fn:filter( $function as function(item()) as xs:boolean, $seq as item()* ) as item()*
Returns those items from the sequence $seq for which the supplied function $function returns true. For more details, see XPath 3.0 Functions and Operators.
Parameters | |
---|---|
function | The function value. |
seq | The function value. |
fn:filter(function($a) { $a mod 2 = 0 }, (1 to 10)) => (2, 4, 6, 8, 10)