XSLT 3.0 conformance
The XSLT 3.0 specification is far from complete, so at the time of writing it is not meaningful to discuss conformance in fine detail.
Broadly speaking:
-
Saxon-HE does not implement any XSLT 3.0 features.
-
Saxon-PE implements a selection of XSLT 3.0 (and XPath 3.0) features, with the exception of schema-awareness and streaming.
-
Saxon-EE implements additional features relating to streaming (processing of a source document without constructing a tree in memory.
For information on streaming, see Streaming of large source documents.
At the time of writing, the latest published working draft is XSLT 3.0 published on 10 July 2012. Since then the WG has produced many internal drafts, and some of the new features appear in Saxon 9.5 ahead of publication by W3C.
XSLT 3.0 features are not available unless explicitly requested. The request can be by setting -xsltversion:3.0
on the command line, by calling setXsltLanguageVersion()
on the XsltCompiler
object, or by use of the configuration setting
FeatureKeys.XSLT_VERSION
. Setting version="3.0"
on the xsl:stylesheet
element is recommended, but is not sufficient on its own.
The exception to the above is that new functions in separate namespaces (the map
and math
namespaces in particular) do not require XSLT 3.0 to be enabled, since a conformant 2.0 processor can handle them as extension
functions.
When XSLT 3.0 is activated, XPath expressions in the stylesheet may use all constructs defined in the Candidate Recommendation XPath 3.0 draft of 29 January 2013.
Additional XSLT 3.0 features implemented in Saxon 9.5 include the following:
-
The
xsl:iterate
instruction -
The
xsl:mode
declaration -
The
xsl:merge
instruction -
The
xsl:try
instruction -
The
xsl:evaluate
instruction -
The
xsl:stream
instruction (Saxon-EE only) -
The
xsl:accumulator
declaration -
The
xsl:assert
instruction -
The
xsl:map
andxsl:map-entry
instructions -
The
select
attribute of thexsl:copy
instruction -
The
bind-group
andbind-grouping-key
attributes of thexsl:for-each-group
instruction -
The
composite
attribute of thexsl:for-each-group
instruction -
The
static
attribute of thexsl:variable
andxsl:param
declarations -
The
[xsl:]on-empty
attribute ofxsl:element
,xsl:copy
,xsl:attribute
, and literal result elements -
The
copy-of
andsnapshot()
functions -
The syntax of patterns has been generalized; most of the new XSLT 3.0 features are implemented but the implementation may be incomplete.
Maps, as defined in the draft XSLT 3.0 specification, are implemented as an extension to XPath 3.0. For details see Maps in XPath 3.0.
Some of the new XSLT 3.0 features that are NOT yet implemented include:
-
Packages
-
The
xsl:context-item
declaration -
The
xsl:fork
instruction (there is a partial implementation but it is not usable) -
The
composite
attribute of thexsl:key
declaration