XSLT 2.0 implementation

Implemented the xsl:analyze-string instruction, which supports regular expression matching.

Where an embedded expression within an attribute value template yields a sequence of more than one item, the string values of all the items are now output, separated by spaces. This is incompatible with XSLT 1.0, which ignored all but the first node in a node-set. If this causes compatibility problems (a) you can fix it by using the filter [1] after the expression, (b) please let me know: the XSL WG wants to know whether this incompatible change is likely to cause problems in practice.

The elements xsl:variable, xsl:param, and xsl:result may now take a type attribute indicating the required type of the value. The supplied value will be converted to this type if necessary. The value of the attribute is the same subset of the XPath SequenceType production as is implemented for "cast as" and "instance of" expressions: basically, the fixed types such as "item" and "element" and the built-in types such as xs:string and xs:date, followed by an optional occurrence indicator.

Parameters to xsl:function may no longer specify a default value: all arguments must be supplied in the function call.

An xsl:message instruction may now appear inside an xsl:function.

The xsl:text instruction may now contain other instructions, such as xsl:value-of. Pending resolution of issue 132 in the spec, avoid using disable-output-escaping with nested xsl:text elements. The effect is unlikely to be what you expected..

It is now an error to specify the mode or priority attributes on an xsl:template element with no match attribute.

Match patterns using the id() and key() functions can now reference global variables or parameters for the value of the id or key.

The attributes version, exclude-result-prefixes, and extension-element-prefixes may now appear on any element in the XSLT namespace. Note that these attributes are prefixed xsl: when used on a literal result element, but have no prefix when used on an XSLT element.

The attribute [xsl:]default-xpath-namespace is now available on all elements. It defines the defualt namespace to be used for unprefixed element names in path expressions and patterns.

The xsl:apply-templates element now allows mode="#current" and mode="#default". The xsl:template allows the mode attribute to be a list of mode names, optionally including #default to match the default mode.

The disable-output-escaping attribute of xsl:attribute is implemented, replacing the saxon:disable-output-escaping extension, which is no longer available.

The xsl:destination element is renamed xsl:principal-result-document. (This was misdocumented in version 7.1).

Implemented the unparsed-text() function (with the second argument being mandatory).