Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


duplicated element names in content model

From: Tobias Koenig <tobias.koenig@---------.--->
To: 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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent