Map Module

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

This module is statically bound to the prefix "map".

Description

The functions defined in this section use a conventional namespace prefix map, which is assumed to be bound to the namespace URI http://www.w3.org/2005/xpath-functions/map.

A map is an additional kind of item.

A map consists of a set of entries. Each entry comprises a key which is an arbitrary atomic value, and an arbitrary sequence called the associated value.

Functions

map:contains


Signature
map:contains($map as map(*), $key as xs:anyAtomicType) as xs:boolean
Description

Tests whether a supplied map contains an entry for a given key

back to top

map:entry


Signature
map:entry($key as xs:anyAtomicType, $value as item()*) as map(*)
Description

Returns a map that contains a single entry (a key-value pair).

back to top

map:find


Signature
map:find($input as item()*, $key as xs:anyAtomicType) as array(*)
Description

Searches the supplied input sequence and any contained maps and arrays for a map entry with the supplied key, and returns the corresponding values.

back to top

map:for-each


Signature
map:for-each($map as map(*), $action as function(xs:anyAtomicType, item()*) as item()*) as item()*
Description

Applies a supplied function to every entry in a map, returning the concatenation of the results.

back to top

map:get


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

Returns the value associated with a supplied key in a given map.

back to top

map:keys


Signature
map:keys($map as map(*)) as xs:anyAtomicType*
Description

Returns a sequence containing all the keys present in a map

back to top

map:merge


Signature
map:merge($maps as map(*)*) as map(*)
map:merge($maps as map(*)*, $options as map(*)) as map(*)
Description

Returns a map that combines the entries from a number of existing maps.

back to top

map:put


Signature
map:put($map as map(*), $key as xs:anyAtomicType, $value as item()*) as map(*)
Description

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.

back to top

map:remove


Signature
map:remove($map as map(*), $keys as xs:anyAtomicType*) as map(*)
Description

Returns a map containing all the entries from a supplied map, except those having a specified key.

back to top

map:size


Signature
map:size($map as map(*)) as xs:integer
Description

Returns the number of entries in the supplied map.

back to top