XSLT 2.0 implementation
The warning that is issued when a stylesheet that specifies
version="1.0" is now suppressed
by default when the transformation is run via an API rather than from the command line. The default can be changed
Configuration.setVersionWarning(true). User feedback suggests that this warning is often
an irritant and there are environments where it is hard to suppress it. The XSLT specification says that the warning
SHOULD be produced unless the user has requested otherwise; therefore be informed that calling the Saxon API without setting
this switch counts as "requesting otherwise".
Tail call optimization is now implemented for
xsl:next-match as well as
xsl:apply-templates. This caters for mutual recursion involving a mixture of these three instructions.
type-available() function can now be used to check for the availability of Java classes. For example
type-available('jt:java.util.HashMap') returns true, where the prefix
jt is bound to the URI
The system property
xsl:supports-namespace-axis, introduced in erratum E14, is now recognized (and returns the
xsl:number, the specification classifies characters as alphanumeric if they are in one of the Unicode
categories Nd, Nl, No, Lu, Ll, Lt, Lm or Lo. Saxon was previously using the Java method
which turns out not to be precisely equivalent to this definition. This has been corrected.
An additional option
-xsd:schemadoc1.xsd;schemadoc2.xsd... is available on the command line. This supplies
a list of additional schema documents to be loaded. These are not automatically available in the static context of the stylesheet, but they
are available for use when validating input documents (or result documents). The argument can also be used to supply the schema
location of a schema document imported by the stylesheet, in the case where the
refers only to the target namespace of the schema and not to its location.
An additional command line option
-traceout allows the output from the
trace() function to be directed
to a file, or to be discarded. A corresponding option is available in the API (classes
A new extension instruction
saxon:iterate is available experimentally, with subsidiary instructions
saxon:finally. This is designed partly for easier coding of operations
that otherwise require explicit recursion, but mainly to enable streamed processing of input files. For details see
The code supporting the creation and testing of patterns, as defined in XSLT, has now been decoupled from
the XSLT engine, allowing patterns to be used in a non-XSLT environment (for example, in an XProc processor).
Java APIs for invoking this functionality have been added to the
s9api.XPathCompiler classes. These APIs compile the pattern into an object that masquerades as an XPath expression;
when evaluating this expression, the result is true if the pattern matches the context node, false if it does not.
The AntTransform task, a customized Ant task for invoking Saxon XSLT transformations, is no longer issued as an intrinsic part of the Saxon product, but can be downloaded as a separate package from SourceForge: see https://sourceforge.net/project/showfiles.php?group_id=29872.