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

[Bug 2226] R-234: Anonymous global type elements of same name in model group

From: <bugzilla@wiggum.w3.org>
Date: Wed, 14 Sep 2005 19:25:42 +0000
To: www-xml-schema-comments@w3.org
Cc:
Message-Id: <E1EFct4-0001UN-E6@wiggum.w3.org>

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

           Summary: R-234: Anonymous global type elements of same name in
                    model group
           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


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
Received on Wednesday, 14 September 2005 19:25:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:13:09 GMT