Saxonica: XSLT and XQuery Processing: The Map Extension

The Map Extension

This is a family of extension functions, map:new(), map:put(), map:get(), and map:keys() that can be used to maintain a general purpose map from atomic values to arbitrary XDM sequences. The functions are in namespace http://ns.saxonica.com/map, and are available in Saxon-PE and Saxon-EE only.

The map itself is an object of type javatype:com.saxonica.extfn.map.ImmutableMap, where the prefix javatype corresponds to the namespace URI http://saxon.sf.net/java-type.

The map is immutable: adding an entry to a map creates a new map, leaving the original map unchanged. These are therefore pure functions. Under the hood, the implementation avoids copying data whereever possible to minimise the use of memory when a map is built incrementally.

The individual methods are described below: