This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 2231 - R-239: Question re: Element Declarations Consistent
Summary: R-239: Question re: Element Declarations Consistent
Status: CLOSED LATER
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Structures: XSD Part 1 (show other bugs)
Version: 1.0 only
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Henry S. Thompson
QA Contact: XML Schema comments list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-14 19:32 UTC by Sandy Gao
Modified: 2009-04-21 19:25 UTC (History)
1 user (show)

See Also:


Attachments

Description Sandy Gao 2005-09-14 19:32:19 UTC
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: 

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

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

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

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

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? 

See:
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2003OctDec/0029.html
Comment 1 Sandy Gao 2005-09-14 19:32:36 UTC
Henry's response:
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2003OctDec/0030.html

Also, see follow-up mail re: potential other EDC issues:
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2003OctDec/0060.html
Comment 2 Sandy Gao 2005-09-23 04:23:13 UTC
This is essentially RQ-146. Propose to resolve it as "later".
Comment 3 Sandy Gao 2005-09-28 14:32:58 UTC
Discussed at 2005-09-23 telecon and decided to defer the this problem to 1.1.