asciidoctor-gb 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +7 -0
  2. data/.hound.yml +3 -0
  3. data/.oss-guides.rubocop.yml +1077 -0
  4. data/.rubocop.ribose.yml +65 -0
  5. data/.rubocop.tb.yml +640 -0
  6. data/.rubocop.yml +15 -0
  7. data/CODE_OF_CONDUCT.md +74 -0
  8. data/Gemfile +11 -0
  9. data/README.adoc +77 -0
  10. data/Rakefile +6 -0
  11. data/asciidoctor-gb.gemspec +52 -0
  12. data/bin/console +14 -0
  13. data/bin/setup +8 -0
  14. data/lib/asciidoctor/gb/agencies.rb +186 -0
  15. data/lib/asciidoctor/gb/converter.rb +179 -0
  16. data/lib/asciidoctor/gb/front.rb +179 -0
  17. data/lib/asciidoctor/gb/gbconvert.rb +86 -0
  18. data/lib/asciidoctor/gb/gbstandard.rng +297 -0
  19. data/lib/asciidoctor/gb/html/blank.png +0 -0
  20. data/lib/asciidoctor/gb/html/footer.png +0 -0
  21. data/lib/asciidoctor/gb/html/gb-logos/gb-standard-db.gif +0 -0
  22. data/lib/asciidoctor/gb/html/gb-logos/gb-standard-db.png +0 -0
  23. data/lib/asciidoctor/gb/html/gb-logos/gb-standard-db.svg +1 -0
  24. data/lib/asciidoctor/gb/html/gb-logos/gb-standard-gb.gif +0 -0
  25. data/lib/asciidoctor/gb/html/gb-logos/gb-standard-gb.png +0 -0
  26. data/lib/asciidoctor/gb/html/gb-logos/gb-standard-gb.svg +1 -0
  27. data/lib/asciidoctor/gb/html/gb-logos/gb-standard-gjb.gif +0 -0
  28. data/lib/asciidoctor/gb/html/gb-logos/gb-standard-gjb.png +0 -0
  29. data/lib/asciidoctor/gb/html/gb-logos/gb-standard-gjb.svg +1 -0
  30. data/lib/asciidoctor/gb/html/gb-logos/gb-standard-gm.gif +0 -0
  31. data/lib/asciidoctor/gb/html/gb-logos/gb-standard-gm.png +0 -0
  32. data/lib/asciidoctor/gb/html/gb-logos/gb-standard-gm.svg +1 -0
  33. data/lib/asciidoctor/gb/html/gb-logos/gb-standard-jjf.gif +0 -0
  34. data/lib/asciidoctor/gb/html/gb-logos/gb-standard-jjf.png +0 -0
  35. data/lib/asciidoctor/gb/html/gb-logos/gb-standard-jjf.svg +1 -0
  36. data/lib/asciidoctor/gb/html/gb-logos/gb-standard-zb.gif +0 -0
  37. data/lib/asciidoctor/gb/html/gb-logos/gb-standard-zb.png +0 -0
  38. data/lib/asciidoctor/gb/html/gb-logos/gb-standard-zb.svg +13 -0
  39. data/lib/asciidoctor/gb/html/gb.css +642 -0
  40. data/lib/asciidoctor/gb/html/header.html +216 -0
  41. data/lib/asciidoctor/gb/html/html_gb_intro.html +45 -0
  42. data/lib/asciidoctor/gb/html/html_gb_titlepage.html +98 -0
  43. data/lib/asciidoctor/gb/html/htmlstyle.css +187 -0
  44. data/lib/asciidoctor/gb/html/logo.png +0 -0
  45. data/lib/asciidoctor/gb/html/word_gb_intro.html +3 -0
  46. data/lib/asciidoctor/gb/html/word_gb_titlepage.html +234 -0
  47. data/lib/asciidoctor/gb/html/wordstyle.css +2367 -0
  48. data/lib/asciidoctor/gb/isodoc.rng +1563 -0
  49. data/lib/asciidoctor/gb/isostandard.rng +845 -0
  50. data/lib/asciidoctor/gb/metadata.rb +186 -0
  51. data/lib/asciidoctor/gb/section_input.rb +168 -0
  52. data/lib/asciidoctor/gb/section_output.rb +38 -0
  53. data/lib/asciidoctor/gb/version.rb +5 -0
  54. data/lib/asciidoctor/gb/xref_gen.rb +25 -0
  55. data/lib/asciidoctor/gb.rb +7 -0
  56. data/lib/asciidoctor-gb.rb +4 -0
  57. metadata +411 -0
