Using XPath 3.1 in assertions

From Saxon 9.9 the XPath version used can be configured using the configuration property XPATH_VERSION_FOR_XSD.

If the attribute saxon:extensions="any-xpath-version" is present on the xs:schema element of a schema document, then XPath expressions used within assertions and conditional type assignments within that schema document are allowed to use XPath 3.1 syntax. By default, only XPath 2.0 is allowed. This feature was new in Saxon 9.8.0.5.

The saxon:extensions attribute is a whitespace-separated list of keywords.