SAXONICA

Saxon Documentation
Full Contents
About Saxon
Changes in this Release
Conditions of Use
Using XSLT 2.0
Using XQuery
Handling Source Documents
XML Schema Processing
The XPath API
Saxon on .NET
Extensibility
Saxon Extensions
| Introduction
| EXSLT Extensions
| Extension attributes (XSLT only)
| Additional serialization parameters
» | Extension functions
| Extension instructions
Sample Saxon Applications
The Saxon SQL Extension
XSLT Elements
XPath 2.0 Expression Syntax
Function Library
Standards Conformance

# saxon:find()

find(indexed-sequence, key-values)

The first argument must be an indexed sequence created using the function saxon:index(). This will invariably be provided in the form of a variable reference. The type of this object is `{http://saxon.sf.net/java-type}com.saxonica.extra.IndexedSequence`

If the second argument is omitted, the function returns the entire indexed sequence, that is, the value passed to the first argument of `saxon:index()`.

Otherwise, the second argument is any expression. The result of this expression is atomized to produce a sequence of atomic values. The result of the function consists of all items in the indexed sequence that match one or more of these atomic values. Duplicates are not removed. The order of the result is sorted first by the position of the key value within the sequence of key values, and then by the order of the result items within the indexed sequence.

If a key value is of type `xdt:untypedAtomic`, it is treated as a string. Values are matched according to the rules of the `eq` operator. This means, for example, that if the indexed values are numbers, then the key value must be supplied as a number.

For examples of use, see saxon:index().

The `saxon:find` function is available only with Saxon-SA.

Next