This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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.
This might be a duplicate of Bug 13796.
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 ***
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.