XPath 3.0 Conformance
Saxon 9.6 implements the XPath 3.0 specification as defined in the Recommendation of 8 April 2014.
The various Saxon editions implement XPath 3.0 capabilities as follows:
-
Saxon-HE implement all of XPath 3.0 features with the exception of schema awareness and support for higher-order functions.
-
Saxon-PE adds support for higher-order functions. Specifically, this means inline function declarations, dynamic function calls, named function items (such as
name#1
), and functions that take functions as arguments or return functions as their result, for examplefn:filter
andfn:function-lookup
. -
Saxon-EE adds support for schema awareness. This includes the ability to handle source documents that have type annotations resulting from schema validation, and the ability to use user-defined type names for example in an "instance of" expression.
New features in XPath 3.0 include the following:
-
String contatenation operator
||
-
Simple mapping operator
!
-
Casting is allowed from a string to a union or list type
-
Union types, provided they meet certain rules, can be used as a
SequenceType
-
Dynamic function call (functions are first class values (items) in the data model)
-
Function literals, for example
substring#2
-
Inline functions, for example
function($i) {$i*$i}
-
Partial application of functions, for example
concat('$', ?)
-
Let expressions (
let $v := expr return f($v)
) -
EQNames (
Q{uri}local
) wherever QNames are allowed
Maps are implemented in XPath 3.0 as described in the XSLT 3.0 specification. This is true whether or not the XPath processor is being invoked in an XSLT context. For details see Maps in XPath 3.0.
For details of the function library supported, see Functions.