W3C home > Mailing lists > Public > public-qt-comments@w3.org > December 2015

[Bug 29353] New: Lossless map:merge

From: <bugzilla@jessica.w3.org>
Date: Wed, 30 Dec 2015 18:09:11 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29353-523@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29353

            Bug ID: 29353
           Summary: Lossless map:merge
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery 3.2 Use Cases and Requirements
          Assignee: jonathan.robie@gmail.com
          Reporter: rxk2rxk@gmail.com
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

Hi,

I am using map:merge to construct a map from smaller maps and would like to
preserve values when the keys agree. For example, when calling

    map:merge((map:entry(0, "red"), (map:entry(1, "green"), map:entry(1,
"blue")))

I would like to get back something like

    map { 0: "red", 1: ("green", "blue") }

The W3C specification is to drop "green" in favor of "blue".

While the desired behavior can be accomplished using XQuery syntax, the
solution is not elegant and is relatively slow. Would it be possible to add an
option to map:merge that will exhibit lossless merging?

Thanks,
Ron

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Wednesday, 30 December 2015 18:09:13 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 30 December 2015 18:09:14 UTC