public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] data/xml-schema:master commit in: /
Date: Sat, 16 Apr 2016 17:27:31 +0000 (UTC)	[thread overview]
Message-ID: <1460827628.9de0e83fb8bc56c8e2db187e6bc66dc85cce9afa.mgorny@gentoo> (raw)

commit:     9de0e83fb8bc56c8e2db187e6bc66dc85cce9afa
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 16 17:27:08 2016 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Apr 16 17:27:08 2016 +0000
URL:        https://gitweb.gentoo.org/data/xml-schema.git/commit/?id=9de0e83f

metadata: Use more portable fake-attr uniquity constraint for subslots

 metadata.xsd | 35 ++++++++++++++++-------------------
 1 file changed, 16 insertions(+), 19 deletions(-)

diff --git a/metadata.xsd b/metadata.xsd
index 493c930..0ead09e 100644
--- a/metadata.xsd
+++ b/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? -->


             reply	other threads:[~2016-04-16 17:27 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-16 17:27 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-04-18 15:45 [gentoo-commits] data/xml-schema:master commit in: / Michał Górny
2016-05-06  5:16 Michał Górny
2016-05-06 19:48 Michał Górny
2016-05-07 16:09 Michał Górny
2016-05-08  5:31 Michał Górny
2016-05-08  5:31 Michał Górny
2017-04-07 15:50 Michał Górny
2018-03-13  7:44 Michał Górny
2018-03-18  8:30 Michał Górny
2020-10-15 18:14 Michał Górny
2021-03-14 20:32 Michał Górny
2022-01-23 15:34 Ulrich Müller
2022-05-21 21:50 Ulrich Müller
2022-05-23  6:25 Ulrich Müller
2022-05-23  6:25 Ulrich Müller
2022-05-23 10:57 Ulrich Müller
2022-05-23 10:57 Ulrich Müller
2022-05-23 10:57 Ulrich Müller
2022-05-24 11:51 Ulrich Müller
2022-05-25 12:28 Ulrich Müller
2022-07-29 20:13 Sam James
2022-07-29 20:13 Sam James
2022-09-14 20:02 Sam James
2022-09-14 20:02 Sam James
2022-09-16  1:57 Sam James
2023-02-23 21:32 Sam James
2023-09-14 15:49 Ulrich Müller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1460827628.9de0e83fb8bc56c8e2db187e6bc66dc85cce9afa.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox