XQuery Function Documentation
http://www.w3.org/2005/xpath-functions/map
java:org.exist.xquery.functions.map.MapModule
Functions that operate on maps
map:contains #2
map:contains ($map as map(*), $key as xs:anyAtomicType) as xs:booleanTests whether a supplied map contains an entry for a given key.
- Parameters:
$map The map $key The key to look up - Returns:
- xs:boolean
map:entry #2
map:entry ($key as xs:anyAtomicType, $value as item()*) as map(*)Creates a map that contains a single entry (a key-value pair).
- Parameters:
$key The key $value The associated value - Returns:
- map(*)
map:find #2
map:find ($input as item()*, $key as xs:anyAtomicType) as array(*)Searches the supplied input sequence and any contained maps and arrays for a map entry with the supplied key, and returns the corresponding values.
- Parameters:
$input The sequence of maps to search $key The key to match - Returns:
- array(*) : An array containing the found values with the input key
map:for-each #2
map:for-each ($input as map(*), $action as function(*)) as item()takes any map as its $input argument and applies the supplied function to each entry in the map, in implementation-dependent order; the result is the sequence obtained by concatenating the results of these function calls. The function supplied as $action takes two arguments. It is called supplying the key of the map entry as the first argument, and the associated value as the second argument.
- Parameters:
$input The map $action The function to be called for each entry - Returns:
- item()*
map:get #2
map:get ($map as map(*), $key as xs:anyAtomicType) as item()Returns the value associated with a supplied key in a given map.
- Parameters:
$map The map $key The key to look up - Returns:
- item()*
map:keys #1
map:keys ($map as map(*)) as xs:anyAtomicTypeReturns a sequence containing all the key values present in a map.
- Parameters:
$map The map - Returns:
- xs:anyAtomicType*
map:merge #1
map:merge ($maps as map(*)*) as map(*)Returns a map that combines the entries from a number of existing maps.
- Parameters:
$maps Existing maps to merge to create a new map. - Returns:
- map(*) : A new map which is the result of merging the maps
map:merge #2
map:merge ($maps as map(*)*, $options as map(*)) as map(*)Returns a map that combines the entries from a number of existing maps.
- Parameters:
$maps Existing maps to merge to create a new map. $options Can be used to control the way in which duplicate keys are handled. - Returns:
- map(*) : A new map which is the result of merging the maps
map:put #3
map:put ($map as map(*), $key as xs:anyAtomicType, $value as item()*) as map(*)Returns a map containing all the contents of the supplied map, but with an additional entry, which replaces any existing entry for the same key.
- Parameters:
$map The map $key The key for the entry to insert $value The value for the entry to insert - Returns:
- map(*)
map:remove #2
map:remove ($map as map(*), $key as xs:anyAtomicType*) as map(*)Constructs a new map by removing an entry from an existing map.
- Parameters:
$map The map $key The key to remove - Returns:
- map(*)
map:size #1
map:size ($input as map(*)) as xs:integerReturns the number of entries in the supplied map.
- Parameters:
$input Any map to determine the size of. - Returns:
- xs:integer