W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 2010

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

From: <bugzilla@jessica.w3.org>
Date: Fri, 29 Oct 2010 02:52:43 +0000
To: www-xml-schema-comments@w3.org
Message-Id: <E1PBf59-0003a4-6U@jessica.w3.org>

Sandy Gao <sandygao@ca.ibm.com> changed:

           What    |Removed                     |Added
                 CC|                            |sandygao@ca.ibm.com

--- Comment #3 from Sandy Gao <sandygao@ca.ibm.com> 2010-10-29 02:52:42 UTC ---
Consider a schema:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="X">
        <xs:extension base="xs:id">
          <xs:attribute name="id" type="xs:id" use="optional"/>

And 2 instances:

I1: <X>abcd</X>
I2: <X id="abcd">abcd</X>

It seems that I1 is invalid (an ID/IDREF binding without a [binding]) but I2 is
valid (because of the "id" attribute). Does anyone find this counter-intuitive?

I would think either "top-level ID element is bad", then both I1 and I2 are
invalid, or "top-level ID element is ignored", then both are valid.

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 Friday, 29 October 2010 02:52:44 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:50:10 UTC