Map Module

This XQuery Module contains functions for manipulating maps. Maps have been introduced with XQuery 3.1 and are described in detail in the XQuery Functions and Operators 3.1 specification.

=Conventions=

All functions in this module are assigned to the  namespace, which is statically bound to the map prefix.

=Functions=

Some examples use the map $week defined as:  declare variable $week := map { 0: "Sun", 1: "Mon", 2: "Tue", 3: "Wed", 4: "Thu", 5: "Fri", 6: "Sat" };

map:size
=Changelog=


 * Version 8.6
 * Added: map:find
 * Updated: map:merge: Signature extended with options argument. By default, value of first key is now adopted (instead of last, as in previous versions).


 * Version 8.4
 * Removed: map:serialize (use fn:serialize instead)


 * Version 8.0
 * Added: map:for-each, map:merge, map:put
 * Removed: support for collations (in accordance with the XQuery 3.1 spec).
 * Removed: map:new (replaced with map:merge)
 * Updated: aligned with latest specification: compare keys of type xs:untypedAtomic as xs:string instances, store xs:float or xs:double value NaN.
 * Introduction on maps is now found in the article on XQuery 3.1.


 * Version 7.8
 * Updated: map syntax
 * Added: map:serialize


 * Version 7.7.1
 * Updated: alternative map syntax without map keyword and : as key/value delimiter (e.g.: