summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2016-03-02 22:58:42 +0100
committerMichał Górny <mgorny@gentoo.org>2016-03-02 22:58:42 +0100
commit67a8b01f70688b5e7921928bafb9451d4bf0a8fd (patch)
tree1f7a0212d7f3c287b38007b968ebc57892ca6f7b
parentmetadata.xml: Fix flag uniquity constraint to use 'name' as well (diff)
downloadxml-schema-67a8b01f70688b5e7921928bafb9451d4bf0a8fd.tar.gz
xml-schema-67a8b01f70688b5e7921928bafb9451d4bf0a8fd.tar.bz2
xml-schema-67a8b01f70688b5e7921928bafb9451d4bf0a8fd.zip
metadata.xml: Add validation rules for restrict=""
-rw-r--r--metadata.xsd8
1 files changed, 7 insertions, 1 deletions
diff --git a/metadata.xsd b/metadata.xsd
index e302211..68a7fbc 100644
--- a/metadata.xsd
+++ b/metadata.xsd
@@ -266,7 +266,13 @@
</xs:simpleType>
<xs:simpleType name='restrictAttrType'>
- <xs:restriction base='xs:token'/>
+ <xs:restriction base='xs:token'>
+ <!-- simplified package dependency syntax -->
+ <!-- note: 'pure' package atom is technically valid too
+ but not really meaningful -->
+ <xs:pattern
+ value="([&lt;&gt;]=?|[=~])[A-Za-z0-9_][A-Za-z0-9+_.-]*/[A-Za-z0-9_][A-Za-z0-9+_-]*-[0-9]+(\.[0-9]+)*[a-z]?((_alpha|_beta|_pre|_rc|_p)[0-9]*)*(-r[0-9]+)?\*?"/>
+ </xs:restriction>
</xs:simpleType>
<!-- generic types -->