XQuery 3.0 Conformance
Saxon 9.6 fully implements the XQuery 3.0 specification as defined in the Recommendation of 8 April 2014.
See also XPath 3.0 Conformance; all the new features implemented for XPath 3.0 are also available in XQuery 3.0.
The various Saxon editions implement XQuery 3.0 capabilities as follows:
-
Saxon-HE implements XQuery 3.0 at the Minimal Conformance level, plus the Module Feature and the Serialization Feature.
-
Saxon-PE adds support for the Higher-Order Function Feature.
-
Saxon-EE adds support for the Schema Aware Feature and the Typed Data Feature.
The precise definition of these optional features is contained in the conformance section of the XQuery 3.0 specification.
Saxon does not implement the Static Typing Feature.
New facilities in XQuery 3.0, beyond those in XPath 3.0, include the following:
-
Group by clause in FLWOR expressions
-
Tumbling window and sliding window in FLWOR expressions
-
Count clause in FLWOR expressions
-
Outer joins, represented by the syntax
allowing empty
in a FLWOR expression -
Try/Catch expressions
-
Private functions and variables
-
Switch expressions
-
Computed namespace constructors
-
Output declarations to control serialization
-
Decimal format declarations to control use of the
format-number
function -
Validation against a named type
-
Default values for external variables
Maps are implemented in XQuery 3.0 as described in the XSLT 3.0 specification.
For details of the function library supported, see Functions.
Saxon acts either as an XQuery 1.0 or an XQuery 3.0 processor. In Saxon 9.6, XQuery 3.0 processing becomes the default; a 1.0 processor can be requested on the command line or via the Java or .NET API.