[Bug 28771] New: json-doc default value for "duplicates" prevents lazy streaming evaluation

https://www.w3.org/Bugs/Public/show_bug.cgi?id=28771

            Bug ID: 28771
           Summary: json-doc default value for "duplicates" prevents lazy
                    streaming evaluation
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Functions and Operators 3.1
          Assignee: mike@saxonica.com
          Reporter: josh.spiegel@oracle.com
        QA Contact: public-qt-comments@w3.org
             Group: XSLXQuery_WG

Consider this JSON:

 {
    "desc"    : "Distances between several cities, in kilometers.",
    "author"  : null
    "cities"  : {
        "Brussels": [
                      {"to": "London",    "distance": 322},
                      {"to": "Paris",     "distance": 265},
                      {"to": "Amsterdam", "distance": 173}
                    ],
        "London": [
                      {"to": "Brussels",  "distance": 322},
                      {"to": "Paris",     "distance": 344},
                      {"to": "Amsterdam", "distance": 358}
                  ],
        "Paris": [
                      {"to": "Brussels",  "distance": 265},
                      {"to": "London",    "distance": 344},
                      {"to": "Amsterdam", "distance": 431}
                 ],
        "Amsterdam": [
                      {"to": "Brussels",  "distance": 173},
                      {"to": "London",    "distance": 358},
                      {"to": "Paris",     "distance": 431}
                     ]
     },
    "updated" : "2014-02-04T18:50:45",
    "uptodate": true
 }

Consider this query:

     declare option output:method “json";
     json-doc("distances.json")("cities")("London")

I would like to be able to stream this query by default.  For example, an
implementation could stop parsing the JSON file after it finds London (and
never consume Paris, Amsterdam, updated, or uptodate).  Currently it cannot do
this since the default value for the parse option “duplicates” is “use-last”. 
I would like the working group to consider changing the default value to
“use-first” to facilitate lazy streaming evaluation by default.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Friday, 5 June 2015 20:46:42 UTC