Functions, operators, and data types for XPath 2.0

The fn:dateTime function has been changed so that if either argument is an empty sequence, the result is an empty sequence. This implements a late change to the specification: see W3C bugzilla entry 3651.

The old xdt namespace is no longer supported. (The types previously in this namespace are now in the XML Schema namespace http://www.w3.org/2001/XMLSchema).

A new extension function saxon:sort has been introduced to allow sorting in free-standing XPath applications. There are two variants: a single argument version which simply sorts a sequence of nodes or atomic values on the value itself (after atomization in the case of a node), and a two-argument version whose second argument is an expression (obtained by calling saxon:expression()) that is used to calculate the sort key.

An enhancement to the saxon:transform extension function allows parameters to be supplied to the transformation. This is done by introducing an optional parameter whose value is a sequence of nodes (typically elements): the name of the node is used as the name of a parameter, and the atomized value of the node is used as the value of the parameter.

The Saxon-SA extension functions saxon:index and saxon:find have been rewritten to use the same indexing logic as is used for implicitly-created indexes. A consequence is that the order of results (which has never been well-defined) may be different from before.

The function iri-to-uri() now escapes ASCII characters that are disallowed in an IRI value, specifically the characters space, double-quotation-mark, less-than, greater-than, backslash, circumflex, grave accent, left curly brace, vertical bar, and right curly brace.