Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] data/xml-schema:master commit in: /
Date: Sun, 08 May 2016 05:31:24
Message-Id: 1462684885.d7e18ac28cde6806f95f62705874f31e010a9e0e.mgorny@gentoo
1 commit: d7e18ac28cde6806f95f62705874f31e010a9e0e
2 Author: Göktürk Yüksek <gokturk <AT> binghamton <DOT> edu>
3 AuthorDate: Sat May 7 21:57:00 2016 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun May 8 05:21:25 2016 +0000
6 URL: https://gitweb.gentoo.org/data/xml-schema.git/commit/?id=d7e18ac2
7
8 metadata.xsd: fix upstream maintainer name uniquity constraint
9
10 Current constraint doesn't work because the xpath walk starts from
11 <maintainer> and looks for children <maintainer>. Move the constraint
12 inside <upstream> to fix it.
13
14 Signed-off-by: Göktürk Yüksek <gokturk <AT> binghamton.edu>
15
16 metadata.xsd | 11 +++++------
17 1 file changed, 5 insertions(+), 6 deletions(-)
18
19 diff --git a/metadata.xsd b/metadata.xsd
20 index 41a8fca..cad8304 100644
21 --- a/metadata.xsd
22 +++ b/metadata.xsd
23 @@ -61,6 +61,10 @@
24 </xs:unique>
25 </xs:element>
26 <xs:element name='upstream' type='upstreamType'>
27 + <xs:unique name='upstreamMaintainerUniquityConstraint'>
28 + <xs:selector xpath='maintainer'/>
29 + <xs:field xpath='name'/>
30 + </xs:unique>
31 <xs:unique name='bugsToSingleConstraint'>
32 <xs:selector xpath='bugs-to'/>
33 <xs:field xpath='@fake-only-once'/>
34 @@ -99,12 +103,7 @@
35 <!-- the huge <upstream/> structure -->
36 <xs:complexType name='upstreamType'>
37 <xs:choice minOccurs='0' maxOccurs='unbounded'>
38 - <xs:element name='maintainer' type='upstreamMaintainerType'>
39 - <xs:unique name='upstreamMaintainerUniquityConstraint'>
40 - <xs:selector xpath='maintainer'/>
41 - <xs:field xpath='name'/>
42 - </xs:unique>
43 - </xs:element>
44 + <xs:element name='maintainer' type='upstreamMaintainerType'/>
45 <xs:element name='changelog' type='urlOnceType'/>
46 <xs:element name='doc' type='upstreamDocType'/>
47 <xs:element name='bugs-to' type='urlOnceType'/>