metanorma-iec 1.2.11 → 1.2.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +9 -29
- data/.rubocop.yml +0 -4
- data/lib/asciidoctor/iec/basicdoc.rng +5 -3
- data/lib/asciidoctor/iec/converter.rb +20 -0
- data/lib/asciidoctor/iec/front.rb +22 -58
- data/lib/asciidoctor/iec/iec.rng +37 -0
- data/lib/asciidoctor/iec/iec_intro_en.xml +37 -12
- data/lib/asciidoctor/iec/iec_intro_fr.xml +38 -6
- data/lib/asciidoctor/iec/isodoc.rng +134 -5
- data/lib/asciidoctor/iec/isostandard.rng +33 -107
- data/lib/isodoc/iec/base_convert.rb +2 -2
- data/lib/isodoc/iec/html/html_iec_intro.html +1 -1
- data/lib/isodoc/iec/html/word_iec_intro.html +1 -1
- data/lib/isodoc/iec/html_convert.rb +2 -2
- data/lib/isodoc/iec/iec.international-standard.xsl +732 -295
- data/lib/isodoc/iec/word_convert.rb +2 -2
- data/lib/metanorma/iec/version.rb +1 -1
- data/metanorma-iec.gemspec +3 -3
- data/spec/asciidoctor-iec/base_spec.rb +429 -9
- data/spec/asciidoctor-iec/blocks_spec.rb +24 -20
- data/spec/asciidoctor-iec/cleanup_spec.rb +92 -12
- data/spec/asciidoctor-iec/iev_spec.rb +12 -6
- data/spec/asciidoctor-iec/inline_spec.rb +11 -7
- data/spec/asciidoctor-iec/lists_spec.rb +7 -3
- data/spec/asciidoctor-iec/section_spec.rb +9 -5
- data/spec/asciidoctor-iec/validate_spec.rb +22 -21
- data/spec/isodoc/iso_spec.rb +2 -2
- data/spec/metanorma/processor_spec.rb +1 -1
- data/spec/spec_helper.rb +25 -33
- metadata +8 -8
@@ -102,7 +102,7 @@
|
|
102
102
|
</attribute>
|
103
103
|
</optional>
|
104
104
|
<oneOrMore>
|
105
|
-
<ref name="
|
105
|
+
<ref name="ul_li"/>
|
106
106
|
</oneOrMore>
|
107
107
|
<zeroOrMore>
|
108
108
|
<ref name="note"/>
|
@@ -253,6 +253,9 @@
|
|
253
253
|
<data type="boolean"/>
|
254
254
|
</attribute>
|
255
255
|
</optional>
|
256
|
+
<optional>
|
257
|
+
<attribute name="width"/>
|
258
|
+
</optional>
|
256
259
|
<optional>
|
257
260
|
<ref name="colgroup"/>
|
258
261
|
</optional>
|
@@ -786,6 +789,9 @@
|
|
786
789
|
<attribute name="width"/>
|
787
790
|
</element>
|
788
791
|
</define>
|
792
|
+
<define name="BibItemType" combine="choice">
|
793
|
+
<value>internal</value>
|
794
|
+
</define>
|
789
795
|
<define name="TextElement" combine="choice">
|
790
796
|
<ref name="concept"/>
|
791
797
|
</define>
|
@@ -806,6 +812,8 @@
|
|
806
812
|
<ref name="requirement"/>
|
807
813
|
<ref name="recommendation"/>
|
808
814
|
<ref name="permission"/>
|
815
|
+
<ref name="imagemap"/>
|
816
|
+
<ref name="svgmap"/>
|
809
817
|
</choice>
|
810
818
|
</define>
|
811
819
|
<define name="bibliography">
|
@@ -836,6 +844,9 @@
|
|
836
844
|
<data type="boolean"/>
|
837
845
|
</attribute>
|
838
846
|
</optional>
|
847
|
+
<optional>
|
848
|
+
<attribute name="number"/>
|
849
|
+
</optional>
|
839
850
|
<optional>
|
840
851
|
<attribute name="obligation">
|
841
852
|
<choice>
|
@@ -891,9 +902,11 @@
|
|
891
902
|
<element name="code">
|
892
903
|
<text/>
|
893
904
|
</element>
|
894
|
-
<
|
895
|
-
<text
|
896
|
-
|
905
|
+
<optional>
|
906
|
+
<element name="text">
|
907
|
+
<text/>
|
908
|
+
</element>
|
909
|
+
</optional>
|
897
910
|
</element>
|
898
911
|
</define>
|
899
912
|
<define name="standard-document">
|
@@ -906,6 +919,9 @@
|
|
906
919
|
</choice>
|
907
920
|
</attribute>
|
908
921
|
<ref name="bibdata"/>
|
922
|
+
<optional>
|
923
|
+
<ref name="misccontainer"/>
|
924
|
+
</optional>
|
909
925
|
<optional>
|
910
926
|
<ref name="boilerplate"/>
|
911
927
|
</optional>
|
@@ -916,11 +932,21 @@
|
|
916
932
|
<zeroOrMore>
|
917
933
|
<ref name="annex"/>
|
918
934
|
</zeroOrMore>
|
935
|
+
<optional>
|
936
|
+
<ref name="bibliography"/>
|
937
|
+
</optional>
|
919
938
|
<zeroOrMore>
|
920
|
-
<ref name="
|
939
|
+
<ref name="indexsect"/>
|
921
940
|
</zeroOrMore>
|
922
941
|
</element>
|
923
942
|
</define>
|
943
|
+
<define name="misccontainer">
|
944
|
+
<element name="misc-container">
|
945
|
+
<oneOrMore>
|
946
|
+
<ref name="AnyElement"/>
|
947
|
+
</oneOrMore>
|
948
|
+
</element>
|
949
|
+
</define>
|
924
950
|
<define name="preface">
|
925
951
|
<element name="preface">
|
926
952
|
<oneOrMore>
|
@@ -944,6 +970,11 @@
|
|
944
970
|
<ref name="Content-Section"/>
|
945
971
|
</element>
|
946
972
|
</define>
|
973
|
+
<define name="indexsect">
|
974
|
+
<element name="indexsect">
|
975
|
+
<ref name="Content-Section"/>
|
976
|
+
</element>
|
977
|
+
</define>
|
947
978
|
<define name="boilerplate">
|
948
979
|
<element name="boilerplate">
|
949
980
|
<optional>
|
@@ -1063,6 +1094,9 @@
|
|
1063
1094
|
</choice>
|
1064
1095
|
</attribute>
|
1065
1096
|
</optional>
|
1097
|
+
<optional>
|
1098
|
+
<attribute name="number"/>
|
1099
|
+
</optional>
|
1066
1100
|
<optional>
|
1067
1101
|
<attribute name="type"/>
|
1068
1102
|
</optional>
|
@@ -1116,6 +1150,9 @@
|
|
1116
1150
|
<optional>
|
1117
1151
|
<attribute name="type"/>
|
1118
1152
|
</optional>
|
1153
|
+
<optional>
|
1154
|
+
<attribute name="number"/>
|
1155
|
+
</optional>
|
1119
1156
|
<optional>
|
1120
1157
|
<ref name="section-title"/>
|
1121
1158
|
</optional>
|
@@ -1218,6 +1255,9 @@
|
|
1218
1255
|
<optional>
|
1219
1256
|
<attribute name="type"/>
|
1220
1257
|
</optional>
|
1258
|
+
<optional>
|
1259
|
+
<attribute name="number"/>
|
1260
|
+
</optional>
|
1221
1261
|
<optional>
|
1222
1262
|
<attribute name="obligation">
|
1223
1263
|
<choice>
|
@@ -1546,6 +1586,7 @@
|
|
1546
1586
|
<value>add</value>
|
1547
1587
|
<value>modify</value>
|
1548
1588
|
<value>delete</value>
|
1589
|
+
<value>replace</value>
|
1549
1590
|
</choice>
|
1550
1591
|
</attribute>
|
1551
1592
|
<optional>
|
@@ -1576,6 +1617,11 @@
|
|
1576
1617
|
</optional>
|
1577
1618
|
<optional>
|
1578
1619
|
<element name="newcontent">
|
1620
|
+
<optional>
|
1621
|
+
<attribute name="id">
|
1622
|
+
<data type="ID"/>
|
1623
|
+
</attribute>
|
1624
|
+
</optional>
|
1579
1625
|
<zeroOrMore>
|
1580
1626
|
<ref name="BasicBlock"/>
|
1581
1627
|
</zeroOrMore>
|
@@ -1609,4 +1655,87 @@
|
|
1609
1655
|
<text/>
|
1610
1656
|
</element>
|
1611
1657
|
</define>
|
1658
|
+
<define name="imagemap">
|
1659
|
+
<element name="imagemap">
|
1660
|
+
<ref name="figure"/>
|
1661
|
+
<zeroOrMore>
|
1662
|
+
<element name="area">
|
1663
|
+
<attribute name="type">
|
1664
|
+
<choice>
|
1665
|
+
<value>rect</value>
|
1666
|
+
<value>circle</value>
|
1667
|
+
<value>ellipse</value>
|
1668
|
+
<value>poly</value>
|
1669
|
+
</choice>
|
1670
|
+
</attribute>
|
1671
|
+
<choice>
|
1672
|
+
<ref name="xref"/>
|
1673
|
+
<ref name="hyperlink"/>
|
1674
|
+
<ref name="eref"/>
|
1675
|
+
</choice>
|
1676
|
+
<oneOrMore>
|
1677
|
+
<element name="coords">
|
1678
|
+
<attribute name="x">
|
1679
|
+
<data type="float"/>
|
1680
|
+
</attribute>
|
1681
|
+
<attribute name="y">
|
1682
|
+
<data type="float"/>
|
1683
|
+
</attribute>
|
1684
|
+
</element>
|
1685
|
+
</oneOrMore>
|
1686
|
+
<optional>
|
1687
|
+
<element name="radius">
|
1688
|
+
<attribute name="x">
|
1689
|
+
<data type="float"/>
|
1690
|
+
</attribute>
|
1691
|
+
<optional>
|
1692
|
+
<attribute name="y">
|
1693
|
+
<data type="float"/>
|
1694
|
+
</attribute>
|
1695
|
+
</optional>
|
1696
|
+
</element>
|
1697
|
+
</optional>
|
1698
|
+
</element>
|
1699
|
+
</zeroOrMore>
|
1700
|
+
</element>
|
1701
|
+
</define>
|
1702
|
+
<define name="svgmap">
|
1703
|
+
<element name="svgmap">
|
1704
|
+
<ref name="figure"/>
|
1705
|
+
<zeroOrMore>
|
1706
|
+
<element name="target">
|
1707
|
+
<attribute name="href">
|
1708
|
+
<data type="anyURI"/>
|
1709
|
+
</attribute>
|
1710
|
+
<choice>
|
1711
|
+
<ref name="xref"/>
|
1712
|
+
<ref name="hyperlink"/>
|
1713
|
+
<ref name="eref"/>
|
1714
|
+
</choice>
|
1715
|
+
</element>
|
1716
|
+
</zeroOrMore>
|
1717
|
+
</element>
|
1718
|
+
</define>
|
1719
|
+
<define name="ul_li">
|
1720
|
+
<element name="li">
|
1721
|
+
<optional>
|
1722
|
+
<attribute name="id">
|
1723
|
+
<data type="ID"/>
|
1724
|
+
</attribute>
|
1725
|
+
</optional>
|
1726
|
+
<optional>
|
1727
|
+
<attribute name="uncheckedcheckbox">
|
1728
|
+
<data type="boolean"/>
|
1729
|
+
</attribute>
|
1730
|
+
</optional>
|
1731
|
+
<optional>
|
1732
|
+
<attribute name="checkedcheckbox">
|
1733
|
+
<data type="boolean"/>
|
1734
|
+
</attribute>
|
1735
|
+
</optional>
|
1736
|
+
<oneOrMore>
|
1737
|
+
<ref name="BasicBlock"/>
|
1738
|
+
</oneOrMore>
|
1739
|
+
</element>
|
1740
|
+
</define>
|
1612
1741
|
</grammar>
|
@@ -79,19 +79,6 @@
|
|
79
79
|
</choice>
|
80
80
|
</element>
|
81
81
|
</define>
|
82
|
-
<define name="ul">
|
83
|
-
<element name="ul">
|
84
|
-
<attribute name="id">
|
85
|
-
<data type="ID"/>
|
86
|
-
</attribute>
|
87
|
-
<oneOrMore>
|
88
|
-
<ref name="ul_li"/>
|
89
|
-
</oneOrMore>
|
90
|
-
<zeroOrMore>
|
91
|
-
<ref name="note"/>
|
92
|
-
</zeroOrMore>
|
93
|
-
</element>
|
94
|
-
</define>
|
95
82
|
<define name="sections">
|
96
83
|
<element name="sections">
|
97
84
|
<zeroOrMore>
|
@@ -140,22 +127,28 @@
|
|
140
127
|
</choice>
|
141
128
|
</attribute>
|
142
129
|
</optional>
|
130
|
+
<optional>
|
131
|
+
<attribute name="type"/>
|
132
|
+
</optional>
|
143
133
|
<optional>
|
144
134
|
<ref name="section-title"/>
|
145
135
|
</optional>
|
146
|
-
<
|
147
|
-
<
|
148
|
-
<
|
149
|
-
<
|
150
|
-
|
151
|
-
|
152
|
-
<
|
153
|
-
|
154
|
-
|
136
|
+
<group>
|
137
|
+
<choice>
|
138
|
+
<group>
|
139
|
+
<oneOrMore>
|
140
|
+
<ref name="BasicBlock"/>
|
141
|
+
</oneOrMore>
|
142
|
+
<zeroOrMore>
|
143
|
+
<ref name="note"/>
|
144
|
+
</zeroOrMore>
|
145
|
+
</group>
|
146
|
+
<ref name="amend"/>
|
147
|
+
</choice>
|
155
148
|
<oneOrMore>
|
156
149
|
<ref name="clause-subsection"/>
|
157
150
|
</oneOrMore>
|
158
|
-
</
|
151
|
+
</group>
|
159
152
|
</define>
|
160
153
|
<define name="term">
|
161
154
|
<element name="term">
|
@@ -186,17 +179,6 @@
|
|
186
179
|
</zeroOrMore>
|
187
180
|
</element>
|
188
181
|
</define>
|
189
|
-
<define name="definition">
|
190
|
-
<element name="definition">
|
191
|
-
<oneOrMore>
|
192
|
-
<choice>
|
193
|
-
<ref name="paragraph"/>
|
194
|
-
<ref name="figure"/>
|
195
|
-
<ref name="formula"/>
|
196
|
-
</choice>
|
197
|
-
</oneOrMore>
|
198
|
-
</element>
|
199
|
-
</define>
|
200
182
|
<define name="annex">
|
201
183
|
<element name="annex">
|
202
184
|
<optional>
|
@@ -327,6 +309,11 @@
|
|
327
309
|
<optional>
|
328
310
|
<attribute name="script"/>
|
329
311
|
</optional>
|
312
|
+
<optional>
|
313
|
+
<attribute name="inline-header">
|
314
|
+
<data type="boolean"/>
|
315
|
+
</attribute>
|
316
|
+
</optional>
|
330
317
|
<optional>
|
331
318
|
<attribute name="obligation">
|
332
319
|
<choice>
|
@@ -335,6 +322,12 @@
|
|
335
322
|
</choice>
|
336
323
|
</attribute>
|
337
324
|
</optional>
|
325
|
+
<optional>
|
326
|
+
<attribute name="number"/>
|
327
|
+
</optional>
|
328
|
+
<optional>
|
329
|
+
<attribute name="type"/>
|
330
|
+
</optional>
|
338
331
|
<optional>
|
339
332
|
<ref name="section-title"/>
|
340
333
|
</optional>
|
@@ -352,57 +345,6 @@
|
|
352
345
|
</oneOrMore>
|
353
346
|
</choice>
|
354
347
|
</define>
|
355
|
-
<define name="table">
|
356
|
-
<element name="table">
|
357
|
-
<attribute name="id">
|
358
|
-
<data type="ID"/>
|
359
|
-
</attribute>
|
360
|
-
<optional>
|
361
|
-
<attribute name="width"/>
|
362
|
-
</optional>
|
363
|
-
<optional>
|
364
|
-
<attribute name="unnumbered">
|
365
|
-
<data type="boolean"/>
|
366
|
-
</attribute>
|
367
|
-
</optional>
|
368
|
-
<optional>
|
369
|
-
<attribute name="number"/>
|
370
|
-
</optional>
|
371
|
-
<optional>
|
372
|
-
<attribute name="subsequence"/>
|
373
|
-
</optional>
|
374
|
-
<optional>
|
375
|
-
<attribute name="alt"/>
|
376
|
-
</optional>
|
377
|
-
<optional>
|
378
|
-
<attribute name="summary"/>
|
379
|
-
</optional>
|
380
|
-
<optional>
|
381
|
-
<attribute name="uri">
|
382
|
-
<data type="anyURI"/>
|
383
|
-
</attribute>
|
384
|
-
</optional>
|
385
|
-
<optional>
|
386
|
-
<ref name="colgroup"/>
|
387
|
-
</optional>
|
388
|
-
<optional>
|
389
|
-
<ref name="tname"/>
|
390
|
-
</optional>
|
391
|
-
<optional>
|
392
|
-
<ref name="thead"/>
|
393
|
-
</optional>
|
394
|
-
<ref name="tbody"/>
|
395
|
-
<optional>
|
396
|
-
<ref name="tfoot"/>
|
397
|
-
</optional>
|
398
|
-
<zeroOrMore>
|
399
|
-
<ref name="table-note"/>
|
400
|
-
</zeroOrMore>
|
401
|
-
<optional>
|
402
|
-
<ref name="dl"/>
|
403
|
-
</optional>
|
404
|
-
</element>
|
405
|
-
</define>
|
406
348
|
</include>
|
407
349
|
<!-- end overrides -->
|
408
350
|
<!--
|
@@ -422,6 +364,9 @@
|
|
422
364
|
<zeroOrMore>
|
423
365
|
<ref name="termdocsource"/>
|
424
366
|
</zeroOrMore>
|
367
|
+
<optional>
|
368
|
+
<ref name="misccontainer"/>
|
369
|
+
</optional>
|
425
370
|
<optional>
|
426
371
|
<ref name="boilerplate"/>
|
427
372
|
</optional>
|
@@ -433,6 +378,9 @@
|
|
433
378
|
<ref name="annex"/>
|
434
379
|
</zeroOrMore>
|
435
380
|
<ref name="bibliography"/>
|
381
|
+
<zeroOrMore>
|
382
|
+
<ref name="indexsect"/>
|
383
|
+
</zeroOrMore>
|
436
384
|
</element>
|
437
385
|
</define>
|
438
386
|
<define name="horizontal">
|
@@ -521,28 +469,6 @@
|
|
521
469
|
<ref name="Clause-Section"/>
|
522
470
|
</element>
|
523
471
|
</define>
|
524
|
-
<define name="ul_li">
|
525
|
-
<element name="li">
|
526
|
-
<optional>
|
527
|
-
<attribute name="id">
|
528
|
-
<data type="ID"/>
|
529
|
-
</attribute>
|
530
|
-
</optional>
|
531
|
-
<optional>
|
532
|
-
<attribute name="uncheckedcheckbox">
|
533
|
-
<data type="boolean"/>
|
534
|
-
</attribute>
|
535
|
-
</optional>
|
536
|
-
<optional>
|
537
|
-
<attribute name="checkedcheckbox">
|
538
|
-
<data type="boolean"/>
|
539
|
-
</attribute>
|
540
|
-
</optional>
|
541
|
-
<oneOrMore>
|
542
|
-
<ref name="BasicBlock"/>
|
543
|
-
</oneOrMore>
|
544
|
-
</element>
|
545
|
-
</define>
|
546
472
|
<define name="stagename">
|
547
473
|
<element name="stagename">
|
548
474
|
<text/>
|
@@ -13,7 +13,7 @@ module IsoDoc
|
|
13
13
|
b = isoxml.at(ns("//boilerplate/legal-statement"))
|
14
14
|
page_break(out)
|
15
15
|
iec_orgname(out)
|
16
|
-
middle_title(out)
|
16
|
+
middle_title(isoxml, out)
|
17
17
|
out.div **attr_code(id: f ? f["id"] : "") do |s|
|
18
18
|
s.h1(**{ class: "ForewordTitle" }) { |h1| h1 << @i18n.foreword }
|
19
19
|
@meta.get[:doctype] == "Amendment" or
|
@@ -30,7 +30,7 @@ module IsoDoc
|
|
30
30
|
out.p(**{ class: "zzSTDTitle1" }) { |p| p << " " }
|
31
31
|
end
|
32
32
|
|
33
|
-
def middle_title(out)
|
33
|
+
def middle_title(_isoxml, out)
|
34
34
|
title1 = @meta.get[:doctitlemain]&.sub(/\s+$/, "")
|
35
35
|
@meta.get[:doctitleintro] and
|
36
36
|
title1 = "#{@meta.get[:doctitleintro]} — #{title1}"
|