map:build
Returns a map that typically contains one entry for each item in a supplied input sequence.
build($input as item()*, $key as (fn($item as item(), $position as xs:integer) as xs:anyAtomicType*)?:=fn:identity#1, $value as (fn($item as item(), $position as xs:integer) as item()*)?:=fn:identity#1, $options as map(*)?:={}) ➔ map(*)
Arguments | ||||
| $input | item()* | The input sequence | |
| $key | (fn($item as item(), $position as xs:integer) as xs:anyAtomicType*)? | := fn:identity#1 | Function to compute map keys |
| $value | (fn($item as item(), $position as xs:integer) as item()*)? | := fn:identity#1 | Function to compute map values |
| $options | map(*)? | := {} | Options map |
Result | map(*) | |||
Namespace
http://www.w3.org/2005/xpath-functions/map
Links to W3C specifications
XPath 4.0 Functions and Operators
Saxon availability
Available in XPath 4.0, XSLT 4.0, and XQuery 4.0. Requires Saxon-PE or Saxon-EE. Implemented since Saxon 13. Implemented experimentally since Saxon 12. Available for all platforms.
Notes on the Saxon implementation
Available since Saxon 13 in XPath 4.0. An earlier version of the function was available since Saxon 12.0 provided that syntax extensions are enabled.