1 |
Use a build-in datatype of XML Schema instead of hand-crafting our own. |
2 |
|
3 |
Bug: https://bugs.gentoo.org/578294 |
4 |
Signed-off-by: Ulrich Müller <ulm@g.o> |
5 |
--- |
6 |
metadata.xsd | 224 ++------------------------------------------------- |
7 |
1 file changed, 6 insertions(+), 218 deletions(-) |
8 |
|
9 |
diff --git a/metadata.xsd b/metadata.xsd |
10 |
index 1a86051..40e230e 100644 |
11 |
--- a/metadata.xsd |
12 |
+++ b/metadata.xsd |
13 |
@@ -170,7 +170,7 @@ |
14 |
<xs:complexType name='maintainerDescType'> |
15 |
<xs:simpleContent> |
16 |
<xs:extension base="xs:token"> |
17 |
- <xs:attribute name='lang' type='langAttrType' default='en'/> |
18 |
+ <xs:attribute name='lang' type='xs:language' default='en'/> |
19 |
</xs:extension> |
20 |
</xs:simpleContent> |
21 |
</xs:complexType> |
22 |
@@ -181,7 +181,7 @@ |
23 |
<xs:element name='pkg' type='pkgType'/> |
24 |
<xs:element name='cat' type='catType'/> |
25 |
</xs:choice> |
26 |
- <xs:attribute name='lang' type='langAttrType' default='en'/> |
27 |
+ <xs:attribute name='lang' type='xs:language' default='en'/> |
28 |
<xs:attribute name='restrict' type='restrictAttrType' default=''/> |
29 |
</xs:complexType> |
30 |
|
31 |
@@ -190,7 +190,7 @@ |
32 |
<xs:element name='pkg' type='pkgType'/> |
33 |
<xs:element name='cat' type='catType'/> |
34 |
</xs:choice> |
35 |
- <xs:attribute name='lang' type='langAttrType' default='en'/> |
36 |
+ <xs:attribute name='lang' type='xs:language' default='en'/> |
37 |
</xs:complexType> |
38 |
|
39 |
<!-- slots --> |
40 |
@@ -199,7 +199,7 @@ |
41 |
<xs:element name='slot' type='slotType'/> |
42 |
<xs:element name='subslots' type='tokenOnceType'/> |
43 |
</xs:choice> |
44 |
- <xs:attribute name='lang' type='langAttrType' default='en'/> |
45 |
+ <xs:attribute name='lang' type='xs:language' default='en'/> |
46 |
</xs:complexType> |
47 |
|
48 |
<xs:complexType name='slotType'> |
49 |
@@ -229,7 +229,7 @@ |
50 |
<xs:choice minOccurs='0' maxOccurs='unbounded'> |
51 |
<xs:element name='flag' type='flagType'/> |
52 |
</xs:choice> |
53 |
- <xs:attribute name='lang' type='langAttrType' default='en'/> |
54 |
+ <xs:attribute name='lang' type='xs:language' default='en'/> |
55 |
</xs:complexType> |
56 |
|
57 |
<xs:complexType name='flagType' mixed='true'> |
58 |
@@ -254,7 +254,7 @@ |
59 |
<xs:complexType name='upstreamDocType'> |
60 |
<xs:simpleContent> |
61 |
<xs:extension base="urlType"> |
62 |
- <xs:attribute name='lang' type='langAttrType' default='en'/> |
63 |
+ <xs:attribute name='lang' type='xs:language' default='en'/> |
64 |
</xs:extension> |
65 |
</xs:simpleContent> |
66 |
</xs:complexType> |
67 |
@@ -313,218 +313,6 @@ |
68 |
</xs:simpleType> |
69 |
|
70 |
<!-- common attributes --> |
71 |
- <xs:simpleType name='langAttrType'> |
72 |
- <xs:restriction base='xs:token'> |
73 |
- <!-- ISO 639-1 language codes --> |
74 |
- <xs:enumeration value='aa'/> |
75 |
- <xs:enumeration value='ab'/> |
76 |
- <xs:enumeration value='ae'/> |
77 |
- <xs:enumeration value='af'/> |
78 |
- <xs:enumeration value='ak'/> |
79 |
- <xs:enumeration value='am'/> |
80 |
- <xs:enumeration value='an'/> |
81 |
- <xs:enumeration value='ar'/> |
82 |
- <xs:enumeration value='as'/> |
83 |
- <xs:enumeration value='av'/> |
84 |
- <xs:enumeration value='ay'/> |
85 |
- <xs:enumeration value='az'/> |
86 |
- <xs:enumeration value='ba'/> |
87 |
- <xs:enumeration value='be'/> |
88 |
- <xs:enumeration value='bg'/> |
89 |
- <xs:enumeration value='bh'/> |
90 |
- <xs:enumeration value='bi'/> |
91 |
- <xs:enumeration value='bm'/> |
92 |
- <xs:enumeration value='bn'/> |
93 |
- <xs:enumeration value='bo'/> |
94 |
- <xs:enumeration value='bo'/> |
95 |
- <xs:enumeration value='br'/> |
96 |
- <xs:enumeration value='bs'/> |
97 |
- <xs:enumeration value='ca'/> |
98 |
- <xs:enumeration value='ce'/> |
99 |
- <xs:enumeration value='ch'/> |
100 |
- <xs:enumeration value='co'/> |
101 |
- <xs:enumeration value='cr'/> |
102 |
- <xs:enumeration value='cs'/> |
103 |
- <xs:enumeration value='cs'/> |
104 |
- <xs:enumeration value='cu'/> |
105 |
- <xs:enumeration value='cv'/> |
106 |
- <xs:enumeration value='cy'/> |
107 |
- <xs:enumeration value='cy'/> |
108 |
- <xs:enumeration value='da'/> |
109 |
- <xs:enumeration value='de'/> |
110 |
- <xs:enumeration value='de'/> |
111 |
- <xs:enumeration value='dv'/> |
112 |
- <xs:enumeration value='dz'/> |
113 |
- <xs:enumeration value='ee'/> |
114 |
- <xs:enumeration value='el'/> |
115 |
- <xs:enumeration value='el'/> |
116 |
- <xs:enumeration value='en'/> |
117 |
- <xs:enumeration value='eo'/> |
118 |
- <xs:enumeration value='es'/> |
119 |
- <xs:enumeration value='et'/> |
120 |
- <xs:enumeration value='eu'/> |
121 |
- <xs:enumeration value='eu'/> |
122 |
- <xs:enumeration value='fa'/> |
123 |
- <xs:enumeration value='fa'/> |
124 |
- <xs:enumeration value='ff'/> |
125 |
- <xs:enumeration value='fi'/> |
126 |
- <xs:enumeration value='fj'/> |
127 |
- <xs:enumeration value='fo'/> |
128 |
- <xs:enumeration value='fr'/> |
129 |
- <xs:enumeration value='fr'/> |
130 |
- <xs:enumeration value='fy'/> |
131 |
- <xs:enumeration value='ga'/> |
132 |
- <xs:enumeration value='ga'/> |
133 |
- <xs:enumeration value='Ga'/> |
134 |
- <xs:enumeration value='gd'/> |
135 |
- <xs:enumeration value='gl'/> |
136 |
- <xs:enumeration value='gn'/> |
137 |
- <xs:enumeration value='gu'/> |
138 |
- <xs:enumeration value='gv'/> |
139 |
- <xs:enumeration value='ha'/> |
140 |
- <xs:enumeration value='he'/> |
141 |
- <xs:enumeration value='hi'/> |
142 |
- <xs:enumeration value='ho'/> |
143 |
- <xs:enumeration value='hr'/> |
144 |
- <xs:enumeration value='ht'/> |
145 |
- <xs:enumeration value='hu'/> |
146 |
- <xs:enumeration value='hy'/> |
147 |
- <xs:enumeration value='hy'/> |
148 |
- <xs:enumeration value='hz'/> |
149 |
- <xs:enumeration value='ia'/> |
150 |
- <xs:enumeration value='id'/> |
151 |
- <xs:enumeration value='ie'/> |
152 |
- <xs:enumeration value='ig'/> |
153 |
- <xs:enumeration value='ii'/> |
154 |
- <xs:enumeration value='ik'/> |
155 |
- <xs:enumeration value='io'/> |
156 |
- <xs:enumeration value='is'/> |
157 |
- <xs:enumeration value='is'/> |
158 |
- <xs:enumeration value='it'/> |
159 |
- <xs:enumeration value='iu'/> |
160 |
- <xs:enumeration value='ja'/> |
161 |
- <xs:enumeration value='jv'/> |
162 |
- <xs:enumeration value='ka'/> |
163 |
- <xs:enumeration value='ka'/> |
164 |
- <xs:enumeration value='kg'/> |
165 |
- <xs:enumeration value='ki'/> |
166 |
- <xs:enumeration value='kj'/> |
167 |
- <xs:enumeration value='kk'/> |
168 |
- <xs:enumeration value='kl'/> |
169 |
- <xs:enumeration value='km'/> |
170 |
- <xs:enumeration value='kn'/> |
171 |
- <xs:enumeration value='ko'/> |
172 |
- <xs:enumeration value='kr'/> |
173 |
- <xs:enumeration value='ks'/> |
174 |
- <xs:enumeration value='ku'/> |
175 |
- <xs:enumeration value='kv'/> |
176 |
- <xs:enumeration value='kw'/> |
177 |
- <xs:enumeration value='ky'/> |
178 |
- <xs:enumeration value='la'/> |
179 |
- <xs:enumeration value='lb'/> |
180 |
- <xs:enumeration value='lg'/> |
181 |
- <xs:enumeration value='li'/> |
182 |
- <xs:enumeration value='ln'/> |
183 |
- <xs:enumeration value='lo'/> |
184 |
- <xs:enumeration value='lt'/> |
185 |
- <xs:enumeration value='lu'/> |
186 |
- <xs:enumeration value='lv'/> |
187 |
- <xs:enumeration value='mg'/> |
188 |
- <xs:enumeration value='mh'/> |
189 |
- <xs:enumeration value='mi'/> |
190 |
- <xs:enumeration value='mi'/> |
191 |
- <xs:enumeration value='mk'/> |
192 |
- <xs:enumeration value='mk'/> |
193 |
- <xs:enumeration value='ml'/> |
194 |
- <xs:enumeration value='mn'/> |
195 |
- <xs:enumeration value='mr'/> |
196 |
- <xs:enumeration value='ms'/> |
197 |
- <xs:enumeration value='ms'/> |
198 |
- <xs:enumeration value='mt'/> |
199 |
- <xs:enumeration value='my'/> |
200 |
- <xs:enumeration value='my'/> |
201 |
- <xs:enumeration value='na'/> |
202 |
- <xs:enumeration value='nb'/> |
203 |
- <xs:enumeration value='nd'/> |
204 |
- <xs:enumeration value='ne'/> |
205 |
- <xs:enumeration value='ng'/> |
206 |
- <xs:enumeration value='nl'/> |
207 |
- <xs:enumeration value='nl'/> |
208 |
- <xs:enumeration value='nn'/> |
209 |
- <xs:enumeration value='no'/> |
210 |
- <xs:enumeration value='nr'/> |
211 |
- <xs:enumeration value='nv'/> |
212 |
- <xs:enumeration value='ny'/> |
213 |
- <xs:enumeration value='oc'/> |
214 |
- <xs:enumeration value='oj'/> |
215 |
- <xs:enumeration value='om'/> |
216 |
- <xs:enumeration value='or'/> |
217 |
- <xs:enumeration value='os'/> |
218 |
- <xs:enumeration value='pa'/> |
219 |
- <xs:enumeration value='pi'/> |
220 |
- <xs:enumeration value='pl'/> |
221 |
- <xs:enumeration value='ps'/> |
222 |
- <xs:enumeration value='pt'/> |
223 |
- <xs:enumeration value='qu'/> |
224 |
- <xs:enumeration value='rm'/> |
225 |
- <xs:enumeration value='rn'/> |
226 |
- <xs:enumeration value='ro'/> |
227 |
- <xs:enumeration value='ro'/> |
228 |
- <xs:enumeration value='ru'/> |
229 |
- <xs:enumeration value='rw'/> |
230 |
- <xs:enumeration value='sa'/> |
231 |
- <xs:enumeration value='sc'/> |
232 |
- <xs:enumeration value='sd'/> |
233 |
- <xs:enumeration value='se'/> |
234 |
- <xs:enumeration value='sg'/> |
235 |
- <xs:enumeration value='si'/> |
236 |
- <xs:enumeration value='sk'/> |
237 |
- <xs:enumeration value='sk'/> |
238 |
- <xs:enumeration value='sl'/> |
239 |
- <xs:enumeration value='sm'/> |
240 |
- <xs:enumeration value='sn'/> |
241 |
- <xs:enumeration value='so'/> |
242 |
- <xs:enumeration value='sq'/> |
243 |
- <xs:enumeration value='sq'/> |
244 |
- <xs:enumeration value='sr'/> |
245 |
- <xs:enumeration value='ss'/> |
246 |
- <xs:enumeration value='st'/> |
247 |
- <xs:enumeration value='su'/> |
248 |
- <xs:enumeration value='sv'/> |
249 |
- <xs:enumeration value='sw'/> |
250 |
- <xs:enumeration value='ta'/> |
251 |
- <xs:enumeration value='te'/> |
252 |
- <xs:enumeration value='tg'/> |
253 |
- <xs:enumeration value='th'/> |
254 |
- <xs:enumeration value='ti'/> |
255 |
- <xs:enumeration value='tk'/> |
256 |
- <xs:enumeration value='tl'/> |
257 |
- <xs:enumeration value='tn'/> |
258 |
- <xs:enumeration value='to'/> |
259 |
- <xs:enumeration value='tr'/> |
260 |
- <xs:enumeration value='ts'/> |
261 |
- <xs:enumeration value='tt'/> |
262 |
- <xs:enumeration value='tw'/> |
263 |
- <xs:enumeration value='ty'/> |
264 |
- <xs:enumeration value='ug'/> |
265 |
- <xs:enumeration value='uk'/> |
266 |
- <xs:enumeration value='ur'/> |
267 |
- <xs:enumeration value='uz'/> |
268 |
- <xs:enumeration value='ve'/> |
269 |
- <xs:enumeration value='vi'/> |
270 |
- <xs:enumeration value='vo'/> |
271 |
- <xs:enumeration value='wa'/> |
272 |
- <xs:enumeration value='wo'/> |
273 |
- <xs:enumeration value='xh'/> |
274 |
- <xs:enumeration value='yi'/> |
275 |
- <xs:enumeration value='yo'/> |
276 |
- <xs:enumeration value='za'/> |
277 |
- <xs:enumeration value='zh'/> |
278 |
- <xs:enumeration value='zh'/> |
279 |
- <xs:enumeration value='zu'/> |
280 |
- </xs:restriction> |
281 |
- </xs:simpleType> |
282 |
- |
283 |
<xs:simpleType name='restrictAttrType'> |
284 |
<xs:restriction base='xs:token'> |
285 |
<!-- simplified package dependency syntax --> |
286 |
-- |
287 |
2.35.1 |