XQuery 1.0 implementation
The command line interface by default no longer wraps the result sequence into an XML document with a
result:sequence
as its outermost element. This wrapping can still be achieved using the
-wrap
option on the command line. The default output format is now to output each item
in the result sequence independently. If the item is a document node or an element node then it is
serialized as XML. It it is anything else, then its string value is output on a new line.
This format is much more useful when the query is designed to produce a single XML or HTML document.
Note that you can specify !method=html
on the command line to invoke HTML rather than
XML serialization.
A number of other changes and extensions have been made to the command line options for the
net.sf.saxon.Query
command. See Using XQuery for details.
Query execution can now be traced using the -T
option. (Though the actual output is
still rather XSLT-oriented). Note that line numbers for some expressions currently indicate where the
expression ends (though for the more complex expressions such as element constructors and FLWOR
expressions, it shows where it starts).
I have added support for the document{}
constructor. (This is implemented using an internal
instruction representing a conceptual xsl:document
instruction, which is also now used for
producing temporary trees in XSLT.)
Computed element and attribute constructors now accept the name as a value of type xs:QName
as an alternative to xs:string
.
Added extra validation of numeric character references, and support for characters above Unicode 65535 (surrogate pairs).
Improvements have been made in error messages, particularly for run-time errors. Many of these changes should also benefit XSLT users.