XPath 2.0 implementation
Operator precedences have changed. They are now aligned with the internal 12 January 2004 draft, except that unary "+" and "-" bind more tightly than anything except "/".
The implementation of the eq
family of operators has been brought into line
with the latest specifications. In particular, an untypedAtomic value is now converted to a string,
no longer to the type of the other operand. At compile time, a warning rather than an error is now produced
if the static types of the two operands are incomparable but both optional: technically, comparison of
xs:integer?
to xs:string?
is not a static error, because in the case where
both operands evaluate to an empty sequence, the comparison is legitimate (and returns ()
).
The SequenceType syntax empty()
is now implemented.
The syntax for SequenceTypes incorporates some changes agreed by the W3C Working Groups but
not yet published. Specifically, element(N)
matches any element named N whether or not
N is declared in a schema; element(*)
matches any element; element(N, T)
matches any element named N whose type annotation is T, where T is a simple or global type defined in
a schema, or a built-in type; schema-element(N)
matches an element
whose name is N, or a name in the substitution group of N, where N is a global element declaration
in the schema, and whose type matches the type of this global element. And similarly for attributes.