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

# Changes to XQuery

The new syntax `declare variable $x := expr;` is supported in the query prolog. For the time being the old syntax `declare variable $x { expr };` is also supported.

A constructed element no longer inherits the namespaces of its new parent. Note that this is equivalent to `inherit-namespaces="no"` in XSLT. The difference will probably not be noticeable unless the result is serialized with `version="1.1" undeclare-namespaces="yes"`. (Since this change was implemented, the XQuery WG has decided to add a declaration to the Query prolog to control whether namespaces are inherited, with the default being "yes". Saxon has not yet implemented this change.)

XML-like entity references and character references are now recognized in the fixed text portions of attribute values within a direct element constructor, for example, `<a ampersand="&amp;"/>`

Attribute values within direct element constructors may now double the delimiting quotation mark to represent itself, for example `<quote phrase="She said, ""I won't"""/>`.

The extension functions `saxon:evaluate`, `saxon:expression`, and `saxon:eval` are now available under XQuery as well as XSLT.

The syntax for `declare ordering` in the Query Prolog, and for the `ordered{}` and `unordered{}` expressions, is accepted. In Saxon these currently have no effect on the result of the query: the result order will always be predictable. (Since `unordered` allows the results to be delivered in any order, this is a conformant implementation).

It is now possible to have two functions with the same name, provided they have different arity (number of arguments).

Values of external variables supplied on the command line are now treated as `untypedAtomic` values rather than strings. This means they will automatically be cast to the required type. For example, if $p has a required type of `xs:integer`, you can now specify `p=3` on the command line, whereas this would previously have given a type error.

Line endings within the character content of a direct element constructor are now normalized (according to the XML 1.1 rules). In particular, the Windows line ending CRLF is treated as equivalent to a single newline character.

Invalid content in a computed comment or processing instruction is now a fatal error.

The default collation if none is specified in the query prolog is now the Unicode codepoint collation (it was previously a collation based on the Java locale).

The query prolog may now contain the declaration `declare default order empty greatest|least`.

Some of the new extension functions described below, such as `saxon:for-each-group`, `saxon:analyze-string`, and `saxon:format-date` will be of particular interest in XQuery as they provide capabilities missing from the W3C language specification.

Next