extension adds element removed by restriction (3.4.6/1.5)

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>

Received on Monday, 23 October 2006 13:59:30 UTC