XML technologies / XPath / XPath 2.0: language reference / XPath: expressions, operators and keywords
(Excerpt from "XSLT 2.0 & XPath 2.0" by Frank Bongers, chapter 4.)
An XPath expression may contain any number of subexpressions combined through operators or keywords. Comments must also be possible within subexpressions. Depending on the operators or keywords, we distinguish:
Arithmetic expressions:
Combining subexpressions with arithmetic operatorsComparison expressions:
Combining subexpressions with comparison operatorsLogical expressions:
Combining subexpressions with logical operatorsSequence-type operators:
Testing type membership or convertibility, and converting typesConditional expressions:
Expressing IF-ELSE conditions in XPath expressionsQuantified expressions:
Testing XPath expressions against quantity rulesLoop expressions:
Expressing FOR loops in XPath expressionsCombining sequences:
Union, intersection and difference of two sequencesComments:
Explanations within XPath expressions
For completeness, two further concepts should be mentioned here. They are explained in detail in their own sections later:
Path expressions:
These construct sequences according to the processing focus.Sequence expressions:
These create sequences or describe their composition for testing.
Copyright © Galileo Press, Bonn 2008
You may print the online version for private use.
Otherwise, this chapter from "XSLT 2.0 & XPath 2.0 ― Das umfassende Handbuch" is subject to the same terms as the bound edition: the work and all its parts are protected by copyright. All rights reserved, including reproduction, translation, microfilming, storage and processing in electronic systems.
Galileo Press, Rheinwerkallee 4, 53227 Bonn