# 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 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.

Expand | Up Next