# map:remove - XPath XQuery Reference

Returns a map containing all the entries from a supplied map, except those having a specified key.deterministiccontext-independentfocus-independentThe function map:remove returns a map containing all the entries in $map except for any entry whose key is 
            the same key as an item in$keys.No failure occurs if an item in $keys does not correspond to any entry in $map;
            that key value is simply ignored.The effect of the function call map:remove($MAP, $KEY) can be described more formally as the result of the expression below:
map:merge (
    map:for-each (
       $MAP, function($k, $v) { 
               if (some $key in $KEY satisfies (op:same-key($k, $key)) 
               then () 
               else map:entry($k, $v)
             } ) ) map:remove($week, 4)map{0:"Sonntag", 1:"Montag", 2:"Dienstag", 3:"Mittwoch", 5:"Freitag",
                  6:"Samstag"}map:remove($week, 23)map{0:"Sonntag", 1:"Montag", 2:"Dienstag", 3:"Mittwoch", 4:"Donnerstag",
                  5:"Freitag", 6:"Samstag"}map:remove($week, (0, 6 to 7))map{1:"Montag", 2:"Dienstag", 3:"Mittwoch", 4:"Donnerstag", 5:"Freitag"}map:remove($week, ())map{0:"Sonntag", 1:"Montag", 2:"Dienstag", 3:"Mittwoch", 4:"Donnerstag", 5:"Freitag",
                  6:"Samstag"}