- From: <bugzilla@jessica.w3.org>
- Date: Mon, 01 Jun 2015 17:34:09 +0000
- To: public-qt-comments@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=28729 Bug ID: 28729 Summary: map:remove when multiple entries have the "same key" as $key Product: XPath / XQuery / XSLT Version: Candidate Recommendation Hardware: PC OS: All Status: NEW Severity: normal Priority: P2 Component: XQuery 3.1 Assignee: jonathan.robie@gmail.com Reporter: josh.spiegel@oracle.com QA Contact: public-qt-comments@w3.org Group: XSLXQuery_WG >From the definition of map:remove: "Returns a map containing all the entries from a supplied map, except for one." and "The function map:remove returns a ·map· containing all the entries in $map except for any entry whose key is the ·same key· as $key." These statements contradict each other in the case where $key is the "same key" as multiple entries in the map. For example: let $m := map { xs:decimal("1.00000000000000000000000000000000001") : (), xs:decimal("1.00000000000000000000000000000000002") : () } return map:remove($m, xs:double("1.0")) The double value is equal to both decimal values. Is one entry removed or both? Note, map:get clarifies what happens in this situation: "Where values of different numeric types are numerically very close to each other, it can happen that the map contains two entries whose keys both match the supplied key, but which are not equal to each other. In this situation the entry that is returned is ·implementation-dependent·" -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Monday, 1 June 2015 17:34:19 UTC