commit:     d7e18ac28cde6806f95f62705874f31e010a9e0e
Author:     Göktürk Yüksek <gokturk <AT> binghamton <DOT> edu>
AuthorDate: Sat May  7 21:57:00 2016 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun May  8 05:21:25 2016 +0000
URL:        https://gitweb.gentoo.org/data/xml-schema.git/commit/?id=d7e18ac2

metadata.xsd: fix upstream maintainer name uniquity constraint

Current constraint doesn't work because the xpath walk starts from
<maintainer> and looks for children <maintainer>. Move the constraint
inside <upstream> to fix it.

Signed-off-by: Göktürk Yüksek <gokturk <AT> binghamton.edu>

 metadata.xsd | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/metadata.xsd b/metadata.xsd
index 41a8fca..cad8304 100644
--- a/metadata.xsd
+++ b/metadata.xsd
@@ -61,6 +61,10 @@
                                </xs:unique>
                        </xs:element>
                        <xs:element name='upstream' type='upstreamType'>
+                               <xs:unique 
name='upstreamMaintainerUniquityConstraint'>
+                                       <xs:selector xpath='maintainer'/>
+                                       <xs:field xpath='name'/>
+                               </xs:unique>
                                <xs:unique name='bugsToSingleConstraint'>
                                        <xs:selector xpath='bugs-to'/>
                                        <xs:field xpath='@fake-only-once'/>
@@ -99,12 +103,7 @@
        <!-- the huge <upstream/> structure -->
        <xs:complexType name='upstreamType'>
                <xs:choice minOccurs='0' maxOccurs='unbounded'>
-                       <xs:element name='maintainer' 
type='upstreamMaintainerType'>
-                               <xs:unique 
name='upstreamMaintainerUniquityConstraint'>
-                                       <xs:selector xpath='maintainer'/>
-                                       <xs:field xpath='name'/>
-                               </xs:unique>
-                       </xs:element>
+                       <xs:element name='maintainer' 
type='upstreamMaintainerType'/>
                        <xs:element name='changelog' type='urlOnceType'/>
                        <xs:element name='doc' type='upstreamDocType'/>
                        <xs:element name='bugs-to' type='urlOnceType'/>

Reply via email to