XPath 2.0 implementation
The precedence of different expressions in the XPath grammar has been aligned with the August 2002
working draft. This meant making a few changes: range expressions (such as 1 to 10
) now bind more
tightly than conditional expressions; all comparison operators now have the same precedence, and consecutive
operators (as in a = b = c
) are not allowed; unary minus binds more tightly than union;
cast and treat expressions are no longer allowed as steps in a path expression. Saxon implements
the full XPath 2.0 grammar with the exceptions of the validate
expression and schema-related
aspects of the SequenceType
production.
Removed the ability to do a "mapping cast", that is, to cast a sequence as a sequence. This functionality went beyond the semantics of cast as defined in the XPath 2.0 specification. The argument and result of a cast must now be a singleton, and if the input is an empty sequence, the output is an empty sequence. The actual conversion rules still need some work to align them fully with the evolving XPath specification.