Text · 11843 bytes Raw Blame History
1 <?xml version="1.0"?>
2 <grammar xmlns="http://relaxng.org/ns/structure/1.0" ns="">
3 <start>
4 <element name="interface">
5 <optional>
6 <attribute name="domain">
7 <text/>
8 </attribute>
9 </optional>
10 <zeroOrMore>
11 <choice>
12 <ref name="requires"/>
13 <ref name="object"/>
14 <ref name="template"/>
15 <ref name="menu"/>
16 </choice>
17 </zeroOrMore>
18 </element>
19 </start>
20 <define name="requires">
21 <element name="requires">
22 <attribute name="lib">
23 <text/>
24 </attribute>
25 <attribute name="version">
26 <text/>
27 </attribute>
28 </element>
29 </define>
30 <define name="object">
31 <element name="object">
32 <optional>
33 <attribute name="id">
34 <data type="ID" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
35 </attribute>
36 </optional>
37 <attribute name="class">
38 <text/>
39 </attribute>
40 <optional>
41 <attribute name="type-func">
42 <text/>
43 </attribute>
44 </optional>
45 <optional>
46 <attribute name="constructor">
47 <text/>
48 </attribute>
49 </optional>
50 <zeroOrMore>
51 <choice>
52 <ref name="property"/>
53 <ref name="signal"/>
54 <ref name="child"/>
55 <ref name="constraints"/>
56 <ref name="ANY"/>
57 </choice>
58 </zeroOrMore>
59 </element>
60 </define>
61 <define name="template">
62 <element name="template">
63 <attribute name="class">
64 <text/>
65 </attribute>
66 <attribute name="parent">
67 <text/>
68 </attribute>
69 <zeroOrMore>
70 <choice>
71 <ref name="property"/>
72 <ref name="signal"/>
73 <ref name="child"/>
74 <ref name="ANY"/>
75 </choice>
76 </zeroOrMore>
77 </element>
78 </define>
79 <define name="property">
80 <element name="property">
81 <attribute name="name">
82 <text/>
83 </attribute>
84 <optional>
85 <attribute name="translatable">
86 <choice>
87 <value>yes</value>
88 <value>no</value>
89 </choice>
90 </attribute>
91 </optional>
92 <optional>
93 <attribute name="comments">
94 <text/>
95 </attribute>
96 </optional>
97 <optional>
98 <attribute name="context">
99 <text/>
100 </attribute>
101 </optional>
102 <optional>
103 <group>
104 <attribute name="bind-source">
105 <text/>
106 </attribute>
107 <optional>
108 <attribute name="bind-property">
109 <text/>
110 </attribute>
111 </optional>
112 <optional>
113 <attribute name="bind-flags">
114 <text/>
115 </attribute>
116 </optional>
117 </group>
118 </optional>
119 <choice>
120 <text/>
121 <ref name="object"/>
122 <ref name="constant"/>
123 <ref name="lookup"/>
124 <ref name="closure"/>
125 <ref name="menu"/>
126 </choice>
127 </element>
128 </define>
129 <define name="signal">
130 <element name="signal">
131 <attribute name="name">
132 <text/>
133 </attribute>
134 <attribute name="handler">
135 <text/>
136 </attribute>
137 <optional>
138 <attribute name="after">
139 <text/>
140 </attribute>
141 </optional>
142 <optional>
143 <attribute name="swapped">
144 <text/>
145 </attribute>
146 </optional>
147 <optional>
148 <attribute name="object">
149 <text/>
150 </attribute>
151 </optional>
152 <optional>
153 <attribute name="last_modification_time">
154 <text/>
155 </attribute>
156 </optional>
157 <empty/>
158 </element>
159 </define>
160 <define name="child">
161 <element name="child">
162 <optional>
163 <attribute name="type">
164 <text/>
165 </attribute>
166 </optional>
167 <optional>
168 <attribute name="internal-child">
169 <text/>
170 </attribute>
171 </optional>
172 <zeroOrMore>
173 <choice>
174 <ref name="object"/>
175 <ref name="ANY"/>
176 </choice>
177 </zeroOrMore>
178 </element>
179 </define>
180 <define name="menu">
181 <element name="menu">
182 <optional>
183 <attribute name="id">
184 <data type="ID" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
185 </attribute>
186 </optional>
187 <optional>
188 <attribute name="domain">
189 <text/>
190 </attribute>
191 </optional>
192 <zeroOrMore>
193 <choice>
194 <ref name="item"/>
195 <ref name="submenu"/>
196 <ref name="section"/>
197 </choice>
198 </zeroOrMore>
199 </element>
200 </define>
201 <define name="item">
202 <element name="item">
203 <optional>
204 <attribute name="id">
205 <data type="ID" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
206 </attribute>
207 </optional>
208 <zeroOrMore>
209 <choice>
210 <ref name="attribute_"/>
211 <ref name="link"/>
212 </choice>
213 </zeroOrMore>
214 </element>
215 </define>
216 <define name="attribute_">
217 <element name="attribute">
218 <attribute name="name">
219 <text/>
220 </attribute>
221 <optional>
222 <attribute name="type">
223 <text/>
224 </attribute>
225 </optional>
226 <optional>
227 <attribute name="translatable">
228 <choice>
229 <value>yes</value>
230 <value>no</value>
231 </choice>
232 </attribute>
233 </optional>
234 <optional>
235 <attribute name="context">
236 <text/>
237 </attribute>
238 </optional>
239 <optional>
240 <attribute name="comments">
241 <text/>
242 </attribute>
243 </optional>
244 <optional>
245 <text/>
246 </optional>
247 </element>
248 </define>
249 <define name="link">
250 <element name="link">
251 <optional>
252 <attribute name="id">
253 <data type="ID" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
254 </attribute>
255 </optional>
256 <attribute name="name">
257 <text/>
258 </attribute>
259 <zeroOrMore>
260 <ref name="item"/>
261 </zeroOrMore>
262 </element>
263 </define>
264 <define name="submenu">
265 <element name="submenu">
266 <optional>
267 <attribute name="id">
268 <data type="ID" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
269 </attribute>
270 </optional>
271 <zeroOrMore>
272 <choice>
273 <ref name="attribute_"/>
274 <ref name="item"/>
275 <ref name="submenu"/>
276 <ref name="section"/>
277 </choice>
278 </zeroOrMore>
279 </element>
280 </define>
281 <define name="section">
282 <element name="section">
283 <optional>
284 <attribute name="id">
285 <data type="ID" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
286 </attribute>
287 </optional>
288 <zeroOrMore>
289 <choice>
290 <ref name="attribute_"/>
291 <ref name="item"/>
292 <ref name="submenu"/>
293 <ref name="section"/>
294 </choice>
295 </zeroOrMore>
296 </element>
297 </define>
298 <define name="ANY">
299 <element>
300 <anyName>
301 <except>
302 <name>interface</name>
303 <name>requires</name>
304 <name>object</name>
305 <name>property</name>
306 <name>signal</name>
307 <name>child</name>
308 <name>menu</name>
309 <name>item</name>
310 <name>attribute</name>
311 <name>link</name>
312 <name>submenu</name>
313 <name>section</name>
314 <name>lookup</name>
315 <name>closure</name>
316 <name>constant</name>
317 <name>constraint</name>
318 <name>guide</name>
319 </except>
320 </anyName>
321 <zeroOrMore>
322 <attribute>
323 <anyName/>
324 <text/>
325 </attribute>
326 </zeroOrMore>
327 <interleave>
328 <zeroOrMore>
329 <ref name="ALL"/>
330 </zeroOrMore>
331 <optional>
332 <text/>
333 </optional>
334 </interleave>
335 </element>
336 </define>
337 <define name="ALL">
338 <element>
339 <anyName/>
340 <zeroOrMore>
341 <attribute>
342 <anyName/>
343 <text/>
344 </attribute>
345 </zeroOrMore>
346 <interleave>
347 <zeroOrMore>
348 <ref name="ALL"/>
349 </zeroOrMore>
350 <optional>
351 <text/>
352 </optional>
353 </interleave>
354 </element>
355 </define>
356 <define name="constant">
357 <element name="constant">
358 <attribute name="type">
359 <text/>
360 </attribute>
361 <optional>
362 <attribute name="translatable">
363 <choice>
364 <value>yes</value>
365 <value>no</value>
366 </choice>
367 </attribute>
368 </optional>
369 <optional>
370 <attribute name="context">
371 <text/>
372 </attribute>
373 </optional>
374 <optional>
375 <attribute name="comments">
376 <text/>
377 </attribute>
378 </optional>
379 <optional>
380 <text/>
381 </optional>
382 </element>
383 </define>
384 <define name="lookup">
385 <element name="lookup">
386 <optional>
387 <attribute name="name">
388 <text/>
389 </attribute>
390 </optional>
391 <optional>
392 <attribute name="type">
393 <text/>
394 </attribute>
395 </optional>
396 <choice>
397 <text/>
398 <ref name="constant"/>
399 </choice>
400 </element>
401 </define>
402 <define name="closure">
403 <element name="closure">
404 <attribute name="type">
405 <text/>
406 </attribute>
407 <attribute name="function">
408 <text/>
409 </attribute>
410 <zeroOrMore>
411 <choice>
412 <ref name="constant"/>
413 <ref name="lookup"/>
414 </choice>
415 </zeroOrMore>
416 </element>
417 </define>
418 <define name="guide">
419 <element name="guide">
420 <optional>
421 <attribute name="name">
422 <text/>
423 </attribute>
424 </optional>
425 <optional>
426 <attribute name="min-width">
427 <text/>
428 </attribute>
429 </optional>
430 <optional>
431 <attribute name="min-height">
432 <text/>
433 </attribute>
434 </optional>
435 <optional>
436 <attribute name="nat-width">
437 <text/>
438 </attribute>
439 </optional>
440 <optional>
441 <attribute name="nat-height">
442 <text/>
443 </attribute>
444 </optional>
445 <optional>
446 <attribute name="max-width">
447 <text/>
448 </attribute>
449 </optional>
450 <optional>
451 <attribute name="max-height">
452 <text/>
453 </attribute>
454 </optional>
455 <optional>
456 <attribute name="strength">
457 <text/>
458 </attribute>
459 </optional>
460 </element>
461 </define>
462 <define name="constraint">
463 <element name="constraint">
464 <attribute name="target">
465 <text/>
466 </attribute>
467 <attribute name="target-attribute">
468 <text/>
469 </attribute>
470 <optional>
471 <group>
472 <attribute name="source">
473 <text/>
474 </attribute>
475 <attribute name="source-attribute">
476 <text/>
477 </attribute>
478 </group>
479 </optional>
480 <optional>
481 <attribute name="relation">
482 <text/>
483 </attribute>
484 </optional>
485 <optional>
486 <attribute name="constant">
487 <text/>
488 </attribute>
489 </optional>
490 <optional>
491 <attribute name="multiplier">
492 <text/>
493 </attribute>
494 </optional>
495 <optional>
496 <attribute name="strength">
497 <text/>
498 </attribute>
499 </optional>
500 </element>
501 </define>
502 <define name="constraints">
503 <element name="constraints">
504 <zeroOrMore>
505 <choice>
506 <ref name="guide"/>
507 <ref name="constraint"/>
508 </choice>
509 </zeroOrMore>
510 </element>
511 </define>
512 </grammar>