W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2002

RE: complexType derivation method

From: Lemmin, Harald <Harald.Lemmin@softwareag.com>
Date: Thu, 10 Jan 2002 11:44:11 +0100
Message-ID: <DFF2AC9E3583D511A21F0008C7E6210601E3A87D@daemsg02.software-ag.de>
To: xmlschema-dev@w3.org
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:26 GMT