[Bug 9922] New: xs:ID element as outermost element in document

http://www.w3.org/Bugs/Public/show_bug.cgi?id=9922

           Summary: xs:ID element as outermost element in document
           Product: XML Schema
           Version: 1.0/1.1 both
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Structures: XSD Part 1
        AssignedTo: David_E3@VERIFONE.com
        ReportedBy: mike@saxonica.com
         QAContact: www-xml-schema-comments@w3.org
                CC: cmsmcq@blackmesatech.com


Consider the following as a complete XML document

<X>abcd</X>

where X is declared to have type xs:ID.

This arises in test case NISTSchema-SV-IV-atomic-ID-maxLength-1.

According to Part 1, section 3.17.5.2, I believe the ID/IDREF table will
contain an ID/IDREF binding whose [id] is the string "abcd" and whose [binding]
is the empty set.

According to Part 1 section 3.3.4.5, this makes the X element invalid. The
rationale stated in a Note is "The first clause above applies when there is a
reference to an undefined ID." This rationale appears to be incorrect if the
situation can also arise for an ID-valued element that has no parent.

There are various possible resolutions. The choice of resolution may depend on
how we want to handle the document <X IDREF="abcd">abcd</X> - is this valid
because the IDREF value exists in the document as an ID, or is it invalid
because there is no element whose ID is abcd?

-- 
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.

Received on Monday, 14 June 2010 15:05:03 UTC