Mega Code Archive

 
Categories / XML / XML Schema
 

The order between derivation by list and derivation by union depends on the result to achieve

<?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="listOfUnions">     <xs:list>       <xs:simpleType>         <xs:union memberTypes="xs:date xs:integer" />       </xs:simpleType>     </xs:list>   </xs:simpleType>   <xs:simpleType name="UnionOfLists">     <xs:union>       <xs:simpleType>         <xs:list itemType="xs:date" />       </xs:simpleType>       <xs:simpleType>         <xs:list itemType="xs:integer" />       </xs:simpleType>     </xs:union>   </xs:simpleType> </xs:schema>