SAXONICA

Saxon Documentation
Full Contents
About Saxon
Changes in this Release
| Version 8.9 (2007-02-12)
| Version 8.8 (2006-09-05)
| Version 8.7.3 (2006-06-13)
| Version 8.7.2 (2006-04-19)
| Version 8.7.1 (2006-04-13)
| 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
XPath API for Java
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 in XPath 2.0 Processing

Namespace URIs have been updated as defined in the October 2004 draft specifications: for example `http://www.w3.org/2004/10/xpath-functions` and `http://www.w3.org/2004/10/xpath-datatypes`.

The right-hand operand of the "/" operator can now be an expression of any type. (The left-hand operand must still return nodes, which means that in a path expression, every step except the last must return nodes.) If the expression returns atomic values, no sorting into document order or removal of duplicates takes place. A type error occurs if the returned value contains a mixture of nodes and atomic values. This facility allows expressions such as `sum(//item/(@price * @qty)), eliminating the need for range variables in many situations.`.

The revised rules for backwards compatible processing in general comparisons have been implemented. These are much closer to the XPath 1.0 rules. Most notably, an expression such as `@price > @discount` where both attributes are untyped is now a numeric comparison rather than a string comparison. Backwards-compatible mode is invoked in an XSLT stylesheet specifying `version="1.0"`.

The revised rules for backwards compatibility in arithmetic expressions have been implemented. The main changes are (a) numeric arithmetic always produces an `xs:double` result (never an integer or a decimal - except in the case of the `idiv` operator), (b) arguments that can't be converted to a number generate NaN (rather than an error or an empty sequence).

Compile-time warning messages are now produced for steps in path expressions that can never retrieve any nodes, for example `child::text()` if the context node is an attribute, or `..` if the context node is a document node.

Next