asciidoctor-csd 0.1.0 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,68 @@
1
+ <script>//TOC generation
2
+ $('#toc').toc({
3
+ 'selectors': 'h1,h2:not(.TermNum)', //elements to use as headings
4
+ 'container': 'main', //element to find all selectors in
5
+ 'smoothScrolling': true, //enable or disable smooth scrolling on click
6
+ 'prefix': 'toc', //prefix for anchor tags and class names
7
+ 'onHighlight': function(el) {}, //called when a new section is highlighted
8
+ 'highlightOnScroll': true, //add class to heading that is currently in focus
9
+ 'highlightOffset': 100, //offset to trigger the next headline
10
+ 'anchorName': function(i, heading, prefix) { //custom function for anchor name
11
+ return prefix+i;
12
+ },
13
+ 'headerText': function(i, heading, $heading) { //custom function building the header-item text
14
+ return $heading.text();
15
+ },
16
+ 'itemClass': function(i, heading, $heading, prefix) { // custom function for item class
17
+ return $heading[0].tagName.toLowerCase();
18
+ }
19
+ });
20
+
21
+ </script>
22
+
23
+ <script>
24
+ //TOC toggle animation
25
+ $('#toggle').on('click', function(){
26
+ if( $('nav').is(':visible') ) {
27
+ $('nav').animate({ 'left': '-353px' }, 'slow', function(){
28
+ $('nav').hide();
29
+ });
30
+ $('.container').animate({ 'padding-left': '31px' }, 'slow');
31
+ }
32
+ else {
33
+ $('nav').show();
34
+ $('nav').animate({ 'left': '0px' }, 'slow');
35
+ $('.container').animate({ 'padding-left': '360px' }, 'slow');
36
+ }
37
+ });
38
+ </script>
39
+
40
+ <script>
41
+ // Scroll to top button
42
+ window.onscroll = function() {scrollFunction()};
43
+
44
+ function scrollFunction() {
45
+ if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
46
+ document.getElementById("myBtn").style.display = "block";
47
+ } else {
48
+ document.getElementById("myBtn").style.display = "none";
49
+ }
50
+ }
51
+
52
+ // When the user clicks on the button, scroll to the top of the document
53
+ function topFunction() {
54
+ document.body.scrollTop = 0;
55
+ document.documentElement.scrollTop = 0;
56
+ }
57
+ </script>
58
+
59
+ <script>
60
+ $(document).ready(function() {
61
+ $('[id^=toc]').each(function ()
62
+ {
63
+ var currentToc = $(this);
64
+ var url = window.location.href;
65
+ currentToc.wrap("<a href='" + url + "#" + currentToc.attr("id") + "' </a>");
66
+ });
67
+ });
68
+ </script>
@@ -0,0 +1,1035 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ instantiations of this grammar may replace leaf strings
4
+ with more elaborated types; e.g. title (text) replaced with
5
+ title-main, title-intro, title-part; type replaced with
6
+ enum.
7
+
8
+ some renaming at leaf nodes is permissible
9
+
10
+ obligations can change both from optional to mandatory,
11
+ and from mandatory to optional; optional elements may
12
+ be omitted; freely positioned alternatives may be replaced
13
+ with strict ordering
14
+
15
+ DO NOT introduce a namespace here. We do not want a distinct namespace
16
+ for these elements, and a distinct namespace for any grammar inheriting
17
+ these elements; we just want one namespace for any child grammars
18
+ of this.
19
+ -->
20
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
21
+ <include href="biblio.rng"/>
22
+ <start>
23
+ <ref name="standard-document"/>
24
+ </start>
25
+ <define name="standard-document">
26
+ <element name="standard-document">
27
+ <ref name="bibdata"/>
28
+ <optional>
29
+ <ref name="version"/>
30
+ </optional>
31
+ <oneOrMore>
32
+ <ref name="sections"/>
33
+ </oneOrMore>
34
+ <zeroOrMore>
35
+ <ref name="annex"/>
36
+ </zeroOrMore>
37
+ <zeroOrMore>
38
+ <ref name="references"/>
39
+ </zeroOrMore>
40
+ </element>
41
+ </define>
42
+ <define name="bibdata">
43
+ <element name="bibdata">
44
+ <ref name="BibData"/>
45
+ </element>
46
+ </define>
47
+ <define name="status">
48
+ <element name="status">
49
+ <ref name="FormattedString"/>
50
+ </element>
51
+ </define>
52
+ <define name="version">
53
+ <element name="version">
54
+ <optional>
55
+ <ref name="vedition"/>
56
+ </optional>
57
+ <optional>
58
+ <ref name="revision-date"/>
59
+ </optional>
60
+ <zeroOrMore>
61
+ <ref name="draft"/>
62
+ </zeroOrMore>
63
+ </element>
64
+ </define>
65
+ <define name="vedition">
66
+ <element name="edition">
67
+ <data type="int"/>
68
+ </element>
69
+ </define>
70
+ <define name="revision-date">
71
+ <element name="revision-date">
72
+ <data type="date"/>
73
+ </element>
74
+ </define>
75
+ <define name="draft">
76
+ <element name="draft">
77
+ <text/>
78
+ </element>
79
+ </define>
80
+ <define name="sections">
81
+ <element name="sections">
82
+ <oneOrMore>
83
+ <choice>
84
+ <ref name="content"/>
85
+ <ref name="clause"/>
86
+ <ref name="terms"/>
87
+ <ref name="definitions"/>
88
+ </choice>
89
+ </oneOrMore>
90
+ </element>
91
+ </define>
92
+ <define name="definitions">
93
+ <element name="definitions">
94
+ <optional>
95
+ <attribute name="id">
96
+ <data type="ID"/>
97
+ </attribute>
98
+ </optional>
99
+ <optional>
100
+ <ref name="section-title"/>
101
+ </optional>
102
+ <ref name="dl"/>
103
+ </element>
104
+ </define>
105
+ <define name="section-title">
106
+ <element name="title">
107
+ <text/>
108
+ </element>
109
+ </define>
110
+ <define name="content">
111
+ <element name="content">
112
+ <ref name="Content-Section"/>
113
+ </element>
114
+ </define>
115
+ <define name="content-subsection">
116
+ <element name="clause">
117
+ <ref name="Content-Section"/>
118
+ </element>
119
+ </define>
120
+ <define name="Basic-Section">
121
+ <optional>
122
+ <attribute name="id">
123
+ <data type="ID"/>
124
+ </attribute>
125
+ </optional>
126
+ <optional>
127
+ <ref name="section-title"/>
128
+ </optional>
129
+ <oneOrMore>
130
+ <ref name="BasicBlock"/>
131
+ </oneOrMore>
132
+ <zeroOrMore>
133
+ <ref name="note"/>
134
+ </zeroOrMore>
135
+ </define>
136
+ <define name="Content-Section">
137
+ <optional>
138
+ <attribute name="id">
139
+ <data type="ID"/>
140
+ </attribute>
141
+ </optional>
142
+ <optional>
143
+ <ref name="section-title"/>
144
+ </optional>
145
+ <choice>
146
+ <group>
147
+ <oneOrMore>
148
+ <ref name="BasicBlock"/>
149
+ </oneOrMore>
150
+ <zeroOrMore>
151
+ <ref name="note"/>
152
+ </zeroOrMore>
153
+ </group>
154
+ <oneOrMore>
155
+ <ref name="content-subsection"/>
156
+ </oneOrMore>
157
+ </choice>
158
+ </define>
159
+ <define name="clause">
160
+ <element name="clause">
161
+ <ref name="Clause-Section"/>
162
+ </element>
163
+ </define>
164
+ <define name="Clause-Section">
165
+ <optional>
166
+ <attribute name="id">
167
+ <data type="ID"/>
168
+ </attribute>
169
+ </optional>
170
+ <optional>
171
+ <ref name="section-title"/>
172
+ </optional>
173
+ <choice>
174
+ <group>
175
+ <oneOrMore>
176
+ <ref name="BasicBlock"/>
177
+ </oneOrMore>
178
+ <zeroOrMore>
179
+ <ref name="note"/>
180
+ </zeroOrMore>
181
+ </group>
182
+ <oneOrMore>
183
+ <ref name="clause-subsection"/>
184
+ </oneOrMore>
185
+ </choice>
186
+ </define>
187
+ <define name="clause-subsection">
188
+ <element name="clause">
189
+ <ref name="Clause-Section"/>
190
+ </element>
191
+ </define>
192
+ <define name="annex">
193
+ <element name="annex">
194
+ <optional>
195
+ <attribute name="id">
196
+ <data type="ID"/>
197
+ </attribute>
198
+ </optional>
199
+ <attribute name="obligation">
200
+ <choice>
201
+ <value>normative</value>
202
+ <value>informative</value>
203
+ </choice>
204
+ </attribute>
205
+ <optional>
206
+ <ref name="section-title"/>
207
+ </optional>
208
+ <choice>
209
+ <group>
210
+ <oneOrMore>
211
+ <ref name="BasicBlock"/>
212
+ </oneOrMore>
213
+ <zeroOrMore>
214
+ <ref name="note"/>
215
+ </zeroOrMore>
216
+ </group>
217
+ <oneOrMore>
218
+ <ref name="clause-subsection"/>
219
+ </oneOrMore>
220
+ </choice>
221
+ </element>
222
+ </define>
223
+ <define name="references">
224
+ <element name="references">
225
+ <optional>
226
+ <attribute name="id">
227
+ <data type="ID"/>
228
+ </attribute>
229
+ </optional>
230
+ <optional>
231
+ <ref name="section-title"/>
232
+ </optional>
233
+ <zeroOrMore>
234
+ <ref name="bibitem"/>
235
+ </zeroOrMore>
236
+ </element>
237
+ </define>
238
+ <define name="terms">
239
+ <element name="terms">
240
+ <optional>
241
+ <attribute name="id">
242
+ <data type="ID"/>
243
+ </attribute>
244
+ </optional>
245
+ <oneOrMore>
246
+ <ref name="term"/>
247
+ </oneOrMore>
248
+ </element>
249
+ </define>
250
+ <define name="term">
251
+ <element name="term">
252
+ <optional>
253
+ <attribute name="id">
254
+ <data type="ID"/>
255
+ </attribute>
256
+ </optional>
257
+ <oneOrMore>
258
+ <ref name="preferred"/>
259
+ </oneOrMore>
260
+ <zeroOrMore>
261
+ <ref name="admitted"/>
262
+ </zeroOrMore>
263
+ <zeroOrMore>
264
+ <ref name="deprecates"/>
265
+ </zeroOrMore>
266
+ <optional>
267
+ <ref name="termdomain"/>
268
+ </optional>
269
+ <ref name="definition"/>
270
+ <zeroOrMore>
271
+ <ref name="termnote"/>
272
+ </zeroOrMore>
273
+ <zeroOrMore>
274
+ <ref name="termexample"/>
275
+ </zeroOrMore>
276
+ <zeroOrMore>
277
+ <ref name="termsource"/>
278
+ </zeroOrMore>
279
+ </element>
280
+ </define>
281
+ <define name="preferred">
282
+ <element name="preferred">
283
+ <oneOrMore>
284
+ <ref name="TextElement"/>
285
+ </oneOrMore>
286
+ </element>
287
+ </define>
288
+ <define name="admitted">
289
+ <element name="admitted">
290
+ <oneOrMore>
291
+ <ref name="TextElement"/>
292
+ </oneOrMore>
293
+ </element>
294
+ </define>
295
+ <define name="deprecates">
296
+ <element name="deprecates">
297
+ <oneOrMore>
298
+ <ref name="TextElement"/>
299
+ </oneOrMore>
300
+ </element>
301
+ </define>
302
+ <define name="termdomain">
303
+ <element name="domain">
304
+ <oneOrMore>
305
+ <ref name="TextElement"/>
306
+ </oneOrMore>
307
+ </element>
308
+ </define>
309
+ <define name="definition">
310
+ <element name="definition">
311
+ <ref name="paragraph"/>
312
+ </element>
313
+ </define>
314
+ <define name="termnote">
315
+ <element name="termnote">
316
+ <attribute name="id">
317
+ <data type="ID"/>
318
+ </attribute>
319
+ <ref name="paragraph"/>
320
+ </element>
321
+ </define>
322
+ <define name="termexample">
323
+ <element name="termexample">
324
+ <attribute name="id">
325
+ <data type="ID"/>
326
+ </attribute>
327
+ <ref name="BasicBlock"/>
328
+ </element>
329
+ </define>
330
+ <define name="termsource">
331
+ <element name="termsource">
332
+ <attribute name="status">
333
+ <choice>
334
+ <value>identical</value>
335
+ <value>modified</value>
336
+ </choice>
337
+ </attribute>
338
+ <ref name="origin"/>
339
+ <optional>
340
+ <ref name="modification"/>
341
+ </optional>
342
+ </element>
343
+ </define>
344
+ <define name="origin">
345
+ <element name="origin">
346
+ <ref name="erefType"/>
347
+ </element>
348
+ </define>
349
+ <define name="modification">
350
+ <element name="modification">
351
+ <ref name="paragraph"/>
352
+ </element>
353
+ </define>
354
+ <define name="BasicBlock">
355
+ <choice>
356
+ <ref name="paragraph-with-footnote"/>
357
+ <ref name="table"/>
358
+ <ref name="formula"/>
359
+ <ref name="admonition"/>
360
+ <ref name="ol"/>
361
+ <ref name="ul"/>
362
+ <ref name="dl"/>
363
+ <ref name="figure"/>
364
+ <ref name="quote"/>
365
+ <ref name="sourcecode"/>
366
+ <ref name="example"/>
367
+ <ref name="review"/>
368
+ </choice>
369
+ </define>
370
+ <define name="paragraph">
371
+ <element name="p">
372
+ <ref name="ParagraphType"/>
373
+ </element>
374
+ </define>
375
+ <define name="Alignments">
376
+ <choice>
377
+ <value>left</value>
378
+ <value>right</value>
379
+ <value>center</value>
380
+ <value>justified</value>
381
+ </choice>
382
+ </define>
383
+ <define name="ParagraphType">
384
+ <attribute name="id">
385
+ <data type="ID"/>
386
+ </attribute>
387
+ <optional>
388
+ <attribute name="align">
389
+ <ref name="Alignments"/>
390
+ </attribute>
391
+ </optional>
392
+ <zeroOrMore>
393
+ <ref name="TextElement"/>
394
+ </zeroOrMore>
395
+ <zeroOrMore>
396
+ <ref name="note"/>
397
+ </zeroOrMore>
398
+ </define>
399
+ <define name="paragraph-with-footnote">
400
+ <element name="p">
401
+ <attribute name="id">
402
+ <data type="ID"/>
403
+ </attribute>
404
+ <optional>
405
+ <attribute name="align">
406
+ <ref name="Alignments"/>
407
+ </attribute>
408
+ </optional>
409
+ <zeroOrMore>
410
+ <choice>
411
+ <ref name="TextElement"/>
412
+ <ref name="fn"/>
413
+ </choice>
414
+ </zeroOrMore>
415
+ <zeroOrMore>
416
+ <ref name="note"/>
417
+ </zeroOrMore>
418
+ </element>
419
+ </define>
420
+ <define name="note">
421
+ <element name="note">
422
+ <attribute name="id">
423
+ <data type="ID"/>
424
+ </attribute>
425
+ <oneOrMore>
426
+ <ref name="paragraph-with-footnote"/>
427
+ </oneOrMore>
428
+ </element>
429
+ </define>
430
+ <define name="review">
431
+ <element name="review">
432
+ <attribute name="id">
433
+ <data type="ID"/>
434
+ </attribute>
435
+ <attribute name="reviewer"/>
436
+ <optional>
437
+ <attribute name="date">
438
+ <data type="dateTime"/>
439
+ </attribute>
440
+ </optional>
441
+ <attribute name="from">
442
+ <data type="IDREF"/>
443
+ </attribute>
444
+ <optional>
445
+ <attribute name="to">
446
+ <data type="IDREF"/>
447
+ </attribute>
448
+ </optional>
449
+ <oneOrMore>
450
+ <ref name="paragraph"/>
451
+ </oneOrMore>
452
+ </element>
453
+ </define>
454
+ <define name="formula">
455
+ <element name="formula">
456
+ <attribute name="id">
457
+ <data type="ID"/>
458
+ </attribute>
459
+ <ref name="stem"/>
460
+ <optional>
461
+ <ref name="dl"/>
462
+ </optional>
463
+ <zeroOrMore>
464
+ <ref name="note"/>
465
+ </zeroOrMore>
466
+ </element>
467
+ </define>
468
+ <define name="quote">
469
+ <element name="quote">
470
+ <attribute name="id">
471
+ <data type="ID"/>
472
+ </attribute>
473
+ <optional>
474
+ <attribute name="alignment">
475
+ <ref name="Alignments"/>
476
+ </attribute>
477
+ </optional>
478
+ <optional>
479
+ <ref name="quote-source"/>
480
+ </optional>
481
+ <optional>
482
+ <ref name="quote-author"/>
483
+ </optional>
484
+ <oneOrMore>
485
+ <ref name="paragraph-with-footnote"/>
486
+ </oneOrMore>
487
+ <zeroOrMore>
488
+ <ref name="note"/>
489
+ </zeroOrMore>
490
+ </element>
491
+ </define>
492
+ <define name="quote-source">
493
+ <element name="source">
494
+ <ref name="erefType"/>
495
+ </element>
496
+ </define>
497
+ <define name="quote-author">
498
+ <element name="author">
499
+ <text/>
500
+ </element>
501
+ </define>
502
+ <define name="sourcecode">
503
+ <element name="sourcecode">
504
+ <attribute name="id">
505
+ <data type="ID"/>
506
+ </attribute>
507
+ <optional>
508
+ <ref name="tname"/>
509
+ </optional>
510
+ <oneOrMore>
511
+ <choice>
512
+ <text/>
513
+ <ref name="callout"/>
514
+ </choice>
515
+ </oneOrMore>
516
+ <zeroOrMore>
517
+ <ref name="annotation"/>
518
+ </zeroOrMore>
519
+ <zeroOrMore>
520
+ <ref name="note"/>
521
+ </zeroOrMore>
522
+ </element>
523
+ </define>
524
+ <define name="table">
525
+ <element name="table">
526
+ <attribute name="id">
527
+ <data type="ID"/>
528
+ </attribute>
529
+ <optional>
530
+ <ref name="tname"/>
531
+ </optional>
532
+ <optional>
533
+ <ref name="thead"/>
534
+ </optional>
535
+ <ref name="tbody"/>
536
+ <optional>
537
+ <ref name="tfoot"/>
538
+ </optional>
539
+ <zeroOrMore>
540
+ <ref name="table-note"/>
541
+ </zeroOrMore>
542
+ <optional>
543
+ <ref name="dl"/>
544
+ </optional>
545
+ </element>
546
+ </define>
547
+ <define name="tname">
548
+ <element name="name">
549
+ <text/>
550
+ </element>
551
+ </define>
552
+ <define name="thead">
553
+ <element name="thead">
554
+ <ref name="tr"/>
555
+ </element>
556
+ </define>
557
+ <define name="tfoot">
558
+ <element name="tfoot">
559
+ <ref name="tr"/>
560
+ </element>
561
+ </define>
562
+ <define name="tbody">
563
+ <element name="tbody">
564
+ <oneOrMore>
565
+ <ref name="tr"/>
566
+ </oneOrMore>
567
+ </element>
568
+ </define>
569
+ <define name="table-note">
570
+ <element name="note">
571
+ <ref name="paragraph"/>
572
+ </element>
573
+ </define>
574
+ <define name="tr">
575
+ <element name="tr">
576
+ <oneOrMore>
577
+ <choice>
578
+ <ref name="td"/>
579
+ <ref name="th"/>
580
+ </choice>
581
+ </oneOrMore>
582
+ </element>
583
+ </define>
584
+ <define name="td">
585
+ <element name="td">
586
+ <optional>
587
+ <attribute name="colspan"/>
588
+ </optional>
589
+ <optional>
590
+ <attribute name="rowspan"/>
591
+ </optional>
592
+ <optional>
593
+ <attribute name="align">
594
+ <choice>
595
+ <value>left</value>
596
+ <value>right</value>
597
+ <value>center</value>
598
+ </choice>
599
+ </attribute>
600
+ </optional>
601
+ <choice>
602
+ <zeroOrMore>
603
+ <ref name="TextElement"/>
604
+ </zeroOrMore>
605
+ <oneOrMore>
606
+ <ref name="paragraph-with-footnote"/>
607
+ </oneOrMore>
608
+ </choice>
609
+ </element>
610
+ </define>
611
+ <define name="th">
612
+ <element name="th">
613
+ <optional>
614
+ <attribute name="colspan"/>
615
+ </optional>
616
+ <optional>
617
+ <attribute name="rowspan"/>
618
+ </optional>
619
+ <optional>
620
+ <attribute name="align">
621
+ <choice>
622
+ <value>left</value>
623
+ <value>right</value>
624
+ <value>center</value>
625
+ </choice>
626
+ </attribute>
627
+ </optional>
628
+ <choice>
629
+ <zeroOrMore>
630
+ <ref name="TextElement"/>
631
+ </zeroOrMore>
632
+ <oneOrMore>
633
+ <ref name="paragraph-with-footnote"/>
634
+ </oneOrMore>
635
+ </choice>
636
+ </element>
637
+ </define>
638
+ <define name="example">
639
+ <element name="example">
640
+ <attribute name="id">
641
+ <data type="ID"/>
642
+ </attribute>
643
+ <oneOrMore>
644
+ <choice>
645
+ <ref name="formula"/>
646
+ <ref name="ul"/>
647
+ <ref name="ol"/>
648
+ <ref name="dl"/>
649
+ <ref name="quote"/>
650
+ <ref name="sourcecode"/>
651
+ <ref name="paragraph-with-footnote"/>
652
+ </choice>
653
+ </oneOrMore>
654
+ <zeroOrMore>
655
+ <ref name="note"/>
656
+ </zeroOrMore>
657
+ </element>
658
+ </define>
659
+ <define name="admonition">
660
+ <element name="admonition">
661
+ <attribute name="type">
662
+ <choice>
663
+ <value>warning</value>
664
+ <value>note</value>
665
+ <value>tip</value>
666
+ <value>important</value>
667
+ <value>caution</value>
668
+ </choice>
669
+ </attribute>
670
+ <attribute name="id">
671
+ <data type="ID"/>
672
+ </attribute>
673
+ <zeroOrMore>
674
+ <ref name="paragraph-with-footnote"/>
675
+ </zeroOrMore>
676
+ <zeroOrMore>
677
+ <ref name="note"/>
678
+ </zeroOrMore>
679
+ </element>
680
+ </define>
681
+ <define name="figure">
682
+ <element name="figure">
683
+ <attribute name="id">
684
+ <data type="ID"/>
685
+ </attribute>
686
+ <optional>
687
+ <ref name="source"/>
688
+ </optional>
689
+ <optional>
690
+ <ref name="tname"/>
691
+ </optional>
692
+ <choice>
693
+ <oneOrMore>
694
+ <ref name="figure"/>
695
+ </oneOrMore>
696
+ <group>
697
+ <zeroOrMore>
698
+ <ref name="TextElement"/>
699
+ </zeroOrMore>
700
+ <zeroOrMore>
701
+ <ref name="note"/>
702
+ </zeroOrMore>
703
+ <optional>
704
+ <ref name="dl"/>
705
+ </optional>
706
+ </group>
707
+ </choice>
708
+ </element>
709
+ </define>
710
+ <define name="TextElement">
711
+ <choice>
712
+ <text/>
713
+ <ref name="em"/>
714
+ <ref name="eref"/>
715
+ <ref name="strong"/>
716
+ <ref name="stem"/>
717
+ <ref name="sub"/>
718
+ <ref name="sup"/>
719
+ <ref name="tt"/>
720
+ <ref name="strike"/>
721
+ <ref name="smallcap"/>
722
+ <ref name="xref"/>
723
+ <ref name="br"/>
724
+ <ref name="hyperlink"/>
725
+ <ref name="hr"/>
726
+ <ref name="pagebreak"/>
727
+ <ref name="bookmark"/>
728
+ </choice>
729
+ </define>
730
+ <define name="source">
731
+ <element name="source">
732
+ <data type="anyURI"/>
733
+ </element>
734
+ </define>
735
+ <define name="em">
736
+ <element name="em">
737
+ <text/>
738
+ </element>
739
+ </define>
740
+ <define name="strong">
741
+ <element name="strong">
742
+ <text/>
743
+ </element>
744
+ </define>
745
+ <define name="tt">
746
+ <element name="tt">
747
+ <text/>
748
+ </element>
749
+ </define>
750
+ <define name="sub">
751
+ <element name="sub">
752
+ <text/>
753
+ </element>
754
+ </define>
755
+ <define name="sup">
756
+ <element name="sup">
757
+ <text/>
758
+ </element>
759
+ </define>
760
+ <define name="strike">
761
+ <element name="strike">
762
+ <text/>
763
+ </element>
764
+ </define>
765
+ <define name="smallcap">
766
+ <element name="smallcap">
767
+ <text/>
768
+ </element>
769
+ </define>
770
+ <define name="br">
771
+ <element name="br">
772
+ <empty/>
773
+ </element>
774
+ </define>
775
+ <define name="hr">
776
+ <element name="hr">
777
+ <empty/>
778
+ </element>
779
+ </define>
780
+ <define name="pagebreak">
781
+ <element name="pagebreak">
782
+ <empty/>
783
+ </element>
784
+ </define>
785
+ <!-- bare ID element, used for referencing arbitrary spans of text -->
786
+ <define name="bookmark">
787
+ <element name="bookmark">
788
+ <attribute name="id">
789
+ <data type="ID"/>
790
+ </attribute>
791
+ <empty/>
792
+ </element>
793
+ </define>
794
+ <define name="ReferenceFormat">
795
+ <choice>
796
+ <value>external</value>
797
+ <value>inline</value>
798
+ <value>footnote</value>
799
+ <value>callout</value>
800
+ </choice>
801
+ </define>
802
+ <define name="eref">
803
+ <element name="eref">
804
+ <ref name="erefType"/>
805
+ </element>
806
+ </define>
807
+ <define name="erefType">
808
+ <optional>
809
+ <attribute name="normative">
810
+ <data type="boolean"/>
811
+ </attribute>
812
+ </optional>
813
+ <attribute name="citeas"/>
814
+ <attribute name="type">
815
+ <ref name="ReferenceFormat"/>
816
+ </attribute>
817
+ <ref name="CitationType"/>
818
+ <text/>
819
+ </define>
820
+ <define name="hyperlink">
821
+ <element name="link">
822
+ <attribute name="target">
823
+ <data type="anyURI"/>
824
+ </attribute>
825
+ <attribute name="type">
826
+ <ref name="ReferenceFormat"/>
827
+ </attribute>
828
+ <text/>
829
+ </element>
830
+ </define>
831
+ <define name="xref">
832
+ <element name="xref">
833
+ <attribute name="target">
834
+ <data type="IDREF"/>
835
+ </attribute>
836
+ <attribute name="type">
837
+ <ref name="ReferenceFormat"/>
838
+ </attribute>
839
+ <text/>
840
+ </element>
841
+ </define>
842
+ <define name="fn">
843
+ <element name="fn">
844
+ <attribute name="reference"/>
845
+ <oneOrMore>
846
+ <ref name="paragraph"/>
847
+ </oneOrMore>
848
+ </element>
849
+ </define>
850
+ <!--
851
+ This is xref with fixed @type="footnote", and @target built in as paragraph+
852
+ @reference replaces ReferenceElement/text
853
+ so <fn reference="2"><p>This is a footnote</p></fn>
854
+ corresponds to
855
+ <eref type="footnote" target="fn2">2</xref> <p id="fn2">This is a footnote</p>
856
+ -->
857
+ <define name="callout">
858
+ <element name="callout">
859
+ <attribute name="target">
860
+ <data type="IDREF"/>
861
+ </attribute>
862
+ <text/>
863
+ </element>
864
+ </define>
865
+ <!--
866
+ This is xref with fixed @type="callout"; the target by convention is in an annotation in the same source code snippet
867
+ so <callout target="xyz">1</callout>
868
+ corresponds to <xref type="callout" target="xyz">1</xref>
869
+ -->
870
+ <define name="image">
871
+ <element name="image">
872
+ <attribute name="id">
873
+ <data type="ID"/>
874
+ </attribute>
875
+ <optional>
876
+ <attribute name="src">
877
+ <data type="anyURI"/>
878
+ </attribute>
879
+ </optional>
880
+ <attribute name="imagetype">
881
+ <choice>
882
+ <value>SVG</value>
883
+ <value>JPEG</value>
884
+ <value>GIF</value>
885
+ <value>PNG</value>
886
+ <value>PDF</value>
887
+ </choice>
888
+ </attribute>
889
+ <optional>
890
+ <attribute name="width">
891
+ <data type="int"/>
892
+ </attribute>
893
+ </optional>
894
+ <optional>
895
+ <attribute name="height">
896
+ <data type="int"/>
897
+ </attribute>
898
+ </optional>
899
+ </element>
900
+ </define>
901
+ <define name="stem">
902
+ <element name="stem">
903
+ <attribute name="type">
904
+ <choice>
905
+ <value>MathML</value>
906
+ <value>AsciiMath</value>
907
+ </choice>
908
+ </attribute>
909
+ <text/>
910
+ </element>
911
+ </define>
912
+ <define name="annotation">
913
+ <element name="annotation">
914
+ <attribute name="id">
915
+ <data type="ID"/>
916
+ </attribute>
917
+ <ref name="paragraph"/>
918
+ </element>
919
+ </define>
920
+ <define name="ul">
921
+ <element name="ul">
922
+ <attribute name="id">
923
+ <data type="ID"/>
924
+ </attribute>
925
+ <oneOrMore>
926
+ <ref name="li"/>
927
+ </oneOrMore>
928
+ <zeroOrMore>
929
+ <ref name="note"/>
930
+ </zeroOrMore>
931
+ </element>
932
+ </define>
933
+ <define name="li">
934
+ <element name="li">
935
+ <oneOrMore>
936
+ <ref name="paragraph-with-footnote"/>
937
+ </oneOrMore>
938
+ </element>
939
+ </define>
940
+ <define name="ol">
941
+ <element name="ol">
942
+ <attribute name="id">
943
+ <data type="ID"/>
944
+ </attribute>
945
+ <attribute name="type">
946
+ <choice>
947
+ <value>roman</value>
948
+ <value>alphabet</value>
949
+ <value>arabic</value>
950
+ <value>roman_upper</value>
951
+ <value>alphabet_upper</value>
952
+ </choice>
953
+ </attribute>
954
+ <oneOrMore>
955
+ <ref name="li"/>
956
+ </oneOrMore>
957
+ <zeroOrMore>
958
+ <ref name="note"/>
959
+ </zeroOrMore>
960
+ </element>
961
+ </define>
962
+ <define name="dl">
963
+ <element name="dl">
964
+ <attribute name="id">
965
+ <data type="ID"/>
966
+ </attribute>
967
+ <oneOrMore>
968
+ <ref name="dt"/>
969
+ <ref name="dd"/>
970
+ </oneOrMore>
971
+ <zeroOrMore>
972
+ <ref name="note"/>
973
+ </zeroOrMore>
974
+ </element>
975
+ </define>
976
+ <define name="dt">
977
+ <element name="dt">
978
+ <ref name="TextElement"/>
979
+ </element>
980
+ </define>
981
+ <define name="dd">
982
+ <element name="dd">
983
+ <zeroOrMore>
984
+ <ref name="paragraph-with-footnote"/>
985
+ </zeroOrMore>
986
+ </element>
987
+ </define>
988
+ <define name="BibData">
989
+ <optional>
990
+ <attribute name="type">
991
+ <ref name="BibItemType"/>
992
+ </attribute>
993
+ </optional>
994
+ <oneOrMore>
995
+ <ref name="btitle"/>
996
+ </oneOrMore>
997
+ <optional>
998
+ <ref name="formattedref"/>
999
+ </optional>
1000
+ <zeroOrMore>
1001
+ <ref name="source"/>
1002
+ </zeroOrMore>
1003
+ <zeroOrMore>
1004
+ <ref name="docidentifier"/>
1005
+ </zeroOrMore>
1006
+ <zeroOrMore>
1007
+ <ref name="bdate"/>
1008
+ </zeroOrMore>
1009
+ <zeroOrMore>
1010
+ <ref name="contributor"/>
1011
+ </zeroOrMore>
1012
+ <optional>
1013
+ <ref name="edition"/>
1014
+ </optional>
1015
+ <zeroOrMore>
1016
+ <ref name="biblionote"/>
1017
+ </zeroOrMore>
1018
+ <zeroOrMore>
1019
+ <ref name="language"/>
1020
+ </zeroOrMore>
1021
+ <zeroOrMore>
1022
+ <ref name="script"/>
1023
+ </zeroOrMore>
1024
+ <optional>
1025
+ <ref name="abstract"/>
1026
+ </optional>
1027
+ <optional>
1028
+ <ref name="status"/>
1029
+ </optional>
1030
+ <ref name="copyright"/>
1031
+ <zeroOrMore>
1032
+ <ref name="docrelation"/>
1033
+ </zeroOrMore>
1034
+ </define>
1035
+ </grammar>