XML Schema - simple types - "union"

Approximately correspond to C "union" concept.

Result is a simple type.

Base type and values enumeration can be merged.

Example:

<xs:simpleType name="isbnType"> 
 <xs:union>
   <xs:simpleType> 
    <xs:restriction base="xs:string">
     <xs:pattern value="[0-9]{10}"/> 
    </xs:restriction>
   </xs:simpleType> 
   <xs:simpleType> 
    <xs:restriction base="xs:NMTOKEN"> 
     <xs:enumeration value="TBD"/>
     <xs:enumeration value="NA"/> 
    </xs:restriction>
   </xs:simpleType>
 </xs:union> 
</xs:simpleType>