@likecoin/epubcheck-ts 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +339 -0
  3. package/dist/index.cjs +1904 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.cts +523 -0
  6. package/dist/index.d.ts +523 -0
  7. package/dist/index.js +1895 -0
  8. package/dist/index.js.map +1 -0
  9. package/package.json +69 -0
  10. package/schemas/applications.rng +429 -0
  11. package/schemas/aria.rng +3355 -0
  12. package/schemas/block.rng +488 -0
  13. package/schemas/common.rng +1076 -0
  14. package/schemas/container.rng +24 -0
  15. package/schemas/core-scripting.rng +950 -0
  16. package/schemas/data.rng +161 -0
  17. package/schemas/datatypes.rng +401 -0
  18. package/schemas/embed.rng +980 -0
  19. package/schemas/epub-mathml3-inc.rng +161 -0
  20. package/schemas/epub-nav-30.rnc +44 -0
  21. package/schemas/epub-nav-30.rng +19985 -0
  22. package/schemas/epub-nav-30.sch +87 -0
  23. package/schemas/epub-prefix-attr.rng +17 -0
  24. package/schemas/epub-shared-inc.rng +29 -0
  25. package/schemas/epub-ssml-attrs.rng +17 -0
  26. package/schemas/epub-svg-30.rnc +17 -0
  27. package/schemas/epub-svg-30.rng +19903 -0
  28. package/schemas/epub-svg-30.sch +7 -0
  29. package/schemas/epub-svg-forgiving-inc.rng +315 -0
  30. package/schemas/epub-switch.rng +121 -0
  31. package/schemas/epub-trigger.rng +90 -0
  32. package/schemas/epub-type-attr.rng +12 -0
  33. package/schemas/epub-xhtml-30.rnc +6 -0
  34. package/schemas/epub-xhtml-30.rng +19882 -0
  35. package/schemas/epub-xhtml-30.sch +409 -0
  36. package/schemas/epub-xhtml-inc.rng +151 -0
  37. package/schemas/epub-xhtml-integration.rng +565 -0
  38. package/schemas/epub-xhtml-svg-mathml.rng +17 -0
  39. package/schemas/form-datatypes.rng +54 -0
  40. package/schemas/mathml3-common.rng +336 -0
  41. package/schemas/mathml3-content.rng +1552 -0
  42. package/schemas/mathml3-inc.rng +30 -0
  43. package/schemas/mathml3-presentation.rng +2341 -0
  44. package/schemas/mathml3-strict-content.rng +205 -0
  45. package/schemas/media.rng +374 -0
  46. package/schemas/meta.rng +754 -0
  47. package/schemas/microdata.rng +192 -0
  48. package/schemas/ncx.rng +308 -0
  49. package/schemas/ocf-container-30.rnc +37 -0
  50. package/schemas/ocf-container-30.rng +568 -0
  51. package/schemas/opf.rng +15 -0
  52. package/schemas/opf20.rng +513 -0
  53. package/schemas/package-30.rnc +133 -0
  54. package/schemas/package-30.rng +1153 -0
  55. package/schemas/package-30.sch +444 -0
  56. package/schemas/phrase.rng +746 -0
  57. package/schemas/rdfa.rng +552 -0
  58. package/schemas/revision.rng +106 -0
  59. package/schemas/ruby.rng +141 -0
  60. package/schemas/sectional.rng +278 -0
  61. package/schemas/structural.rng +298 -0
  62. package/schemas/tables.rng +420 -0
  63. package/schemas/web-components.rng +184 -0
  64. package/schemas/web-forms.rng +975 -0
  65. package/schemas/web-forms2.rng +1236 -0
