map:get

Gets an entry from a map

get($map as map(*), $key as xs:anyAtomicType) ➔ item()*

Arguments

 

$map

map(*)

The input map

 

$key

xs:anyAtomicType

The candidate key

Result

item()*

Details

Namespace: http://www.w3.org/2005/xpath-functions/map

Applies to: XSLT 3.0 only (if enabled in Saxon: requires Saxon-PE or Saxon-EE)

If the candidate key is present in the map, the function returns the corresponding value. Otherwise it returns the empty sequence.

Notes on the Saxon implementation

Available since Saxon 9.4. Currently in namespace http://www.w3.org/2005/xpath-functions/map. Available in XSLT, XPath, and XQuery, whether or not 3.0 is available. Requires Saxon-PE or Saxon-EE. Saxon always compares string-valued keys using the Unicode codepoint collation.