Saxon extensions to the W3C XSLT/XQuery specifications

Changes to EXPath functions

The implementations of the EXPath binary and file module functions have been updated to conform to the new 4.0 specifications. Changes apply whether or not 4.0 is enabled.

Dropped experimental features

Some proposed enhancements that didn't survive into the current 4.0 draft specifications have been dropped:

Dropped or changed extension functions

Some Saxon extension functions that were essentially prototypes of near-identical XPath 4.0 functions are dropped:

The undocumented functions saxon:create-map and saxon:map-as-sequence-of-maps are dropped.

The extension functions saxon:line-number and saxon:column-number now return an empty sequence if the argument value is an empty sequence.

New extension functions

The new functions saxon:compose and saxon:generate-sequence are implemented.

Dropped or changed XSLT extensions

A new vendor option has been added to the fn:transform function. Setting the option saxon:write-result-documents to true() changes the way the output of xsl:result-document instructions is handled. Instead of being returned in the result map returned by fn:transform, they are handled by the result document handler registered with the primary transformation, or the default result document handler otherwise: this has the effect of writing the secondary results directly to filestore.

The saxon:array and saxon:array-member instructions are dropped in favour of their XSLT 4.0 counterparts, xsl:array and xsl:array-member. Note that the XSLT 4.0 specification for xsl:array has changed to drop the composite attribute, and add the for-each attribute.

The saxon:item-type instruction is dropped, superseded by xsl:item-type from the XSLT 4.0 specification.

The saxon:as extension attribute is deprecated; the standard as attribute can now be used in its place.

The xsl:map/@saxon:on-duplicates extension attribute is no longer supported, it is replaced by the regular XSLT 4.0 attribute xsl:map/@duplicates. Similarly the saxon:on-duplicates option of the map:merge function is replaced by the regular 4.0 option duplicates.

The xsl:accumulator-rule/@saxon:capture extension attribute is deprecated; it is replaced by the regular XSLT 4.0 attribute xsl:accumulator-rule/@capture.

The extension instruction saxon:tabulate-maps is dropped, as it depends on features like pins and labels that were proposed for XPath 4.0 but subsequently replaced by JNodes. Practical use cases for saxon:tabulate-maps can readily be rewritten to use JNode-based path expressions: the example previously in the documentation:

<saxon:tabulate-maps root="parse-json($input)" select="?*?cities?*"/>

might become:

<xsl:variable name="root" select="parse-json($input) -> jtree()"/> <xsl:select> array { for $e in $root/*/cities/* return map:merge(($e, {'_keys': array { ancestor-or-self::* ! jkey() } }, ancestor::map(*)/child::type(xs:anyAtomicType) )) } </xsl:select>