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 2226 - R-234: Anonymous global type elements of same name in model group
Summary: R-234: Anonymous global type elements of same name in model group
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:25 UTC by Sandy Gao
Modified: 2009-04-21 19:25 UTC (History)
0 users

See Also:


Attachments

Description Sandy Gao 2005-09-14 19:25:42 UTC
Is the following schema valid?

        <xsd:element name="elem1">
 		<xsd:complexType/>
 	</xsd:element>

 	<xsd:complexType name="type1">
 		<xsd:sequence>
 			<xsd:element ref="elem1"/>
 			<xsd:element ref="elem1"/>
 		</xsd:sequence>
 	</xsd:complexType>

Henry's response: 

Should be, but the REC language is broken here -- I'm pretty sure the intent 
was for this constraint to apply to two _distinct_ element declarations, which 
means at least one of them would have to be local, as all refs to a named top-
level element decl produce the _same_ element decl. I'm not aware of any 
processors which complain about this case. 

See:
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2003JulSep/0081.html
Comment 1 Sandy Gao 2005-09-23 04:20:11 UTC
Seems the best we can is already done in erratum E1-54
http://www.w3.org/2001/05/xmlschema-errata#e1-54
Propose to resolve this as either fixed or later.
Comment 2 Sandy Gao 2005-09-28 14:31:49 UTC
Discussed at 2005-09-23 telecon.

The specific issue reported is covered by E1-54. The general question of 
anonymous type identity will be discussed under 1.1. See RQ-151.