summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRepository QA checks <repo-qa-checks@gentoo.org>2016-04-16 17:47:40 +0000
committerRepository QA checks <repo-qa-checks@gentoo.org>2016-04-16 17:47:40 +0000
commitf3891cd4cc948af2475425c345fd542080245e52 (patch)
treef4323a907f050e1c519d8b67d19dfde89b9e1170
parentMerge updates from master (diff)
parentmetadata: Use more portable fake-attr uniquity constraint for subslots (diff)
downloadgentoo-f3891cd4cc948af2475425c345fd542080245e52.tar.gz
gentoo-f3891cd4cc948af2475425c345fd542080245e52.tar.bz2
gentoo-f3891cd4cc948af2475425c345fd542080245e52.zip
Merge commit '9de0e83fb8bc56c8e2db187e6bc66dc85cce9afa'
-rw-r--r--metadata/xml-schema/metadata.xsd35
1 files changed, 16 insertions, 19 deletions
diff --git a/metadata/xml-schema/metadata.xsd b/metadata/xml-schema/metadata.xsd
index 493c930fc57b..0ead09ee8342 100644
--- a/metadata/xml-schema/metadata.xsd
+++ b/metadata/xml-schema/metadata.xsd
@@ -51,6 +51,10 @@
<xs:selector xpath='slot'/>
<xs:field xpath='@name'/>
</xs:unique>
+ <xs:unique name='subslotsSingleConstraint'>
+ <xs:selector xpath='subslots'/>
+ <xs:field xpath='@fake-only-once'/>
+ </xs:unique>
</xs:element>
<xs:element name='upstream' type='upstreamType'>
<xs:unique name='bugsToSingleConstraint'>
@@ -175,25 +179,9 @@
<!-- slots -->
<xs:complexType name='slotsType'>
- <!-- 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 minOccurs='0' maxOccurs='unbounded'>
+ <xs:element name='slot' type='slotType'/>
+ <xs:element name='subslots' type='tokenOnceType'/>
</xs:choice>
<xs:attribute name='lang' type='langAttrType' default='en'/>
</xs:complexType>
@@ -532,6 +520,15 @@
</xs:restriction>
</xs:simpleType>
+ <xs:complexType name='tokenOnceType'>
+ <xs:simpleContent>
+ <xs:extension base="xs:token">
+ <xs:attribute name='fake-only-once'
+ fixed='there can be at most one element of this type'/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
<xs:simpleType name='urlType'>
<xs:restriction base='xs:token'>
<!-- TODO: something better? -->