relaton-jis 1.14.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1125 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
+ <define name="document">
4
+ <element name="document">
5
+ <optional>
6
+ <attribute name="identifier"/>
7
+ </optional>
8
+ <ref name="bibdata"/>
9
+ <ref name="sections"/>
10
+ <zeroOrMore>
11
+ <ref name="references"/>
12
+ </zeroOrMore>
13
+ </element>
14
+ </define>
15
+ <define name="bibdata">
16
+ <element name="bibdata">
17
+ <ref name="BibData"/>
18
+ </element>
19
+ </define>
20
+ <define name="sections">
21
+ <element name="sections">
22
+ <oneOrMore>
23
+ <ref name="section"/>
24
+ </oneOrMore>
25
+ </element>
26
+ </define>
27
+ <define name="section">
28
+ <element name="section">
29
+ <ref name="Basic-Section"/>
30
+ <zeroOrMore>
31
+ <ref name="section"/>
32
+ </zeroOrMore>
33
+ </element>
34
+ </define>
35
+ <define name="Basic-Section">
36
+ <optional>
37
+ <attribute name="id">
38
+ <data type="ID"/>
39
+ </attribute>
40
+ </optional>
41
+ <optional>
42
+ <attribute name="language"/>
43
+ </optional>
44
+ <optional>
45
+ <attribute name="script"/>
46
+ </optional>
47
+ <optional>
48
+ <ref name="section-title"/>
49
+ </optional>
50
+ <zeroOrMore>
51
+ <ref name="BasicBlock"/>
52
+ </zeroOrMore>
53
+ </define>
54
+ <define name="references">
55
+ <element name="references">
56
+ <optional>
57
+ <attribute name="id">
58
+ <data type="ID"/>
59
+ </attribute>
60
+ </optional>
61
+ <optional>
62
+ <ref name="section-title"/>
63
+ </optional>
64
+ <zeroOrMore>
65
+ <ref name="BasicBlock"/>
66
+ </zeroOrMore>
67
+ <zeroOrMore>
68
+ <ref name="bibitem"/>
69
+ </zeroOrMore>
70
+ </element>
71
+ </define>
72
+ <define name="section-title">
73
+ <element name="title">
74
+ <zeroOrMore>
75
+ <ref name="TextElement"/>
76
+ </zeroOrMore>
77
+ </element>
78
+ </define>
79
+ <define name="BasicBlock">
80
+ <choice>
81
+ <ref name="paragraph-with-footnote"/>
82
+ <ref name="table"/>
83
+ <ref name="formula"/>
84
+ <ref name="admonition"/>
85
+ <ref name="ol"/>
86
+ <ref name="ul"/>
87
+ <ref name="dl"/>
88
+ <ref name="figure"/>
89
+ <ref name="quote"/>
90
+ <ref name="sourcecode"/>
91
+ <ref name="example"/>
92
+ <ref name="review"/>
93
+ <ref name="pre"/>
94
+ <ref name="note"/>
95
+ <ref name="pagebreak"/>
96
+ <ref name="hr"/>
97
+ <ref name="bookmark"/>
98
+ </choice>
99
+ </define>
100
+ <define name="paragraph">
101
+ <element name="p">
102
+ <ref name="ParagraphType"/>
103
+ </element>
104
+ </define>
105
+ <define name="Alignments">
106
+ <choice>
107
+ <value>left</value>
108
+ <value>right</value>
109
+ <value>center</value>
110
+ <value>justified</value>
111
+ </choice>
112
+ </define>
113
+ <define name="ParagraphType">
114
+ <attribute name="id">
115
+ <data type="ID"/>
116
+ </attribute>
117
+ <optional>
118
+ <attribute name="align">
119
+ <ref name="Alignments"/>
120
+ </attribute>
121
+ </optional>
122
+ <zeroOrMore>
123
+ <ref name="TextElement"/>
124
+ </zeroOrMore>
125
+ <zeroOrMore>
126
+ <ref name="note"/>
127
+ </zeroOrMore>
128
+ </define>
129
+ <define name="paragraph-with-footnote">
130
+ <element name="p">
131
+ <attribute name="id">
132
+ <data type="ID"/>
133
+ </attribute>
134
+ <optional>
135
+ <attribute name="align">
136
+ <ref name="Alignments"/>
137
+ </attribute>
138
+ </optional>
139
+ <zeroOrMore>
140
+ <choice>
141
+ <ref name="TextElement"/>
142
+ <ref name="fn"/>
143
+ </choice>
144
+ </zeroOrMore>
145
+ <zeroOrMore>
146
+ <ref name="note"/>
147
+ </zeroOrMore>
148
+ </element>
149
+ </define>
150
+ <define name="note">
151
+ <element name="note">
152
+ <attribute name="id">
153
+ <data type="ID"/>
154
+ </attribute>
155
+ <oneOrMore>
156
+ <ref name="paragraph"/>
157
+ </oneOrMore>
158
+ </element>
159
+ </define>
160
+ <define name="review">
161
+ <element name="review">
162
+ <attribute name="id">
163
+ <data type="ID"/>
164
+ </attribute>
165
+ <attribute name="reviewer"/>
166
+ <optional>
167
+ <attribute name="date">
168
+ <data type="dateTime"/>
169
+ </attribute>
170
+ </optional>
171
+ <optional>
172
+ <attribute name="from">
173
+ <data type="IDREF"/>
174
+ </attribute>
175
+ </optional>
176
+ <optional>
177
+ <attribute name="to">
178
+ <data type="IDREF"/>
179
+ </attribute>
180
+ </optional>
181
+ <oneOrMore>
182
+ <ref name="paragraph"/>
183
+ </oneOrMore>
184
+ </element>
185
+ </define>
186
+ <define name="formula">
187
+ <element name="formula">
188
+ <attribute name="id">
189
+ <data type="ID"/>
190
+ </attribute>
191
+ <optional>
192
+ <attribute name="unnumbered">
193
+ <data type="boolean"/>
194
+ </attribute>
195
+ </optional>
196
+ <optional>
197
+ <attribute name="subsequence"/>
198
+ </optional>
199
+ <optional>
200
+ <attribute name="inequality">
201
+ <data type="boolean"/>
202
+ </attribute>
203
+ </optional>
204
+ <ref name="stem"/>
205
+ <optional>
206
+ <ref name="dl"/>
207
+ </optional>
208
+ <zeroOrMore>
209
+ <ref name="note"/>
210
+ </zeroOrMore>
211
+ </element>
212
+ </define>
213
+ <define name="quote">
214
+ <element name="quote">
215
+ <attribute name="id">
216
+ <data type="ID"/>
217
+ </attribute>
218
+ <optional>
219
+ <attribute name="alignment">
220
+ <ref name="Alignments"/>
221
+ </attribute>
222
+ </optional>
223
+ <optional>
224
+ <ref name="quote-source"/>
225
+ </optional>
226
+ <optional>
227
+ <ref name="quote-author"/>
228
+ </optional>
229
+ <oneOrMore>
230
+ <ref name="paragraph-with-footnote"/>
231
+ </oneOrMore>
232
+ <zeroOrMore>
233
+ <ref name="note"/>
234
+ </zeroOrMore>
235
+ </element>
236
+ </define>
237
+ <define name="quote-source">
238
+ <element name="source">
239
+ <ref name="erefType"/>
240
+ </element>
241
+ </define>
242
+ <define name="quote-author">
243
+ <element name="author">
244
+ <text/>
245
+ </element>
246
+ </define>
247
+ <define name="sourcecode">
248
+ <element name="sourcecode">
249
+ <attribute name="id">
250
+ <data type="ID"/>
251
+ </attribute>
252
+ <optional>
253
+ <attribute name="unnumbered">
254
+ <data type="boolean"/>
255
+ </attribute>
256
+ </optional>
257
+ <optional>
258
+ <attribute name="subsequence"/>
259
+ </optional>
260
+ <optional>
261
+ <attribute name="lang"/>
262
+ </optional>
263
+ <optional>
264
+ <ref name="tname"/>
265
+ </optional>
266
+ <oneOrMore>
267
+ <choice>
268
+ <text/>
269
+ <ref name="callout"/>
270
+ </choice>
271
+ </oneOrMore>
272
+ <zeroOrMore>
273
+ <ref name="annotation"/>
274
+ </zeroOrMore>
275
+ <zeroOrMore>
276
+ <ref name="note"/>
277
+ </zeroOrMore>
278
+ </element>
279
+ </define>
280
+ <define name="pre">
281
+ <element name="pre">
282
+ <attribute name="id">
283
+ <data type="ID"/>
284
+ </attribute>
285
+ <optional>
286
+ <attribute name="alt"/>
287
+ </optional>
288
+ <optional>
289
+ <ref name="tname"/>
290
+ </optional>
291
+ <text/>
292
+ <zeroOrMore>
293
+ <ref name="note"/>
294
+ </zeroOrMore>
295
+ </element>
296
+ </define>
297
+ <define name="table">
298
+ <element name="table">
299
+ <attribute name="id">
300
+ <data type="ID"/>
301
+ </attribute>
302
+ <optional>
303
+ <attribute name="unnumbered">
304
+ <data type="boolean"/>
305
+ </attribute>
306
+ </optional>
307
+ <optional>
308
+ <attribute name="subsequence"/>
309
+ </optional>
310
+ <optional>
311
+ <attribute name="alt"/>
312
+ </optional>
313
+ <optional>
314
+ <attribute name="summary"/>
315
+ </optional>
316
+ <optional>
317
+ <attribute name="uri">
318
+ <data type="anyURI"/>
319
+ </attribute>
320
+ </optional>
321
+ <optional>
322
+ <ref name="tname"/>
323
+ </optional>
324
+ <optional>
325
+ <ref name="thead"/>
326
+ </optional>
327
+ <ref name="tbody"/>
328
+ <optional>
329
+ <ref name="tfoot"/>
330
+ </optional>
331
+ <zeroOrMore>
332
+ <ref name="table-note"/>
333
+ </zeroOrMore>
334
+ <optional>
335
+ <ref name="dl"/>
336
+ </optional>
337
+ </element>
338
+ </define>
339
+ <define name="tname">
340
+ <element name="name">
341
+ <oneOrMore>
342
+ <choice>
343
+ <ref name="PureTextElement"/>
344
+ <ref name="eref"/>
345
+ <ref name="stem"/>
346
+ <ref name="keyword"/>
347
+ <ref name="xref"/>
348
+ <ref name="hyperlink"/>
349
+ </choice>
350
+ </oneOrMore>
351
+ </element>
352
+ </define>
353
+ <define name="thead">
354
+ <element name="thead">
355
+ <ref name="tr"/>
356
+ </element>
357
+ </define>
358
+ <define name="tfoot">
359
+ <element name="tfoot">
360
+ <ref name="tr"/>
361
+ </element>
362
+ </define>
363
+ <define name="tbody">
364
+ <element name="tbody">
365
+ <oneOrMore>
366
+ <ref name="tr"/>
367
+ </oneOrMore>
368
+ </element>
369
+ </define>
370
+ <define name="table-note">
371
+ <element name="note">
372
+ <ref name="paragraph"/>
373
+ </element>
374
+ </define>
375
+ <define name="tr">
376
+ <element name="tr">
377
+ <oneOrMore>
378
+ <choice>
379
+ <ref name="td"/>
380
+ <ref name="th"/>
381
+ </choice>
382
+ </oneOrMore>
383
+ </element>
384
+ </define>
385
+ <define name="td">
386
+ <element name="td">
387
+ <optional>
388
+ <attribute name="colspan"/>
389
+ </optional>
390
+ <optional>
391
+ <attribute name="rowspan"/>
392
+ </optional>
393
+ <optional>
394
+ <attribute name="align">
395
+ <choice>
396
+ <value>left</value>
397
+ <value>right</value>
398
+ <value>center</value>
399
+ </choice>
400
+ </attribute>
401
+ </optional>
402
+ <optional>
403
+ <attribute name="valign">
404
+ <choice>
405
+ <value>top</value>
406
+ <value>middle</value>
407
+ <value>bottom</value>
408
+ <value>baseline</value>
409
+ </choice>
410
+ </attribute>
411
+ </optional>
412
+ <choice>
413
+ <zeroOrMore>
414
+ <ref name="TextElement"/>
415
+ </zeroOrMore>
416
+ <oneOrMore>
417
+ <ref name="paragraph-with-footnote"/>
418
+ </oneOrMore>
419
+ </choice>
420
+ </element>
421
+ </define>
422
+ <define name="th">
423
+ <element name="th">
424
+ <optional>
425
+ <attribute name="colspan"/>
426
+ </optional>
427
+ <optional>
428
+ <attribute name="rowspan"/>
429
+ </optional>
430
+ <optional>
431
+ <attribute name="align">
432
+ <choice>
433
+ <value>left</value>
434
+ <value>right</value>
435
+ <value>center</value>
436
+ </choice>
437
+ </attribute>
438
+ </optional>
439
+ <optional>
440
+ <attribute name="valign">
441
+ <choice>
442
+ <value>top</value>
443
+ <value>middle</value>
444
+ <value>bottom</value>
445
+ <value>baseline</value>
446
+ </choice>
447
+ </attribute>
448
+ </optional>
449
+ <choice>
450
+ <zeroOrMore>
451
+ <ref name="TextElement"/>
452
+ </zeroOrMore>
453
+ <oneOrMore>
454
+ <ref name="paragraph-with-footnote"/>
455
+ </oneOrMore>
456
+ </choice>
457
+ </element>
458
+ </define>
459
+ <define name="example">
460
+ <element name="example">
461
+ <attribute name="id">
462
+ <data type="ID"/>
463
+ </attribute>
464
+ <optional>
465
+ <attribute name="unnumbered">
466
+ <data type="boolean"/>
467
+ </attribute>
468
+ </optional>
469
+ <optional>
470
+ <attribute name="subsequence"/>
471
+ </optional>
472
+ <optional>
473
+ <ref name="tname"/>
474
+ </optional>
475
+ <oneOrMore>
476
+ <choice>
477
+ <ref name="formula"/>
478
+ <ref name="ul"/>
479
+ <ref name="ol"/>
480
+ <ref name="dl"/>
481
+ <ref name="quote"/>
482
+ <ref name="sourcecode"/>
483
+ <ref name="paragraph-with-footnote"/>
484
+ </choice>
485
+ </oneOrMore>
486
+ <zeroOrMore>
487
+ <ref name="note"/>
488
+ </zeroOrMore>
489
+ </element>
490
+ </define>
491
+ <define name="admonition">
492
+ <element name="admonition">
493
+ <attribute name="type">
494
+ <ref name="AdmonitionType"/>
495
+ </attribute>
496
+ <optional>
497
+ <attribute name="class"/>
498
+ </optional>
499
+ <attribute name="id">
500
+ <data type="ID"/>
501
+ </attribute>
502
+ <optional>
503
+ <attribute name="uri">
504
+ <data type="anyURI"/>
505
+ </attribute>
506
+ </optional>
507
+ <optional>
508
+ <ref name="tname"/>
509
+ </optional>
510
+ <zeroOrMore>
511
+ <ref name="paragraph-with-footnote"/>
512
+ </zeroOrMore>
513
+ <zeroOrMore>
514
+ <ref name="note"/>
515
+ </zeroOrMore>
516
+ </element>
517
+ </define>
518
+ <define name="AdmonitionType">
519
+ <choice>
520
+ <value>warning</value>
521
+ <value>note</value>
522
+ <value>tip</value>
523
+ <value>important</value>
524
+ <value>caution</value>
525
+ </choice>
526
+ </define>
527
+ <define name="figure">
528
+ <element name="figure">
529
+ <attribute name="id">
530
+ <data type="ID"/>
531
+ </attribute>
532
+ <optional>
533
+ <attribute name="unnumbered">
534
+ <data type="boolean"/>
535
+ </attribute>
536
+ </optional>
537
+ <optional>
538
+ <attribute name="subsequence"/>
539
+ </optional>
540
+ <optional>
541
+ <attribute name="class"/>
542
+ </optional>
543
+ <optional>
544
+ <ref name="source"/>
545
+ </optional>
546
+ <optional>
547
+ <ref name="tname"/>
548
+ </optional>
549
+ <choice>
550
+ <ref name="image"/>
551
+ <ref name="video"/>
552
+ <ref name="audio"/>
553
+ <ref name="pre"/>
554
+ <oneOrMore>
555
+ <ref name="paragraph-with-footnote"/>
556
+ </oneOrMore>
557
+ <zeroOrMore>
558
+ <ref name="figure"/>
559
+ </zeroOrMore>
560
+ </choice>
561
+ <zeroOrMore>
562
+ <ref name="fn"/>
563
+ </zeroOrMore>
564
+ <optional>
565
+ <ref name="dl"/>
566
+ </optional>
567
+ <zeroOrMore>
568
+ <ref name="note"/>
569
+ </zeroOrMore>
570
+ </element>
571
+ </define>
572
+ <define name="TextElement">
573
+ <choice>
574
+ <text/>
575
+ <ref name="em"/>
576
+ <ref name="eref"/>
577
+ <ref name="strong"/>
578
+ <ref name="stem"/>
579
+ <ref name="sub"/>
580
+ <ref name="sup"/>
581
+ <ref name="tt"/>
582
+ <ref name="underline"/>
583
+ <ref name="keyword"/>
584
+ <ref name="ruby"/>
585
+ <ref name="strike"/>
586
+ <ref name="smallcap"/>
587
+ <ref name="xref"/>
588
+ <ref name="br"/>
589
+ <ref name="hyperlink"/>
590
+ <ref name="hr"/>
591
+ <ref name="pagebreak"/>
592
+ <ref name="bookmark"/>
593
+ <ref name="image"/>
594
+ <ref name="index"/>
595
+ <ref name="index-xref"/>
596
+ </choice>
597
+ </define>
598
+ <define name="PureTextElement">
599
+ <choice>
600
+ <text/>
601
+ <ref name="em"/>
602
+ <ref name="strong"/>
603
+ <ref name="sub"/>
604
+ <ref name="sup"/>
605
+ <ref name="tt"/>
606
+ <ref name="underline"/>
607
+ <ref name="strike"/>
608
+ <ref name="smallcap"/>
609
+ <ref name="br"/>
610
+ </choice>
611
+ </define>
612
+ <define name="source">
613
+ <element name="source">
614
+ <ref name="TypedUri"/>
615
+ </element>
616
+ </define>
617
+ <define name="em">
618
+ <element name="em">
619
+ <zeroOrMore>
620
+ <choice>
621
+ <ref name="PureTextElement"/>
622
+ <ref name="stem"/>
623
+ <ref name="eref"/>
624
+ <ref name="xref"/>
625
+ <ref name="hyperlink"/>
626
+ </choice>
627
+ </zeroOrMore>
628
+ </element>
629
+ </define>
630
+ <define name="strong">
631
+ <element name="strong">
632
+ <zeroOrMore>
633
+ <choice>
634
+ <ref name="PureTextElement"/>
635
+ <ref name="stem"/>
636
+ <ref name="eref"/>
637
+ <ref name="xref"/>
638
+ <ref name="hyperlink"/>
639
+ </choice>
640
+ </zeroOrMore>
641
+ </element>
642
+ </define>
643
+ <define name="tt">
644
+ <element name="tt">
645
+ <zeroOrMore>
646
+ <choice>
647
+ <ref name="PureTextElement"/>
648
+ <ref name="eref"/>
649
+ <ref name="xref"/>
650
+ <ref name="hyperlink"/>
651
+ </choice>
652
+ </zeroOrMore>
653
+ </element>
654
+ </define>
655
+ <define name="keyword">
656
+ <element name="keyword">
657
+ <zeroOrMore>
658
+ <ref name="PureTextElement"/>
659
+ </zeroOrMore>
660
+ </element>
661
+ </define>
662
+ <define name="sub">
663
+ <element name="sub">
664
+ <zeroOrMore>
665
+ <ref name="PureTextElement"/>
666
+ </zeroOrMore>
667
+ </element>
668
+ </define>
669
+ <define name="sup">
670
+ <element name="sup">
671
+ <zeroOrMore>
672
+ <ref name="PureTextElement"/>
673
+ </zeroOrMore>
674
+ </element>
675
+ </define>
676
+ <define name="strike">
677
+ <element name="strike">
678
+ <zeroOrMore>
679
+ <ref name="PureTextElement"/>
680
+ </zeroOrMore>
681
+ </element>
682
+ </define>
683
+ <define name="underline">
684
+ <element name="underline">
685
+ <optional>
686
+ <attribute name="style"/>
687
+ </optional>
688
+ <zeroOrMore>
689
+ <ref name="PureTextElement"/>
690
+ </zeroOrMore>
691
+ </element>
692
+ </define>
693
+ <define name="smallcap">
694
+ <element name="smallcap">
695
+ <zeroOrMore>
696
+ <ref name="PureTextElement"/>
697
+ </zeroOrMore>
698
+ </element>
699
+ </define>
700
+ <define name="ruby">
701
+ <element name="ruby">
702
+ <zeroOrMore>
703
+ <choice>
704
+ <ref name="PureTextElement"/>
705
+ <ref name="rp"/>
706
+ <ref name="rt"/>
707
+ </choice>
708
+ </zeroOrMore>
709
+ </element>
710
+ </define>
711
+ <define name="rp">
712
+ <element name="rp">
713
+ <zeroOrMore>
714
+ <ref name="PureTextElement"/>
715
+ </zeroOrMore>
716
+ </element>
717
+ </define>
718
+ <define name="rt">
719
+ <element name="rt">
720
+ <zeroOrMore>
721
+ <ref name="PureTextElement"/>
722
+ </zeroOrMore>
723
+ </element>
724
+ </define>
725
+ <define name="br">
726
+ <element name="br">
727
+ <empty/>
728
+ </element>
729
+ </define>
730
+ <define name="hr">
731
+ <element name="hr">
732
+ <empty/>
733
+ </element>
734
+ </define>
735
+ <define name="pagebreak">
736
+ <element name="pagebreak">
737
+ <empty/>
738
+ </element>
739
+ </define>
740
+ <define name="index">
741
+ <element name="index">
742
+ <optional>
743
+ <attribute name="to">
744
+ <data type="IDREF"/>
745
+ </attribute>
746
+ </optional>
747
+ <element name="primary">
748
+ <oneOrMore>
749
+ <ref name="PureTextElement"/>
750
+ </oneOrMore>
751
+ </element>
752
+ <optional>
753
+ <element name="secondary">
754
+ <oneOrMore>
755
+ <ref name="PureTextElement"/>
756
+ </oneOrMore>
757
+ </element>
758
+ </optional>
759
+ <optional>
760
+ <element name="tertiary">
761
+ <oneOrMore>
762
+ <ref name="PureTextElement"/>
763
+ </oneOrMore>
764
+ </element>
765
+ </optional>
766
+ </element>
767
+ </define>
768
+ <define name="index-xref">
769
+ <element name="index-xref">
770
+ <attribute name="also">
771
+ <data type="boolean"/>
772
+ </attribute>
773
+ <element name="primary">
774
+ <oneOrMore>
775
+ <ref name="PureTextElement"/>
776
+ </oneOrMore>
777
+ </element>
778
+ <optional>
779
+ <element name="secondary">
780
+ <oneOrMore>
781
+ <ref name="PureTextElement"/>
782
+ </oneOrMore>
783
+ </element>
784
+ </optional>
785
+ <optional>
786
+ <element name="tertiary">
787
+ <oneOrMore>
788
+ <ref name="PureTextElement"/>
789
+ </oneOrMore>
790
+ </element>
791
+ </optional>
792
+ <element name="target">
793
+ <oneOrMore>
794
+ <ref name="PureTextElement"/>
795
+ </oneOrMore>
796
+ </element>
797
+ </element>
798
+ </define>
799
+ <!-- bare ID element, used for referencing arbitrary spans of text -->
800
+ <define name="bookmark">
801
+ <element name="bookmark">
802
+ <attribute name="id">
803
+ <data type="ID"/>
804
+ </attribute>
805
+ <empty/>
806
+ </element>
807
+ </define>
808
+ <define name="ReferenceFormat">
809
+ <choice>
810
+ <value>external</value>
811
+ <value>inline</value>
812
+ <value>footnote</value>
813
+ <value>callout</value>
814
+ </choice>
815
+ </define>
816
+ <define name="eref">
817
+ <element name="eref">
818
+ <ref name="erefType"/>
819
+ </element>
820
+ </define>
821
+ <define name="erefType">
822
+ <optional>
823
+ <attribute name="normative">
824
+ <data type="boolean"/>
825
+ </attribute>
826
+ </optional>
827
+ <attribute name="citeas"/>
828
+ <attribute name="type">
829
+ <ref name="ReferenceFormat"/>
830
+ </attribute>
831
+ <optional>
832
+ <attribute name="alt"/>
833
+ </optional>
834
+ <ref name="CitationType"/>
835
+ <oneOrMore>
836
+ <ref name="PureTextElement"/>
837
+ </oneOrMore>
838
+ </define>
839
+ <define name="hyperlink">
840
+ <element name="link">
841
+ <attribute name="target">
842
+ <data type="anyURI"/>
843
+ </attribute>
844
+ <attribute name="type">
845
+ <ref name="ReferenceFormat"/>
846
+ </attribute>
847
+ <optional>
848
+ <attribute name="alt"/>
849
+ </optional>
850
+ <oneOrMore>
851
+ <ref name="PureTextElement"/>
852
+ </oneOrMore>
853
+ </element>
854
+ </define>
855
+ <define name="xref">
856
+ <element name="xref">
857
+ <attribute name="target">
858
+ <data type="IDREF"/>
859
+ </attribute>
860
+ <attribute name="type">
861
+ <ref name="ReferenceFormat"/>
862
+ </attribute>
863
+ <optional>
864
+ <attribute name="alt"/>
865
+ </optional>
866
+ <oneOrMore>
867
+ <ref name="PureTextElement"/>
868
+ </oneOrMore>
869
+ </element>
870
+ </define>
871
+ <define name="fn">
872
+ <element name="fn">
873
+ <attribute name="reference"/>
874
+ <oneOrMore>
875
+ <ref name="paragraph"/>
876
+ </oneOrMore>
877
+ </element>
878
+ </define>
879
+ <!--
880
+ This is xref with fixed @type="footnote", and @target built in as paragraph+
881
+ @reference replaces ReferenceElement/text
882
+ so <fn reference="2"><p>This is a footnote</p></fn>
883
+ corresponds to
884
+ <eref type="footnote" target="fn2">2</xref> <p id="fn2">This is a footnote</p>
885
+ -->
886
+ <define name="callout">
887
+ <element name="callout">
888
+ <attribute name="target">
889
+ <data type="IDREF"/>
890
+ </attribute>
891
+ <text/>
892
+ </element>
893
+ </define>
894
+ <!--
895
+ This is xref with fixed @type="callout"; the target by convention is in an annotation in the same source code snippet
896
+ so <callout target="xyz">1</callout>
897
+ corresponds to <xref type="callout" target="xyz">1</xref>
898
+ -->
899
+ <define name="image">
900
+ <element name="image">
901
+ <attribute name="id">
902
+ <data type="ID"/>
903
+ </attribute>
904
+ <attribute name="src">
905
+ <data type="anyURI"/>
906
+ </attribute>
907
+ <attribute name="mimetype"/>
908
+ <optional>
909
+ <attribute name="filename"/>
910
+ </optional>
911
+ <optional>
912
+ <attribute name="width">
913
+ <choice>
914
+ <data type="int"/>
915
+ <value>auto</value>
916
+ </choice>
917
+ </attribute>
918
+ </optional>
919
+ <optional>
920
+ <attribute name="height">
921
+ <choice>
922
+ <data type="int"/>
923
+ <value>auto</value>
924
+ </choice>
925
+ </attribute>
926
+ </optional>
927
+ <optional>
928
+ <attribute name="alt"/>
929
+ </optional>
930
+ <optional>
931
+ <attribute name="title"/>
932
+ </optional>
933
+ <optional>
934
+ <attribute name="longdesc">
935
+ <data type="anyURI"/>
936
+ </attribute>
937
+ </optional>
938
+ </element>
939
+ </define>
940
+ <define name="video">
941
+ <element name="video">
942
+ <attribute name="id">
943
+ <data type="ID"/>
944
+ </attribute>
945
+ <attribute name="src">
946
+ <data type="anyURI"/>
947
+ </attribute>
948
+ <attribute name="mimetype"/>
949
+ <optional>
950
+ <attribute name="filename"/>
951
+ </optional>
952
+ <optional>
953
+ <attribute name="width">
954
+ <choice>
955
+ <data type="int"/>
956
+ <value>auto</value>
957
+ </choice>
958
+ </attribute>
959
+ </optional>
960
+ <optional>
961
+ <attribute name="height">
962
+ <choice>
963
+ <data type="int"/>
964
+ <value>auto</value>
965
+ </choice>
966
+ </attribute>
967
+ </optional>
968
+ <optional>
969
+ <attribute name="alt"/>
970
+ </optional>
971
+ <optional>
972
+ <attribute name="title"/>
973
+ </optional>
974
+ <optional>
975
+ <attribute name="longdesc">
976
+ <data type="anyURI"/>
977
+ </attribute>
978
+ </optional>
979
+ <zeroOrMore>
980
+ <ref name="altsource"/>
981
+ </zeroOrMore>
982
+ </element>
983
+ </define>
984
+ <define name="audio">
985
+ <element name="audio">
986
+ <attribute name="id">
987
+ <data type="ID"/>
988
+ </attribute>
989
+ <attribute name="src">
990
+ <data type="anyURI"/>
991
+ </attribute>
992
+ <attribute name="mimetype"/>
993
+ <optional>
994
+ <attribute name="filename"/>
995
+ </optional>
996
+ <optional>
997
+ <attribute name="alt"/>
998
+ </optional>
999
+ <optional>
1000
+ <attribute name="title"/>
1001
+ </optional>
1002
+ <optional>
1003
+ <attribute name="longdesc">
1004
+ <data type="anyURI"/>
1005
+ </attribute>
1006
+ </optional>
1007
+ <zeroOrMore>
1008
+ <ref name="altsource"/>
1009
+ </zeroOrMore>
1010
+ </element>
1011
+ </define>
1012
+ <define name="altsource">
1013
+ <element name="altsource">
1014
+ <attribute name="src">
1015
+ <data type="anyURI"/>
1016
+ </attribute>
1017
+ <attribute name="mimetype"/>
1018
+ <optional>
1019
+ <attribute name="filename"/>
1020
+ </optional>
1021
+ </element>
1022
+ </define>
1023
+ <define name="stem">
1024
+ <element name="stem">
1025
+ <attribute name="type">
1026
+ <choice>
1027
+ <value>MathML</value>
1028
+ <value>AsciiMath</value>
1029
+ </choice>
1030
+ </attribute>
1031
+ <oneOrMore>
1032
+ <choice>
1033
+ <text/>
1034
+ <ref name="AnyElement"/>
1035
+ </choice>
1036
+ </oneOrMore>
1037
+ </element>
1038
+ </define>
1039
+ <define name="annotation">
1040
+ <element name="annotation">
1041
+ <attribute name="id">
1042
+ <data type="ID"/>
1043
+ </attribute>
1044
+ <ref name="paragraph"/>
1045
+ </element>
1046
+ </define>
1047
+ <define name="ul">
1048
+ <element name="ul">
1049
+ <attribute name="id">
1050
+ <data type="ID"/>
1051
+ </attribute>
1052
+ <oneOrMore>
1053
+ <ref name="li"/>
1054
+ </oneOrMore>
1055
+ <zeroOrMore>
1056
+ <ref name="note"/>
1057
+ </zeroOrMore>
1058
+ </element>
1059
+ </define>
1060
+ <define name="li">
1061
+ <element name="li">
1062
+ <optional>
1063
+ <attribute name="id">
1064
+ <data type="ID"/>
1065
+ </attribute>
1066
+ </optional>
1067
+ <oneOrMore>
1068
+ <ref name="paragraph-with-footnote"/>
1069
+ </oneOrMore>
1070
+ </element>
1071
+ </define>
1072
+ <define name="ol">
1073
+ <element name="ol">
1074
+ <attribute name="id">
1075
+ <data type="ID"/>
1076
+ </attribute>
1077
+ <attribute name="type">
1078
+ <choice>
1079
+ <value>roman</value>
1080
+ <value>alphabet</value>
1081
+ <value>arabic</value>
1082
+ <value>roman_upper</value>
1083
+ <value>alphabet_upper</value>
1084
+ </choice>
1085
+ </attribute>
1086
+ <optional>
1087
+ <attribute name="start"/>
1088
+ </optional>
1089
+ <oneOrMore>
1090
+ <ref name="li"/>
1091
+ </oneOrMore>
1092
+ <zeroOrMore>
1093
+ <ref name="note"/>
1094
+ </zeroOrMore>
1095
+ </element>
1096
+ </define>
1097
+ <define name="dl">
1098
+ <element name="dl">
1099
+ <attribute name="id">
1100
+ <data type="ID"/>
1101
+ </attribute>
1102
+ <oneOrMore>
1103
+ <ref name="dt"/>
1104
+ <ref name="dd"/>
1105
+ </oneOrMore>
1106
+ <zeroOrMore>
1107
+ <ref name="note"/>
1108
+ </zeroOrMore>
1109
+ </element>
1110
+ </define>
1111
+ <define name="dt">
1112
+ <element name="dt">
1113
+ <zeroOrMore>
1114
+ <ref name="TextElement"/>
1115
+ </zeroOrMore>
1116
+ </element>
1117
+ </define>
1118
+ <define name="dd">
1119
+ <element name="dd">
1120
+ <zeroOrMore>
1121
+ <ref name="paragraph-with-footnote"/>
1122
+ </zeroOrMore>
1123
+ </element>
1124
+ </define>
1125
+ </grammar>