Can I choose one simpleType in one element?

Hi!

We define some  common simpleTypes because we will use them 
several times in XMLs. and I would like to choose one simpleType 
between common simpleType in one tag(element).

If you know some  answers, please advice me!

ex)
==================
in XML, it will be...
------------------
<A>abcde</A>           <!-- 6 small character -->
------------------
OR
------------------
<A>1234567890</A>      <!-- 10 number -->
------------------

==================
in schema, I would like to choose several simpleTypes.
==================

<xs:element name="A">
   <!-- WE WOULD LIKE TO CHOOSE TYPE -->
     CHOOSE
        REF="alf simpleType"
          OR
        REF="num simpleType"
</xs:element>


<!-- "alf" simpleType -->
<xs:simpleType name="alf">
    <xs:restriction base="xs:string">
        <xs:pattern value="[a-z]{6}"/>
    </xs:restriction>
</xs:simpleType>

<!-- "num" simpleType -->
<xs:simpleType name="num">
    <xs:restriction base="xs:string">
        <xs:pattern value="[0-9]{10}"/>
    </xs:restriction>
</xs:simpleType>


Thank you!
miki kasahara



-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
Miki Kasahara
http://jp.getronics.com/
Professional ServiceDivision
e-Solutions Development Department
Getronics Japan, LTD
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-

Received on Thursday, 11 July 2002 00:27:17 UTC