Using XPath 3.1 in Assertions

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 is new in Saxon 9.8.0.5.

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