metanorma-iso 2.0.8.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/html2doc/lists.rb +169 -0
- data/lib/isodoc/iso/base_convert.rb +11 -1
- data/lib/isodoc/iso/html/html_iso_titlepage.html +7 -0
- data/lib/isodoc/iso/html/isodoc-dis.css +407 -427
- data/lib/isodoc/iso/html/isodoc-dis.scss +482 -438
- data/lib/isodoc/iso/html/isodoc.css +38 -13
- data/lib/isodoc/iso/html/isodoc.scss +38 -12
- data/lib/isodoc/iso/html/style-human.css +14 -1
- data/lib/isodoc/iso/html/style-human.scss +10 -1
- data/lib/isodoc/iso/html/style-iso.css +35 -23
- data/lib/isodoc/iso/html/style-iso.scss +31 -23
- data/lib/isodoc/iso/html/word_iso_intro-dis.html +3 -1
- data/lib/isodoc/iso/html/word_iso_titlepage-dis.html +26 -13
- data/lib/isodoc/iso/html/word_iso_titlepage-prf.html +58 -0
- data/lib/isodoc/iso/html/word_iso_titlepage.html +16 -6
- data/lib/isodoc/iso/html/wordstyle-dis.css +168 -48
- data/lib/isodoc/iso/html/wordstyle-dis.scss +158 -43
- data/lib/isodoc/iso/html_convert.rb +7 -2
- data/lib/isodoc/iso/i18n-en.yaml +33 -4
- data/lib/isodoc/iso/i18n-fr.yaml +30 -3
- data/lib/isodoc/iso/i18n-ru.yaml +33 -4
- data/lib/isodoc/iso/i18n-zh-Hans.yaml +33 -3
- data/lib/isodoc/iso/i18n.rb +1 -1
- data/lib/isodoc/iso/init.rb +17 -1
- data/lib/isodoc/iso/iso.amendment.xsl +1711 -367
- data/lib/isodoc/iso/iso.international-standard.xsl +1711 -367
- data/lib/isodoc/iso/metadata.rb +72 -78
- data/lib/isodoc/iso/presentation_bibdata.rb +74 -0
- data/lib/isodoc/iso/presentation_xml_convert.rb +52 -100
- data/lib/isodoc/iso/presentation_xref.rb +132 -0
- data/lib/isodoc/iso/sections.rb +3 -3
- data/lib/isodoc/iso/word_cleanup.rb +17 -0
- data/lib/isodoc/iso/word_convert.rb +32 -12
- data/lib/isodoc/iso/word_dis_cleanup.rb +235 -0
- data/lib/isodoc/iso/word_dis_convert.rb +122 -0
- data/lib/isodoc/iso/xref.rb +78 -29
- data/lib/metanorma/iso/base.rb +20 -1
- data/lib/metanorma/iso/biblio.rng +69 -42
- data/lib/metanorma/iso/boilerplate-fr.xml +4 -1
- data/lib/metanorma/iso/boilerplate-ru.xml +4 -3
- data/lib/metanorma/iso/boilerplate.xml +4 -3
- data/lib/metanorma/iso/cleanup.rb +29 -1
- data/lib/metanorma/iso/front.rb +31 -6
- data/lib/metanorma/iso/front_id.rb +2 -0
- data/lib/metanorma/iso/isodoc.rng +65 -0
- data/lib/metanorma/iso/isostandard.rng +30 -12
- data/lib/metanorma/iso/macros.rb +29 -0
- data/lib/metanorma/iso/version.rb +1 -1
- data/lib/metanorma-iso.rb +1 -0
- data/lib/relaton/render/config.yml +4 -0
- data/lib/relaton/render/general.rb +13 -0
- data/metanorma-iso.gemspec +1 -1
- data/spec/isodoc/amd_spec.rb +35 -60
- data/spec/isodoc/blocks_spec.rb +783 -179
- data/spec/isodoc/i18n_spec.rb +331 -100
- data/spec/isodoc/inline_spec.rb +35 -42
- data/spec/isodoc/iso_spec.rb +51 -170
- data/spec/isodoc/metadata_spec.rb +240 -99
- data/spec/isodoc/postproc_spec.rb +68 -7
- data/spec/isodoc/ref_spec.rb +66 -69
- data/spec/isodoc/section_spec.rb +88 -80
- data/spec/isodoc/table_spec.rb +2 -2
- data/spec/isodoc/terms_spec.rb +2 -2
- data/spec/isodoc/word_dis_spec.rb +1886 -0
- data/spec/isodoc/xref_spec.rb +138 -64
- data/spec/metanorma/amd_spec.rb +53 -1
- data/spec/metanorma/base_spec.rb +195 -20
- data/spec/metanorma/blocks_spec.rb +54 -0
- data/spec/metanorma/lists_spec.rb +2 -2
- data/spec/metanorma/section_spec.rb +2 -2
- data/spec/spec_helper.rb +23 -4
- data/spec/vcr_cassettes/withdrawn_iso.yml +25 -25
- metadata +15 -10
- data/docs/asciiiso-syntax.adoc +0 -307
- data/docs/guidance.adoc +0 -487
- data/docs/navigation.adoc +0 -23
- data/docs/quickstart.adoc +0 -179
- data/spec/vcr_cassettes/docrels.yml +0 -385
data/spec/isodoc/xref_spec.rb
CHANGED
@@ -121,7 +121,7 @@ RSpec.describe IsoDoc do
|
|
121
121
|
<annex id="annex1" displayorder='5'>
|
122
122
|
<title>
|
123
123
|
<strong>Annex A</strong>
|
124
|
-
<br
|
124
|
+
<br/><span class="obligation">(informative)</span></title>
|
125
125
|
<clause id="annex1a" inline-header="true">
|
126
126
|
<title>A.1</title>
|
127
127
|
<note id="AN">
|
@@ -153,7 +153,7 @@ RSpec.describe IsoDoc do
|
|
153
153
|
.convert("test", input, true))).to be_equivalent_to xmlpp(output)
|
154
154
|
end
|
155
155
|
|
156
|
-
it "cross-references figures
|
156
|
+
it "cross-references figures" do
|
157
157
|
input = <<~INPUT
|
158
158
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
159
159
|
<preface>
|
@@ -224,12 +224,12 @@ RSpec.describe IsoDoc do
|
|
224
224
|
<preface>
|
225
225
|
<foreword id="fwd" displayorder='1'>
|
226
226
|
<p>
|
227
|
-
<xref target="N">Figure 1</xref>
|
228
|
-
<xref target="note1">Figure 2</xref>
|
229
|
-
<xref target="note2">Figure 3</xref>
|
230
|
-
<xref target="AN">Figure A.1</xref>
|
231
|
-
<xref target="Anote1">Figure A.2</xref>
|
232
|
-
<xref target="Anote2">Figure A.3</xref>
|
227
|
+
<xref target="N"><span class='citefig'>Figure 1</span></xref>
|
228
|
+
<xref target="note1"><span class='citefig'>Figure 2</span></xref>
|
229
|
+
<xref target="note2"><span class='citefig'>Figure 3</span></xref>
|
230
|
+
<xref target="AN"><span class='citefig'>Figure A.1</span></xref>
|
231
|
+
<xref target="Anote1"><span class='citefig'>Figure A.2</span></xref>
|
232
|
+
<xref target="Anote2"><span class='citefig'>Figure A.3</span></xref>
|
233
233
|
</p>
|
234
234
|
</foreword>
|
235
235
|
</preface>
|
@@ -243,7 +243,7 @@ RSpec.describe IsoDoc do
|
|
243
243
|
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
244
244
|
</figure>
|
245
245
|
<p>
|
246
|
-
<xref target="N">Figure 1</xref>
|
246
|
+
<xref target="N"><span class='citefig'>Figure 1</span></xref>
|
247
247
|
</p>
|
248
248
|
</clause>
|
249
249
|
<terms id="terms" displayorder='3'>
|
@@ -264,8 +264,8 @@ RSpec.describe IsoDoc do
|
|
264
264
|
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
265
265
|
</figure>
|
266
266
|
<p>
|
267
|
-
<xref target="note1">Figure 2</xref>
|
268
|
-
<xref target="note2">Figure 3</xref>
|
267
|
+
<xref target="note1"><span class='citefig'>Figure 2</span></xref>
|
268
|
+
<xref target="note2"><span class='citefig'>Figure 3</span></xref>
|
269
269
|
</p>
|
270
270
|
</clause>
|
271
271
|
</clause>
|
@@ -273,7 +273,7 @@ RSpec.describe IsoDoc do
|
|
273
273
|
<annex id="annex1" displayorder='5'>
|
274
274
|
<title>
|
275
275
|
<strong>Annex A</strong>
|
276
|
-
<br
|
276
|
+
<br/><span class="obligation">(informative)</span></title>
|
277
277
|
<clause id="annex1a" inline-header="true">
|
278
278
|
<title>A.1</title>
|
279
279
|
<figure id="AN">
|
@@ -299,7 +299,7 @@ RSpec.describe IsoDoc do
|
|
299
299
|
.convert("test", input, true))).to be_equivalent_to xmlpp(output)
|
300
300
|
end
|
301
301
|
|
302
|
-
it "cross-references subfigures
|
302
|
+
it "cross-references subfigures" do
|
303
303
|
input = <<~INPUT
|
304
304
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
305
305
|
<preface>
|
@@ -362,12 +362,12 @@ RSpec.describe IsoDoc do
|
|
362
362
|
<preface>
|
363
363
|
<foreword id="fwd" displayorder='1'>
|
364
364
|
<p>
|
365
|
-
<xref target="N">Figure 1</xref>
|
366
|
-
<xref target="note1">Figure 1 a)</xref>
|
367
|
-
<xref target="note2">Figure 1 b)</xref>
|
368
|
-
<xref target="AN">Figure A.1</xref>
|
369
|
-
<xref target="Anote1">Figure A.1 a)</xref>
|
370
|
-
<xref target="Anote2">Figure A.1 b)</xref>
|
365
|
+
<xref target="N"><span class='citefig'>Figure 1</span></xref>
|
366
|
+
<xref target="note1"><span class='citefig'>Figure 1 a)</span></xref>
|
367
|
+
<xref target="note2"><span class='citefig'>Figure 1 b)</span></xref>
|
368
|
+
<xref target="AN"><span class='citefig'>Figure A.1</span></xref>
|
369
|
+
<xref target="Anote1"><span class='citefig'>Figure A.1 a)</span></xref>
|
370
|
+
<xref target="Anote2"><span class='citefig'>Figure A.1 b)</span></xref>
|
371
371
|
</p>
|
372
372
|
</foreword>
|
373
373
|
</preface>
|
@@ -398,8 +398,8 @@ RSpec.describe IsoDoc do
|
|
398
398
|
</figure>
|
399
399
|
</figure>
|
400
400
|
<p>
|
401
|
-
<xref target="note1">Figure 1 a)</xref>
|
402
|
-
<xref target="note2">Figure 1 b)</xref>
|
401
|
+
<xref target="note1"><span class='citefig'>Figure 1 a)</span></xref>
|
402
|
+
<xref target="note2"><span class='citefig'>Figure 1 b)</span></xref>
|
403
403
|
</p>
|
404
404
|
</clause>
|
405
405
|
</clause>
|
@@ -407,7 +407,7 @@ RSpec.describe IsoDoc do
|
|
407
407
|
<annex id="annex1" displayorder='5'>
|
408
408
|
<title>
|
409
409
|
<strong>Annex A</strong>
|
410
|
-
<br
|
410
|
+
<br/><span class="obligation">(informative)</span></title>
|
411
411
|
<clause id="annex1a" inline-header="true">
|
412
412
|
<title>A.1</title>
|
413
413
|
</clause>
|
@@ -546,7 +546,7 @@ RSpec.describe IsoDoc do
|
|
546
546
|
<annex id="annex1" displayorder='5'>
|
547
547
|
<title>
|
548
548
|
<strong>Annex A</strong>
|
549
|
-
<br
|
549
|
+
<br/><span class="obligation">(informative)</span></title>
|
550
550
|
<clause id="annex1a" inline-header="true">
|
551
551
|
<title>A.1</title>
|
552
552
|
<example id="AN">
|
@@ -700,7 +700,7 @@ RSpec.describe IsoDoc do
|
|
700
700
|
<annex id="annex1" displayorder='5'>
|
701
701
|
<title>
|
702
702
|
<strong>Annex A</strong>
|
703
|
-
<br
|
703
|
+
<br/><span class="obligation">(informative)</span></title>
|
704
704
|
<clause id="annex1a" inline-header="true">
|
705
705
|
<title>A.1</title>
|
706
706
|
<formula id="AN">
|
@@ -833,12 +833,12 @@ RSpec.describe IsoDoc do
|
|
833
833
|
<preface>
|
834
834
|
<foreword displayorder='1'>
|
835
835
|
<p>
|
836
|
-
<xref target="N">Table 1</xref>
|
837
|
-
<xref target="note1">Table 2</xref>
|
838
|
-
<xref target="note2">Table 3</xref>
|
839
|
-
<xref target="AN">Table A.1</xref>
|
840
|
-
<xref target="Anote1">Table A.2</xref>
|
841
|
-
<xref target="Anote2">Table A.3</xref>
|
836
|
+
<xref target="N"><span class='citetbl'>Table 1</span></xref>
|
837
|
+
<xref target="note1"><span class='citetbl'>Table 2</span></xref>
|
838
|
+
<xref target="note2"><span class='citetbl'>Table 3</span></xref>
|
839
|
+
<xref target="AN"><span class='citetbl'>Table A.1</span></xref>
|
840
|
+
<xref target="Anote1"><span class='citetbl'>Table A.2</span></xref>
|
841
|
+
<xref target="Anote2"><span class='citetbl'>Table A.3</span></xref>
|
842
842
|
</p>
|
843
843
|
</foreword>
|
844
844
|
</preface>
|
@@ -858,7 +858,7 @@ RSpec.describe IsoDoc do
|
|
858
858
|
</tbody>
|
859
859
|
</table>
|
860
860
|
<p>
|
861
|
-
<xref target="N">Table 1</xref>
|
861
|
+
<xref target="N"><span class='citetbl'>Table 1</span></xref>
|
862
862
|
</p>
|
863
863
|
</clause>
|
864
864
|
<terms id="terms" displayorder='3'>
|
@@ -891,8 +891,8 @@ RSpec.describe IsoDoc do
|
|
891
891
|
</tbody>
|
892
892
|
</table>
|
893
893
|
<p>
|
894
|
-
<xref target="note1">Table 2</xref>
|
895
|
-
<xref target="note2">Table 3</xref>
|
894
|
+
<xref target="note1"><span class='citetbl'>Table 2</span></xref>
|
895
|
+
<xref target="note2"><span class='citetbl'>Table 3</span></xref>
|
896
896
|
</p>
|
897
897
|
</clause>
|
898
898
|
</clause>
|
@@ -900,7 +900,7 @@ RSpec.describe IsoDoc do
|
|
900
900
|
<annex id="annex1" displayorder='5'>
|
901
901
|
<title>
|
902
902
|
<strong>Annex A</strong>
|
903
|
-
<br
|
903
|
+
<br/><span class="obligation">(informative)</span></title>
|
904
904
|
<clause id="annex1a" inline-header="true">
|
905
905
|
<title>A.1</title>
|
906
906
|
<table id="AN">
|
@@ -1138,23 +1138,23 @@ RSpec.describe IsoDoc do
|
|
1138
1138
|
<title>Foreword</title>
|
1139
1139
|
<p id='A'>
|
1140
1140
|
This is a preamble
|
1141
|
-
<xref target='C'>0.1</xref>
|
1142
|
-
<xref target='C1'>0.2</xref>
|
1143
|
-
<xref target='D'>Clause 1</xref>
|
1144
|
-
<xref target='H'>Clause 3</xref>
|
1145
|
-
<xref target='I'>3.1</xref>
|
1146
|
-
<xref target='J'>3.1.1</xref>
|
1147
|
-
<xref target='K'>3.2</xref>
|
1148
|
-
<xref target='L'>Clause 4</xref>
|
1149
|
-
<xref target='M'>Clause 5</xref>
|
1150
|
-
<xref target='N'>5.1</xref>
|
1151
|
-
<xref target='O'>5.2</xref>
|
1152
|
-
<xref target='P'>Annex A</xref>
|
1153
|
-
<xref target='Q'>A.1</xref>
|
1154
|
-
<xref target='Q1'>A.1.1</xref>
|
1155
|
-
<xref target='Q2'>Annex A, Appendix 1</xref>
|
1141
|
+
<xref target='C'><span class='citesec'>0.1</span></xref>
|
1142
|
+
<xref target='C1'><span class='citesec'>0.2</span></xref>
|
1143
|
+
<xref target='D'><span class='citesec'>Clause 1</span></xref>
|
1144
|
+
<xref target='H'><span class='citesec'>Clause 3</span></xref>
|
1145
|
+
<xref target='I'><span class='citesec'>3.1</span></xref>
|
1146
|
+
<xref target='J'><span class='citesec'>3.1.1</span></xref>
|
1147
|
+
<xref target='K'><span class='citesec'>3.2</span></xref>
|
1148
|
+
<xref target='L'><span class='citesec'>Clause 4</span></xref>
|
1149
|
+
<xref target='M'><span class='citesec'>Clause 5</span></xref>
|
1150
|
+
<xref target='N'><span class='citesec'>5.1</span></xref>
|
1151
|
+
<xref target='O'><span class='citesec'>5.2</span></xref>
|
1152
|
+
<xref target='P'><span class='citeapp'>Annex A</span></xref>
|
1153
|
+
<xref target='Q'><span class='citeapp'>A.1</span></xref>
|
1154
|
+
<xref target='Q1'><span class='citeapp'>A.1.1</span></xref>
|
1155
|
+
<xref target='Q2'><span class='citeapp'>Annex A, Appendix 1</span></xref>
|
1156
1156
|
<xref target='Q3'>Annex A, Appendix 1.1</xref>
|
1157
|
-
<xref target='R'>Clause 2</xref>
|
1157
|
+
<xref target='R'><span class='citesec'>Clause 2</span></xref>
|
1158
1158
|
</p>
|
1159
1159
|
</foreword>
|
1160
1160
|
<introduction id='B' obligation='informative' displayorder='2'>
|
@@ -1243,7 +1243,7 @@ RSpec.describe IsoDoc do
|
|
1243
1243
|
<title>
|
1244
1244
|
<strong>Annex A</strong>
|
1245
1245
|
<br/>
|
1246
|
-
(normative)
|
1246
|
+
<span class="obligation">(normative)</span>
|
1247
1247
|
<br/>
|
1248
1248
|
<br/>
|
1249
1249
|
<strong>Annex</strong>
|
@@ -1404,7 +1404,7 @@ RSpec.describe IsoDoc do
|
|
1404
1404
|
<annex id="annex1" displayorder='5'>
|
1405
1405
|
<title>
|
1406
1406
|
<strong>Annex A</strong>
|
1407
|
-
<br
|
1407
|
+
<br/><span class="obligation">(informative)</span></title>
|
1408
1408
|
<clause id="annex1a" inline-header="true">
|
1409
1409
|
<title>A.1</title>
|
1410
1410
|
<ol id="AN" type="alphabet">
|
@@ -1501,12 +1501,12 @@ RSpec.describe IsoDoc do
|
|
1501
1501
|
<preface>
|
1502
1502
|
<foreword displayorder='1'>
|
1503
1503
|
<p>
|
1504
|
-
<xref target='N'>
|
1505
|
-
<xref target='note1'>3.1 List 1 a)</xref>
|
1506
|
-
<xref target='note2'>3.1 List 2 a)</xref>
|
1504
|
+
<xref target='N'>1 a)</xref>
|
1505
|
+
<xref target='note1'>3.1, List 1 a)</xref>
|
1506
|
+
<xref target='note2'>3.1, List 2 a)</xref>
|
1507
1507
|
<xref target='AN'>A.1 a)</xref>
|
1508
|
-
<xref target='Anote1'>A.2 List 1 a)</xref>
|
1509
|
-
<xref target='Anote2'>A.2 List 2 a)</xref>
|
1508
|
+
<xref target='Anote1'>A.2, List 1 a)</xref>
|
1509
|
+
<xref target='Anote2'>A.2, List 2 a)</xref>
|
1510
1510
|
</p>
|
1511
1511
|
</foreword>
|
1512
1512
|
</preface>
|
@@ -1536,7 +1536,7 @@ RSpec.describe IsoDoc do
|
|
1536
1536
|
</clause>
|
1537
1537
|
</clause>
|
1538
1538
|
</sections>
|
1539
|
-
<annex id='annex1' displayorder='5'><title><strong>Annex A</strong><br
|
1539
|
+
<annex id='annex1' displayorder='5'><title><strong>Annex A</strong><br/><span class="obligation">(informative)</span></title>
|
1540
1540
|
<clause inline-header="true" id='annex1a'><title>A.1</title>
|
1541
1541
|
<ol id='ANl' type="alphabet">
|
1542
1542
|
<li id='AN'>
|
@@ -1621,12 +1621,12 @@ RSpec.describe IsoDoc do
|
|
1621
1621
|
<preface>
|
1622
1622
|
<foreword displayorder='1'>
|
1623
1623
|
<p>
|
1624
|
-
<xref target='N'>
|
1625
|
-
<xref target='note1'>
|
1626
|
-
<xref target='note2'>
|
1627
|
-
<xref target='AN'>
|
1628
|
-
<xref target='Anote1'>
|
1629
|
-
<xref target='Anote2'>
|
1624
|
+
<xref target='N'>1 a)</xref>
|
1625
|
+
<xref target='note1'>1 a) 1)</xref>
|
1626
|
+
<xref target='note2'>1 a) 1) i)</xref>
|
1627
|
+
<xref target='AN'>1 a) 1) i) A)</xref>
|
1628
|
+
<xref target='Anote1'>1 a) 1) i) A) I)</xref>
|
1629
|
+
<xref target='Anote2'>1 a) 1) i) A) I) a)</xref>
|
1630
1630
|
</p>
|
1631
1631
|
</foreword>
|
1632
1632
|
</preface>
|
@@ -1670,4 +1670,78 @@ RSpec.describe IsoDoc do
|
|
1670
1670
|
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
1671
1671
|
.convert("test", input, true))).to be_equivalent_to xmlpp(output)
|
1672
1672
|
end
|
1673
|
+
|
1674
|
+
it "conflates cross-references to a split list" do
|
1675
|
+
input = <<~INPUT
|
1676
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1677
|
+
<preface>
|
1678
|
+
<foreword>
|
1679
|
+
<p><xref target="Na"/></p>
|
1680
|
+
</foreword>
|
1681
|
+
</preface>
|
1682
|
+
<sections>
|
1683
|
+
<clause id="scope" type="scope">
|
1684
|
+
<title>Scope</title>
|
1685
|
+
<ol id="N1">
|
1686
|
+
<li id="Na"><p>A</p></li>
|
1687
|
+
<li id="Na1"><p>A</p></li>
|
1688
|
+
</ol>
|
1689
|
+
<ol id="N2" start="3">
|
1690
|
+
<li id="Nb"><p>A</p></li>
|
1691
|
+
<li id="Nb1"><p>A</p></li>
|
1692
|
+
</ol>
|
1693
|
+
<ol id="N3" start="5">
|
1694
|
+
<li id="Nc"><p>A</p></li>
|
1695
|
+
<li id="Nc1"><p>A</p></li>
|
1696
|
+
</ol>
|
1697
|
+
</clause>
|
1698
|
+
</sections>
|
1699
|
+
</iso-standard>
|
1700
|
+
INPUT
|
1701
|
+
output = <<~OUTPUT
|
1702
|
+
<foreword displayorder='1'>
|
1703
|
+
<p><xref target='Na'>1 a)</xref></p>
|
1704
|
+
</foreword>
|
1705
|
+
OUTPUT
|
1706
|
+
expect(xmlpp(Nokogiri::XML(IsoDoc::Iso::PresentationXMLConvert.new({})
|
1707
|
+
.convert("test", input, true))
|
1708
|
+
.at("//xmlns:foreword").to_xml))
|
1709
|
+
.to be_equivalent_to xmlpp(output)
|
1710
|
+
|
1711
|
+
input = <<~INPUT
|
1712
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1713
|
+
<preface>
|
1714
|
+
<foreword>
|
1715
|
+
<p><xref target="Na"/></p>
|
1716
|
+
</foreword>
|
1717
|
+
</preface>
|
1718
|
+
<sections>
|
1719
|
+
<clause id="scope" type="scope">
|
1720
|
+
<title>Scope</title>
|
1721
|
+
<ol id="N1">
|
1722
|
+
<li id="Na"><p>A</p></li>
|
1723
|
+
<li id="Na1"><p>A</p></li>
|
1724
|
+
</ol>
|
1725
|
+
<ol id="N2" start="3">
|
1726
|
+
<li id="Nb"><p>A</p></li>
|
1727
|
+
<li id="Nb1"><p>A</p></li>
|
1728
|
+
</ol>
|
1729
|
+
<ol id="N3" start="6">
|
1730
|
+
<li id="Nc"><p>A</p></li>
|
1731
|
+
<li id="Nc1"><p>A</p></li>
|
1732
|
+
</ol>
|
1733
|
+
</clause>
|
1734
|
+
</sections>
|
1735
|
+
</iso-standard>
|
1736
|
+
INPUT
|
1737
|
+
output = <<~OUTPUT
|
1738
|
+
<foreword displayorder='1'>
|
1739
|
+
<p><xref target='Na'>Clause 1, List 1 a)</xref></p>
|
1740
|
+
</foreword>
|
1741
|
+
OUTPUT
|
1742
|
+
expect(xmlpp(Nokogiri::XML(IsoDoc::Iso::PresentationXMLConvert.new({})
|
1743
|
+
.convert("test", input, true))
|
1744
|
+
.at("//xmlns:foreword").to_xml))
|
1745
|
+
.to be_equivalent_to xmlpp(output)
|
1746
|
+
end
|
1673
1747
|
end
|
data/spec/metanorma/amd_spec.rb
CHANGED
@@ -55,7 +55,7 @@ RSpec.describe Metanorma::ISO do
|
|
55
55
|
=== Bibliography Subsection
|
56
56
|
INPUT
|
57
57
|
output = <<~OUTPUT
|
58
|
-
#{BLANK_HDR.sub(%r{<doctype>
|
58
|
+
#{BLANK_HDR.sub(%r{<doctype>standard</doctype>}, '<doctype>amendment</doctype>')}
|
59
59
|
<sections>
|
60
60
|
<clause id="_" obligation="normative">
|
61
61
|
<title>Foreword</title>
|
@@ -255,6 +255,7 @@ RSpec.describe Metanorma::ISO do
|
|
255
255
|
<ext>
|
256
256
|
<doctype>amendment</doctype>
|
257
257
|
<editorialgroup>
|
258
|
+
<agency>ISO</agency>
|
258
259
|
<technical-committee number="1" type="A">TC</technical-committee>
|
259
260
|
<technical-committee number="11" type="A1">TC1</technical-committee>
|
260
261
|
<subcommittee number="2" type="B">SC</subcommittee>
|
@@ -263,6 +264,15 @@ RSpec.describe Metanorma::ISO do
|
|
263
264
|
<workgroup number="31" type="C1">WG1</workgroup>
|
264
265
|
<secretariat>SECRETARIAT</secretariat>
|
265
266
|
</editorialgroup>
|
267
|
+
<approvalgroup>
|
268
|
+
<agency>ISO</agency>
|
269
|
+
<technical-committee number="1" type="A">TC</technical-committee>
|
270
|
+
<technical-committee number="11" type="A1">TC1</technical-committee>
|
271
|
+
<subcommittee number="2" type="B">SC</subcommittee>
|
272
|
+
<subcommittee number="21" type="B1">SC1</subcommittee>
|
273
|
+
<workgroup number="3" type="C">WG</workgroup>
|
274
|
+
<workgroup number="31" type="C1">WG1</workgroup>
|
275
|
+
</approvalgroup>
|
266
276
|
<ics>
|
267
277
|
<code>1</code>
|
268
278
|
</ics>
|
@@ -341,10 +351,17 @@ RSpec.describe Metanorma::ISO do
|
|
341
351
|
<ext>
|
342
352
|
<doctype>amendment</doctype>
|
343
353
|
<editorialgroup>
|
354
|
+
<agency>ISO</agency>
|
344
355
|
<technical-committee/>
|
345
356
|
<subcommittee/>
|
346
357
|
<workgroup/>
|
347
358
|
</editorialgroup>
|
359
|
+
<approvalgroup>
|
360
|
+
<agency>ISO</agency>
|
361
|
+
<technical-committee/>
|
362
|
+
<subcommittee/>
|
363
|
+
<workgroup/>
|
364
|
+
</approvalgroup>
|
348
365
|
<structuredidentifier>
|
349
366
|
<project-number amendment="1" part="1">17301</project-number>
|
350
367
|
</structuredidentifier>
|
@@ -413,10 +430,17 @@ RSpec.describe Metanorma::ISO do
|
|
413
430
|
<ext>
|
414
431
|
<doctype>amendment</doctype>
|
415
432
|
<editorialgroup>
|
433
|
+
<agency>ISO</agency>
|
416
434
|
<technical-committee/>
|
417
435
|
<subcommittee/>
|
418
436
|
<workgroup/>
|
419
437
|
</editorialgroup>
|
438
|
+
<approvalgroup>
|
439
|
+
<agency>ISO</agency>
|
440
|
+
<technical-committee/>
|
441
|
+
<subcommittee/>
|
442
|
+
<workgroup/>
|
443
|
+
</approvalgroup>
|
420
444
|
<structuredidentifier>
|
421
445
|
<project-number amendment="1" part="1">17301</project-number>
|
422
446
|
</structuredidentifier>
|
@@ -484,10 +508,17 @@ RSpec.describe Metanorma::ISO do
|
|
484
508
|
<ext>
|
485
509
|
<doctype>amendment</doctype>
|
486
510
|
<editorialgroup>
|
511
|
+
<agency>ISO</agency>
|
487
512
|
<technical-committee/>
|
488
513
|
<subcommittee/>
|
489
514
|
<workgroup/>
|
490
515
|
</editorialgroup>
|
516
|
+
<approvalgroup>
|
517
|
+
<agency>ISO</agency>
|
518
|
+
<technical-committee/>
|
519
|
+
<subcommittee/>
|
520
|
+
<workgroup/>
|
521
|
+
</approvalgroup>
|
491
522
|
<structuredidentifier>
|
492
523
|
<project-number amendment="1" part="1">17301</project-number>
|
493
524
|
</structuredidentifier>
|
@@ -556,10 +587,17 @@ RSpec.describe Metanorma::ISO do
|
|
556
587
|
<ext>
|
557
588
|
<doctype>technical-corrigendum</doctype>
|
558
589
|
<editorialgroup>
|
590
|
+
<agency>ISO</agency>
|
559
591
|
<technical-committee/>
|
560
592
|
<subcommittee/>
|
561
593
|
<workgroup/>
|
562
594
|
</editorialgroup>
|
595
|
+
<approvalgroup>
|
596
|
+
<agency>ISO</agency>
|
597
|
+
<technical-committee/>
|
598
|
+
<subcommittee/>
|
599
|
+
<workgroup/>
|
600
|
+
</approvalgroup>
|
563
601
|
<structuredidentifier>
|
564
602
|
<project-number corrigendum="3" part="1">17301</project-number>
|
565
603
|
</structuredidentifier>
|
@@ -628,10 +666,17 @@ RSpec.describe Metanorma::ISO do
|
|
628
666
|
<ext>
|
629
667
|
<doctype>technical-corrigendum</doctype>
|
630
668
|
<editorialgroup>
|
669
|
+
<agency>ISO</agency>
|
631
670
|
<technical-committee/>
|
632
671
|
<subcommittee/>
|
633
672
|
<workgroup/>
|
634
673
|
</editorialgroup>
|
674
|
+
<approvalgroup>
|
675
|
+
<agency>ISO</agency>
|
676
|
+
<technical-committee/>
|
677
|
+
<subcommittee/>
|
678
|
+
<workgroup/>
|
679
|
+
</approvalgroup>
|
635
680
|
<structuredidentifier>
|
636
681
|
<project-number part='1' corrigendum='3'>17301</project-number>
|
637
682
|
</structuredidentifier>
|
@@ -699,10 +744,17 @@ RSpec.describe Metanorma::ISO do
|
|
699
744
|
<ext>
|
700
745
|
<doctype>technical-corrigendum</doctype>
|
701
746
|
<editorialgroup>
|
747
|
+
<agency>ISO</agency>
|
702
748
|
<technical-committee/>
|
703
749
|
<subcommittee/>
|
704
750
|
<workgroup/>
|
705
751
|
</editorialgroup>
|
752
|
+
<approvalgroup>
|
753
|
+
<agency>ISO</agency>
|
754
|
+
<technical-committee/>
|
755
|
+
<subcommittee/>
|
756
|
+
<workgroup/>
|
757
|
+
</approvalgroup>
|
706
758
|
<structuredidentifier>
|
707
759
|
<project-number corrigendum="3" part="1">17301</project-number>
|
708
760
|
</structuredidentifier>
|