W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 2005

[Bug 2231] R-239: Question re: Element Declarations Consistent

From: <bugzilla@wiggum.w3.org>
Date: Wed, 14 Sep 2005 19:32:19 +0000
To: www-xml-schema-comments@w3.org
Message-Id: <E1EFczT-0001lj-KI@wiggum.w3.org>


           Summary: R-239: Question re: Element Declarations Consistent
           Product: XML Schema
           Version: 1.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSD Part 1: Structures
        AssignedTo: ht@w3.org
        ReportedBy: sandygao@ca.ibm.com
         QAContact: www-xml-schema-comments@w3.org

The Element Declarations Consistent rule for model groups ( 
http://www.w3.org/TR/xmlschema-1/#cos-element-consistent) rules out 
inconsistent element declarations like the following two conflicting 
definitions of element <a> i.e., <a> cannot be both an "int" and a "string" in 
the same group: 

<xs:complexType name="example-1">
    <xs:element name="a" type="xs:int"/>
    <xs:element name="whatever"/>
    <xs:element name="a" type="xs:string"/>

In addition to explicit element declarations, the rule also prevents conflicts 
between elements that appear "either directly, indirectly, or implicitly", 
i.e., between nested model groups or elements permitted via substitution 

My question: consider the following "tricky" indirect case involving a wildcard 
referencing a global element - 

<xs:element name="a" type="xs:string"/>
<xs:complexType name="example-2">
    <xs:element name="a" type="xs:int"/>
    <xs:element name="whatever"/>
    <xs:any namespace="##targetNamespace" processContents="lax"/>

Clearly the local <a> and the indirect reference to the global <a> 
are "inconsistent" with each other within the content model of example-2, but 
I'm not sure if the "directly, indirectly, or implicitly" language in the ETC 
rule captures this case. 

Is there a hole in the EDC rule language with respect to example-2? Is this 
something that could be clarified in an errata? 

Received on Wednesday, 14 September 2005 19:32:28 UTC

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