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 29568 - [XQX3.1] Incorrect XQueryX conversion of "\u005c"
Summary: [XQX3.1] Incorrect XQueryX conversion of "\u005c"
Status: RESOLVED DUPLICATE of bug 13796
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQueryX 3.1 (show other bugs)
Version: Candidate Recommendation
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Josh Spiegel
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-10 21:03 UTC by Michael Kay
Modified: 2016-04-16 14:27 UTC (History)
2 users (show)

See Also:


Attachments

Description Michael Kay 2016-04-10 21:03:29 UTC
Test case json-to-xml-043 reads:

fn:json-to-xml('"\u005c"')

In the XQueryX version of the test, the function call is represented as:

      <xqx:functionCallExpr>
        <xqx:functionName xqx:prefix="fn">json-to-xml</xqx:functionName>
        <xqx:arguments>
          <xqx:stringConstantExpr>
            <xqx:value>"\"</xqx:value>
          </xqx:stringConstantExpr>
        </xqx:arguments>
      </xqx:functionCallExpr>

The conversion from XQuery to XQueryX appears to be incorrect. "\u005c" is a valid JSON string, whereas "\" is not.
Comment 1 Michael Dyck 2016-04-10 22:23:40 UTC
This might be a duplicate of Bug 13796.
Comment 2 Josh Spiegel 2016-04-15 20:39:32 UTC
Yes, this is a duplicate of 13796 - the w3c parser is converting \uXXXX to a character in string literals.

There are other tests besides json-to-xml-043 where this happens (e.g. json-to-xml-021, json-to-xml-022, json-to-xml-042, etc.).  You may only be noticing in this case since \u005c is the backslash and converting it makes the JSON invalid (in other cases the string is still valid JSON).

*** This bug has been marked as a duplicate of bug 13796 ***
Comment 3 Michael Kay 2016-04-16 14:27:17 UTC
Yes, that was the first test case where I noticed the effect, but I noticed others later.

I guess that we've established that the problem is not with the spec; it's a problem with the W3C parsing applet which in turn causes a problem with the XQueryX version of the tests.