metanorma-iec 0.0.1

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