Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - RE: regex help >Thread Next - element with anonymous type in a group Question about the unique element declaration inside the model groupsTo: <xmlschema-dev@--.---> Date: 1/26/2007 1:54:00 AM I meet a case when I do the schema testing, which as the following:
<xs:schema>
<xs:complexType name="One">
<xs:sequence>
<xs:element name="elem1" type="xs:string"
fixed="abc"/>
<xs:element name="elem1" type="xs:string"
fixed="123"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
There are two elements with the same name "elem1" and the same target
namespace
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}
<http://www.w3.org/TR/xmlschema-1/#element_declarations#element_declarat
ions> , {attribute group definitions}
<http://www.w3.org/TR/xmlschema-1/#attribute_group_definitions#attribute
_group_definitions> ,
{model group definitions}
<http://www.w3.org/TR/xmlschema-1/#model_group_definitions#model_group_d
efinitions> and {notation declarations}
<http://www.w3.org/TR/xmlschema-1/#notation_declarations#notation_declar
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
~~~~~~~~~~~~~~~~~~~~~~~~
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
