can an attribute prohibited by restriction be added back through a subsequent extension?

Is the following derivation sequence valid??

 

<xs:complexType name="CT">

                        <xs:attribute name="x" type="xs:int"/>

                        <xs:attribute name="y" type="xs:int"/>

</xs:complexType>

                

 <xs:complexType name="CT2">

                  <xs:complexContent>

                        <xs:restriction base="CT">

                          <xs:attribute name="x" type="xs:int"
use="prohibited"/>

                        </xs:restriction>

                  </xs:complexContent>

 </xs:complexType>

 

  <xs:complexType name="CT3">

                  <xs:complexContent>

                        <xs:extension base="CT2">

                          <xs:attribute name="x" type="xs:int"/>

                        </xs:extension>

                  </xs:complexContent>

  </xs:complexType>

 

I specifically need clarification on the following part of the spec:

Schema Component Constraint: Derivation Valid (Extension)

    1.5 It must in principle be possible to derive the complex type
definition in two steps, the first an extension and the second a
restriction (possibly vacuous), from that type definition among its
ancestors whose {base type definition}
<http://www.w3.org/TR/xmlschema-1/#ct-base_type_definition#ct-base_type_
definition>  is the *ur-type definition*
<http://www.w3.org/TR/xmlschema-1/#ur-type-itself#ur-type-itself> . 

    

NOTE: This requirement ensures that nothing removed by a restriction is
subsequently added back by an extension. It is trivial to check if the
extension in question is the only extension in its derivation, or if
there are no restrictions bar the first from the *ur-type definition*
<http://www.w3.org/TR/xmlschema-1/#ur-type-itself#ur-type-itself> . 

 

Constructing the intermediate type definition to check this constraint
is straightforward: simply re-order the derivation to put all the
extension steps first, then collapse them into a single extension. If
the resulting definition can be the basis for a valid restriction to the
desired definition, the constraint is satisfied. 

 

Received on Tuesday, 16 April 2002 21:11:31 UTC