[Bug 13935] New: xsd 1.1 assertions testing comment nodes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 13935] New: xsd 1.1 assertions testing comment nodes

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

           Summary: xsd 1.1 assertions testing comment nodes
           Product: XML Schema Test Suite
           Version: 2006-11-06
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Saxon tests
        AssignedTo: [hidden email]
        ReportedBy: [hidden email]
         QAContact: [hidden email]


The Saxon test assert023.n1.xml (in the "assert" test set), specifies the
following requirement,

XML instance document:

<temp x="204"><!--comments not allowed--></temp>

XSD 1.1 schema:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
  <xs:element name="temp">
    <xs:complexType>
       <xs:sequence/>    
       <xs:attribute name="x" use="required"/>
       <xs:attribute name="y" use="optional"/>      
       <xs:assert test="empty(.//comment())"/>
    </xs:complexType>
  </xs:element>
</xs:schema>

and says that the expected validity of this test is "invalid". It seems that
expected validity of this test should be "valid". I don't think that, the XSD
(1.0 as well as 1.1) language allows validating XML comments [1]. With this [1]
in mind, the approach Xerces follows in this regard is, that it doesn't ever
include XPath comment nodes in the XDM tree that it constructs. Therefore an
assert like above would also be true for Xerces.

If you agree with this bug report, would you kindly change the status of this
test to "valid". Or let us know, that how would you justify the correctness of
this test?

Thanks.

--
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Reply | Threaded
Open this post in threaded view
|

[Bug 13935] xsd 1.1 assertions testing comment nodes

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

--- Comment #1 from Mukul Gandhi <[hidden email]> 2011-08-28 20:04:46 UTC ---
(In reply to comment #0)
> Therefore an assert like above would also be true for Xerces.

Sorry for the typo above. This should have been read as below,

"Therefore an assert like above would always evaluate to true for Xerces." [1]

This (ref, [1]) would happen for Xerces since, the XDM tree for <assert>
components never having comment nodes cannot produce a 'true' result by
evaluation of XPath expressions, that would attempt to check for existence of
comment nodes in the <assert> XDM trees.

Would be great if SAXONICA or the XML Schema WG may comment on this issue.

Thanks.

--
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Reply | Threaded
Open this post in threaded view
|

[Bug 13935] xsd 1.1 assertions testing comment nodes

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

Sandy Gao <[hidden email]> changed:

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

--- Comment #2 from Sandy Gao <[hidden email]> 2011-10-07 13:26:40 UTC ---
I'm guessing the reference [1] should be

http://www.w3.org/TR/xmlschema11-1/#sec-wsnormalization

--
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Reply | Threaded
Open this post in threaded view
|

[Bug 13935] xsd 1.1 assertions testing comment nodes

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

Michael Kay <[hidden email]> changed:

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

--- Comment #3 from Michael Kay <[hidden email]> 2011-10-07 14:20:59 UTC ---
I think the spec needs clarification. The sentence you cite certainly indicates
that comments and PIs should be ignored; however the rules in 3.13.4.1 for
constructing an XDM instance to use for testing assertions has the consequence
that they are not ignored for the purpose of assertion testing. I had assumed
this was a feature.

--
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Reply | Threaded
Open this post in threaded view
|

[Bug 13935] xsd 1.1 assertions testing comment nodes

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

David Ezell <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |needsDrafting
                 CC|                            |[hidden email],
                   |                            |[hidden email]
          Component|Saxon tests                 |Structures: XSD Part 1
            Version|2006-11-06                  |1.1 only
         AssignedTo|[hidden email]    |[hidden email]
            Product|XML Schema Test Suite       |XML Schema
   Target Milestone|---                         |PR
          QAContact|public-xml-schema-testsuite |www-xml-schema-comments@w3.
                   |@w3.org                     |org

--- Comment #4 from David Ezell <[hidden email]> 2011-10-07 15:44:26 UTC ---
Change section 3.1.4 to delete or rephrase second paragraph, in such a way so
as to allow XPath expressions to address PIs and comments.

--
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.