map:remove

Removes entries from a map. Returns a new map based on the supplied map, minus any entries whose key matches one of the supplied keys. The supplied map is unchanged.

remove($map as map(*), $keys as xs:anyAtomicType*) ➔ item()*

Arguments

 

$map

map(*)

The input map

 

$keys

xs:anyAtomicType*

The keys to be removed

Result

item()*

Namespace

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

Links to W3C specifications

XPath 3.1 Functions and Operators

XSLT 3.0 Specification

Saxon availability

Available in XPath 3.1, XSLT 3.0, and XQuery 3.1. From Saxon 9.7, available in all editions.

Notes on the Saxon implementation

Available as defined in XSLT 3.0 since Saxon 9.4; in XSLT, XPath, and XQuery, whether or not 3.0 is available.

XPath 3.1 version implemented since Saxon 9.7.

Since 9.7.0.6, the behaviour changed (following a W3C Specification change) to allow multiple items to be removed in a single call.