W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2003

Duplicate element definitions

From: Paul Warren <pdw@decisionsoft.com>
Date: 22 Jul 2003 16:44:13 +0100
To: xmlschema-dev@w3.org
Message-Id: <1058888653.26146.110.camel@tobol.dsl.local>

Can anyone explain why (according to sqc) the repeated definition of
element1 is acceptable, but that of element2 is not.  According to sqc,
the definition of duplicateTest "contains directly, indirectly or
implicitly the following element declarations with same name and
targetNamespace but with different type definition" referring to the
definitions of element2.

I can't seem to find any reference to this behaviour in the spec.

<xsd:schema xmlns:xsd='http://www.w3.org/2001/XMLSchema'
elementFormDefault="qualified"
>

  <xsd:element name="duplicateTest" >
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="element1" type="fooTest" />

        <xsd:element name="element2" >
          <xsd:complexType >
            <xsd:sequence >
              <xsd:element name="inner1c" />
              <xsd:element name="inner2d" />
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>

        <xsd:element name="element1" type="fooTest" />

        <xsd:element name="element2" >
          <xsd:complexType >
            <xsd:sequence >
              <xsd:element name="inner1c" />
              <xsd:element name="inner2d" />
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>

      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>


  <xsd:complexType name="fooTest">
     <xsd:sequence >
        <xsd:element name="inner1a" />
        <xsd:element name="inner2b" />
     </xsd:sequence>
  </xsd:complexType>

</xsd:schema>


thanks,

Paul
-- 
Paul Warren, Client Services           DecisionSoft Limited
+44-1865-203192                        http://www.decisionsoft.com
Received on Tuesday, 22 July 2003 11:44:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:39 GMT