@@ -0,0 +1,975 @@
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" datatypeLibrary="">
3
+ <!-- ##################################################################### -->
4
+ <define name="common-form.attrs">
5
+ <a:documentation> RELAX NG Schema for HTML 5: Web Forms 1.0 markup #</a:documentation>
6
+ <!-- ##################################################################### -->
7
+ <a:documentation>Shared attributes for form controls</a:documentation>
8
+ <interleave>
9
+ <optional>
10
+ <ref name="common-form.attrs.name"/>
11
+ </optional>
12
+ <optional>
13
+ <ref name="common-form.attrs.disabled"/>
14
+ </optional>
15
+ </interleave>
16
+ </define>
17
+ <define name="common-form.attrs.name">
18
+ <attribute name="name">
19
+ <ref name="form.data.nonemptystring"/>
20
+ </attribute>
21
+ </define>
22
+ <define name="common-form.attrs.disabled">
23
+ <attribute name="disabled">
24
+ <choice>
25
+ <value>disabled</value>
26
+ <value/>
27
+ </choice>
28
+ </attribute>
29
+ </define>
30
+ <define name="shared-form.attrs.readonly">
31
+ <attribute name="readonly">
32
+ <choice>
33
+ <value>readonly</value>
34
+ <value/>
35
+ </choice>
36
+ </attribute>
37
+ </define>
38
+ <define name="shared-form.attrs.maxlength">
39
+ <attribute name="maxlength">
40
+ <ref name="common.data.integer.non-negative"/>
41
+ </attribute>
42
+ </define>
43
+ <define name="shared-form.attrs.size">
44
+ <attribute name="size">
45
+ <ref name="common.data.integer.positive"/>
46
+ </attribute>
47
+ </define>
48
+ <!-- REVISIT tabindex goes in common.attrs -->
49
+ <define name="input.attrs.checked">
50
+ <a:documentation>Shared attributes for &lt;input&gt;</a:documentation>
51
+ <attribute name="checked">
52
+ <choice>
53
+ <value>checked</value>
54
+ <value/>
55
+ </choice>
56
+ </attribute>
57
+ </define>
58
+ <define name="input.text.elem">
59
+ <a:documentation>Text Field: &lt;input type='text'&gt;</a:documentation>
60
+ <element name="input">
61
+ <ref name="input.text.attrs"/>
62
+ </element>
63
+ </define>
64
+ <define name="input.text.attrs">
65
+ <interleave>
66
+ <ref name="common.attrs"/>
67
+ <ref name="common-form.attrs"/>
68
+ <optional>
69
+ <ref name="input.text.attrs.type"/>
70
+ </optional>
71
+ <optional>
72
+ <ref name="shared-form.attrs.maxlength"/>
73
+ </optional>
74
+ <optional>
75
+ <ref name="shared-form.attrs.readonly"/>
76
+ </optional>
77
+ <optional>
78
+ <ref name="shared-form.attrs.size"/>
79
+ </optional>
80
+ <optional>
81
+ <ref name="input.text.attrs.value"/>
82
+ </optional>
83
+ <optional>
84
+ <choice>
85
+ <ref name="common.attrs.aria.implicit.textbox"/>
86
+ <ref name="common.attrs.aria.role.textbox"/>
87
+ <ref name="common.attrs.aria.role.combobox"/>
88
+ <ref name="common.attrs.aria.role.searchbox"/>
89
+ <ref name="common.attrs.aria.role.spinbutton"/>
90
+ </choice>
91
+ </optional>
92
+ </interleave>
93
+ </define>
94
+ <define name="input.text.attrs.type">
95
+ <attribute name="type">
96
+ <value>text</value>
97
+ </attribute>
98
+ </define>
99
+ <define name="input.text.attrs.value">
100
+ <attribute name="value">
101
+ <ref name="form.data.stringwithoutlinebreaks"/>
102
+ </attribute>
103
+ </define>
104
+ <define name="input.elem">
105
+ <ref name="input.text.elem"/>
106
+ </define>
107
+ <define name="input.password.elem">
108
+ <a:documentation>Password Field: &lt;input type='password'&gt;</a:documentation>
109
+ <element name="input">
110
+ <ref name="input.password.attrs"/>
111
+ </element>
112
+ </define>
113
+ <define name="input.password.attrs">
114
+ <interleave>
115
+ <ref name="common.attrs"/>
116
+ <ref name="common-form.attrs"/>
117
+ <ref name="input.password.attrs.type"/>
118
+ <optional>
119
+ <ref name="shared-form.attrs.maxlength"/>
120
+ </optional>
121
+ <optional>
122
+ <ref name="shared-form.attrs.readonly"/>
123
+ </optional>
124
+ <optional>
125
+ <ref name="shared-form.attrs.size"/>
126
+ </optional>
127
+ <optional>
128
+ <ref name="input.password.attrs.value"/>
129
+ </optional>
130
+ </interleave>
131
+ </define>
132
+ <define name="input.password.attrs.type">
133
+ <attribute name="type">
134
+ <value>password</value>
135
+ </attribute>
136
+ </define>
137
+ <define name="input.password.attrs.value">
138
+ <attribute name="value">
139
+ <ref name="form.data.stringwithoutlinebreaks"/>
140
+ </attribute>
141
+ </define>
142
+ <define name="input.elem" combine="choice">
143
+ <ref name="input.password.elem"/>
144
+ </define>
145
+ <define name="input.checkbox.elem">
146
+ <a:documentation>Checkbox: &lt;input type='checkbox'&gt;</a:documentation>
147
+ <element name="input">
148
+ <ref name="input.checkbox.attrs"/>
149
+ </element>
150
+ </define>
151
+ <define name="input.checkbox.attrs">
152
+ <interleave>
153
+ <ref name="common.attrs"/>
154
+ <ref name="common-form.attrs"/>
155
+ <ref name="input.checkbox.attrs.type"/>
156
+ <optional>
157
+ <ref name="input.attrs.checked"/>
158
+ </optional>
159
+ <optional>
160
+ <ref name="input.checkbox.attrs.value"/>
161
+ </optional>
162
+ <optional>
163
+ <choice>
164
+ <ref name="common.attrs.aria.implicit.checkbox"/>
165
+ <ref name="common.attrs.aria.role.checkbox"/>
166
+ <ref name="common.attrs.aria.role.button"/>
167
+ <ref name="common.attrs.aria.role.menuitemcheckbox-checked-not-required"/>
168
+ <ref name="common.attrs.aria.role.option"/>
169
+ <ref name="common.attrs.aria.role.switch-checked-not-required"/>
170
+ </choice>
171
+ </optional>
172
+ </interleave>
173
+ </define>
174
+ <define name="input.checkbox.attrs.type">
175
+ <attribute name="type">
176
+ <value>checkbox</value>
177
+ </attribute>
178
+ </define>
179
+ <define name="input.checkbox.attrs.value">
180
+ <attribute name="value">
181
+ <data type="string"/>
182
+ <!-- REVISIT require non-empty value? -->
183
+ </attribute>
184
+ </define>
185
+ <define name="input.elem" combine="choice">
186
+ <ref name="input.checkbox.elem"/>
187
+ </define>
188
+ <define name="input.radio.elem">
189
+ <a:documentation>Radiobutton: &lt;input type='radio'&gt;</a:documentation>
190
+ <element name="input">
191
+ <ref name="input.radio.attrs"/>
192
+ </element>
193
+ </define>
194
+ <define name="input.radio.attrs">
195
+ <interleave>
196
+ <ref name="common.attrs"/>
197
+ <ref name="common-form.attrs"/>
198
+ <ref name="input.radio.attrs.type"/>
199
+ <optional>
200
+ <ref name="input.attrs.checked"/>
201
+ </optional>
202
+ <optional>
203
+ <ref name="input.radio.attrs.value"/>
204
+ </optional>
205
+ <optional>
206
+ <choice>
207
+ <ref name="common.attrs.aria.implicit.radio"/>
208
+ <ref name="common.attrs.aria.role.radio"/>
209
+ <ref name="common.attrs.aria.role.menuitemradio-checked-not-required"/>
210
+ </choice>
211
+ </optional>
212
+ </interleave>
213
+ </define>
214
+ <define name="input.radio.attrs.type">
215
+ <attribute name="type">
216
+ <value>radio</value>
217
+ </attribute>
218
+ </define>
219
+ <define name="input.radio.attrs.value">
220
+ <attribute name="value">
221
+ <data type="string"/>
222
+ <!-- REVISIT require non-empty value? -->
223
+ </attribute>
224
+ </define>
225
+ <define name="input.elem" combine="choice">
226
+ <ref name="input.radio.elem"/>
227
+ </define>
228
+ <define name="input.button.elem">
229
+ <a:documentation>Scripting Hook Button: &lt;input type='button'&gt;</a:documentation>
230
+ <element name="input">
231
+ <ref name="input.button.attrs"/>
232
+ </element>
233
+ </define>
234
+ <define name="input.button.attrs">
235
+ <interleave>
236
+ <ref name="common.attrs"/>
237
+ <ref name="common-form.attrs"/>
238
+ <ref name="input.button.attrs.type"/>
239
+ <optional>
240
+ <ref name="input.button.attrs.value"/>
241
+ </optional>
242
+ <ref name="button.attrs.popover-controls"/>
243
+ <optional>
244
+ <choice>
245
+ <ref name="common.attrs.aria.implicit.button"/>
246
+ <ref name="common.attrs.aria.role.button"/>
247
+ <ref name="common.attrs.aria.role.checkbox"/>
248
+ <ref name="common.attrs.aria.role.combobox"/>
249
+ <ref name="common.attrs.aria.role.link"/>
250
+ <ref name="common.attrs.aria.role.menuitem"/>
251
+ <ref name="common.attrs.aria.role.menuitemcheckbox"/>
252
+ <ref name="common.attrs.aria.role.menuitemradio"/>
253
+ <ref name="common.attrs.aria.role.option"/>
254
+ <ref name="common.attrs.aria.role.radio"/>
255
+ <ref name="common.attrs.aria.role.switch"/>
256
+ <ref name="common.attrs.aria.role.tab"/>
257
+ </choice>
258
+ </optional>
259
+ </interleave>
260
+ </define>
261
+ <define name="input.button.attrs.type">
262
+ <attribute name="type">
263
+ <value>button</value>
264
+ </attribute>
265
+ </define>
266
+ <define name="input.button.attrs.value">
267
+ <attribute name="value">
268
+ <data type="string"/>
269
+ <!-- REVISIT require non-empty value? -->
270
+ </attribute>
271
+ </define>
272
+ <define name="input.elem" combine="choice">
273
+ <ref name="input.button.elem"/>
274
+ </define>
275
+ <!-- REVISIT should this be enabled by a scripting module only? -->
276
+ <define name="input.submit.elem">
277
+ <a:documentation>Submit Button: &lt;input type='submit'&gt;</a:documentation>
278
+ <element name="input">
279
+ <ref name="input.submit.attrs"/>
280
+ </element>
281
+ </define>
282
+ <define name="input.submit.attrs">
283
+ <interleave>
284
+ <ref name="common.attrs"/>
285
+ <ref name="common-form.attrs"/>
286
+ <ref name="input.submit.attrs.type"/>
287
+ <optional>
288
+ <ref name="input.submit.attrs.value"/>
289
+ </optional>
290
+ <ref name="button.attrs.popover-controls"/>
291
+ <optional>
292
+ <choice>
293
+ <ref name="common.attrs.aria.implicit.button"/>
294
+ <ref name="common.attrs.aria.role.button"/>
295
+ </choice>
296
+ </optional>
297
+ </interleave>
298
+ </define>
299
+ <define name="input.submit.attrs.type">
300
+ <attribute name="type">
301
+ <value>submit</value>
302
+ </attribute>
303
+ </define>
304
+ <define name="input.submit.attrs.value">
305
+ <attribute name="value">
306
+ <data type="string"/>
307
+ <!-- REVISIT require non-empty value? -->
308
+ </attribute>
309
+ </define>
310
+ <define name="input.elem" combine="choice">
311
+ <ref name="input.submit.elem"/>
312
+ </define>
313
+ <define name="input.reset.elem">
314
+ <a:documentation>Reset Button: &lt;input type='reset'&gt;</a:documentation>
315
+ <element name="input">
316
+ <ref name="input.reset.attrs"/>
317
+ </element>
318
+ </define>
319
+ <define name="input.reset.attrs">
320
+ <interleave>
321
+ <ref name="common.attrs"/>
322
+ <ref name="common-form.attrs"/>
323
+ <ref name="input.reset.attrs.type"/>
324
+ <optional>
325
+ <ref name="input.reset.attrs.value"/>
326
+ </optional>
327
+ <ref name="button.attrs.popover-controls"/>
328
+ <optional>
329
+ <choice>
330
+ <ref name="common.attrs.aria.implicit.button"/>
331
+ <ref name="common.attrs.aria.role.button"/>
332
+ </choice>
333
+ </optional>
334
+ </interleave>
335
+ </define>
336
+ <define name="input.reset.attrs.type">
337
+ <attribute name="type">
338
+ <value>reset</value>
339
+ </attribute>
340
+ </define>
341
+ <define name="input.reset.attrs.value">
342
+ <attribute name="value">
343
+ <data type="string"/>
344
+ <!-- REVISIT require non-empty value? -->
345
+ </attribute>
346
+ </define>
347
+ <define name="input.elem" combine="choice">
348
+ <ref name="input.reset.elem"/>
349
+ </define>
350
+ <!-- REVISIT does reset make sense outside a form? -->
351
+ <define name="input.file.elem">
352
+ <a:documentation>File Upload: &lt;input type='file'&gt;</a:documentation>
353
+ <element name="input">
354
+ <ref name="input.file.attrs"/>
355
+ </element>
356
+ </define>
357
+ <define name="input.file.attrs">
358
+ <interleave>
359
+ <ref name="common.attrs"/>
360
+ <ref name="common-form.attrs"/>
361
+ <ref name="input.file.attrs.type"/>
362
+ <optional>
363
+ <ref name="input.file.attrs.accept"/>
364
+ </optional>
365
+ </interleave>
366
+ </define>
367
+ <define name="input.file.attrs.type">
368
+ <attribute name="type">
369
+ <value>file</value>
370
+ </attribute>
371
+ </define>
372
+ <define name="input.file.attrs.accept">
373
+ <attribute name="accept">
374
+ <ref name="form.data.mimetypelist"/>
375
+ </attribute>
376
+ </define>
377
+ <define name="input.elem" combine="choice">
378
+ <ref name="input.file.elem"/>
379
+ </define>
380
+ <define name="input.hidden.elem">
381
+ <a:documentation>Hidden String: &lt;input type='hidden'&gt;</a:documentation>
382
+ <element name="input">
383
+ <ref name="input.hidden.attrs"/>
384
+ </element>
385
+ </define>
386
+ <define name="input.hidden.attrs">
387
+ <interleave>
388
+ <ref name="common.attrs"/>
389
+ <ref name="common-form.attrs"/>
390
+ <ref name="input.hidden.attrs.type"/>
391
+ <optional>
392
+ <ref name="input.hidden.attrs.value"/>
393
+ </optional>
394
+ </interleave>
395
+ </define>
396
+ <define name="input.hidden.attrs.type">
397
+ <attribute name="type">
398
+ <value>hidden</value>
399
+ </attribute>
400
+ </define>
401
+ <define name="input.hidden.attrs.value">
402
+ <attribute name="value">
403
+ <data type="string"/>
404
+ </attribute>
405
+ </define>
406
+ <define name="input.elem" combine="choice">
407
+ <ref name="input.hidden.elem"/>
408
+ </define>
409
+ <define name="input.image.elem">
410
+ <a:documentation>Image Submit Button: &lt;input type='image'&gt;</a:documentation>
411
+ <element name="input">
412
+ <ref name="input.image.attrs"/>
413
+ </element>
414
+ </define>
415
+ <define name="input.image.attrs">
416
+ <interleave>
417
+ <ref name="common.attrs"/>
418
+ <ref name="common-form.attrs"/>
419
+ <ref name="input.image.attrs.type"/>
420
+ <ref name="input.image.attrs.alt"/>
421
+ <optional>
422
+ <ref name="input.image.attrs.src"/>
423
+ </optional>
424
+ <ref name="button.attrs.popover-controls"/>
425
+ <optional>
426
+ <choice>
427
+ <ref name="common.attrs.aria.implicit.button"/>
428
+ <ref name="common.attrs.aria.role.button"/>
429
+ <ref name="common.attrs.aria.role.link"/>
430
+ <ref name="common.attrs.aria.role.menuitem"/>
431
+ <ref name="common.attrs.aria.role.menuitemcheckbox"/>
432
+ <ref name="common.attrs.aria.role.menuitemradio"/>
433
+ <ref name="common.attrs.aria.role.radio"/>
434
+ <ref name="common.attrs.aria.role.switch"/>
435
+ </choice>
436
+ </optional>
437
+ </interleave>
438
+ </define>
439
+ <define name="input.image.attrs.type">
440
+ <attribute name="type">
441
+ <value>image</value>
442
+ </attribute>
443
+ </define>
444
+ <define name="input.image.attrs.alt">
445
+ <attribute name="alt">
446
+ <ref name="form.data.nonemptystring"/>
447
+ </attribute>
448
+ </define>
449
+ <define name="input.image.attrs.src">
450
+ <attribute name="src">
451
+ <ref name="common.data.uri.non-empty"/>
452
+ </attribute>
453
+ </define>
454
+ <define name="input.elem" combine="choice">
455
+ <ref name="input.image.elem"/>
456
+ </define>
457
+ <define name="common.elem.phrasing" combine="choice">
458
+ <ref name="input.elem"/>
459
+ </define>
460
+ <define name="textarea.elem">
461
+ <a:documentation>Text Area: &lt;textarea&gt;</a:documentation>
462
+ <element name="textarea">
463
+ <interleave>
464
+ <ref name="textarea.inner"/>
465
+ <ref name="textarea.attrs"/>
466
+ </interleave>
467
+ </element>
468
+ </define>
469
+ <define name="textarea.attrs">
470
+ <interleave>
471
+ <ref name="common.attrs"/>
472
+ <ref name="common-form.attrs"/>
473
+ <optional>
474
+ <ref name="shared-form.attrs.readonly"/>
475
+ </optional>
476
+ <ref name="textarea.attrs.rows-and-cols-wf1"/>
477
+ <optional>
478
+ <choice>
479
+ <ref name="common.attrs.aria.implicit.textbox"/>
480
+ <ref name="common.attrs.aria.role.textbox"/>
481
+ </choice>
482
+ </optional>
483
+ </interleave>
484
+ <!-- FIXME onfocus, onblur, onselect,onchange -->
485
+ </define>
486
+ <!-- This is ugly. -->
487
+ <define name="textarea.attrs.rows-and-cols-wf1">
488
+ <ref name="textarea.attrs.rows-and-cols-wf1.inner"/>
489
+ </define>
490
+ <define name="textarea.attrs.rows-and-cols-wf1.inner">
491
+ <interleave>
492
+ <ref name="textarea.attrs.cols"/>
493
+ <ref name="textarea.attrs.rows"/>
494
+ </interleave>
495
+ </define>
496
+ <define name="textarea.attrs.cols">
497
+ <attribute name="cols">
498
+ <ref name="common.data.integer.positive"/>
499
+ </attribute>
500
+ </define>
501
+ <define name="textarea.attrs.rows">
502
+ <attribute name="rows">
503
+ <ref name="common.data.integer.positive"/>
504
+ </attribute>
505
+ </define>
506
+ <define name="textarea.inner">
507
+ <text/>
508
+ </define>
509
+ <define name="common.elem.phrasing" combine="choice">
510
+ <ref name="textarea.elem"/>
511
+ </define>
512
+ <!--
513
+ Due to limitations with interleave, handling single/multiple selection
514
+ enforcement in RELAX NG seems to be possible but really awkward.
515
+ Tried it. Leaving it to Schematron.
516
+ -->
517
+ <define name="option.elem">
518
+ <a:documentation>Select menu option: &lt;option selected&gt;</a:documentation>
519
+ <element name="option">
520
+ <interleave>
521
+ <ref name="option.inner"/>
522
+ <ref name="option.attrs"/>
523
+ </interleave>
524
+ </element>
525
+ </define>
526
+ <define name="option.attrs">
527
+ <interleave>
528
+ <ref name="common.attrs"/>
529
+ <optional>
530
+ <ref name="common-form.attrs.disabled"/>
531
+ </optional>
532
+ <optional>
533
+ <ref name="option.attrs.selected"/>
534
+ </optional>
535
+ <optional>
536
+ <ref name="option.attrs.label"/>
537
+ </optional>
538
+ <optional>
539
+ <ref name="option.attrs.value"/>
540
+ </optional>
541
+ <optional>
542
+ <choice>
543
+ <ref name="common.attrs.aria.implicit.option"/>
544
+ <ref name="common.attrs.aria.role.option"/>
545
+ </choice>
546
+ </optional>
547
+ </interleave>
548
+ </define>
549
+ <define name="option.attrs.selected">
550
+ <attribute name="selected">
551
+ <choice>
552
+ <value>selected</value>
553
+ <value/>
554
+ </choice>
555
+ </attribute>
556
+ </define>
557
+ <define name="option.attrs.label">
558
+ <attribute name="label">
559
+ <ref name="form.data.nonemptystring"/>
560
+ </attribute>
561
+ </define>
562
+ <define name="option.attrs.value">
563
+ <attribute name="value">
564
+ <data type="string"/>
565
+ </attribute>
566
+ </define>
567
+ <define name="option.inner">
568
+ <text/>
569
+ </define>
570
+ <define name="optgroup.elem">
571
+ <a:documentation>Option Group: &lt;optgroup&gt;</a:documentation>
572
+ <element name="optgroup">
573
+ <interleave>
574
+ <ref name="optgroup.inner"/>
575
+ <ref name="optgroup.attrs"/>
576
+ </interleave>
577
+ </element>
578
+ </define>
579
+ <define name="optgroup.attrs">
580
+ <interleave>
581
+ <ref name="common.attrs"/>
582
+ <ref name="optgroup.attrs.label"/>
583
+ <optional>
584
+ <ref name="common-form.attrs.disabled"/>
585
+ </optional>
586
+ <optional>
587
+ <choice>
588
+ <ref name="common.attrs.aria.implicit.group"/>
589
+ <ref name="common.attrs.aria.role.group"/>
590
+ </choice>
591
+ </optional>
592
+ </interleave>
593
+ </define>
594
+ <define name="optgroup.attrs.label">
595
+ <attribute name="label">
596
+ <data type="string"/>
597
+ </attribute>
598
+ </define>
599
+ <define name="optgroup.inner">
600
+ <interleave>
601
+ <zeroOrMore>
602
+ <ref name="option.elem"/>
603
+ </zeroOrMore>
604
+ <zeroOrMore>
605
+ <ref name="common.elem.script-supporting"/>
606
+ </zeroOrMore>
607
+ </interleave>
608
+ </define>
609
+ <define name="select.elem">
610
+ <a:documentation>Selection Menu: &lt;select&gt;</a:documentation>
611
+ <element name="select">
612
+ <interleave>
613
+ <ref name="select.inner"/>
614
+ <ref name="select.attrs"/>
615
+ </interleave>
616
+ </element>
617
+ </define>
618
+ <define name="select.attrs">
619
+ <interleave>
620
+ <ref name="common.attrs"/>
621
+ <ref name="common-form.attrs"/>
622
+ <optional>
623
+ <ref name="select.attrs.size"/>
624
+ </optional>
625
+ <optional>
626
+ <ref name="select.attrs.multiple"/>
627
+ </optional>
628
+ <optional>
629
+ <!-- FIXME onfocus, onblur, onchange -->
630
+ <choice>
631
+ <ref name="common.attrs.aria.role.listbox"/>
632
+ <!-- aria-multiselectable depends on "multiple" value; check in assertions -->
633
+ <ref name="common.attrs.aria.role.combobox"/>
634
+ <ref name="common.attrs.aria.role.menu"/>
635
+ <ref name="common.attrs.aria.implicit.combobox"/>
636
+ <ref name="common.attrs.aria.implicit.listbox"/>
637
+ </choice>
638
+ </optional>
639
+ </interleave>
640
+ </define>
641
+ <define name="select.attrs.size">
642
+ <attribute name="size">
643
+ <ref name="common.data.integer.positive"/>
644
+ </attribute>
645
+ </define>
646
+ <define name="select.attrs.multiple">
647
+ <attribute name="multiple">
648
+ <choice>
649
+ <value>multiple</value>
650
+ <value/>
651
+ </choice>
652
+ </attribute>
653
+ </define>
654
+ <define name="select.inner">
655
+ <interleave>
656
+ <zeroOrMore>
657
+ <ref name="optgroup.elem"/>
658
+ </zeroOrMore>
659
+ <zeroOrMore>
660
+ <ref name="option.elem"/>
661
+ </zeroOrMore>
662
+ <zeroOrMore>
663
+ <ref name="common.elem.script-supporting"/>
664
+ </zeroOrMore>
665
+ </interleave>
666
+ </define>
667
+ <define name="common.elem.phrasing" combine="choice">
668
+ <ref name="select.elem"/>
669
+ </define>
670
+ <define name="button.attrs.value">
671
+ <a:documentation>Shared Definitions for Complex Button</a:documentation>
672
+ <attribute name="value">
673
+ <data type="string"/>
674
+ </attribute>
675
+ </define>
676
+ <define name="button.attrs.popover-controls">
677
+ <interleave>
678
+ <optional>
679
+ <ref name="button.attrs.popovertarget"/>
680
+ </optional>
681
+ <optional>
682
+ <ref name="button.attrs.popovertargetaction"/>
683
+ </optional>
684
+ </interleave>
685
+ </define>
686
+ <define name="button.attrs.popovertarget">
687
+ <attribute name="popovertarget">
688
+ <ref name="common.data.idref"/>
689
+ </attribute>
690
+ </define>
691
+ <define name="button.attrs.popovertargetaction">
692
+ <attribute name="popovertargetaction">
693
+ <choice>
694
+ <value>hide</value>
695
+ <value>show</value>
696
+ <value>toggle</value>
697
+ </choice>
698
+ </attribute>
699
+ </define>
700
+ <define name="button.inner">
701
+ <ref name="common.inner.phrasing"/>
702
+ </define>
703
+ <define name="button.submit.elem">
704
+ <a:documentation>Complex Submit Button: &lt;button type='submit'&gt;</a:documentation>
705
+ <element name="button">
706
+ <interleave>
707
+ <ref name="button.inner"/>
708
+ <ref name="button.submit.attrs"/>
709
+ </interleave>
710
+ </element>
711
+ </define>
712
+ <define name="button.submit.attrs">
713
+ <interleave>
714
+ <ref name="common.attrs"/>
715
+ <ref name="common-form.attrs"/>
716
+ <optional>
717
+ <ref name="button.submit.attrs.type"/>
718
+ </optional>
719
+ <optional>
720
+ <ref name="button.attrs.value"/>
721
+ </optional>
722
+ <ref name="button.attrs.popover-controls"/>
723
+ <optional>
724
+ <choice>
725
+ <ref name="common.attrs.aria.implicit.button"/>
726
+ <ref name="common.attrs.aria.role.button"/>
727
+ <ref name="common.attrs.aria.role.checkbox"/>
728
+ <ref name="common.attrs.aria.role.combobox"/>
729
+ <ref name="common.attrs.aria.role.link"/>
730
+ <ref name="common.attrs.aria.role.menuitem"/>
731
+ <ref name="common.attrs.aria.role.menuitemcheckbox"/>
732
+ <ref name="common.attrs.aria.role.menuitemradio"/>
733
+ <ref name="common.attrs.aria.role.option"/>
734
+ <ref name="common.attrs.aria.role.radio"/>
735
+ <ref name="common.attrs.aria.role.tab"/>
736
+ </choice>
737
+ </optional>
738
+ </interleave>
739
+ </define>
740
+ <define name="button.submit.attrs.type">
741
+ <attribute name="type">
742
+ <value>submit</value>
743
+ </attribute>
744
+ </define>
745
+ <define name="button.elem">
746
+ <ref name="button.submit.elem"/>
747
+ </define>
748
+ <define name="button.reset.elem">
749
+ <a:documentation>Complex Reset Button: &lt;button type='reset'&gt;</a:documentation>
750
+ <element name="button">
751
+ <interleave>
752
+ <ref name="button.inner"/>
753
+ <ref name="button.reset.attrs"/>
754
+ </interleave>
755
+ </element>
756
+ </define>
757
+ <define name="button.reset.attrs">
758
+ <interleave>
759
+ <ref name="common.attrs"/>
760
+ <ref name="common-form.attrs"/>
761
+ <ref name="button.reset.attrs.type"/>
762
+ <optional>
763
+ <ref name="button.attrs.value"/>
764
+ </optional>
765
+ <!-- REVISIT I guess this still affects the DOM -->
766
+ <ref name="button.attrs.popover-controls"/>
767
+ <optional>
768
+ <choice>
769
+ <ref name="common.attrs.aria.implicit.button"/>
770
+ <ref name="common.attrs.aria.role.button"/>
771
+ <ref name="common.attrs.aria.role.checkbox"/>
772
+ <ref name="common.attrs.aria.role.link"/>
773
+ <ref name="common.attrs.aria.role.menuitem"/>
774
+ <ref name="common.attrs.aria.role.menuitemcheckbox"/>
775
+ <ref name="common.attrs.aria.role.menuitemradio"/>
776
+ <ref name="common.attrs.aria.role.option"/>
777
+ <ref name="common.attrs.aria.role.radio"/>
778
+ <ref name="common.attrs.aria.role.switch"/>
779
+ </choice>
780
+ </optional>
781
+ </interleave>
782
+ </define>
783
+ <define name="button.reset.attrs.type">
784
+ <attribute name="type">
785
+ <value>reset</value>
786
+ </attribute>
787
+ </define>
788
+ <define name="button.elem" combine="choice">
789
+ <ref name="button.reset.elem"/>
790
+ </define>
791
+ <define name="button.button.elem">
792
+ <a:documentation>Complex Push Button: &lt;button type='button'&gt;</a:documentation>
793
+ <element name="button">
794
+ <interleave>
795
+ <ref name="button.inner"/>
796
+ <ref name="button.button.attrs"/>
797
+ </interleave>
798
+ </element>
799
+ </define>
800
+ <define name="button.button.attrs">
801
+ <interleave>
802
+ <ref name="common.attrs"/>
803
+ <ref name="common-form.attrs"/>
804
+ <ref name="button.button.attrs.type"/>
805
+ <optional>
806
+ <ref name="button.attrs.value"/>
807
+ </optional>
808
+ <!-- REVISIT I guess this still affects the DOM -->
809
+ <ref name="button.attrs.popover-controls"/>
810
+ <optional>
811
+ <choice>
812
+ <ref name="common.attrs.aria.implicit.button"/>
813
+ <ref name="common.attrs.aria.role.button"/>
814
+ <ref name="common.attrs.aria.role.checkbox"/>
815
+ <ref name="common.attrs.aria.role.link"/>
816
+ <ref name="common.attrs.aria.role.menuitem"/>
817
+ <ref name="common.attrs.aria.role.menuitemcheckbox"/>
818
+ <ref name="common.attrs.aria.role.menuitemradio"/>
819
+ <ref name="common.attrs.aria.role.option"/>
820
+ <ref name="common.attrs.aria.role.radio"/>
821
+ <ref name="common.attrs.aria.role.switch"/>
822
+ <ref name="common.attrs.aria.role.tab"/>
823
+ </choice>
824
+ </optional>
825
+ </interleave>
826
+ </define>
827
+ <define name="button.button.attrs.type">
828
+ <attribute name="type">
829
+ <value>button</value>
830
+ </attribute>
831
+ </define>
832
+ <define name="button.elem" combine="choice">
833
+ <ref name="button.button.elem"/>
834
+ </define>
835
+ <define name="common.elem.phrasing" combine="choice">
836
+ <ref name="button.elem"/>
837
+ </define>
838
+ <define name="form.elem">
839
+ <a:documentation>Form: &lt;form&gt;</a:documentation>
840
+ <element name="form">
841
+ <interleave>
842
+ <ref name="form.inner"/>
843
+ <ref name="form.attrs"/>
844
+ </interleave>
845
+ </element>
846
+ </define>
847
+ <define name="form.attrs">
848
+ <interleave>
849
+ <ref name="common.attrs"/>
850
+ <optional>
851
+ <ref name="form.attrs.action"/>
852
+ </optional>
853
+ <optional>
854
+ <!-- REVISIT Should this be required anyway? -->
855
+ <ref name="form.attrs.method"/>
856
+ </optional>
857
+ <optional>
858
+ <ref name="form.attrs.enctype"/>
859
+ </optional>
860
+ <optional>
861
+ <ref name="common-form.attrs.name"/>
862
+ </optional>
863
+ <optional>
864
+ <ref name="form.attrs.accept-charset"/>
865
+ </optional>
866
+ <optional>
867
+ <choice>
868
+ <ref name="common.attrs.aria.implicit.form"/>
869
+ <ref name="common.attrs.aria.landmark.form"/>
870
+ <ref name="common.attrs.aria.landmark.search"/>
871
+ <ref name="common.attrs.aria.role.presentation"/>
872
+ </choice>
873
+ </optional>
874
+ </interleave>
875
+ </define>
876
+ <define name="form.attrs.action">
877
+ <attribute name="action">
878
+ <ref name="common.data.uri.non-empty"/>
879
+ </attribute>
880
+ </define>
881
+ <define name="form.attrs.method">
882
+ <attribute name="method">
883
+ <ref name="form.attrs.method.data"/>
884
+ </attribute>
885
+ </define>
886
+ <define name="form.attrs.method.data">
887
+ <choice>
888
+ <value>get</value>
889
+ <value>post</value>
890
+ <value>dialog</value>
891
+ </choice>
892
+ </define>
893
+ <define name="form.attrs.enctype">
894
+ <attribute name="enctype">
895
+ <ref name="form.attrs.enctype.data"/>
896
+ </attribute>
897
+ </define>
898
+ <define name="form.attrs.enctype.data">
899
+ <choice>
900
+ <value>application/x-www-form-urlencoded</value>
901
+ <value>multipart/form-data</value>
902
+ </choice>
903
+ </define>
904
+ <define name="form.attrs.accept-charset">
905
+ <attribute name="accept-charset">
906
+ <data type="string"/>
907
+ </attribute>
908
+ </define>
909
+ <define name="form.inner">
910
+ <ref name="common.inner.flow"/>
911
+ </define>
912
+ <define name="common.elem.flow" combine="choice">
913
+ <ref name="form.elem"/>
914
+ </define>
915
+ <define name="fieldset.elem">
916
+ <a:documentation>Fieldset: &lt;fieldset&gt;</a:documentation>
917
+ <element name="fieldset">
918
+ <interleave>
919
+ <ref name="fieldset.inner"/>
920
+ <ref name="fieldset.attrs"/>
921
+ </interleave>
922
+ </element>
923
+ </define>
924
+ <define name="fieldset.attrs">
925
+ <interleave>
926
+ <ref name="common.attrs"/>
927
+ <optional>
928
+ <choice>
929
+ <ref name="common.attrs.aria.implicit.group"/>
930
+ <ref name="common.attrs.aria.role.group"/>
931
+ <ref name="common.attrs.aria.role.radiogroup"/>
932
+ <ref name="common.attrs.aria.role.presentation"/>
933
+ </choice>
934
+ </optional>
935
+ </interleave>
936
+ </define>
937
+ <define name="fieldset.inner">
938
+ <optional>
939
+ <ref name="legend.elem"/>
940
+ </optional>
941
+ <ref name="common.inner.flow"/>
942
+ </define>
943
+ <define name="common.elem.flow" combine="choice">
944
+ <ref name="fieldset.elem"/>
945
+ </define>
946
+ <define name="label.elem">
947
+ <a:documentation>Label: &lt;label&gt;</a:documentation>
948
+ <element name="label">
949
+ <interleave>
950
+ <ref name="label.inner"/>
951
+ <ref name="label.attrs"/>
952
+ </interleave>
953
+ </element>
954
+ </define>
955
+ <define name="label.attrs">
956
+ <interleave>
957
+ <ref name="common.attrs"/>
958
+ <optional>
959
+ <ref name="label.attrs.for"/>
960
+ </optional>
961
+ </interleave>
962
+ </define>
963
+ <define name="label.attrs.for">
964
+ <attribute name="for">
965
+ <ref name="common.data.idref"/>
966
+ </attribute>
967
+ </define>
968
+ <define name="label.inner">
969
+ <ref name="common.inner.phrasing"/>
970
+ </define>
971
+ <!-- REVISIT making obvious guess -->
972
+ <define name="common.elem.phrasing" combine="choice">
973
+ <ref name="label.elem"/>
974
+ </define>
975
+ </grammar>