summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2016-03-18 10:36:58 +0100
committerMichał Górny <mgorny@gentoo.org>2016-03-18 10:36:58 +0100
commitcd52d0a4c9ef1819e4e6dd32e1d9a8516f866598 (patch)
treeecc80bcb509b097808d4fe0d84599012d6ff8726
parentmetadata: Remove outdated <cat/> comment (diff)
downloadxml-schema-cd52d0a4c9ef1819e4e6dd32e1d9a8516f866598.tar.gz
xml-schema-cd52d0a4c9ef1819e4e6dd32e1d9a8516f866598.tar.bz2
xml-schema-cd52d0a4c9ef1819e4e6dd32e1d9a8516f866598.zip
metadata: Allow <slots/> elements in any order
-rw-r--r--metadata.xsd27
1 files changed, 20 insertions, 7 deletions
diff --git a/metadata.xsd b/metadata.xsd
index 67012d6..65591ca 100644
--- a/metadata.xsd
+++ b/metadata.xsd
@@ -146,13 +146,26 @@
<!-- slots -->
<xs:complexType name='slotsType'>
- <!-- TODO: any order? -->
- <xs:sequence>
- <xs:element name='slot' type='slotType'
- minOccurs='0' maxOccurs='unbounded'/>
- <xs:element name='subslots' type='xs:token'
- minOccurs='0' maxOccurs='1'/>
- </xs:sequence>
+ <!-- the crazy magic below is to cover any order possible
+ in a deterministic way -->
+ <xs:choice>
+ <xs:sequence>
+ <xs:element name='slot' type='slotType'
+ minOccurs='1' maxOccurs='unbounded'/>
+ <xs:sequence minOccurs='0' maxOccurs='1'>
+ <xs:element name='subslots' type='xs:token'
+ minOccurs='1' maxOccurs='1'/>
+ <xs:element name='slot' type='slotType'
+ minOccurs='0' maxOccurs='unbounded'/>
+ </xs:sequence>
+ </xs:sequence>
+ <xs:sequence>
+ <xs:element name='subslots' type='xs:token'
+ minOccurs='1' maxOccurs='1'/>
+ <xs:element name='slot' type='slotType'
+ minOccurs='0' maxOccurs='unbounded'/>
+ </xs:sequence>
+ </xs:choice>
<xs:attribute name='lang' type='langAttrType' default='en'/>
</xs:complexType>