W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2007

Question about the unique element declaration inside the model groups

From: Wang, Zhuo <zhuo.wang@intel.com>
Date: Thu, 25 Jan 2007 17:53:54 +0800
Message-ID: <7B2CABB47D5B094AAACC8A1E001B82F52280B0@pdsmsx411.ccr.corp.intel.com>
To: <xmlschema-dev@w3.org>
Cc: "Zhang, Hongjiang" <hongjiang.zhang@intel.com>, "Yu, Zhiqiang" <zhiqiang.yu@intel.com>, "Moog, Thomas H" <thomas.h.moog@intel.com>
I meet a case when I do the schema testing, which as the following:



         <xs:complexType name="One">


                     <xs:element name="elem1" type="xs:string"

                     <xs:element name="elem1" type="xs:string"





There are two elements with the same name "elem1" and the same target

inside the <xs:sequence>. Is this allowed? 


I read the spec and get the description which says: 

3.15.6 Constraints on Schemas as a Whole  

Schema Component Constraint: Schema Properties Correct

2 Each of the {type definitions}
<http://www.w3.org/TR/xmlschema-1/#type_definitions#type_definitions> ,
{element declarations}
ions> , {attribute group definitions}
_group_definitions> , 

{model group definitions}
efinitions>  and {notation declarations}
ations>  must not contain two or more 

schema components with the same {name} and {target namespace}.


I think this case violate this rule. However, I test it with many schema
validation tools and get the report that

"This case is correct".  Someone can give me an answer about it? 


Thanks and Regards,
- Wang Zhuo    


Intel Asia-Pacific R&D Ltd.

No. 880 ZiXing Road, ZiZhu Science Park,

Shanghai, PRC, 200241

iNet: 8621-6190  

Work Phone: 86-21-61166190

Cubic: 3F-W135 


Received on Thursday, 25 January 2007 09:54:09 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:11 UTC