Mega Code Archive

 
Categories / XML / XML Schema
 

A union datatype can embed one or more xs

<?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"   targetNamespace="http://www.rntsoft.com" xmlns="http://www.rntsoft.com"   elementFormDefault="qualified">   <xs:simpleType name="myIntegerUnion">     <xs:union>       <xs:simpleType>         <xs:restriction base="xs:integer" />       </xs:simpleType>       <xs:simpleType>         <xs:restriction base="xs:NMTOKEN">           <xs:enumeration value="undefined" />         </xs:restriction>       </xs:simpleType>     </xs:union>   </xs:simpleType> </xs:schema>