SAXON home page

Changes in this Release

This file describes changes for versions 7.0 and later. For changes prior to version 7.0, see

Changes in version 7.5 (2003-05-02)

Defects Cleared

The following bugs are fixed in this release:

687946 An internal error may occur when the key function is used on the right-hand-side of the / operator in a path expression.

689934 A ClassCastException occurs when comparing two values that are not comparable according to XPath 2.0 rules, for example string and integer.

690736 An IllegalStateException may occur when a sequence-valued variable is promoted by the optimizer to move it outside a predicate. The specific message is: java.lang.IllegalStateException: evaluateItem called on non-singleton variable reference at net.sf.saxon.expr.VariableReference.evaluateItem(

700837 An expression that uses a range variable (for example, a for or some expression) cannot be used within a predicate in an XSLT pattern.

706935 A NullPointerException occurs when processing an expression of the form //x[$var] or .//x[$var].

708789 When two or more items have sort keys that evaluate to the empty sequence, the resulting sort order is incorrect.

708998 Incorrect recovery action when xsl:copy-of generates a non-text node in the value of an attribute, comment, or processing instruction.

709347 An empty sequence is not being converted to an empty string when calling a function in backwards compatibility mode.

710093 The value of position() is calculated wrongly when navigating an axis on a JDOM tree.

721687 Crash in XPathEvaluator (Java XPath API) due to incorrect generation of type-checking code.

722537 Saxon crashes if an attribute is marked as an ID but is not a valid ID, which can happen when using a non-validating parser.

Withdrawn Facilities

I have finally dropped support for the old Java-only event-driven API. This was starting to interfere with the ability to optimize XSLT processing. The XPath interfaces remain available. Indeed, all the internal APIs remain available, but I am no longer trying to keep them as simple or as stable as is necessary for a supported external API. There were serious bugs in the sample application in Saxon 7.4 that somehow didn't show up in testing; this sample application has now been dropped.

I have also finally been forced to drop preview mode. It no longer works because the optimizer is becoming too clever. The optimizer uses lazy evaluation of expressions, which relies on the fact that the source document is immutable; preview mode violates this assumption. The correct way to handle this requirement is to write a document splitter as a SAX filter, breaking the source document into small pieces and invoking one transformation for each piece.

The deprecated extension functions get-user-data() and set-user-data() are no longer documented, though they have not yet been deleted from the product.

XSLT Changes

The required="yes|no" attribute on xsl:param is implemented. Currently, failure to supply a required parameter is a dynamic error, it is never detected statically. {ntmp01, ntmp901err}

The xsl:next-match instruction is implemented. {cnfr24-27}

The error that occurs when the name attribute of xsl:element or xsl:attribute contains an undeclared prefix (in the absence of the namespace attribute) is now recoverable. This brings it into line with the handling of other errors in this value. Note however that if the name is known statically then the error is reported at compile time and is fatal.

The error that occurs when a namespace or attribute node is written using xsl:copy-of, when there is no open element start tag, is now recoverable. This brings it into line with other instructions such as xsl:attribute and xsl:copy. {copy62}

Sequence Construction in XSLT

Implemented the new facility to allow construction of sequences in XSLT, when a variable binding element has content and an as attribute.

Added the as attribute to xsl:function. {func20}

Implemented the xsl:sequence instruction, including the as attribute which checks the type of the returned sequence and performs any necessary (and permitted) conversions. {seqNNN}

The xsl:result element is withdrawn. It can always be replaced by xsl:sequence. The as attribute, which denotes the return type of the function, should preferably be moved to the xsl:function element.

Parentless attribute, text, comment, processing-instruction, and namespace nodes are implemented. They are probably a little fragile - some operations on such nodes (e.g. xsl:number, xsl:apply-templates) have not been tested. The new rules for match patterns with parentless nodes have not been implemented: it's probably best to avoid using apply-templates on such nodes for the moment. {seqNNN}

Some instructions, e.g. xsl:value-of, incorrectly generate multiple text nodes, some other instructions may pre-merge the text nodes.

Handling of document nodes within the constructed sequence is probably not yet correct.

The separator attribute of xsl:copy-of is withdrawn.

Revised syntax for validating result trees

The 2 May 2003 WD changes the syntax for attaching type annotations to nodes in a result tree. These facilities are only partially implemented in Saxon, and no new functionality is provided in this release, but the existing functionality has been converted to use the new syntax. Specifically: