Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - >Thread Next - Reg. Attribute declaration duplicated element names in content modelTo: xmlschema-dev@--.--- Date: 1/2/2009 5:10:00 PM
Hej,
the following schema
=========================================
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="doc" type="foo"/>
<xsd:complexType name="foo">
<xsd:sequence>
<xsd:element name="e1" type="xsd:string"/>
<xsd:choice>
<xsd:choice>
<xsd:element name="e1" type="xsd:integer"/>
</xsd:choice>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
=========================================
is wrong according to the schema test suite and several validators.
But why exactly is it wrong? Does it violates the UPA constraint in some way?
When having a document
<doc>
<e1/>
<e1/>
</doc>
it seems to be possible to assign xsd:string to the first e1 and xsd:integer
to the second, as both elements must appear at least once I can not see
any ambiguity here.
Is it explicitly stated somewhere in the schema spec or hidden inside an
algorithm?
Ciao,
Tobias
From lists@f... Fri Jan 02 15:46:17 2009
Received: from bart.w3.org ([12 | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
