diff options
author | 2016-05-06 21:48:22 +0200 | |
---|---|---|
committer | 2016-05-06 21:48:22 +0200 | |
commit | 6070512ca8d633167fdcb976e386df7b834b7f61 (patch) | |
tree | adf504b4d99cdacb60b9cd2442fa2ac7e907959a | |
parent | metadata.xsd: upstream maintainer must have exactly one <name/> element (diff) | |
download | xml-schema-6070512ca8d633167fdcb976e386df7b834b7f61.tar.gz xml-schema-6070512ca8d633167fdcb976e386df7b834b7f61.tar.bz2 xml-schema-6070512ca8d633167fdcb976e386df7b834b7f61.zip |
metadata: Fix allowing multiple <description/>s on maintainers
-rw-r--r-- | metadata.xsd | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/metadata.xsd b/metadata.xsd index fe2c5d2..27039cd 100644 --- a/metadata.xsd +++ b/metadata.xsd @@ -41,6 +41,10 @@ <xs:choice minOccurs='0' maxOccurs='unbounded'> <xs:element name='longdescription' type='longDescType'/> <xs:element name='maintainer' type='maintainerType'> + <xs:unique name='maintainerNameSingleConstraint'> + <xs:selector xpath='name'/> + <xs:field xpath='@fake-only-once'/> + </xs:unique> <xs:unique name='maintainerDescUniquityConstraint'> <xs:selector xpath='description'/> <xs:field xpath='@lang'/> @@ -112,14 +116,11 @@ <!-- maintainer in two variants --> <xs:complexType name='maintainerType'> - <xs:all> - <xs:element name='email' type='emailType' - minOccurs='1'/> - <xs:element name='name' type='xs:token' - minOccurs='0'/> - <xs:element name='description' type='maintainerDescType' - minOccurs='0'/> - </xs:all> + <xs:choice minOccurs='0' maxOccurs='unbounded'> + <xs:element name='email' type='emailType'/> + <xs:element name='name' type='tokenOnceType'/> + <xs:element name='description' type='maintainerDescType'/> + </xs:choice> <xs:attribute name='type' type='maintainerTypeAttrType' use='required'/> <xs:attribute name='restrict' type='restrictAttrType'/> |