XPath 3.0 implementation

Support for XPath 3.0 (previously known as XPath 2.1) is provided. To enable this, call setLanguageVersion("2.1") on the s9api XPathCompiler, or equivalent calls on the net.sf.saxon.sxpath.XPathEvaluator. Within XSLT, XPath 3.0 syntax is supported if the version attribute on the principal stylesheet module is set to "3.0". From JAXP XPath interfaces, support for XPath 3.0 is supported by casting the XPath object to net.sf.saxon.xpath.XPathEvaluator and calling xpath.getStaticContext().setXPathLanguageLevel(new DecimalValue("2.1")).

The following features are available when XPath 3.0 is enabled:

The s9api API, together with lower-level APIs for running XPath (including the StaticContext interface) have been enhanced to allow the required type of the context item to be supplied as a property of the static context.