metanorma-nist 0.0.1

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