diff options
author | Michał Górny <mgorny@gentoo.org> | 2016-03-18 23:24:30 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2016-03-18 23:24:30 +0100 |
commit | 6d926eb7961e9a3d9eef9a4023fec3d56ded47fc (patch) | |
tree | e6de913eee9f75fbcb80566a2b0e12a8c73f03c4 /repositories.xsd | |
parent | repositories: Change default language to 'en', alike metadata.xml (diff) | |
download | xml-schema-6d926eb7961e9a3d9eef9a4023fec3d56ded47fc.tar.gz xml-schema-6d926eb7961e9a3d9eef9a4023fec3d56ded47fc.tar.bz2 xml-schema-6d926eb7961e9a3d9eef9a4023fec3d56ded47fc.zip |
repositories: Ensure there is at most one <homepage/>
Diffstat (limited to 'repositories.xsd')
-rw-r--r-- | repositories.xsd | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/repositories.xsd b/repositories.xsd index 0a80d1d..1b6dae3 100644 --- a/repositories.xsd +++ b/repositories.xsd @@ -20,6 +20,10 @@ <xs:selector xpath='longdescription'/> <xs:field xpath='@lang'/> </xs:unique> + <xs:unique name='homepageSingleConstraint'> + <xs:selector xpath='homepage'/> + <xs:field xpath='@fake-only-once'/> + </xs:unique> </xs:element> <xs:complexType name='repoType'> @@ -27,7 +31,7 @@ <xs:element name='name' type='repoNameType'/> <xs:element name='description' type='descriptionType'/> <xs:element name='longdescription' type='descriptionType'/> - <xs:element name='homepage' type='urlType'/> + <xs:element name='homepage' type='urlOnceType'/> <xs:element name='owner' type='ownerType'/> <xs:element name='source' type='sourceType'/> <xs:element name='feed' type='urlType'/> @@ -131,4 +135,13 @@ <xs:pattern value="[^:]+:.+"/> </xs:restriction> </xs:simpleType> + + <xs:complexType name='urlOnceType'> + <xs:simpleContent> + <xs:extension base="urlType"> + <xs:attribute name='fake-only-once' + fixed='there can be at most one element of this type'/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> </xs:schema> |