metanorma-unece 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +1 -0
  3. data/.hound.yml +3 -0
  4. data/.rubocop.ribose.yml +66 -0
  5. data/.rubocop.tb.yml +650 -0
  6. data/.rubocop.yml +15 -0
  7. data/.travis.yml +21 -0
  8. data/CODE_OF_CONDUCT.md +74 -0
  9. data/Gemfile +4 -0
  10. data/LICENSE +25 -0
  11. data/README.adoc +202 -0
  12. data/Rakefile +6 -0
  13. data/bin/console +14 -0
  14. data/bin/rspec +17 -0
  15. data/bin/setup +8 -0
  16. data/lib/asciidoctor/unece.rb +7 -0
  17. data/lib/asciidoctor/unece/biblio.rng +880 -0
  18. data/lib/asciidoctor/unece/converter.rb +240 -0
  19. data/lib/asciidoctor/unece/isodoc.rng +1066 -0
  20. data/lib/asciidoctor/unece/isostandard.rng +1054 -0
  21. data/lib/asciidoctor/unece/unece.rng +247 -0
  22. data/lib/isodoc/unece.rb +9 -0
  23. data/lib/isodoc/unece/html/header.html +164 -0
  24. data/lib/isodoc/unece/html/html_unece_intro.html +27 -0
  25. data/lib/isodoc/unece/html/html_unece_titlepage.html +112 -0
  26. data/lib/isodoc/unece/html/htmlstyle.scss +1119 -0
  27. data/lib/isodoc/unece/html/logo.jpg +0 -0
  28. data/lib/isodoc/unece/html/scripts.html +82 -0
  29. data/lib/isodoc/unece/html/unece.scss +660 -0
  30. data/lib/isodoc/unece/html/word_unece_intro.html +24 -0
  31. data/lib/isodoc/unece/html/word_unece_plenary_titlepage.html +129 -0
  32. data/lib/isodoc/unece/html/word_unece_titlepage.html +17 -0
  33. data/lib/isodoc/unece/html/wordstyle.scss +1088 -0
  34. data/lib/isodoc/unece/html_convert.rb +392 -0
  35. data/lib/isodoc/unece/metadata.rb +93 -0
  36. data/lib/isodoc/unece/word_convert.rb +405 -0
  37. data/lib/metanorma-unece.rb +8 -0
  38. data/lib/metanorma/unece.rb +11 -0
  39. data/lib/metanorma/unece/UN_emblem_blue.svg +193 -0
  40. data/lib/metanorma/unece/processor.rb +40 -0
  41. data/lib/metanorma/unece/version.rb +5 -0
  42. data/metanorma-unece.gemspec +47 -0
  43. metadata +353 -0
