XSLT 2.0 implementation

Some changes have been made to the format-date() family of functions:

The rules for processing in forwards-compatible mode have been aligned with the changes that first appeared in the XSLT 2.0 draft of 15 September 2005. The main effect of these changes is to remove the rule that static errors (for example in XPath expressions) are not reported if the instruction is not executed. This means that if you want to mark sections of the stylesheet for use under a future version of XSLT, you should use the new compile-time [xsl]:use-when construct, rather than relying on forwards compatible processing mode.

In the format-number() function, Saxon now rounds numbers up or down to eliminate spurious non-zero digits, provided that the resulting number is still equal to the original when converted back to a double. For example, this means that a number such as 1E22 is output as 100,000,000,000,000,000,000,000 rather than 99,999,999,999,999,991,611,392. Both these numbers produce 1E22 when converted back to a to double, and the latter number is the one produced by double-to-decimal conversion, because it is the one closest to the true value of the double.

In xsl:decimal-format, Saxon now checks that the character specified as the zero-digit is indeed classified in Unicode as a digit with numeric value zero. Previously it took this on trust. Note that this means that certain sensible values which were previously allowed are no longer allowed, for example x2080, SUBSCRIPT ZERO.

Using the built-in types that are not allowed by a Basic XSLT Processor (such as xs:int, xs:token) in Saxon-B now results in a hard error rather than a warning as previously.

In the past, calls on xsl:result-document were disallowed whenever calls on extension functions were disabled: the assumption being that the stylesheet is untrusted and therefore should not be allowed to write to file locations using a relative URI. This restriction now applies only for an xsl:result-document instruction with an explicit href attribute.

The format attribute of xsl:result-document is now an attribute value template.

Attributes that contain a collation name (specifically the collation attribute of xsl:sort, xsl:key, and xsl:for-each-group; the [xsl:]default-collation attribute wherever it appears; and the name attribute of saxon:collation) now require the collation name to be a valid URI. If it is a relative URI then it is resolved against the base URI of the element where it appears.

The restriction that stylesheets cannot be compiled if they contain calls on saxon:evaluate() has been removed.

Conformance documentation has been added: see Conformance.