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

[Bug 28181] New: [f+o3.1] xml-to-json: "whose content is such that validation would succeed"

From: <bugzilla@jessica.w3.org>
Date: Mon, 09 Mar 2015 18:03:45 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-28181-523@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=28181

            Bug ID: 28181
           Summary: [f+o3.1] xml-to-json: "whose content is such that
                    validation would succeed"
           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

The specification of xml-to-json requires the processor to accept a node "whose
content is such that validation against the schema given in [json.xsd] would
succeed".

This provision is designed as a way of specifying what input a non-schema-aware
processor should accept, without actually requiring it to perform schema
validation.

There is one respect in which this provision seems to place excessive burden on
a non-schema-aware processor. Validation "would succeed" if the content
includes an xsi:type attribute, provided that the xsi:type attribute has an
appropriate value. For example the following is allowed:

<number xsi:type="xs:short">32</number>

while the following is not:

<number xsi:type="xs:short">816257</number>

It was never intended that a non-schema-aware processor should have to deal
with such things, and I don't think we should require it. I therefore propose
to change the rule from 

<old>
An element node whose name matches the name of a global element declaration in
the schema given in C.2 Schema for the result of fn:json-to-xml, whose type
annotation is xs:untyped, and whose content is such that validation against the
schema given in C.2 Schema for the result of fn:json-to-xml would succeed.
</old>

to

<new>
An element node whose name matches the name of a global element declaration in
the schema given in C.2 Schema for the result of fn:json-to-xml, whose type
annotation is xs:untyped, and whose content is such that (a) validation against
the schema given in C.2 Schema for the result of fn:json-to-xml would succeed,
and (b) there is no attribute at any depth whose namespace is
http://www.w3.org/2001/Schema-instance
</new>

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Monday, 9 March 2015 18:03:47 UTC

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