set:leading

Returns the nodes in the node set passed as the first argument that precede, in document order, the first node in the node set passed as the second argument. If the second node set is empty, then the first node set is returned.

leading($nodes1 as item()*, $nodes2 as item()*) ➔ item()*

Arguments

 

$nodes1

item()*

First node set, in document order

 

$nodes2

item()*

Second node set, in document order

Result

item()*

Namespace

http://exslt.org/sets

Links to specifications

EXSLT Sets Module

Saxon availability

Requires Saxon-PE or Saxon-EE. Available for Java and C/C++ only (not .NET).

Notes on the Saxon implementation

Saxon does not implement the EXSLT rule "If the first node in the second node set is not contained in the first node set, then an empty node set is returned." This rule prevents a pipelined implementation. Saxon returns all nodes that precede the first node of the second node-set in document order, whether or not the two node-sets intersect.