Almost all the tools
we use allow this model, except for one. And reading the spec I have the
impression that it is indeed not allowed.
It is a union using a
simpletype that refers to another union.
<schema
targetNamespace="urn:mpeg:mpeg7:schema:2001"
xmlns:mpeg7="urn:mpeg:mpeg7:schema:2001" xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<simpleType
name="termRelationQualifierType">
<union>
<simpleType>
<restriction
base="NMTOKEN">
<enumeration
value="NT"/>
<enumeration
value="BT"/>
<enumeration
value="RT"/>
<enumeration
value="US"/>
<enumeration
value="UF"/>
</restriction>
</simpleType>
<simpleType>
<restriction
base="mpeg7:termReferenceType"/>
</simpleType>
</union>
</simpleType>
<simpleType
name="termReferenceType">
<union>
<simpleType>
<restriction
base="NMTOKEN">
<whiteSpace
value="collapse"/>
<pattern
value=":[^:]+:[^:]+"/>
</restriction>
</simpleType>
<simpleType>
<restriction
base="anyURI"/>
</simpleType>
</union>
</simpleType>
</schema>