Experimental 4.0 extensions
A W3C Community Group is working on proposals for extensions to XPath, XSLT, and XQuery, which could eventually become part of a version 4.0 set of specifications. Details are at https://qt4cg.org.
Some of the new features in these drafts have been implemented experimentally in Saxon. Generally, the features are not available unless you explicitly enable them. They should not be considered stable: the details are likely to change as the design progresses.
In some cases, the community group has agreed new features but Saxon has not yet implemented them. In other cases, Saxon has implemented proposed features that the community group has not yet agreed. In addition, the draft specifications are constantly changing. So the specifications are only an approximate guide to what is implemented in Saxon.
Use one of the following mechanisms to enable syntax extensions:
- Set the configuration property
ALLOW_SYNTAX_EXTENSIONS (equivalently, use
--allowSyntaxExtensions:on
on the command line, orglobal/@allowSyntaxExtensions="true"
in the configuration file). - Set the language level to 4.0 in a call to an API method such as
XsltCompiler.setXsltLanguageVersion()
. - For XQuery, set the language level to 4.0 in the XQuery declaration in the query prolog.
Note: in XSLT, setting version="4.0"
in the stylesheet is not enough. This gives you an
XSLT 3.0 processor running in forwards compatibility mode, rather than an XSLT 4.0 processor.
Like other Saxon extensions, these extensions all require Saxon-PE or higher. They are also available in SaxonCS.
Generally, Saxonica aims to avoid making incompatible changes except in major releases. But the features described in this section are experimental, so this policy does not apply: the aim instead will be to respond rapidly to changes in the developing specification.
Further information: