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.
Some of these features 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.
These extensions need to be explicitly enabled. Use one of the following mechanisms to enable syntax extensions:
- Set the configuration property
ALLOW_SYNTAX_EXTENSIONS (equivalently, use
--allowSyntaxExtensions:onon the command line, or
global/@allowSyntaxExtensions="true"in the configuration file).
- Set the language level to 4.0 in a call to an API method such as
- 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 is to respond rapidly to changes in the developing specification.