anySimpleType

Is it possible to base new types on "anySimpleType"? For example, 
within the Dublin Core schema we want to define a generic element which 
cannot have children or be 'mixed' but has a 'lang' attribute:

  <complexType name="DCelementType"
     <simpleContent>
       <extension base="anySimpleType">
         <attribute ref="x:lang" use="optional"/>
       </extension>
     </simpleContent>
   </complexType>

   <element name="date" type="DCelementType/>

This approach allows users to restrict the base type in their own 
application profiles. For example, if a user wants their date element 
to use the more constrained 'date' datatype, they can define their own 
element based on the dc:DCelementType, in their own schema:

 <element name="myDate">
   <xs:complexType>
     <xs:simpleContent>
       <xs:restriction base="dc:DCelementType">
         <simpleContent>
           <extension base="date">
             <attribute ref="x:lang" use="optional"/>
           </extension>
         </simpleContent>
       </xs:restriction>
     </xs:simpleContent>
   </xs:complexType>
 </xs:element>

If this is not permitted, then do you have any other suggestions for 
how to do what we're trying to do - define a base simple type with a 
'lang' attribute - from which it is possible to derive other simple 
types such as date, anyURI, string etc.

regards,
Jane
+-----------------------------+-------------------------------------+
| Jane Hunter                 | Senior Research Scientist           |
| DSTC Pty Ltd                | Distributed Systems Technology CRC  |
| Level 7, GP South           | Tel   : +61 7 3365 4310             |
| University of Queensland    | Fax   : +61 7 3365 4311             |
| Queensland 4072, Australia  | Email : jane@dstc.edu.au            |
+-----------------------------+-------------------------------------+

Received on Monday, 13 May 2002 20:04:15 UTC