html-validator 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,472 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" >
3
+ <!-- ##################################################################### -->
4
+ <define name="common.attrs.interact" combine="interleave">
5
+ <a:documentation> RELAX NG Schema for HTML 5: Web Application Features #</a:documentation>
6
+ <!-- ##################################################################### -->
7
+ <a:documentation>Additions to Common Attributes</a:documentation>
8
+ <interleave>
9
+ <optional>
10
+ <ref name="common.attrs.contextmenu"/>
11
+ </optional>
12
+ <optional>
13
+ <ref name="common.attrs.contenteditable"/>
14
+ </optional>
15
+ <optional>
16
+ <ref name="common.attrs.draggable"/>
17
+ </optional>
18
+ <optional>
19
+ <ref name="common.attrs.dropzone"/>
20
+ </optional>
21
+ <optional>
22
+ <ref name="common.attrs.hidden"/>
23
+ </optional>
24
+ <optional>
25
+ <ref name="common.attrs.spellcheck"/>
26
+ </optional>
27
+ </interleave>
28
+ </define>
29
+ <define name="common.attrs.other" combine="interleave">
30
+ <ref name="common.attrs.interact"/>
31
+ </define>
32
+ <define name="common.attrs.contextmenu">
33
+ <a:documentation>Context Menu: contextmenu</a:documentation>
34
+ <attribute name="contextmenu">
35
+ <ref name="common.data.idref"/>
36
+ </attribute>
37
+ </define>
38
+ <define name="common.attrs.contenteditable">
39
+ <a:documentation>Editable Content: contenteditable</a:documentation>
40
+ <attribute name="contenteditable">
41
+ <choice>
42
+ <value type="string">true</value>
43
+ <value type="string">false</value>
44
+ <value type="string"/>
45
+ </choice>
46
+ </attribute>
47
+ </define>
48
+ <define name="common.attrs.draggable">
49
+ <a:documentation>Draggable Element: draggable</a:documentation>
50
+ <attribute name="draggable">
51
+ <choice>
52
+ <value type="string">true</value>
53
+ <value type="string">false</value>
54
+ </choice>
55
+ </attribute>
56
+ </define>
57
+ <define name="common.attrs.dropzone">
58
+ <a:documentation>Dropzone: dropzone</a:documentation>
59
+ <attribute name="dropzone">
60
+ <list>
61
+ <zeroOrMore>
62
+ <choice>
63
+ <data type="string" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
64
+ <param name="pattern">[sS][tT][rR][iI][nN][gG]:.+</param>
65
+ </data>
66
+ <data type="string" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
67
+ <param name="pattern">[fF][iI][lL][eE]:.+</param>
68
+ </data>
69
+ </choice>
70
+ </zeroOrMore>
71
+ <optional>
72
+ <choice>
73
+ <value type="string">copy</value>
74
+ <value type="string">move</value>
75
+ <value type="string">link</value>
76
+ </choice>
77
+ </optional>
78
+ <zeroOrMore>
79
+ <choice>
80
+ <data type="string" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
81
+ <param name="pattern">[sS][tT][rR][iI][nN][gG]:.+</param>
82
+ </data>
83
+ <data type="string" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
84
+ <param name="pattern">[fF][iI][lL][eE]:.+</param>
85
+ </data>
86
+ </choice>
87
+ </zeroOrMore>
88
+ </list>
89
+ </attribute>
90
+ </define>
91
+ <define name="common.attrs.hidden">
92
+ <a:documentation>Hidden Element: hidden</a:documentation>
93
+ <attribute name="hidden">
94
+ <choice>
95
+ <value type="string">hidden</value>
96
+ <value type="string"/>
97
+ </choice>
98
+ </attribute>
99
+ </define>
100
+ <define name="common.attrs.spellcheck">
101
+ <a:documentation>Spellchecking and grammar checking: spellcheck</a:documentation>
102
+ <attribute name="spellcheck">
103
+ <choice>
104
+ <value type="string">true</value>
105
+ <value type="string">false</value>
106
+ <value type="string"/>
107
+ </choice>
108
+ </attribute>
109
+ </define>
110
+ <define name="html.attrs.manifest">
111
+ <a:documentation>Application Cache: manifest</a:documentation>
112
+ <attribute name="manifest">
113
+ <ref name="common.data.uri.non-empty"/>
114
+ </attribute>
115
+ </define>
116
+ <define name="html.attrs" combine="interleave">
117
+ <optional>
118
+ <ref name="html.attrs.manifest"/>
119
+ </optional>
120
+ </define>
121
+ <define name="progress.elem">
122
+ <a:documentation>Progess Indicator: &lt;progress&gt;</a:documentation>
123
+ <element name="progress">
124
+ <interleave>
125
+ <ref name="progress.inner"/>
126
+ <ref name="progress.attrs"/>
127
+ </interleave>
128
+ </element>
129
+ </define>
130
+ <define name="progress.attrs">
131
+ <interleave>
132
+ <ref name="common.attrs"/>
133
+ <optional>
134
+ <ref name="progress.attrs.value"/>
135
+ </optional>
136
+ <optional>
137
+ <ref name="progress.attrs.max"/>
138
+ </optional>
139
+ </interleave>
140
+ </define>
141
+ <define name="progress.attrs.value">
142
+ <attribute name="value">
143
+ <ref name="common.data.float.non-negative"/>
144
+ </attribute>
145
+ </define>
146
+ <define name="progress.attrs.max">
147
+ <attribute name="max">
148
+ <ref name="common.data.float.positive"/>
149
+ </attribute>
150
+ </define>
151
+ <define name="progress.inner">
152
+ <ref name="common.inner.phrasing"/>
153
+ </define>
154
+ <!-- Cannot enforce textContent format here -->
155
+ <define name="common.elem.phrasing" combine="choice">
156
+ <ref name="progress.elem"/>
157
+ </define>
158
+ <define name="command.command.elem">
159
+ <a:documentation>Command with an associated action: &lt;command type='command'&gt;</a:documentation>
160
+ <element name="command">
161
+ <interleave>
162
+ <ref name="command.inner"/>
163
+ <ref name="command.command.attrs"/>
164
+ </interleave>
165
+ </element>
166
+ </define>
167
+ <define name="command.command.attrs">
168
+ <interleave>
169
+ <ref name="common.attrs"/>
170
+ <optional>
171
+ <ref name="command.command.attrs.type"/>
172
+ </optional>
173
+ <ref name="common-command.attrs"/>
174
+ </interleave>
175
+ </define>
176
+ <define name="command.command.attrs.type">
177
+ <attribute name="type">
178
+ <value type="string">command</value>
179
+ </attribute>
180
+ </define>
181
+ <define name="command.elem">
182
+ <ref name="command.command.elem"/>
183
+ </define>
184
+ <define name="command.radio.elem">
185
+ <a:documentation>Selection of one item from a list of items: &lt;command type='radio'&gt;</a:documentation>
186
+ <element name="command">
187
+ <interleave>
188
+ <ref name="command.inner"/>
189
+ <ref name="command.radio.attrs"/>
190
+ </interleave>
191
+ </element>
192
+ </define>
193
+ <define name="command.radio.attrs">
194
+ <interleave>
195
+ <ref name="common.attrs"/>
196
+ <interleave>
197
+ <ref name="command.radio.attrs.type"/>
198
+ <ref name="command.radio.attrs.radiogroup"/>
199
+ <optional>
200
+ <!-- REVISIT taking liberties here -->
201
+ <ref name="command.radio.attrs.checked"/>
202
+ </optional>
203
+ </interleave>
204
+ <ref name="common-command.attrs"/>
205
+ </interleave>
206
+ </define>
207
+ <define name="command.radio.attrs.type">
208
+ <attribute name="type">
209
+ <value type="string">radio</value>
210
+ </attribute>
211
+ </define>
212
+ <define name="command.radio.attrs.radiogroup">
213
+ <attribute name="radiogroup">
214
+ <data type="string" datatypeLibrary=""/>
215
+ <!-- REVISIT need special format here? -->
216
+ </attribute>
217
+ </define>
218
+ <define name="command.radio.attrs.checked">
219
+ <attribute name="checked">
220
+ <choice>
221
+ <value type="string">checked</value>
222
+ <value type="string"/>
223
+ </choice>
224
+ </attribute>
225
+ </define>
226
+ <define name="command.elem" combine="choice">
227
+ <ref name="command.radio.elem"/>
228
+ </define>
229
+ <define name="command.checkbox.elem">
230
+ <a:documentation>State or option that can be toggled: &lt;command type='checkbox'&gt;</a:documentation>
231
+ <element name="command">
232
+ <interleave>
233
+ <ref name="command.inner"/>
234
+ <ref name="command.checkbox.attrs"/>
235
+ </interleave>
236
+ </element>
237
+ </define>
238
+ <define name="command.checkbox.attrs">
239
+ <interleave>
240
+ <ref name="common.attrs"/>
241
+ <interleave>
242
+ <ref name="command.checkbox.attrs.type"/>
243
+ <optional>
244
+ <ref name="command.checkbox.attrs.checked"/>
245
+ </optional>
246
+ </interleave>
247
+ <ref name="common-command.attrs"/>
248
+ </interleave>
249
+ </define>
250
+ <define name="command.checkbox.attrs.type">
251
+ <attribute name="type">
252
+ <value type="string">checkbox</value>
253
+ </attribute>
254
+ </define>
255
+ <define name="command.checkbox.attrs.checked">
256
+ <attribute name="checked">
257
+ <choice>
258
+ <value type="string">checked</value>
259
+ <value type="string"/>
260
+ </choice>
261
+ </attribute>
262
+ </define>
263
+ <define name="command.elem" combine="choice">
264
+ <ref name="command.checkbox.elem"/>
265
+ </define>
266
+ <define name="common-command.attrs">
267
+ <interleave>
268
+ <optional>
269
+ <ref name="command.attrs.label"/>
270
+ </optional>
271
+ <optional>
272
+ <ref name="command.attrs.icon"/>
273
+ </optional>
274
+ <optional>
275
+ <ref name="command.attrs.disabled"/>
276
+ </optional>
277
+ </interleave>
278
+ </define>
279
+ <define name="command.attrs.label">
280
+ <attribute name="label">
281
+ <data type="string" datatypeLibrary=""/>
282
+ </attribute>
283
+ </define>
284
+ <define name="command.attrs.icon">
285
+ <attribute name="icon">
286
+ <ref name="common.data.uri.non-empty"/>
287
+ </attribute>
288
+ </define>
289
+ <define name="command.attrs.disabled">
290
+ <attribute name="disabled">
291
+ <choice>
292
+ <value type="string">disabled</value>
293
+ <value type="string"/>
294
+ </choice>
295
+ </attribute>
296
+ </define>
297
+ <define name="command.inner">
298
+ <empty/>
299
+ </define>
300
+ <define name="common.elem.metadata" combine="choice">
301
+ <interleave>
302
+ <ref name="command.elem"/>
303
+ <ref name="nonHTMLizable"/>
304
+ </interleave>
305
+ </define>
306
+ <define name="common.elem.phrasing" combine="choice">
307
+ <ref name="command.elem"/>
308
+ </define>
309
+ <define name="menu.elem">
310
+ <a:documentation>Menu: &lt;menu&gt;</a:documentation>
311
+ <element name="menu">
312
+ <interleave>
313
+ <ref name="menu.inner"/>
314
+ <ref name="menu.attrs"/>
315
+ </interleave>
316
+ </element>
317
+ </define>
318
+ <define name="menu.attrs">
319
+ <interleave>
320
+ <ref name="common.attrs"/>
321
+ <optional>
322
+ <ref name="menu.attrs.type"/>
323
+ </optional>
324
+ <optional>
325
+ <ref name="menu.attrs.label"/>
326
+ </optional>
327
+ </interleave>
328
+ </define>
329
+ <define name="menu.attrs.type">
330
+ <attribute name="type">
331
+ <choice>
332
+ <value type="string">toolbar</value>
333
+ <value type="string">context</value>
334
+ </choice>
335
+ </attribute>
336
+ </define>
337
+ <define name="menu.attrs.label">
338
+ <attribute name="label">
339
+ <data type="string" datatypeLibrary=""/>
340
+ </attribute>
341
+ </define>
342
+ <define name="menu.inner">
343
+ <choice>
344
+ <zeroOrMore>
345
+ <ref name="mli.elem"/>
346
+ </zeroOrMore>
347
+ <ref name="common.inner.flow"/>
348
+ </choice>
349
+ </define>
350
+ <define name="common.elem.flow" combine="choice">
351
+ <ref name="menu.elem"/>
352
+ </define>
353
+ <!-- REVISIT allow nested menus -->
354
+ <define name="mli.elem">
355
+ <a:documentation>Menu Item: &lt;li&gt;</a:documentation>
356
+ <element name="li">
357
+ <interleave>
358
+ <ref name="mli.inner"/>
359
+ <ref name="mli.attrs"/>
360
+ </interleave>
361
+ </element>
362
+ </define>
363
+ <define name="mli.attrs">
364
+ <ref name="common.attrs"/>
365
+ </define>
366
+ <define name="mli.inner">
367
+ <ref name="common.inner.flow"/>
368
+ </define>
369
+ <define name="canvas.elem.flow">
370
+ <a:documentation>Canvas for Dynamic Graphics: &lt;canvas&gt;</a:documentation>
371
+ <element name="canvas">
372
+ <interleave>
373
+ <ref name="canvas.inner.flow"/>
374
+ <ref name="canvas.attrs"/>
375
+ </interleave>
376
+ </element>
377
+ </define>
378
+ <define name="canvas.elem.phrasing">
379
+ <element name="canvas">
380
+ <interleave>
381
+ <ref name="canvas.inner.phrasing"/>
382
+ <ref name="canvas.attrs"/>
383
+ </interleave>
384
+ </element>
385
+ </define>
386
+ <define name="canvas.attrs">
387
+ <interleave>
388
+ <ref name="common.attrs"/>
389
+ <optional>
390
+ <ref name="canvas.attrs.height"/>
391
+ </optional>
392
+ <optional>
393
+ <ref name="canvas.attrs.width"/>
394
+ </optional>
395
+ <optional>
396
+ <ref name="common.attrs.aria"/>
397
+ </optional>
398
+ </interleave>
399
+ </define>
400
+ <define name="canvas.attrs.height">
401
+ <attribute name="height">
402
+ <ref name="common.data.integer.non-negative"/>
403
+ </attribute>
404
+ </define>
405
+ <define name="canvas.attrs.width">
406
+ <attribute name="width">
407
+ <ref name="common.data.integer.non-negative"/>
408
+ </attribute>
409
+ </define>
410
+ <define name="canvas.inner.flow">
411
+ <ref name="common.inner.flow"/>
412
+ </define>
413
+ <define name="canvas.inner.phrasing">
414
+ <ref name="common.inner.phrasing"/>
415
+ </define>
416
+ <define name="common.elem.flow" combine="choice">
417
+ <ref name="canvas.elem.flow"/>
418
+ </define>
419
+ <define name="common.elem.phrasing" combine="choice">
420
+ <ref name="canvas.elem.phrasing"/>
421
+ </define>
422
+ <define name="details.elem">
423
+ <a:documentation>Additional On-Demand Information: &lt;details&gt;</a:documentation>
424
+ <element name="details">
425
+ <interleave>
426
+ <ref name="details.inner"/>
427
+ <ref name="details.attrs"/>
428
+ </interleave>
429
+ </element>
430
+ </define>
431
+ <define name="details.attrs">
432
+ <interleave>
433
+ <ref name="common.attrs"/>
434
+ <optional>
435
+ <ref name="details.attrs.open"/>
436
+ </optional>
437
+ <optional>
438
+ <ref name="common.attrs.aria.implicit.region"/>
439
+ </optional>
440
+ </interleave>
441
+ </define>
442
+ <define name="details.attrs.open">
443
+ <attribute name="open">
444
+ <choice>
445
+ <value type="string">open</value>
446
+ <value type="string"/>
447
+ </choice>
448
+ </attribute>
449
+ </define>
450
+ <define name="details.inner">
451
+ <ref name="summary.elem"/>
452
+ <ref name="common.inner.flow"/>
453
+ </define>
454
+ <define name="common.elem.flow" combine="choice">
455
+ <ref name="details.elem"/>
456
+ </define>
457
+ <define name="summary.elem">
458
+ <a:documentation>Caption/summary for details element: &lt;summary&gt;</a:documentation>
459
+ <element name="summary">
460
+ <interleave>
461
+ <ref name="summary.inner"/>
462
+ <ref name="summary.attrs"/>
463
+ </interleave>
464
+ </element>
465
+ </define>
466
+ <define name="summary.attrs">
467
+ <ref name="common.attrs"/>
468
+ </define>
469
+ <define name="summary.inner">
470
+ <ref name="common.inner.phrasing"/>
471
+ </define>
472
+ </grammar>