array:for-each

Returns an array whose size is the same as array:size($array), in which each member is computed by applying $function to the corresponding member of $array.

for-each($array as array(*), $function as function(item()*) as item()*) ➔ array(*)

Arguments

 

$array

array(*)

The input array

 

$function

function(item()*) as item()*

The function to be applied to each member of the input array

Result

array(*)

Namespace

http://www.w3.org/2005/xpath-functions/array

Links to W3C specifications

XPath 3.1 Functions and Operators

Saxon availability

Available in XPath 3.1, XSLT 3.0, and XQuery 3.1. From Saxon 10, available in all editions. Implemented in Saxon-PE and Saxon-EE since Saxon 9.7. Available for all platforms.

Notes on the Saxon implementation

Available in Saxon-HE from Saxon 10; in Saxon-PE/EE since 9.7.