Quantcast

[Bug 27156] New: fn:parse-json

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 27156] New: fn:parse-json

Bugzilla from bugzilla@jessica.w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27156

            Bug ID: 27156
           Summary: fn:parse-json
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Functions and Operators 3.1
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]

I have two question on the specification of fn:parse-json (Working Draft, Oct
7):

* What is supposed to be the default value for the "liberal" option?

* If "unescape" is set to true, will invalid XML characters be replaced by
xFFFD, or will an error be raised instead (FOJS0002)?

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

Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 27156] fn:parse-json

Bugzilla from bugzilla@jessica.w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27156

C. M. Sperberg-McQueen <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #1 from C. M. Sperberg-McQueen <[hidden email]> ---
The description of errors says:

    A dynamic error [err:FOJS0001] occurs if the value of $input does not
    conform to the JSON grammar, unless the option "liberal":true() is
    present and the processor chooses to accept the deviation.

I think that amounts to saying that the default value is false().

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

Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 27156] fn:parse-json

Bugzilla from bugzilla@jessica.w3.org
In reply to this post by Bugzilla from bugzilla@jessica.w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27156

Jonathan Robie <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #2 from Jonathan Robie <[hidden email]> ---
(In reply to Christian Gruen from comment #0)
> I have two question on the specification of fn:parse-json (Working Draft,
> Oct 7):
>
> * What is supposed to be the default value for the "liberal" option?

The default must be False - see this error condition:

A dynamic error [err:FOJS0001] occurs if the value of $input does not conform
to the JSON grammar, unless the option "liberal":true() is present and the
processor chooses to accept the deviation.

That should be stated explicitly in the table.

> * If "unescape" is set to true, will invalid XML characters be replaced by
> xFFFD, or will an error be raised instead (FOJS0002)?

This error seems to answer the question:

A dynamic error [err:FOJS0002] occurs if the value of $input contains an
escaped representation of a character (or codepoint) that is not a valid
character in the version of XML supported by the implementation, unless the
unescape option is set to false.

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

Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 27156] fn:parse-json

Bugzilla from bugzilla@jessica.w3.org
In reply to this post by Bugzilla from bugzilla@jessica.w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27156

--- Comment #3 from Jonathan Robie <[hidden email]> ---
> > * If "unescape" is set to true, will invalid XML characters be replaced by
> > xFFFD, or will an error be raised instead (FOJS0002)?
>
> This error seems to answer the question:
>
> A dynamic error [err:FOJS0002] occurs if the value of $input contains an
> escaped representation of a character (or codepoint) that is not a valid
> character in the version of XML supported by the implementation, unless the
> unescape option is set to false.

Ah, but the specification also says this:

If the input contains escape sequences representing characters or codepoints
that are valid characters in the version of XML supported by the
implementation, the escape sequence is replaced by the character(s) that it
represents. If the input contains escape sequences representing characters or
codepoints that are not valid characters in the version of XML supported by the
implementation, the escape sequence is replaced by the Unicode replacement
character (xFFFD).

So this seems to answer the question two different ways, and they contradict
each other.

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

Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 27156] fn:parse-json

Bugzilla from bugzilla@jessica.w3.org
In reply to this post by Bugzilla from bugzilla@jessica.w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27156

--- Comment #4 from Michael Kay <[hidden email]> ---
Also note that the table (first entry) says "An error must be raised (TBA) " -
the TBS needs to be resolved

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

Loading...