@@ -0,0 +1,845 @@
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
+ <include href="isodoc.rng">
4
+ <start>
5
+ <ref name="iso-standard"/>
6
+ </start>
7
+ <define name="language">
8
+ <element name="language">
9
+ <choice>
10
+ <value>en</value>
11
+ <value>fr</value>
12
+ </choice>
13
+ </element>
14
+ </define>
15
+ <define name="script">
16
+ <element name="script">
17
+ <value>Latn</value>
18
+ </element>
19
+ </define>
20
+ <!-- draft into isodoc? To replace version/version? -->
21
+ <define name="version">
22
+ <element name="version">
23
+ <optional>
24
+ <ref name="edition"/>
25
+ </optional>
26
+ <optional>
27
+ <ref name="revision-date"/>
28
+ </optional>
29
+ <optional>
30
+ <ref name="draft"/>
31
+ </optional>
32
+ </element>
33
+ </define>
34
+ <!-- add type to docidentifier in isodoc? -->
35
+ <define name="docidentifier">
36
+ <element name="docidentifier">
37
+ <choice>
38
+ <text/>
39
+ <group>
40
+ <ref name="documentnumber"/>
41
+ <optional>
42
+ <ref name="tc-documentnumber"/>
43
+ </optional>
44
+ </group>
45
+ </choice>
46
+ </element>
47
+ </define>
48
+ <define name="organization">
49
+ <element name="organization">
50
+ <ref name="orgname"/>
51
+ <optional>
52
+ <ref name="uri"/>
53
+ </optional>
54
+ <zeroOrMore>
55
+ <ref name="org-identifier"/>
56
+ </zeroOrMore>
57
+ <zeroOrMore>
58
+ <ref name="contact"/>
59
+ </zeroOrMore>
60
+ <optional>
61
+ <ref name="technical-committee"/>
62
+ </optional>
63
+ <optional>
64
+ <ref name="subcommittee"/>
65
+ </optional>
66
+ <optional>
67
+ <ref name="workgroup"/>
68
+ </optional>
69
+ <optional>
70
+ <ref name="secretariat"/>
71
+ </optional>
72
+ </element>
73
+ </define>
74
+ <define name="BibliographicItem">
75
+ <optional>
76
+ <attribute name="type">
77
+ <ref name="BibItemType"/>
78
+ </attribute>
79
+ </optional>
80
+ <choice>
81
+ <oneOrMore>
82
+ <ref name="btitle"/>
83
+ </oneOrMore>
84
+ <ref name="formattedref"/>
85
+ </choice>
86
+ <optional>
87
+ <ref name="source"/>
88
+ </optional>
89
+ <zeroOrMore>
90
+ <ref name="docidentifier"/>
91
+ </zeroOrMore>
92
+ <zeroOrMore>
93
+ <ref name="bdate"/>
94
+ </zeroOrMore>
95
+ <zeroOrMore>
96
+ <ref name="contributor"/>
97
+ </zeroOrMore>
98
+ <optional>
99
+ <ref name="edition"/>
100
+ </optional>
101
+ <zeroOrMore>
102
+ <ref name="biblionote"/>
103
+ </zeroOrMore>
104
+ <zeroOrMore>
105
+ <ref name="partof"/>
106
+ </zeroOrMore>
107
+ <zeroOrMore>
108
+ <ref name="language"/>
109
+ </zeroOrMore>
110
+ <zeroOrMore>
111
+ <ref name="script"/>
112
+ </zeroOrMore>
113
+ <optional>
114
+ <ref name="abstract"/>
115
+ </optional>
116
+ <optional>
117
+ <ref name="status"/>
118
+ </optional>
119
+ <optional>
120
+ <ref name="copyright"/>
121
+ </optional>
122
+ <zeroOrMore>
123
+ <ref name="docrelation"/>
124
+ </zeroOrMore>
125
+ <optional>
126
+ <ref name="editorialgroup"/>
127
+ </optional>
128
+ </define>
129
+ <define name="BibData">
130
+ <optional>
131
+ <attribute name="type">
132
+ <ref name="BibItemType"/>
133
+ </attribute>
134
+ </optional>
135
+ <oneOrMore>
136
+ <ref name="btitle"/>
137
+ </oneOrMore>
138
+ <optional>
139
+ <ref name="formattedref"/>
140
+ </optional>
141
+ <optional>
142
+ <ref name="source"/>
143
+ </optional>
144
+ <zeroOrMore>
145
+ <ref name="docidentifier"/>
146
+ </zeroOrMore>
147
+ <zeroOrMore>
148
+ <ref name="bdate"/>
149
+ </zeroOrMore>
150
+ <zeroOrMore>
151
+ <ref name="contributor"/>
152
+ </zeroOrMore>
153
+ <optional>
154
+ <ref name="edition"/>
155
+ </optional>
156
+ <zeroOrMore>
157
+ <ref name="biblionote"/>
158
+ </zeroOrMore>
159
+ <zeroOrMore>
160
+ <ref name="partof"/>
161
+ </zeroOrMore>
162
+ <zeroOrMore>
163
+ <ref name="language"/>
164
+ </zeroOrMore>
165
+ <zeroOrMore>
166
+ <ref name="script"/>
167
+ </zeroOrMore>
168
+ <optional>
169
+ <ref name="abstract"/>
170
+ </optional>
171
+ <optional>
172
+ <ref name="status"/>
173
+ </optional>
174
+ <ref name="copyright"/>
175
+ <zeroOrMore>
176
+ <ref name="docrelation"/>
177
+ </zeroOrMore>
178
+ <ref name="editorialgroup"/>
179
+ </define>
180
+ <define name="bdate">
181
+ <element name="date">
182
+ <attribute name="type">
183
+ <choice>
184
+ <value>published</value>
185
+ <value>accessed</value>
186
+ <value>created</value>
187
+ <value>activated</value>
188
+ <value>obsoleted</value>
189
+ </choice>
190
+ </attribute>
191
+ <choice>
192
+ <data type="gYear"/>
193
+ <data type="date"/>
194
+ <value>--</value>
195
+ </choice>
196
+ </element>
197
+ </define>
198
+ <define name="biblionote">
199
+ <element name="note">
200
+ <optional>
201
+ <!-- Biblio date notes can be footnoted -->
202
+ <attribute name="reference"/>
203
+ </optional>
204
+ <ref name="FormattedString"/>
205
+ </element>
206
+ </define>
207
+ <define name="status">
208
+ <element name="status">
209
+ <choice>
210
+ <ref name="FormattedString"/>
211
+ <group>
212
+ <ref name="stage"/>
213
+ <optional>
214
+ <ref name="substage"/>
215
+ </optional>
216
+ </group>
217
+ </choice>
218
+ </element>
219
+ </define>
220
+ <define name="btitle">
221
+ <element name="title">
222
+ <choice>
223
+ <ref name="FormattedString"/>
224
+ <group>
225
+ <optional>
226
+ <ref name="title-intro"/>
227
+ </optional>
228
+ <ref name="title-main"/>
229
+ <optional>
230
+ <ref name="title-part"/>
231
+ </optional>
232
+ </group>
233
+ </choice>
234
+ </element>
235
+ </define>
236
+ <define name="sections">
237
+ <element name="sections">
238
+ <ref name="clause"/>
239
+ <ref name="terms"/>
240
+ <optional>
241
+ <ref name="symbols-abbrevs"/>
242
+ </optional>
243
+ <oneOrMore>
244
+ <ref name="clause"/>
245
+ </oneOrMore>
246
+ </element>
247
+ </define>
248
+ <define name="Content-Section">
249
+ <optional>
250
+ <attribute name="id">
251
+ <data type="ID"/>
252
+ </attribute>
253
+ </optional>
254
+ <optional>
255
+ <attribute name="obligation">
256
+ <choice>
257
+ <value>normative</value>
258
+ <value>informative</value>
259
+ </choice>
260
+ </attribute>
261
+ </optional>
262
+ <optional>
263
+ <ref name="section-title"/>
264
+ </optional>
265
+ <choice>
266
+ <group>
267
+ <oneOrMore>
268
+ <ref name="BasicBlock"/>
269
+ </oneOrMore>
270
+ <zeroOrMore>
271
+ <ref name="note"/>
272
+ </zeroOrMore>
273
+ </group>
274
+ <oneOrMore>
275
+ <ref name="content-subsection"/>
276
+ </oneOrMore>
277
+ </choice>
278
+ </define>
279
+ <define name="references">
280
+ <element name="references">
281
+ <optional>
282
+ <attribute name="id">
283
+ <data type="ID"/>
284
+ </attribute>
285
+ </optional>
286
+ <optional>
287
+ <attribute name="obligation">
288
+ <choice>
289
+ <value>normative</value>
290
+ <value>informative</value>
291
+ </choice>
292
+ </attribute>
293
+ </optional>
294
+ <optional>
295
+ <ref name="section-title"/>
296
+ </optional>
297
+ <zeroOrMore>
298
+ <ref name="bibitem"/>
299
+ </zeroOrMore>
300
+ <zeroOrMore>
301
+ <ref name="references"/>
302
+ </zeroOrMore>
303
+ </element>
304
+ </define>
305
+ <define name="symbols-abbrevs">
306
+ <element name="symbols-abbrevs">
307
+ <optional>
308
+ <attribute name="id">
309
+ <data type="ID"/>
310
+ </attribute>
311
+ </optional>
312
+ <optional>
313
+ <attribute name="obligation">
314
+ <choice>
315
+ <value>normative</value>
316
+ <value>informative</value>
317
+ </choice>
318
+ </attribute>
319
+ </optional>
320
+ <ref name="dl"/>
321
+ </element>
322
+ </define>
323
+ <define name="terms">
324
+ <element name="terms">
325
+ <optional>
326
+ <attribute name="id">
327
+ <data type="ID"/>
328
+ </attribute>
329
+ </optional>
330
+ <optional>
331
+ <attribute name="obligation">
332
+ <choice>
333
+ <value>normative</value>
334
+ <value>informative</value>
335
+ </choice>
336
+ </attribute>
337
+ </optional>
338
+ <optional>
339
+ <ref name="section-title"/>
340
+ </optional>
341
+ <zeroOrMore>
342
+ <ref name="termdocsource"/>
343
+ </zeroOrMore>
344
+ <choice>
345
+ <oneOrMore>
346
+ <ref name="term"/>
347
+ </oneOrMore>
348
+ <group>
349
+ <zeroOrMore>
350
+ <ref name="terms"/>
351
+ </zeroOrMore>
352
+ <optional>
353
+ <ref name="symbols-abbrevs"/>
354
+ </optional>
355
+ </group>
356
+ </choice>
357
+ </element>
358
+ </define>
359
+ <define name="term">
360
+ <element name="term">
361
+ <optional>
362
+ <attribute name="id">
363
+ <data type="ID"/>
364
+ </attribute>
365
+ </optional>
366
+ <ref name="preferred"/>
367
+ <zeroOrMore>
368
+ <ref name="admitted"/>
369
+ </zeroOrMore>
370
+ <zeroOrMore>
371
+ <ref name="deprecates"/>
372
+ </zeroOrMore>
373
+ <optional>
374
+ <ref name="termdomain"/>
375
+ </optional>
376
+ <ref name="definition"/>
377
+ <zeroOrMore>
378
+ <ref name="termnote"/>
379
+ </zeroOrMore>
380
+ <zeroOrMore>
381
+ <ref name="termexample"/>
382
+ </zeroOrMore>
383
+ <zeroOrMore>
384
+ <ref name="termsource"/>
385
+ </zeroOrMore>
386
+ </element>
387
+ </define>
388
+ <define name="definition">
389
+ <element name="definition">
390
+ <oneOrMore>
391
+ <choice>
392
+ <ref name="paragraph"/>
393
+ <ref name="figure"/>
394
+ <ref name="formula"/>
395
+ </choice>
396
+ </oneOrMore>
397
+ </element>
398
+ </define>
399
+ <define name="annex">
400
+ <element name="annex">
401
+ <optional>
402
+ <attribute name="id">
403
+ <data type="ID"/>
404
+ </attribute>
405
+ </optional>
406
+ <optional>
407
+ <attribute name="inline-header">
408
+ <data type="boolean"/>
409
+ </attribute>
410
+ </optional>
411
+ <optional>
412
+ <attribute name="obligation">
413
+ <choice>
414
+ <value>normative</value>
415
+ <value>informative</value>
416
+ </choice>
417
+ </attribute>
418
+ </optional>
419
+ <optional>
420
+ <ref name="section-title"/>
421
+ </optional>
422
+ <zeroOrMore>
423
+ <!--
424
+ allow hanging paragraps in annexes: they introduce lists
425
+ ( paragraph-with-footnote | table | note | formula | admonition | ol | ul | dl | figure | quote | sourcecode | review | example )*,
426
+ -->
427
+ <ref name="BasicBlock"/>
428
+ </zeroOrMore>
429
+ <zeroOrMore>
430
+ <ref name="note"/>
431
+ </zeroOrMore>
432
+ <zeroOrMore>
433
+ <ref name="clause-hanging-paragraph-with-footnote"/>
434
+ </zeroOrMore>
435
+ </element>
436
+ </define>
437
+ <define name="figure">
438
+ <element name="figure">
439
+ <attribute name="id">
440
+ <data type="ID"/>
441
+ </attribute>
442
+ <optional>
443
+ <ref name="tname"/>
444
+ </optional>
445
+ <choice>
446
+ <ref name="image"/>
447
+ <oneOrMore>
448
+ <ref name="subfigure"/>
449
+ </oneOrMore>
450
+ </choice>
451
+ <zeroOrMore>
452
+ <ref name="fn"/>
453
+ </zeroOrMore>
454
+ <optional>
455
+ <ref name="dl"/>
456
+ </optional>
457
+ <zeroOrMore>
458
+ <ref name="note"/>
459
+ </zeroOrMore>
460
+ </element>
461
+ </define>
462
+ <define name="li">
463
+ <element name="li">
464
+ <oneOrMore>
465
+ <!-- ( paragraph-with-footnote | table | note | formula | admonition | ol | ul | dl | quote | sourcecode | review | example )+ -->
466
+ <ref name="BasicBlock"/>
467
+ </oneOrMore>
468
+ <!-- exclude figures? -->
469
+ </element>
470
+ </define>
471
+ <define name="dd">
472
+ <element name="dd">
473
+ <zeroOrMore>
474
+ <!--
475
+ ( paragraph-with-footnote | table | note | formula | admonition | ol | ul | dl | quote | sourcecode | review | example )*
476
+ exclude figures?
477
+ -->
478
+ <ref name="BasicBlock"/>
479
+ </zeroOrMore>
480
+ </element>
481
+ </define>
482
+ <define name="admonition">
483
+ <element name="admonition">
484
+ <attribute name="id">
485
+ <data type="ID"/>
486
+ </attribute>
487
+ <attribute name="type">
488
+ <choice>
489
+ <value>danger</value>
490
+ <value>caution</value>
491
+ <value>warning</value>
492
+ <value>important</value>
493
+ <value>safety precautions</value>
494
+ </choice>
495
+ </attribute>
496
+ <oneOrMore>
497
+ <ref name="paragraph-with-footnote"/>
498
+ </oneOrMore>
499
+ <zeroOrMore>
500
+ <ref name="note"/>
501
+ </zeroOrMore>
502
+ </element>
503
+ </define>
504
+ <define name="xref">
505
+ <element name="xref">
506
+ <attribute name="target">
507
+ <data type="IDREF"/>
508
+ </attribute>
509
+ <text/>
510
+ </element>
511
+ </define>
512
+ <define name="hyperlink">
513
+ <element name="link">
514
+ <attribute name="target">
515
+ <data type="anyURI"/>
516
+ </attribute>
517
+ <text/>
518
+ </element>
519
+ </define>
520
+ <define name="thead">
521
+ <element name="thead">
522
+ <oneOrMore>
523
+ <ref name="tr"/>
524
+ </oneOrMore>
525
+ </element>
526
+ </define>
527
+ <define name="td">
528
+ <element name="td">
529
+ <optional>
530
+ <attribute name="colspan"/>
531
+ </optional>
532
+ <optional>
533
+ <attribute name="rowspan"/>
534
+ </optional>
535
+ <optional>
536
+ <attribute name="align">
537
+ <choice>
538
+ <value>left</value>
539
+ <value>right</value>
540
+ <value>center</value>
541
+ </choice>
542
+ </attribute>
543
+ </optional>
544
+ <choice>
545
+ <zeroOrMore>
546
+ <choice>
547
+ <ref name="TextElement"/>
548
+ <ref name="fn"/>
549
+ </choice>
550
+ </zeroOrMore>
551
+ <oneOrMore>
552
+ <ref name="paragraph-with-footnote"/>
553
+ </oneOrMore>
554
+ </choice>
555
+ </element>
556
+ </define>
557
+ <define name="th">
558
+ <element name="th">
559
+ <optional>
560
+ <attribute name="colspan"/>
561
+ </optional>
562
+ <optional>
563
+ <attribute name="rowspan"/>
564
+ </optional>
565
+ <optional>
566
+ <attribute name="align">
567
+ <choice>
568
+ <value>left</value>
569
+ <value>right</value>
570
+ <value>center</value>
571
+ </choice>
572
+ </attribute>
573
+ </optional>
574
+ <choice>
575
+ <zeroOrMore>
576
+ <choice>
577
+ <ref name="TextElement"/>
578
+ <ref name="fn"/>
579
+ </choice>
580
+ </zeroOrMore>
581
+ <oneOrMore>
582
+ <ref name="paragraph-with-footnote"/>
583
+ </oneOrMore>
584
+ </choice>
585
+ </element>
586
+ </define>
587
+ <define name="table-note">
588
+ <element name="note">
589
+ <optional>
590
+ <attribute name="id">
591
+ <data type="ID"/>
592
+ </attribute>
593
+ </optional>
594
+ <ref name="paragraph"/>
595
+ </element>
596
+ </define>
597
+ <define name="Clause-Section">
598
+ <optional>
599
+ <attribute name="id">
600
+ <data type="ID"/>
601
+ </attribute>
602
+ </optional>
603
+ <optional>
604
+ <attribute name="inline-header">
605
+ <data type="boolean"/>
606
+ </attribute>
607
+ </optional>
608
+ <optional>
609
+ <attribute name="obligation">
610
+ <choice>
611
+ <value>normative</value>
612
+ <value>informative</value>
613
+ </choice>
614
+ </attribute>
615
+ </optional>
616
+ <optional>
617
+ <ref name="section-title"/>
618
+ </optional>
619
+ <choice>
620
+ <group>
621
+ <oneOrMore>
622
+ <ref name="BasicBlock"/>
623
+ </oneOrMore>
624
+ <zeroOrMore>
625
+ <ref name="note"/>
626
+ </zeroOrMore>
627
+ </group>
628
+ <oneOrMore>
629
+ <ref name="clause-subsection"/>
630
+ </oneOrMore>
631
+ </choice>
632
+ </define>
633
+ </include>
634
+ <!-- end overrides -->
635
+ <!--
636
+ We display the Normative References between scope and terms; but to keep the
637
+ grammar simple, we keep the references together
638
+ -->
639
+ <define name="iso-standard">
640
+ <element name="iso-standard">
641
+ <ref name="bibdata"/>
642
+ <optional>
643
+ <ref name="version"/>
644
+ </optional>
645
+ <ref name="foreword"/>
646
+ <optional>
647
+ <ref name="introduction"/>
648
+ </optional>
649
+ <oneOrMore>
650
+ <ref name="sections"/>
651
+ </oneOrMore>
652
+ <zeroOrMore>
653
+ <ref name="annex"/>
654
+ </zeroOrMore>
655
+ <oneOrMore>
656
+ <ref name="references"/>
657
+ </oneOrMore>
658
+ </element>
659
+ </define>
660
+ <define name="BibItemType" combine="choice">
661
+ <choice>
662
+ <value>international-standard</value>
663
+ <value>technical-specification</value>
664
+ <value>technical-report</value>
665
+ <value>publicly-available-specification</value>
666
+ <value>international-workshop-agreement</value>
667
+ <value>guide</value>
668
+ </choice>
669
+ </define>
670
+ <define name="editorialgroup">
671
+ <element name="editorialgroup">
672
+ <ref name="technical-committee"/>
673
+ <optional>
674
+ <ref name="subcommittee"/>
675
+ </optional>
676
+ <optional>
677
+ <ref name="workgroup"/>
678
+ </optional>
679
+ <optional>
680
+ <ref name="secretariat"/>
681
+ </optional>
682
+ </element>
683
+ </define>
684
+ <define name="foreword">
685
+ <element name="foreword">
686
+ <ref name="Content-Section"/>
687
+ </element>
688
+ </define>
689
+ <define name="introduction">
690
+ <element name="introduction">
691
+ <ref name="Content-Section"/>
692
+ </element>
693
+ </define>
694
+ <define name="draft">
695
+ <element name="draft">
696
+ <text/>
697
+ </element>
698
+ </define>
699
+ <define name="stage">
700
+ <element name="stage">
701
+ <choice>
702
+ <value>00</value>
703
+ <value>10</value>
704
+ <value>20</value>
705
+ <value>30</value>
706
+ <value>40</value>
707
+ <value>50</value>
708
+ <value>60</value>
709
+ <value>90</value>
710
+ <value>95</value>
711
+ </choice>
712
+ </element>
713
+ </define>
714
+ <define name="substage">
715
+ <element name="substage">
716
+ <choice>
717
+ <value>00</value>
718
+ <value>20</value>
719
+ <value>60</value>
720
+ <value>90</value>
721
+ <value>92</value>
722
+ <value>93</value>
723
+ <value>98</value>
724
+ <value>99</value>
725
+ </choice>
726
+ </element>
727
+ </define>
728
+ <define name="documentnumber">
729
+ <element name="project-number">
730
+ <optional>
731
+ <attribute name="part">
732
+ <data type="int"/>
733
+ </attribute>
734
+ </optional>
735
+ <optional>
736
+ <attribute name="subpart">
737
+ <data type="int"/>
738
+ </attribute>
739
+ </optional>
740
+ <data type="int"/>
741
+ </element>
742
+ </define>
743
+ <define name="tc-documentnumber">
744
+ <element name="tc-document-number">
745
+ <data type="int"/>
746
+ </element>
747
+ </define>
748
+ <define name="technical-committee">
749
+ <element name="technical-committee">
750
+ <ref name="IsoWorkgroup"/>
751
+ </element>
752
+ </define>
753
+ <define name="subcommittee">
754
+ <element name="subcommittee">
755
+ <ref name="IsoWorkgroup"/>
756
+ </element>
757
+ </define>
758
+ <define name="workgroup">
759
+ <element name="workgroup">
760
+ <ref name="IsoWorkgroup"/>
761
+ </element>
762
+ </define>
763
+ <define name="IsoWorkgroup">
764
+ <optional>
765
+ <attribute name="number">
766
+ <data type="int"/>
767
+ </attribute>
768
+ </optional>
769
+ <optional>
770
+ <attribute name="type"/>
771
+ </optional>
772
+ <text/>
773
+ </define>
774
+ <define name="secretariat">
775
+ <element name="secretariat">
776
+ <text/>
777
+ </element>
778
+ </define>
779
+ <define name="title-intro">
780
+ <element name="title-intro">
781
+ <ref name="FormattedString"/>
782
+ </element>
783
+ </define>
784
+ <define name="title-main">
785
+ <element name="title-main">
786
+ <ref name="FormattedString"/>
787
+ </element>
788
+ </define>
789
+ <define name="title-part">
790
+ <element name="title-part">
791
+ <ref name="FormattedString"/>
792
+ </element>
793
+ </define>
794
+ <define name="clause-hanging-paragraph-with-footnote">
795
+ <element name="subsection">
796
+ <optional>
797
+ <attribute name="id">
798
+ <data type="ID"/>
799
+ </attribute>
800
+ </optional>
801
+ <optional>
802
+ <attribute name="inline-header">
803
+ <data type="boolean"/>
804
+ </attribute>
805
+ </optional>
806
+ <optional>
807
+ <attribute name="obligation">
808
+ <choice>
809
+ <value>normative</value>
810
+ <value>informative</value>
811
+ </choice>
812
+ </attribute>
813
+ </optional>
814
+ <optional>
815
+ <ref name="section-title"/>
816
+ </optional>
817
+ <zeroOrMore>
818
+ <!-- allow hanging paragraphs in annexes: they introduce lists -->
819
+ <ref name="BasicBlock"/>
820
+ </zeroOrMore>
821
+ <zeroOrMore>
822
+ <ref name="note"/>
823
+ </zeroOrMore>
824
+ <zeroOrMore>
825
+ <ref name="clause-hanging-paragraph-with-footnote"/>
826
+ </zeroOrMore>
827
+ </element>
828
+ </define>
829
+ <define name="subfigure">
830
+ <element name="figure">
831
+ <attribute name="id">
832
+ <data type="ID"/>
833
+ </attribute>
834
+ <optional>
835
+ <ref name="tname"/>
836
+ </optional>
837
+ <ref name="image"/>
838
+ </element>
839
+ </define>
840
+ <define name="termdocsource">
841
+ <element name="source">
842
+ <ref name="erefType"/>
843
+ </element>
844
+ </define>
845
+ </grammar>