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

# New and Changed Extension Functions

Two new extension functions `saxon:index` and `saxon:find` are available. These are particularly useful in XQuery, where they provide an equivalent to the capability offered by `xsl:key` in XSLT. The functions can also be useful in XSLT, because unlike `xsl:key` they allow any sequence to be indexed, even one that spans multiple documents. The typical usage is first to create an indexed sequence, for example by:

`declare variable $indexedTowns := saxon:index(//town, saxon:expression("@state"));`

and then to retrieve towns whose state is known by using `saxon:find()`:

`{ saxon:find($indexedTowns, "MA") }`

This example finds all `<town>` elements whose `state` attribute has the value `MA`.

These extension functions are available only in Saxon-SA.

If the argument to the function `saxon:expression` is a compile-time constant (typically a string literal), then the XPath expression is compiled at stylesheet compile time and any errors are reported as static errors.

Next