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

# Extensions

Some performance improvements have been made to the code for calling Java extension functions. Thanks to Wolfgang Hoschek for providing these.

The ability to define user-written functions as memo functions is now available in XQuery as well as XSLT. In XQuery this is achieved by preceding the function decilaration with `declare option saxon:memo-function 'true'`. The effect is that the function caches its results, so if it is called again with the same arguments it returns the remembered result.

The extension function `saxon:serialize()` has been enhanced. As an alternative to the existing format, the second argument may now be a (dynamically-constructed) `xsl:output` element, allowing full access to all serialization properties, and allowing all the properties to be defined dynamically. This works in both XSLT and XQuery.

The use of external object types in namespace `http://saxon.sf.net/java-type` now reflects the Java type hierarchy. For example, if a variable is declared to accept a type of `jt:java.util.List`, then a value of type `jt:java.util.ArrayList` will be accepted, but a value of type `jt:java.util.HashMap` will not. The same applies to the new namespace `http://saxon.sf.net/.net-type` used for external .NET types.

A new extension function `saxon:generate-id()` is available. The semantics are identical to the XSLT function generate-id(): the function returns an ASCII alphanumeric string that uniquely identifies the node supplied as the argument (there must always be exactly one argument). This extension function is made available to provide the same capability as generate-id() in non-XSLT environments, for example in XQuery.

The extension functions `saxon:max()`, `saxon:min()`, and `saxon:sum()`, which have long been deprecated, are now dropped from the product.

In the `saxon:evaluate()` function under XSLT, the default namespace for elements and types is taken from the value of the `xpath-default-namespace` attribute in the stylesheet, if present. Previously it was taken from the default namespace declared using `xmlns="xyz.uri"`, which was a bug. (In XQuery the net effect is no change, because there is only one default namespace.)

The documentation of other extension functions involving sequences of nodes, such as `saxon:leading`, has been changed to reflect the fact that the sequences of nodes on which they operate may contain duplicates and might not be in document order. The implementation of these functions has not been changed, the documentation has been corrected to describe the current behavior.

A new serialization parameter `saxon:supply-source-locator="yes"|"no"` is provided. This is intended for use when sending output to a user-written `ContentHandler` (that is, to a `SAXResult`). The effect of the option is that information is sent to the `Locator` supplied to the `ContentHandler` identifying the position of the context node in the source document. To access this information, the supplied `Locator` must be cast to its implementation class.

Next