W3C home > Mailing lists > Public > public-qt-comments@w3.org > July 2015

[Bug 29007] New: json-to-xml definition is inconsistent with construction from PSVI

From: <nobody@w3.org>
Date: Thu, 30 Jul 2015 16:31:31 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29007-523@http.www.w3.org/Bugs/Public/>

            Bug ID: 29007
           Summary: json-to-xml definition is inconsistent with
                    construction from PSVI
           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
  Target Milestone: ---
             Group: XSLXQuery_WG

In FNO 3.1, 17.5.3 fn:json-to-xml:

"The XDM tree returned by the function does not contain any unnecessary (albeit
valid) nodes such as whitespace text nodes, comments, or processing
instructions, or attributes (escaped and escaped-key) whose value is equal to
the default value (false)."

In XDM 3.1, 6.2.4 Construction from a PSVI:

     "Default and fixed attributes provided by XML Schema processing are added
to the [attributes]"

Example 1:

  import schema namespace fn = "http://www.w3.org/2005/xpath-functions";
  validate { 
    json-to-xml('"foo"', map { 'validate' : false() })  


  <string escaped="false"

Example 2:

  json-to-xml('"foo"', map { 'validate' : true() }) 

Result 2:

  <string xmlns="http://www.w3.org/2005/xpath-functions">foo</string>

And, the following expression will often return false:

    json-to-xml(json, map { 'validate' : true() }),
    validate { json-to-xml(json, map { 'validate' : false() }) }

I think the WG should make the behavior of the 'validate' flag consistent with
validation by either removing the default from the schema or by adding the
defaults in the definition of json-to-xml.

You are receiving this mail because:
You are the QA Contact for the bug.
Received on Thursday, 30 July 2015 16:31:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:55 UTC