XML Schema - jednoduché typy - "union"

Zhruba odpovídá konceptu "union" v C

Výsledkem je jednoduchý typ

Lze spojovat bázový typ a výčet hodnot

Příklad

  <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>