SAXONICA

Saxon Documentation
Full Contents
About Saxon
Changes in this Release
| Version 8.7 (2006-02-24)
| Version 8.6.1 (24 November 2005)
| Version 8.6 (3 November 2005)
| Version 8.5.1 (26 August 2005)
| Version 8.5 (2 August 2005)
| Version 8.4 (4 April 2005)
| Version 8.3 (11 February 2005)
| Version 8.2 (21 December 2004)
| Version 8.1.1 (8 October 2004)
| Version 8.1 (24 September 2004)
» | Version 8.0 (1 June 2004)
Conditions of Use
Using XSLT 2.0
Using XQuery
Handling Source Documents
XML Schema Processing
The XPath API
Saxon on .NET
Extensibility
Saxon Extensions
Sample Saxon Applications
The Saxon SQL Extension
XSLT Elements
XPath 2.0 Expression Syntax
Function Library
Standards Conformance

# XQuery changes

The default collation is now defined and used systematically. If no default collation is specified in the Query Prolog, the collation used for string comparisons and for sorting is the collation `http://saxon.sf.net/collation?lang={lang};strength=tertiary` where the value of `lang` is taken from the Java locale.

Pragmas and must-understand extensions are now recognized. With the exception noted below, pragmas are ignored and must-understand extensions are rejected.

A Saxon-specific pragma has been implemented allowing a default value to be specified for a query parameter (external variable). The syntax is illustrated below:

    declare namespace saxon="http://saxon.sf.net/";
    declare variable $x external (:: pragma saxon:default "20" ::);

The default value must be either a numeric literal or a string literal.

Rules concerning the order of declarations in the Query Prolog are now enforced. These rules have been agreed by the Query Working Group, but are not in the current (November 2003) working draft. The rules require "setter" declarations to precede "non-setter" declarations: the "setters" are the declarations of base-uri, xmlspace, validation mode, default namespaces, and default collation.

A new `run()` method has been added to the `XQueryExpression` object. This takes a JAXP `javax.xml.transform.Result` object as an argument, and runs the query sending results to this `Result` object. This method of running a query is likely to be more efficient than the `iterate()` method, because it avoids building the result tree in memory: nodes are serialized as soon as they are created. This method is now the default way in which query results are output when the processor is run from the command line. The results differ from earlier releases in that, for example, freestanding attribute nodes cannot be output in this form.

In the XQuery API, the version of method `QueryResult.wrap` that takes a `NamePool` as an argument is withdrawn; a `Configuration` must now be supplied. The `QueryResult.serialize` method takes a fourth parameter, the `Configuration`.

Next