[Bug 29872] New: [FO31] escape=yes in parse-json() and json-to-xml()

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

            Bug ID: 29872
           Summary: [FO31] escape=yes in parse-json() and json-to-xml()
           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: mike@saxonica.com
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

The rules for fn:parse-json say:

If the escape option is set to true, escape sequences are retained in their
escaped form, whether or not they represent valid characters.

(This is in rule 3 underneath the options table. I would have expected to find
it in the "escape=true" row of the table, but never mind.)

This rule means that, for example, parse-json("\u0025" map{"escape":true()})
returns "\u0025" rather than "%".

For the fn:json-to-xml() function I cannot find a corresponding rule. There
doesn't seem to be anything that dictates whether "\u0025" should end up as
<string escaped="true">\u0025</string> or as <string>%</string>.

I suggest we adopt the same rule (and move it into the table, in both cases.)

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

Received on Monday, 26 September 2016 10:07:00 UTC