Is this a valid <restriction > of a complex type

Given 

1. a global declaration of the head of a substitutionGroup

<xs:element name="_Geometry" abstract="true"/>

2. a complex type that contains these in its content model

<xs:complexType name="AbstractGeometryContainer" abstract="true">
           <xs:sequence>
                     <xs:element ref="_Geometry" minOccurs="0"/>
           </xs:sequence>
           <xs:attribute name="attA" use="optional"/>
</xs:complexType>

and 

3. a global declaration of a member of the _Geometry substitutionGroup

<xs:element name="Point" type="PointType" substitutionGroup="_Geometry"/>

can we derive PointContainer in one step

<xs:complexType name="PointContainer">
           <xs:complexContent>
                     <xs:restriction base="AbstractGeometryContainer">
                               <xs:sequence>
                                          <xs:element ref="Point" minOccurs
="0"/>
                               </xs:sequence>
                               <xs:attribute name="attA" use="optional"/>
                     </xs:restriction>
           </xs:complexContent>
</xs:complexType>
=======================

I think it is fine - per this section from
http://www.w3.org/TR/xmlschema-1/#coss-particle

-------------------
Schema Component Constraint: Particle Valid (Restriction) 

[Definition:]  For a particle (call it R, for restriction) to be a valid
restriction of another particle (call it B, for base) one of the following
must be true:
1 ... 
2 depending on the kind of particle, per the table below, with the
qualifications that all of the following must be true:
2.1 Any top-level element declaration particle (in R or B) which is the
{substitution group affiliation} of one or more other element declarations
is treated as if it were a choice group whose {min occurs} and {max occurs}
are those of the particle, and whose {particles} consists of one particle
with {min occurs} and {max occurs} of 1 for the top-level element
declaration and for each of the declarations in its ·substitution group·. 
...
-------------------

etc.  

Received on Thursday, 24 January 2002 22:46:44 UTC