# XPath 2.0 conformance

This release of Saxon implements the full XPath 2.0 grammar as defined in the working draft of 12 November 2003, with changes to operator precedences agreed subsequently in response to public comments.

The known restrictions in XPath 2.0 support include the following:

- Saxon supports all the built-in data types.

- The state of implementation of all the standard functions is as described in functions.html

- Support for the type `xs:duration` goes beyond what the specification allows. Ordering is implemented as a total order over all durations, based on the average length of a month (one year = 365.242199 days).

- Timezone offsets are limited to the range -12:00 to +12:00. XML Schema specifies -14:00 to +14:00. This limit is apparently imposed by the JDK 1.4 implementation, though it is not documented.

- The error codes defined in the specification are not used.

- The construct `document-node(element(N, T))` is not supported within an `AxisStep`

- In the construct `element(N, T)` or `element(*, T)` the optional question mark after the type name (previously the keyword "nillable") is not supported.

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.

Expand | Next