XPath 2.0 is Still an “Expression Language”
- When you write XPath 2.0, what you write is an expression
- (7 * 6) is an expression
- /PLAY/ACT/SCENE is another kind of expression (a location path)
- An expression is evaluated to produce an object
- (7 * 6) returns 42
- A location path returns a sequence (list) of nodes
- "XPath" = "difficult" returns
false
- distinct-values((4,5,6,7,6,5,4)) returns
a sequence (4,5,6,7)
- There is an XPath 2.0 subset for pattern matching used in XSLT
2.0.