RE: complexType derivation method

Hi,

just a question inbetween:

The example from ht was:

<xs:complexType name="t1">
   <xs:simpleContent>                                       
        <xs:extension base="xs:string">                     
            <xs:attribute name="x" type="xs:integer"/>      
        </xs:extension>                                     
    </xs:simpleContent>                                     
</xs:complexType>                                           

<xs:complexType name="t4">                    
   <xs:simpleContent>                          
      <xs:restriction base="t1" >             
         <xs:simpleType>                       
            <xs:restriction base="xs:token">
             <xs:pattern value=".*a.*"/>
            </xs:restriction>
         </xs:simpleType>
      </xs:restriction>
   </xs:simpleContent>
</xs:complexType>

So what does type t4 expresses? Is it:
- t4 permits the attribute with name "x" (as inherited from t1)
- The content of t4 can be of type xs:token and has to match the pattern.
  Is this a valid restriction to the base of t1, because token restricts
string and pattern is 
  a valid restriction of the value space?

Am I correct?

What confuses me is the local usage of the simpleType and the introduction
of a new base type.

Thanks,
Harald
 

Received on Thursday, 10 January 2002 05:44:16 UTC