metanorma-ogc 0.0.2

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