Chapter 7. XPath Fundamentals
This chapter defines some fundamental features of the XPath language. The first half of the chapter describes the basic syntactic and lexical conventions of the language, and the second half describes the important notion of context: this establishes the way in which XPath expressions interact with the environment in which they are used, which for our purposes primarily means the containing XSLT stylesheet.
The complete grammar of the language is summarized in Appendix A, and for convenience I have split the constructs of the language across five chapters, as follows:
Notation used for describing the grammar
Overall structure of the language
Lexical rules (including comments and whitespace handling)
Context item expression
Value comparison operators:
General comparison operators:
Node identity and ordering operators:
Steps and axes
Union, intersect, and except operators
Sequence concatenation operator:
Numeric range operator:
As with other programming languages, the syntax is defined in a set of production rules. Each ...