XQuery 3.0 implementation

The term XQuery 3.0 is the new proposed name for the language currently published as a W3C working draft under the title XQuery 1.1.

In the absence of an xquery version declaration in the query prolog, Saxon now permits XQuery 3.0 syntax if it is enabled from the command line or API. An xquery version declaration that specifies version="3.0" is accepted only if XQuery 3.0 has been enabled from the command line or API.

The syntax for production AnyFunctionItem is now function(*) rather than function(). For backwards compatibility with Saxon 9.2, the older syntax continues to be supported for the time being.

The new switch expression is implemented.

The custom syntax for partial function application (for example concat("[", ?, ", ", ?, "]") is implemented. (For the time being, the partial-apply() function remains available as well.)

The syntax for "outer for" has been changed (W3C bug 6927). In place of "outer for $x in E", write "for $x allowing empty in E".

In a FLOWR expression, the where clause can now be repeated. (The construct where X where Y is simply another way of writing where X and Y.)

The new context-independent QName syntax "uri":local is recognized if XQuery 3.0 is enabled.

The qualifiers deterministic, nondeterministic, public, and private are now recognized on function declarations. However they currently have no effect.

On the net.sf.saxon.Query command line interface, the -traceout option now governs the destination of trace output from the standard TraceListener (-T option) as well as from the trace() function. The -TP option (for timing profile information) is extended so a filename can be specified: -TP:filename.