XSLT 2.0 implementation

XHTML output is now selected automatically if the first element in the result tree has local name "html" and namespace URI "http://www.w3.org/1999/xhtml".

Grouping facilities (xsl:for-each-group) have been rewritten. Grouping keys may now be of any data type that supports equality comparison. Previous Saxon releases converted the values to strings before comparing; they are now compared according to the rules for their native data type. (There are actually very few cases where this gives a different answer: one such case is when comparing dates in different timezones). The function current-grouping-key() is supported. When using the group-by attribute, an item in the population may now be assigned to zero or more groups. The collation attribute is now available to define how string-valued keys should be compared; the default is Unicode codepoint collation. The new implementation offers better pipelining in cases where no sorting is needed (though it is not completely serial: for example with group-adjacent, the contents of one group of adjacent elements will be held in memory at any one time). {group020-025}

The specification says that it is an error when the set of grouping keys is heterogeneous (for example, a mixture of strings and numbers). Saxon currently detects this error in the case of group-adjacent, but does not detect it for group-by -- non-comparable values are simply treated as being not equal.

Added support in the system-property function for the new properties xsl:is-schema-aware, xsl:supports-serialization, and xsl:supports-backwards-compatibility. The xsl:version property now returns 2.0, reflecting the fact that Saxon is now close to achieving full conformance with the draft 2.0 specification.