Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


extension adds element removed by restriction (3.4.6/1.5)

From: "Moog, Thomas H" <thomas.h.moog@-----.--->
To: <xmlschema-dev@--.--->
Date: 10/23/2006 5:59:00 AM

In 3.4.6 (Constraints on Complex Type Definition Schema
Components) Section 1.5 there is this comment:

    Note: This requirement ensures that nothing removed by a
    restriction is subsequently added back by an extension.

The following schema is accepted by three schema validators.
I would expect gamma to be rejected because it adds back
element "b" which was removed when beta was created
from alpha.

I would appreciate it if someone would explain why this
does not violate 3.4.6 section 1.5.

Thanks.

<xs:complexType name="alpha">
  <xs:sequence>
     <xs:element name="a" />
     <xs:element name="b" minOccurs="0" />
  </xs:sequence>
</xs:complexType>
 
<xs:complexType name="beta" >
  <xs:complexContent>
    <xs:restriction base="alpha" >
      <xs:sequence>
        <xs:element name="a" />
      </xs:sequence>
    </xs:restriction>
  </xs:complexContent>
</xs:complexType>
 
<xs:complexType name="gamma" >
  <xs:complexContent>
    <xs:extension base="beta" >
      <xs:sequence>
        <xs:element name="b" />
      </xs:sequence>
    </xs:extension>
  </xs:complexContent>
</xs:complexType>

From cmsmcq@a... Tue Oct 24 01:47:05 2006
Received: from lisa.w3.org ([128.30.52.41


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