saxon:index-where
Returns the index positions (starting at 1) of those items from the sequence $seq
for which the supplied function $f
returns true.
index-where($seq as item()*, $f as function(item()) as xs:boolean) ➔ item()*
Arguments | |||
| $seq | item()* | The sequence to be searched |
| $f | function(item()) as xs:boolean | The predicate function (used to test each item in the sequence) |
Result | item()* |
Namespace
http://saxon.sf.net/
Notes on the Saxon implementation
Available in Saxon-PE/EE since 10.
Details
For example, saxon:index-where(("London", "Rome", "Berlin", "Paris"), function($x){string-length($x)=6})
returns (1, 3)
.