# XSLT 2.0 conformance

This release of Saxon implements many facilities defined in the draft XSLT 2.0 specification. This implementation is not yet complete, though most features defined in the working draft of 5 November 2004 are available. Some minor changes agreed by the Working Group since that publication have also been implemented.

Saxon-B 8.x acts as a Basic XSLT Processor, while Saxon-SA 8.x acts as a Schema-Aware XSLT Processor. The distinction is that a Basic XSLT Processor does not allow schemas to be imported and does not support validation of source or result documents or reference to user-defined types. These correspond to the two conformance levels defined in the XSLT 2.0 specification.

The XSLT 2.0 specification defines two optional conformance features, the serialization feature and the backwards compatibility feature. These optional features are implemented in both Saxon variants.

Known restrictions, relative to the conformance rules for a basic XSLT processor, include the following:

- The `xsl:output` option `normalize-unicode` is not implemented.

- The `xhtml` output method does not follow all the rules for XHTML formatting in the serialization specification.

- If `key()` is called in a match pattern, the argument must be a string literal.

- When the source document is supplied as a pre-built tree (in any format), Saxon strips whitespace text nodes as requested by the stylesheet, but takes no account of any `xml:space` attributes present in the tree.

- Not all the error codes defined in the specification are used.

- The rule that in forwards compatibility mode, an optional attribute should be ignored if its value is not one of the values that is allowed for the attribute, is not implemented. (At any rate, it is not implemented for all such cases).

- Error XT1650 is not reported. A static error should be reported if there are two conflicting `xsl:output` declarations; Saxon simply uses the last one in declaration order.

In the schema-aware XSLT processor, the following restrictions apply:

- The `type` attribute of `xsl:document`, `xsl:result-document`, and instructions that copy document nodes, is not implemented.

- Error XT0485 is not reported. This error prevents the construction of an element that has two QName-valued attributes using the same prefix to refer to different URIs.

- When a namespace-sensitive attribute value (typically, a QName) is validated, checking of the namespace prefix is deferred until the attribute is added to an element and the full namespace context of the element is known. If the element itself uses `validation="strip"`, then the type annotations are removed before the attribute has been fully validated, so an invalid prefix will not be reported as an error.

- The distinction between the types `xdt:untyped` and `xs:anyType` is not fully implemented.

Expand | Next