diff options
author | Göktürk Yüksek <gokturk@binghamton.edu> | 2016-05-07 17:57:00 -0400 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2016-05-08 07:21:25 +0200 |
commit | d7e18ac28cde6806f95f62705874f31e010a9e0e (patch) | |
tree | 53c2e780fb324f3137c6f4815d1103d4cb1d3a6a | |
parent | metadata.xsd: properly check for duplicate <longdescription> elements (diff) | |
download | xml-schema-d7e18ac28cde6806f95f62705874f31e010a9e0e.tar.gz xml-schema-d7e18ac28cde6806f95f62705874f31e010a9e0e.tar.bz2 xml-schema-d7e18ac28cde6806f95f62705874f31e010a9e0e.zip |
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@binghamton.edu>
-rw-r--r-- | metadata.xsd | 11 |
1 files 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'/> |