@@ -0,0 +1,1054 @@
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
+ <!-- add type to docidentifier in isodoc? -->
21
+ <define name="docidentifier">
22
+ <element name="docidentifier">
23
+ <optional>
24
+ <attribute name="type"/>
25
+ </optional>
26
+ <choice>
27
+ <text/>
28
+ <group>
29
+ <ref name="documentnumber"/>
30
+ <optional>
31
+ <ref name="tc-documentnumber"/>
32
+ </optional>
33
+ </group>
34
+ </choice>
35
+ </element>
36
+ </define>
37
+ <define name="organization">
38
+ <element name="organization">
39
+ <ref name="orgname"/>
40
+ <optional>
41
+ <ref name="abbreviation"/>
42
+ </optional>
43
+ <optional>
44
+ <ref name="uri"/>
45
+ </optional>
46
+ <zeroOrMore>
47
+ <ref name="org-identifier"/>
48
+ </zeroOrMore>
49
+ <zeroOrMore>
50
+ <ref name="contact"/>
51
+ </zeroOrMore>
52
+ <optional>
53
+ <ref name="technical-committee"/>
54
+ </optional>
55
+ <optional>
56
+ <ref name="subcommittee"/>
57
+ </optional>
58
+ <optional>
59
+ <ref name="workgroup"/>
60
+ </optional>
61
+ <optional>
62
+ <ref name="secretariat"/>
63
+ </optional>
64
+ </element>
65
+ </define>
66
+ <define name="BibliographicItem">
67
+ <optional>
68
+ <attribute name="type">
69
+ <ref name="BibItemType"/>
70
+ </attribute>
71
+ </optional>
72
+ <optional>
73
+ <ref name="fetched"/>
74
+ </optional>
75
+ <choice>
76
+ <oneOrMore>
77
+ <ref name="btitle"/>
78
+ </oneOrMore>
79
+ <ref name="formattedref"/>
80
+ </choice>
81
+ <zeroOrMore>
82
+ <ref name="bsource"/>
83
+ </zeroOrMore>
84
+ <zeroOrMore>
85
+ <ref name="docidentifier"/>
86
+ </zeroOrMore>
87
+ <zeroOrMore>
88
+ <ref name="bdate"/>
89
+ </zeroOrMore>
90
+ <zeroOrMore>
91
+ <ref name="contributor"/>
92
+ </zeroOrMore>
93
+ <optional>
94
+ <ref name="edition"/>
95
+ </optional>
96
+ <zeroOrMore>
97
+ <ref name="biblionote"/>
98
+ </zeroOrMore>
99
+ <zeroOrMore>
100
+ <ref name="language"/>
101
+ </zeroOrMore>
102
+ <zeroOrMore>
103
+ <ref name="script"/>
104
+ </zeroOrMore>
105
+ <zeroOrMore>
106
+ <ref name="abstract"/>
107
+ </zeroOrMore>
108
+ <optional>
109
+ <ref name="status"/>
110
+ </optional>
111
+ <optional>
112
+ <ref name="copyright"/>
113
+ </optional>
114
+ <zeroOrMore>
115
+ <ref name="docrelation"/>
116
+ </zeroOrMore>
117
+ <zeroOrMore>
118
+ <ref name="series"/>
119
+ </zeroOrMore>
120
+ <optional>
121
+ <ref name="medium"/>
122
+ </optional>
123
+ <zeroOrMore>
124
+ <ref name="bplace"/>
125
+ </zeroOrMore>
126
+ <zeroOrMore>
127
+ <ref name="extent"/>
128
+ </zeroOrMore>
129
+ <zeroOrMore>
130
+ <ref name="accesslocation"/>
131
+ </zeroOrMore>
132
+ <optional>
133
+ <ref name="bclassification"/>
134
+ </optional>
135
+ <optional>
136
+ <ref name="validity"/>
137
+ </optional>
138
+ <optional>
139
+ <ref name="editorialgroup"/>
140
+ </optional>
141
+ <zeroOrMore>
142
+ <ref name="ics"/>
143
+ </zeroOrMore>
144
+ <optional>
145
+ <ref name="allParts"/>
146
+ </optional>
147
+ </define>
148
+ <define name="BibData">
149
+ <optional>
150
+ <attribute name="type">
151
+ <ref name="BibItemType"/>
152
+ </attribute>
153
+ </optional>
154
+ <oneOrMore>
155
+ <ref name="btitle"/>
156
+ </oneOrMore>
157
+ <optional>
158
+ <ref name="formattedref"/>
159
+ </optional>
160
+ <zeroOrMore>
161
+ <ref name="bsource"/>
162
+ </zeroOrMore>
163
+ <zeroOrMore>
164
+ <ref name="docidentifier"/>
165
+ </zeroOrMore>
166
+ <zeroOrMore>
167
+ <ref name="bdate"/>
168
+ </zeroOrMore>
169
+ <zeroOrMore>
170
+ <ref name="contributor"/>
171
+ </zeroOrMore>
172
+ <optional>
173
+ <ref name="edition"/>
174
+ </optional>
175
+ <zeroOrMore>
176
+ <ref name="biblionote"/>
177
+ </zeroOrMore>
178
+ <zeroOrMore>
179
+ <ref name="language"/>
180
+ </zeroOrMore>
181
+ <zeroOrMore>
182
+ <ref name="script"/>
183
+ </zeroOrMore>
184
+ <zeroOrMore>
185
+ <ref name="abstract"/>
186
+ </zeroOrMore>
187
+ <optional>
188
+ <ref name="status"/>
189
+ </optional>
190
+ <ref name="copyright"/>
191
+ <zeroOrMore>
192
+ <ref name="docrelation"/>
193
+ </zeroOrMore>
194
+ <zeroOrMore>
195
+ <ref name="series"/>
196
+ </zeroOrMore>
197
+ <optional>
198
+ <ref name="medium"/>
199
+ </optional>
200
+ <zeroOrMore>
201
+ <ref name="bplace"/>
202
+ </zeroOrMore>
203
+ <zeroOrMore>
204
+ <ref name="extent"/>
205
+ </zeroOrMore>
206
+ <zeroOrMore>
207
+ <ref name="accesslocation"/>
208
+ </zeroOrMore>
209
+ <optional>
210
+ <ref name="bclassification"/>
211
+ </optional>
212
+ <optional>
213
+ <ref name="validity"/>
214
+ </optional>
215
+ <ref name="editorialgroup"/>
216
+ <zeroOrMore>
217
+ <ref name="ics"/>
218
+ </zeroOrMore>
219
+ <optional>
220
+ <ref name="allParts"/>
221
+ </optional>
222
+ </define>
223
+ <define name="bdate">
224
+ <element name="date">
225
+ <attribute name="type">
226
+ <choice>
227
+ <value>published</value>
228
+ <value>accessed</value>
229
+ <value>created</value>
230
+ <value>implemented</value>
231
+ <value>obsoleted</value>
232
+ <value>confirmed</value>
233
+ <value>updated</value>
234
+ <value>issued</value>
235
+ </choice>
236
+ </attribute>
237
+ <!-- ( ( bfrom, bto? ) | date_on ) -->
238
+ <choice>
239
+ <group>
240
+ <element name="from">
241
+ <choice>
242
+ <data type="gYear"/>
243
+ <data type="date"/>
244
+ </choice>
245
+ </element>
246
+ <optional>
247
+ <element name="to">
248
+ <choice>
249
+ <data type="gYear"/>
250
+ <data type="date"/>
251
+ </choice>
252
+ </element>
253
+ </optional>
254
+ </group>
255
+ <element name="on">
256
+ <choice>
257
+ <data type="gYear"/>
258
+ <data type="date"/>
259
+ <value>--</value>
260
+ </choice>
261
+ </element>
262
+ </choice>
263
+ </element>
264
+ </define>
265
+ <define name="biblionote">
266
+ <element name="note">
267
+ <optional>
268
+ <!-- Biblio date notes can be footnoted -->
269
+ <attribute name="reference"/>
270
+ </optional>
271
+ <ref name="FormattedString"/>
272
+ </element>
273
+ </define>
274
+ <define name="status">
275
+ <element name="status">
276
+ <choice>
277
+ <ref name="FormattedString"/>
278
+ <group>
279
+ <ref name="stage"/>
280
+ <optional>
281
+ <ref name="substage"/>
282
+ </optional>
283
+ <optional>
284
+ <ref name="iteration"/>
285
+ </optional>
286
+ </group>
287
+ </choice>
288
+ </element>
289
+ </define>
290
+ <define name="btitle">
291
+ <element name="title">
292
+ <choice>
293
+ <ref name="FormattedString"/>
294
+ <group>
295
+ <optional>
296
+ <ref name="title-intro"/>
297
+ </optional>
298
+ <ref name="title-main"/>
299
+ <optional>
300
+ <ref name="title-part"/>
301
+ </optional>
302
+ </group>
303
+ </choice>
304
+ </element>
305
+ </define>
306
+ <define name="sections">
307
+ <element name="sections">
308
+ <ref name="clause"/>
309
+ <choice>
310
+ <ref name="term-clause"/>
311
+ <ref name="terms"/>
312
+ </choice>
313
+ <optional>
314
+ <ref name="definitions"/>
315
+ </optional>
316
+ <oneOrMore>
317
+ <ref name="clause"/>
318
+ </oneOrMore>
319
+ </element>
320
+ </define>
321
+ <define name="Basic-Section">
322
+ <optional>
323
+ <attribute name="id">
324
+ <data type="ID"/>
325
+ </attribute>
326
+ </optional>
327
+ <optional>
328
+ <attribute name="obligation">
329
+ <choice>
330
+ <value>normative</value>
331
+ <value>informative</value>
332
+ </choice>
333
+ </attribute>
334
+ </optional>
335
+ <optional>
336
+ <ref name="section-title"/>
337
+ </optional>
338
+ <group>
339
+ <oneOrMore>
340
+ <ref name="BasicBlock"/>
341
+ </oneOrMore>
342
+ <zeroOrMore>
343
+ <ref name="note"/>
344
+ </zeroOrMore>
345
+ </group>
346
+ </define>
347
+ <define name="Content-Section">
348
+ <optional>
349
+ <attribute name="id">
350
+ <data type="ID"/>
351
+ </attribute>
352
+ </optional>
353
+ <optional>
354
+ <attribute name="obligation">
355
+ <choice>
356
+ <value>normative</value>
357
+ <value>informative</value>
358
+ </choice>
359
+ </attribute>
360
+ </optional>
361
+ <optional>
362
+ <ref name="section-title"/>
363
+ </optional>
364
+ <choice>
365
+ <group>
366
+ <oneOrMore>
367
+ <ref name="BasicBlock"/>
368
+ </oneOrMore>
369
+ <zeroOrMore>
370
+ <ref name="note"/>
371
+ </zeroOrMore>
372
+ </group>
373
+ <oneOrMore>
374
+ <ref name="content-subsection"/>
375
+ </oneOrMore>
376
+ </choice>
377
+ </define>
378
+ <define name="Clause-Section">
379
+ <optional>
380
+ <attribute name="id">
381
+ <data type="ID"/>
382
+ </attribute>
383
+ </optional>
384
+ <optional>
385
+ <attribute name="inline-header">
386
+ <data type="boolean"/>
387
+ </attribute>
388
+ </optional>
389
+ <optional>
390
+ <attribute name="obligation">
391
+ <choice>
392
+ <value>normative</value>
393
+ <value>informative</value>
394
+ </choice>
395
+ </attribute>
396
+ </optional>
397
+ <optional>
398
+ <ref name="section-title"/>
399
+ </optional>
400
+ <choice>
401
+ <group>
402
+ <oneOrMore>
403
+ <ref name="BasicBlock"/>
404
+ </oneOrMore>
405
+ <zeroOrMore>
406
+ <ref name="note"/>
407
+ </zeroOrMore>
408
+ </group>
409
+ <oneOrMore>
410
+ <ref name="clause-subsection"/>
411
+ </oneOrMore>
412
+ </choice>
413
+ </define>
414
+ <define name="references">
415
+ <element name="references">
416
+ <optional>
417
+ <attribute name="id">
418
+ <data type="ID"/>
419
+ </attribute>
420
+ </optional>
421
+ <optional>
422
+ <attribute name="obligation">
423
+ <choice>
424
+ <value>normative</value>
425
+ <value>informative</value>
426
+ </choice>
427
+ </attribute>
428
+ </optional>
429
+ <optional>
430
+ <ref name="section-title"/>
431
+ </optional>
432
+ <zeroOrMore>
433
+ <ref name="bibitem"/>
434
+ </zeroOrMore>
435
+ <zeroOrMore>
436
+ <ref name="references"/>
437
+ </zeroOrMore>
438
+ </element>
439
+ </define>
440
+ <define name="definitions">
441
+ <element name="definitions">
442
+ <optional>
443
+ <attribute name="id">
444
+ <data type="ID"/>
445
+ </attribute>
446
+ </optional>
447
+ <optional>
448
+ <attribute name="obligation">
449
+ <choice>
450
+ <value>normative</value>
451
+ <value>informative</value>
452
+ </choice>
453
+ </attribute>
454
+ </optional>
455
+ <ref name="dl"/>
456
+ </element>
457
+ </define>
458
+ <define name="terms">
459
+ <element name="terms">
460
+ <optional>
461
+ <attribute name="id">
462
+ <data type="ID"/>
463
+ </attribute>
464
+ </optional>
465
+ <optional>
466
+ <attribute name="obligation">
467
+ <choice>
468
+ <value>normative</value>
469
+ <value>informative</value>
470
+ </choice>
471
+ </attribute>
472
+ </optional>
473
+ <optional>
474
+ <ref name="section-title"/>
475
+ </optional>
476
+ <choice>
477
+ <oneOrMore>
478
+ <ref name="term"/>
479
+ </oneOrMore>
480
+ <group>
481
+ <zeroOrMore>
482
+ <ref name="terms"/>
483
+ </zeroOrMore>
484
+ <optional>
485
+ <ref name="definitions"/>
486
+ </optional>
487
+ </group>
488
+ </choice>
489
+ </element>
490
+ </define>
491
+ <define name="term">
492
+ <element name="term">
493
+ <optional>
494
+ <attribute name="id">
495
+ <data type="ID"/>
496
+ </attribute>
497
+ </optional>
498
+ <ref name="preferred"/>
499
+ <zeroOrMore>
500
+ <ref name="admitted"/>
501
+ </zeroOrMore>
502
+ <zeroOrMore>
503
+ <ref name="deprecates"/>
504
+ </zeroOrMore>
505
+ <optional>
506
+ <ref name="termdomain"/>
507
+ </optional>
508
+ <ref name="definition"/>
509
+ <zeroOrMore>
510
+ <ref name="termnote"/>
511
+ </zeroOrMore>
512
+ <zeroOrMore>
513
+ <ref name="termexample"/>
514
+ </zeroOrMore>
515
+ <zeroOrMore>
516
+ <ref name="termsource"/>
517
+ </zeroOrMore>
518
+ </element>
519
+ </define>
520
+ <define name="definition">
521
+ <element name="definition">
522
+ <oneOrMore>
523
+ <choice>
524
+ <ref name="paragraph"/>
525
+ <ref name="figure"/>
526
+ <ref name="formula"/>
527
+ </choice>
528
+ </oneOrMore>
529
+ </element>
530
+ </define>
531
+ <define name="annex">
532
+ <element name="annex">
533
+ <optional>
534
+ <attribute name="id">
535
+ <data type="ID"/>
536
+ </attribute>
537
+ </optional>
538
+ <optional>
539
+ <attribute name="inline-header">
540
+ <data type="boolean"/>
541
+ </attribute>
542
+ </optional>
543
+ <optional>
544
+ <attribute name="obligation">
545
+ <choice>
546
+ <value>normative</value>
547
+ <value>informative</value>
548
+ </choice>
549
+ </attribute>
550
+ </optional>
551
+ <optional>
552
+ <ref name="section-title"/>
553
+ </optional>
554
+ <zeroOrMore>
555
+ <!--
556
+ allow hanging paragraps in annexes: they introduce lists
557
+ ( paragraph-with-footnote | table | note | formula | admonition | ol | ul | dl | figure | quote | sourcecode | review | example )*,
558
+ -->
559
+ <ref name="BasicBlock"/>
560
+ </zeroOrMore>
561
+ <zeroOrMore>
562
+ <ref name="note"/>
563
+ </zeroOrMore>
564
+ <zeroOrMore>
565
+ <ref name="clause-hanging-paragraph-with-footnote"/>
566
+ </zeroOrMore>
567
+ <zeroOrMore>
568
+ <ref name="annex-appendix"/>
569
+ </zeroOrMore>
570
+ </element>
571
+ </define>
572
+ <define name="figure">
573
+ <element name="figure">
574
+ <attribute name="id">
575
+ <data type="ID"/>
576
+ </attribute>
577
+ <optional>
578
+ <ref name="tname"/>
579
+ </optional>
580
+ <choice>
581
+ <ref name="image"/>
582
+ <oneOrMore>
583
+ <ref name="subfigure"/>
584
+ </oneOrMore>
585
+ </choice>
586
+ <zeroOrMore>
587
+ <ref name="fn"/>
588
+ </zeroOrMore>
589
+ <optional>
590
+ <ref name="dl"/>
591
+ </optional>
592
+ <zeroOrMore>
593
+ <ref name="note"/>
594
+ </zeroOrMore>
595
+ </element>
596
+ </define>
597
+ <define name="li">
598
+ <element name="li">
599
+ <group>
600
+ <optional>
601
+ <!-- ( paragraph-with-footnote | table | note | formula | admonition | ol | ul | dl | quote | sourcecode | review | example )+ -->
602
+ <attribute name="id">
603
+ <data type="ID"/>
604
+ </attribute>
605
+ </optional>
606
+ <oneOrMore>
607
+ <ref name="BasicBlock"/>
608
+ </oneOrMore>
609
+ </group>
610
+ <!-- exclude figures? -->
611
+ </element>
612
+ </define>
613
+ <define name="dd">
614
+ <element name="dd">
615
+ <zeroOrMore>
616
+ <!--
617
+ ( paragraph-with-footnote | table | note | formula | admonition | ol | ul | dl | quote | sourcecode | review | example )*
618
+ exclude figures?
619
+ -->
620
+ <ref name="BasicBlock"/>
621
+ </zeroOrMore>
622
+ </element>
623
+ </define>
624
+ <define name="admonition">
625
+ <element name="admonition">
626
+ <attribute name="id">
627
+ <data type="ID"/>
628
+ </attribute>
629
+ <attribute name="type">
630
+ <choice>
631
+ <value>danger</value>
632
+ <value>caution</value>
633
+ <value>warning</value>
634
+ <value>important</value>
635
+ <value>safety precautions</value>
636
+ </choice>
637
+ </attribute>
638
+ <oneOrMore>
639
+ <ref name="paragraph-with-footnote"/>
640
+ </oneOrMore>
641
+ <zeroOrMore>
642
+ <ref name="note"/>
643
+ </zeroOrMore>
644
+ </element>
645
+ </define>
646
+ <define name="xref">
647
+ <element name="xref">
648
+ <attribute name="target">
649
+ <data type="IDREF"/>
650
+ </attribute>
651
+ <text/>
652
+ </element>
653
+ </define>
654
+ <define name="hyperlink">
655
+ <element name="link">
656
+ <attribute name="target">
657
+ <data type="anyURI"/>
658
+ </attribute>
659
+ <text/>
660
+ </element>
661
+ </define>
662
+ <define name="thead">
663
+ <element name="thead">
664
+ <oneOrMore>
665
+ <ref name="tr"/>
666
+ </oneOrMore>
667
+ </element>
668
+ </define>
669
+ <define name="td">
670
+ <element name="td">
671
+ <optional>
672
+ <attribute name="colspan"/>
673
+ </optional>
674
+ <optional>
675
+ <attribute name="rowspan"/>
676
+ </optional>
677
+ <optional>
678
+ <attribute name="align">
679
+ <choice>
680
+ <value>left</value>
681
+ <value>right</value>
682
+ <value>center</value>
683
+ </choice>
684
+ </attribute>
685
+ </optional>
686
+ <choice>
687
+ <zeroOrMore>
688
+ <choice>
689
+ <ref name="TextElement"/>
690
+ <ref name="fn"/>
691
+ </choice>
692
+ </zeroOrMore>
693
+ <oneOrMore>
694
+ <ref name="paragraph-with-footnote"/>
695
+ </oneOrMore>
696
+ </choice>
697
+ </element>
698
+ </define>
699
+ <define name="th">
700
+ <element name="th">
701
+ <optional>
702
+ <attribute name="colspan"/>
703
+ </optional>
704
+ <optional>
705
+ <attribute name="rowspan"/>
706
+ </optional>
707
+ <optional>
708
+ <attribute name="align">
709
+ <choice>
710
+ <value>left</value>
711
+ <value>right</value>
712
+ <value>center</value>
713
+ </choice>
714
+ </attribute>
715
+ </optional>
716
+ <choice>
717
+ <zeroOrMore>
718
+ <choice>
719
+ <ref name="TextElement"/>
720
+ <ref name="fn"/>
721
+ </choice>
722
+ </zeroOrMore>
723
+ <oneOrMore>
724
+ <ref name="paragraph-with-footnote"/>
725
+ </oneOrMore>
726
+ </choice>
727
+ </element>
728
+ </define>
729
+ <define name="table-note">
730
+ <element name="note">
731
+ <optional>
732
+ <attribute name="id">
733
+ <data type="ID"/>
734
+ </attribute>
735
+ </optional>
736
+ <ref name="paragraph"/>
737
+ </element>
738
+ </define>
739
+ <define name="preface">
740
+ <element name="preface">
741
+ <ref name="foreword"/>
742
+ <optional>
743
+ <ref name="introduction"/>
744
+ </optional>
745
+ </element>
746
+ </define>
747
+ </include>
748
+ <!-- end overrides -->
749
+ <!--
750
+ We display the Normative References between scope and terms; but to keep the
751
+ grammar simple, we keep the references together
752
+ -->
753
+ <define name="iso-standard">
754
+ <element name="iso-standard">
755
+ <ref name="bibdata"/>
756
+ <optional>
757
+ <ref name="version"/>
758
+ </optional>
759
+ <zeroOrMore>
760
+ <ref name="termdocsource"/>
761
+ </zeroOrMore>
762
+ <ref name="preface"/>
763
+ <oneOrMore>
764
+ <ref name="sections"/>
765
+ </oneOrMore>
766
+ <zeroOrMore>
767
+ <ref name="annex"/>
768
+ </zeroOrMore>
769
+ <ref name="bibliography"/>
770
+ </element>
771
+ </define>
772
+ <define name="bibliography">
773
+ <element name="bibliography">
774
+ <oneOrMore>
775
+ <choice>
776
+ <ref name="references"/>
777
+ <ref name="reference-clause"/>
778
+ </choice>
779
+ </oneOrMore>
780
+ </element>
781
+ </define>
782
+ <define name="BibItemType" combine="choice">
783
+ <choice>
784
+ <value>international-standard</value>
785
+ <value>technical-specification</value>
786
+ <value>technical-report</value>
787
+ <value>publicly-available-specification</value>
788
+ <value>international-workshop-agreement</value>
789
+ <value>guide</value>
790
+ </choice>
791
+ </define>
792
+ <define name="editorialgroup">
793
+ <element name="editorialgroup">
794
+ <oneOrMore>
795
+ <ref name="technical-committee"/>
796
+ </oneOrMore>
797
+ <zeroOrMore>
798
+ <ref name="subcommittee"/>
799
+ </zeroOrMore>
800
+ <zeroOrMore>
801
+ <ref name="workgroup"/>
802
+ </zeroOrMore>
803
+ <optional>
804
+ <ref name="secretariat"/>
805
+ </optional>
806
+ </element>
807
+ </define>
808
+ <define name="foreword">
809
+ <element name="foreword">
810
+ <ref name="Basic-Section"/>
811
+ </element>
812
+ </define>
813
+ <define name="introduction">
814
+ <element name="introduction">
815
+ <ref name="Content-Section"/>
816
+ </element>
817
+ </define>
818
+ <define name="stage">
819
+ <element name="stage">
820
+ <choice>
821
+ <value>00</value>
822
+ <value>10</value>
823
+ <value>20</value>
824
+ <value>30</value>
825
+ <value>40</value>
826
+ <value>50</value>
827
+ <value>60</value>
828
+ <value>90</value>
829
+ <value>95</value>
830
+ </choice>
831
+ </element>
832
+ </define>
833
+ <define name="substage">
834
+ <element name="substage">
835
+ <choice>
836
+ <value>00</value>
837
+ <value>20</value>
838
+ <value>60</value>
839
+ <value>90</value>
840
+ <value>92</value>
841
+ <value>93</value>
842
+ <value>98</value>
843
+ <value>99</value>
844
+ </choice>
845
+ </element>
846
+ </define>
847
+ <define name="iteration">
848
+ <element name="iteration">
849
+ <data type="int"/>
850
+ </element>
851
+ </define>
852
+ <define name="documentnumber">
853
+ <element name="project-number">
854
+ <optional>
855
+ <attribute name="part">
856
+ <data type="int"/>
857
+ </attribute>
858
+ </optional>
859
+ <optional>
860
+ <attribute name="subpart">
861
+ <data type="int"/>
862
+ </attribute>
863
+ </optional>
864
+ <text/>
865
+ </element>
866
+ </define>
867
+ <define name="tc-documentnumber">
868
+ <element name="tc-document-number">
869
+ <data type="int"/>
870
+ </element>
871
+ </define>
872
+ <define name="technical-committee">
873
+ <element name="technical-committee">
874
+ <ref name="IsoWorkgroup"/>
875
+ </element>
876
+ </define>
877
+ <define name="subcommittee">
878
+ <element name="subcommittee">
879
+ <ref name="IsoWorkgroup"/>
880
+ </element>
881
+ </define>
882
+ <define name="workgroup">
883
+ <element name="workgroup">
884
+ <ref name="IsoWorkgroup"/>
885
+ </element>
886
+ </define>
887
+ <define name="IsoWorkgroup">
888
+ <optional>
889
+ <attribute name="number">
890
+ <data type="int"/>
891
+ </attribute>
892
+ </optional>
893
+ <optional>
894
+ <attribute name="type"/>
895
+ </optional>
896
+ <text/>
897
+ </define>
898
+ <define name="secretariat">
899
+ <element name="secretariat">
900
+ <text/>
901
+ </element>
902
+ </define>
903
+ <define name="title-intro">
904
+ <element name="title-intro">
905
+ <ref name="FormattedString"/>
906
+ </element>
907
+ </define>
908
+ <define name="title-main">
909
+ <element name="title-main">
910
+ <ref name="FormattedString"/>
911
+ </element>
912
+ </define>
913
+ <define name="title-part">
914
+ <element name="title-part">
915
+ <ref name="FormattedString"/>
916
+ </element>
917
+ </define>
918
+ <define name="allParts">
919
+ <element name="allparts">
920
+ <data type="boolean"/>
921
+ </element>
922
+ </define>
923
+ <define name="clause-hanging-paragraph-with-footnote">
924
+ <element name="clause">
925
+ <optional>
926
+ <attribute name="id">
927
+ <data type="ID"/>
928
+ </attribute>
929
+ </optional>
930
+ <optional>
931
+ <attribute name="inline-header">
932
+ <data type="boolean"/>
933
+ </attribute>
934
+ </optional>
935
+ <optional>
936
+ <attribute name="obligation">
937
+ <choice>
938
+ <value>normative</value>
939
+ <value>informative</value>
940
+ </choice>
941
+ </attribute>
942
+ </optional>
943
+ <optional>
944
+ <ref name="section-title"/>
945
+ </optional>
946
+ <zeroOrMore>
947
+ <!-- allow hanging paragraphs in annexes: they introduce lists -->
948
+ <ref name="BasicBlock"/>
949
+ </zeroOrMore>
950
+ <zeroOrMore>
951
+ <ref name="note"/>
952
+ </zeroOrMore>
953
+ <zeroOrMore>
954
+ <ref name="clause-hanging-paragraph-with-footnote"/>
955
+ </zeroOrMore>
956
+ </element>
957
+ </define>
958
+ <define name="subfigure">
959
+ <element name="figure">
960
+ <attribute name="id">
961
+ <data type="ID"/>
962
+ </attribute>
963
+ <optional>
964
+ <ref name="tname"/>
965
+ </optional>
966
+ <ref name="image"/>
967
+ </element>
968
+ </define>
969
+ <define name="termdocsource">
970
+ <element name="termdocsource">
971
+ <ref name="CitationType"/>
972
+ </element>
973
+ </define>
974
+ <define name="ics">
975
+ <element name="ics">
976
+ <element name="code">
977
+ <text/>
978
+ </element>
979
+ <element name="text">
980
+ <text/>
981
+ </element>
982
+ </element>
983
+ </define>
984
+ <define name="term-clause">
985
+ <element name="clause">
986
+ <optional>
987
+ <attribute name="id">
988
+ <data type="ID"/>
989
+ </attribute>
990
+ </optional>
991
+ <optional>
992
+ <attribute name="inline-header">
993
+ <data type="boolean"/>
994
+ </attribute>
995
+ </optional>
996
+ <optional>
997
+ <attribute name="obligation">
998
+ <choice>
999
+ <value>normative</value>
1000
+ <value>informative</value>
1001
+ </choice>
1002
+ </attribute>
1003
+ </optional>
1004
+ <optional>
1005
+ <ref name="section-title"/>
1006
+ </optional>
1007
+ <zeroOrMore>
1008
+ <choice>
1009
+ <ref name="term-clause"/>
1010
+ <ref name="terms"/>
1011
+ <ref name="definitions"/>
1012
+ </choice>
1013
+ </zeroOrMore>
1014
+ </element>
1015
+ </define>
1016
+ <define name="reference-clause">
1017
+ <element name="clause">
1018
+ <optional>
1019
+ <attribute name="id">
1020
+ <data type="ID"/>
1021
+ </attribute>
1022
+ </optional>
1023
+ <optional>
1024
+ <attribute name="inline-header">
1025
+ <data type="boolean"/>
1026
+ </attribute>
1027
+ </optional>
1028
+ <optional>
1029
+ <attribute name="obligation">
1030
+ <choice>
1031
+ <value>normative</value>
1032
+ <value>informative</value>
1033
+ </choice>
1034
+ </attribute>
1035
+ </optional>
1036
+ <optional>
1037
+ <ref name="section-title"/>
1038
+ </optional>
1039
+ <choice>
1040
+ <oneOrMore>
1041
+ <ref name="reference-clause"/>
1042
+ </oneOrMore>
1043
+ <zeroOrMore>
1044
+ <ref name="references"/>
1045
+ </zeroOrMore>
1046
+ </choice>
1047
+ </element>
1048
+ </define>
1049
+ <define name="annex-appendix">
1050
+ <element name="appendix">
1051
+ <ref name="Clause-Section"/>
1052
+ </element>
1053
+ </define>
1054
+ </grammar>