This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25502 - Binary Operators on maps
Summary: Binary Operators on maps
Status: NEW
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Requirements for Future Versions (show other bugs)
Version: Working drafts
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Jim Melton
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-29 15:41 UTC by Liam R E Quin
Modified: 2014-04-29 15:41 UTC (History)
0 users

See Also:


Attachments

Description Liam R E Quin 2014-04-29 15:41:49 UTC
Copied from mailing list by Liam -
https://lists.w3.org/Archives/Member/w3c-xsl-query/2014Apr/0036.html


This is an attempt to flesh out an idea from Mohamed (see https://lists.w3.org/Archives/Member/w3c-xsl-query/2014Feb/0065.html).

1. map1  + map2 

If a and b are both maps, then a  + b is defined as map:new( a, b).  The following expressions are equivalent:

$m2 := map:new( $m1, { "foo" : "bar" }) 
$m2 := $m1 + { "foo" : "bar" }


2. map - atomic

If a is a map and b is an atomic value, then a - b is defined as map:remove(a, b). The following expressions are equivalent:

$m2 := map:remove( $m1, "foo") 
$m2 := $m1 - "foo"

Jonathan