metanorma-iso 2.1.4 → 2.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/iso/html/isodoc-dis.css +1 -10
- data/lib/isodoc/iso/html/isodoc-dis.scss +1 -13
- data/lib/isodoc/iso/html/isodoc.css +4 -11
- data/lib/isodoc/iso/html/isodoc.scss +5 -15
- data/lib/isodoc/iso/html/style-human.css +3 -0
- data/lib/isodoc/iso/html/style-human.scss +4 -0
- data/lib/isodoc/iso/html/style-iso.css +3 -0
- data/lib/isodoc/iso/html/style-iso.scss +4 -0
- data/lib/isodoc/iso/i18n-en.yaml +1 -1
- data/lib/isodoc/iso/iso.amendment.xsl +3618 -2934
- data/lib/isodoc/iso/iso.international-standard.xsl +3618 -2934
- data/lib/isodoc/iso/presentation_xml_convert.rb +8 -6
- data/lib/isodoc/iso/word_cleanup.rb +50 -19
- data/lib/isodoc/iso/word_dis_cleanup.rb +2 -14
- data/lib/isodoc/iso/word_dis_convert.rb +1 -1
- data/lib/metanorma/iso/boilerplate-fr.xml +1 -1
- data/lib/metanorma/iso/boilerplate-ru.xml +1 -1
- data/lib/metanorma/iso/boilerplate.xml +1 -1
- data/lib/metanorma/iso/cleanup.rb +0 -1
- data/lib/metanorma/iso/front_id.rb +20 -1
- data/lib/metanorma/iso/isodoc.rng +16 -1
- data/lib/metanorma/iso/reqt.rng +1 -1
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +2 -1
- data/spec/isodoc/postproc_spec.rb +8 -75
- data/spec/isodoc/ref_spec.rb +123 -76
- data/spec/isodoc/terms_spec.rb +62 -0
- data/spec/isodoc/word_dis_spec.rb +133 -15
- data/spec/metanorma/base_spec.rb +19 -17
- data/spec/metanorma/cleanup_spec.rb +5 -5
- data/spec/metanorma/processor_spec.rb +1 -2
- data/spec/metanorma/refs_spec.rb +5 -3
- data/spec/metanorma/section_spec.rb +8 -8
- data/spec/spec_helper.rb +1 -1
- data/spec/vcr_cassettes/withdrawn_iso.yml +33 -33
- metadata +18 -4
data/spec/isodoc/ref_spec.rb
CHANGED
@@ -197,7 +197,7 @@ RSpec.describe IsoDoc do
|
|
197
197
|
for food and animal feeding stuffs according to the Dumas combustion
|
198
198
|
method</em> (see
|
199
199
|
|
200
|
-
<link target="http://www.icc.or.at"/> )
|
200
|
+
<link target="http://www.icc.or.at"/> ) [ICC 167]
|
201
201
|
</formattedref>
|
202
202
|
<docidentifier type="ICC">ICC 167</docidentifier>
|
203
203
|
</bibitem>
|
@@ -209,12 +209,12 @@ RSpec.describe IsoDoc do
|
|
209
209
|
<references id="_bibliography" normative="false" obligation="informative" displayorder="3">
|
210
210
|
<title depth="1">Bibliography</title>
|
211
211
|
<bibitem id="ISBN" type="book">
|
212
|
-
<formattedref><em>Chemicals for analytical laboratory use</em>. ISBN.</formattedref>
|
212
|
+
<formattedref><em>Chemicals for analytical laboratory use</em>. n.p.: n.d. ISBN.</formattedref>
|
213
213
|
<docidentifier type="ISBN">ISBN</docidentifier>
|
214
214
|
<docidentifier type="metanorma">[1]</docidentifier>
|
215
215
|
</bibitem>
|
216
216
|
<bibitem id="ISSN" type="journal">
|
217
|
-
<formattedref><em>Instruments for analytical laboratory use</em>. ISSN.</formattedref>
|
217
|
+
<formattedref><em>Instruments for analytical laboratory use</em>. n.d. ISSN.</formattedref>
|
218
218
|
<docidentifier type="ISSN">ISSN</docidentifier>
|
219
219
|
<docidentifier type="metanorma">[2]</docidentifier>
|
220
220
|
</bibitem>
|
@@ -244,13 +244,13 @@ RSpec.describe IsoDoc do
|
|
244
244
|
<docidentifier type="metanorma">[10]</docidentifier>
|
245
245
|
</bibitem>
|
246
246
|
<bibitem id="ref11">
|
247
|
-
<formattedref><em>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</em
|
247
|
+
<formattedref><em><span class="stddocTitle">Internet Calendaring and Scheduling Core Object Specification (iCalendar)</span></em></formattedref>
|
248
248
|
<docidentifier type='metanorma-ordinal'>[4]</docidentifier>
|
249
249
|
<docidentifier type="IETF">IETF RFC 10</docidentifier>
|
250
250
|
</bibitem>
|
251
251
|
<bibitem id="ref12">
|
252
252
|
<formattedref format="application/x-isodoc+xml">CitationWorks. 2019.
|
253
|
-
<em>How to cite a reference</em
|
253
|
+
<em>How to cite a reference</em>. [IETF RFC 20]</formattedref>
|
254
254
|
<docidentifier type="metanorma">[Citn]</docidentifier>
|
255
255
|
<docidentifier type="IETF">IETF RFC 20</docidentifier>
|
256
256
|
</bibitem>
|
@@ -261,76 +261,123 @@ RSpec.describe IsoDoc do
|
|
261
261
|
|
262
262
|
html = <<~OUTPUT
|
263
263
|
#{HTML_HDR}
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
264
|
+
<br/>
|
265
|
+
<div>
|
266
|
+
<h1 class='ForewordTitle'>Foreword</h1>
|
267
|
+
<p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
|
268
|
+
<a href='#ISO712'>ISO 712</a>
|
269
|
+
<a href='#ISBN'>[1]</a>
|
270
|
+
<a href='#ISSN'>[2]</a>
|
271
|
+
<a href='#ISO16634'>ISO 16634:--</a>
|
272
|
+
<a href='#ref1'>ICC 167</a>
|
273
|
+
<a href='#ref10'>[10]</a>
|
274
|
+
<a href='#ref12'>Citn</a>
|
275
|
+
</p>
|
276
|
+
</div>
|
277
|
+
<p class='zzSTDTitle1'/>
|
278
|
+
<div>
|
279
|
+
<h1>1 Normative References</h1>
|
280
|
+
<p>
|
281
|
+
The following documents are referred to in the text in such a way that
|
282
|
+
some or all of their content constitutes requirements of this
|
283
|
+
document. For dated references, only the edition cited applies. For
|
284
|
+
undated references, the latest edition of the referenced document
|
285
|
+
(including any amendments) applies.
|
286
|
+
</p>
|
287
|
+
<p id='ISO712' class='NormRef'>
|
288
|
+
ISO 712,
|
289
|
+
<i>Cereals and cereal products</i>
|
290
|
+
</p>
|
291
|
+
<p id='ISO16634' class='NormRef'>
|
292
|
+
ISO 16634:-- (all parts)
|
293
|
+
<a class='FootnoteRef' href='#fn:1'>
|
294
|
+
<sup>1</sup>
|
295
|
+
</a>
|
296
|
+
,
|
297
|
+
<i>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</i>
|
298
|
+
</p>
|
299
|
+
<p id='ISO20483' class='NormRef'>
|
300
|
+
ISO 20483:2013-2014,
|
301
|
+
<i>Cereals and pulses</i>
|
302
|
+
</p>
|
303
|
+
<p id='ref1' class='NormRef'>
|
304
|
+
ICC 167,
|
305
|
+
<span style='font-variant:small-caps;'>Standard No I.C.C 167</span>
|
306
|
+
.
|
307
|
+
<i>
|
308
|
+
Determination of the protein content in cereal and cereal products
|
309
|
+
for food and animal feeding stuffs according to the Dumas combustion
|
310
|
+
method
|
311
|
+
</i>
|
312
|
+
(see
|
313
|
+
<a href='http://www.icc.or.at'>http://www.icc.or.at</a>
|
314
|
+
) [ICC 167]
|
315
|
+
</p>
|
316
|
+
<div class='Note'>
|
317
|
+
<p>
|
318
|
+
<span class='note_label'>NOTE</span>
|
319
|
+
This is an annotation of ISO 20483:2013-2014
|
320
|
+
</p>
|
321
|
+
</div>
|
322
|
+
</div>
|
323
|
+
<br/>
|
324
|
+
<div>
|
325
|
+
<h1 class='Section3'>Bibliography</h1>
|
326
|
+
<p id='ISBN' class='Biblio'>
|
327
|
+
[1]
|
328
|
+
<i>Chemicals for analytical laboratory use</i>
|
329
|
+
. n.p.: n.d. ISBN.
|
330
|
+
</p>
|
331
|
+
<p id='ISSN' class='Biblio'>
|
332
|
+
[2]
|
333
|
+
<i>Instruments for analytical laboratory use</i>
|
334
|
+
. n.d. ISSN.
|
335
|
+
</p>
|
336
|
+
<div class='Note'>
|
337
|
+
<p>
|
338
|
+
<span class='note_label'>NOTE</span>
|
339
|
+
This is an annotation of document ISSN.
|
340
|
+
</p>
|
341
|
+
</div>
|
342
|
+
<div class='Note'>
|
343
|
+
<p>
|
344
|
+
<span class='note_label'>NOTE</span>
|
345
|
+
This is another annotation of document ISSN.
|
346
|
+
</p>
|
347
|
+
</div>
|
348
|
+
<p id='ISO3696' class='Biblio'>
|
349
|
+
[3] ISO 3696,
|
350
|
+
<i>Water for analytical laboratory use</i>
|
351
|
+
</p>
|
352
|
+
<p id='ref10' class='Biblio'>
|
353
|
+
[10]
|
354
|
+
<span style='font-variant:small-caps;'>Standard No I.C.C 167</span>
|
355
|
+
.
|
356
|
+
<i>
|
357
|
+
Determination of the protein content in cereal and cereal products
|
358
|
+
for food and animal feeding stuffs according to the Dumas combustion
|
359
|
+
method
|
360
|
+
</i>
|
361
|
+
(see
|
362
|
+
<a href='http://www.icc.or.at'>http://www.icc.or.at</a>
|
363
|
+
)
|
364
|
+
</p>
|
365
|
+
<p id='ref11' class='Biblio'>
|
366
|
+
[4] IETF RFC 10,
|
367
|
+
<i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i>
|
368
|
+
</p>
|
369
|
+
<p id='ref12' class='Biblio'>
|
370
|
+
Citn IETF RFC 20, CitationWorks. 2019.
|
371
|
+
<i>How to cite a reference</i>
|
372
|
+
. [IETF RFC 20]
|
373
|
+
</p>
|
374
|
+
</div>
|
375
|
+
<aside id='fn:1' class='footnote'>
|
376
|
+
<p>Under preparation. (Stage at the time of publication ISO/DIS 16634)</p>
|
377
|
+
</aside>
|
378
|
+
</div>
|
379
|
+
</body>
|
380
|
+
</html>
|
334
381
|
OUTPUT
|
335
382
|
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
336
383
|
.convert("test", input, true))
|
@@ -372,7 +419,7 @@ RSpec.describe IsoDoc do
|
|
372
419
|
<em>
|
373
420
|
<span class='stddocTitle'>IGNF. (IGN France) Registry</span>
|
374
421
|
</em>
|
375
|
-
[website]. Available from:
|
422
|
+
[website]. n.d. Available from:
|
376
423
|
<span class='biburl'>
|
377
424
|
<link target='https://registre.ign.fr/ign/IGNF/'>https://registre.ign.fr/ign/IGNF/</link>
|
378
425
|
</span>
|
data/spec/isodoc/terms_spec.rb
CHANGED
@@ -249,4 +249,66 @@ RSpec.describe IsoDoc do
|
|
249
249
|
.sub(%r{</div>\s*<br.*$}m, "")))
|
250
250
|
.to be_equivalent_to xmlpp(word)
|
251
251
|
end
|
252
|
+
|
253
|
+
it "processes related terms" do
|
254
|
+
input = <<~INPUT
|
255
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
256
|
+
<sections>
|
257
|
+
<terms id='A' obligation='normative'>
|
258
|
+
<title>Terms and definitions</title>
|
259
|
+
<term id='second'>
|
260
|
+
<preferred>
|
261
|
+
<expression>
|
262
|
+
<name>Second Term</name>
|
263
|
+
</expression>
|
264
|
+
<field-of-application>Field</field-of-application>
|
265
|
+
<usage-info>Usage Info 1</usage-info>
|
266
|
+
</preferred>
|
267
|
+
<definition><verbal-definition>Definition 1</verbal-definition></definition>
|
268
|
+
</term>
|
269
|
+
<term id="C">
|
270
|
+
<preferred language='fr' script='Latn' type='prefix'>
|
271
|
+
<expression>
|
272
|
+
<name>First Designation</name>
|
273
|
+
</expression></preferred>
|
274
|
+
<related type='contrast'>
|
275
|
+
<preferred>
|
276
|
+
<expression>
|
277
|
+
<name>Fifth Designation</name>
|
278
|
+
<grammar>
|
279
|
+
<gender>neuter</gender>
|
280
|
+
</grammar>
|
281
|
+
</expression>
|
282
|
+
</preferred>
|
283
|
+
<xref target='second'/>
|
284
|
+
</related>
|
285
|
+
<definition><verbal-definition>Definition 2</verbal-definition></definition>
|
286
|
+
</term>
|
287
|
+
</terms>
|
288
|
+
</sections>
|
289
|
+
</iso-standard>
|
290
|
+
INPUT
|
291
|
+
output = <<~OUTPUT
|
292
|
+
<?xml version='1.0'?>
|
293
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
|
294
|
+
<sections>
|
295
|
+
<terms id='A' obligation='normative' displayorder='1'>
|
296
|
+
<title depth='1'>1<tab/>Terms and definitions</title>
|
297
|
+
<term id='second'>
|
298
|
+
<name>1.1</name>
|
299
|
+
<preferred><strong>Second Term</strong>, <Field, Usage Info 1></preferred>
|
300
|
+
<definition>Definition 1</definition>
|
301
|
+
</term>
|
302
|
+
<term id='C'>
|
303
|
+
<name>1.2</name>
|
304
|
+
<preferred language='fr' script='Latn' type='prefix'><strong>First Designation</strong></preferred>
|
305
|
+
<definition>Definition 2</definition>
|
306
|
+
</term>
|
307
|
+
</terms>
|
308
|
+
</sections>
|
309
|
+
</iso-standard>
|
310
|
+
OUTPUT
|
311
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
312
|
+
.convert("test", input, true))).to be_equivalent_to xmlpp(output)
|
313
|
+
end
|
252
314
|
end
|
@@ -1010,9 +1010,9 @@ RSpec.describe IsoDoc do
|
|
1010
1010
|
Note
|
1011
1011
|
</p>
|
1012
1012
|
</div>
|
1013
|
-
<div style='page-break-after:avoid;'>
|
1013
|
+
<div class="Figureexample" style='page-break-after:avoid;'>
|
1014
1014
|
<a name='D' id='D'/>
|
1015
|
-
<p class='
|
1015
|
+
<p class='Figureexample'>
|
1016
1016
|
<span style='mso-tab-count:1'> </span>
|
1017
1017
|
Example
|
1018
1018
|
</p>
|
@@ -1687,7 +1687,7 @@ RSpec.describe IsoDoc do
|
|
1687
1687
|
<span style='mso-tab-count:1'> </span>
|
1688
1688
|
Example start
|
1689
1689
|
</p>
|
1690
|
-
<p class='Code--'>X</p>
|
1690
|
+
<p class='Code--' style='margin-bottom:12pt;'>X</p>
|
1691
1691
|
<p class='Exampleindentcontinued'>Example continued</p>
|
1692
1692
|
</div>
|
1693
1693
|
<p class='Code-'>X</p>
|
@@ -1728,7 +1728,7 @@ RSpec.describe IsoDoc do
|
|
1728
1728
|
<div class='WordSection3'>
|
1729
1729
|
<p class='zzSTDTitle'>
|
1730
1730
|
Date and time — Representations for information interchange —
|
1731
|
-
<span style='font-weight:normal'>Part 1
|
1731
|
+
<span style='font-weight:normal'>Part 1:</span>
|
1732
1732
|
Basic rules
|
1733
1733
|
</p>
|
1734
1734
|
<div>
|
@@ -1799,7 +1799,7 @@ RSpec.describe IsoDoc do
|
|
1799
1799
|
<div class='WordSection3'>
|
1800
1800
|
<p class='zzSTDTitle'>
|
1801
1801
|
Date and time — Representations for information interchange —
|
1802
|
-
<span style='font-weight:normal'>Part 1
|
1802
|
+
<span style='font-weight:normal'>Part 1:</span>
|
1803
1803
|
Basic rules
|
1804
1804
|
<span style='font-weight:normal'> AMENDMENT 1: Technical corrections</span>
|
1805
1805
|
</p>
|
@@ -1842,11 +1842,9 @@ RSpec.describe IsoDoc do
|
|
1842
1842
|
<br/>
|
1843
1843
|
CH-1214 Vernier, Geneva, Switzerland
|
1844
1844
|
<br/>
|
1845
|
-
|
1845
|
+
Phone: +41 22 749 01 11
|
1846
1846
|
<br/>
|
1847
|
-
|
1848
|
-
<br/>
|
1849
|
-
copyright@iso.org
|
1847
|
+
Email: copyright@iso.org
|
1850
1848
|
<br/>
|
1851
1849
|
www.iso.org</p>
|
1852
1850
|
</clause>
|
@@ -1896,9 +1894,8 @@ RSpec.describe IsoDoc do
|
|
1896
1894
|
</p>
|
1897
1895
|
<p class='zzCopyright'> Ch. de Blandonnet 8 ?~@? CP 401 </p>
|
1898
1896
|
<p class='zzCopyright'> CH-1214 Vernier, Geneva, Switzerland </p>
|
1899
|
-
<p class='zzCopyright'>
|
1900
|
-
<p class='zzCopyright'>
|
1901
|
-
<p class='zzCopyright'> copyright@iso.org </p>
|
1897
|
+
<p class='zzCopyright'> Phone: +41 22 749 01 11 </p>
|
1898
|
+
<p class='zzCopyright'> Email: copyright@iso.org </p>
|
1902
1899
|
<p class='zzCopyright'> www.iso.org</p>
|
1903
1900
|
</div>
|
1904
1901
|
</div>
|
@@ -1935,12 +1932,133 @@ RSpec.describe IsoDoc do
|
|
1935
1932
|
</p>
|
1936
1933
|
<p class='zzCopyright' style='text-indent:20.15pt;'> Ch. de Blandonnet 8 ?~@? CP 401 </p>
|
1937
1934
|
<p class='zzCopyright' style='text-indent:20.15pt;'> CH-1214 Vernier, Geneva, Switzerland </p>
|
1938
|
-
<p class='zzCopyright' style='text-indent:20.15pt;'>
|
1939
|
-
<p class='zzCopyright' style='text-indent:20.15pt;'>
|
1940
|
-
<p class='zzCopyright' style='text-indent:20.15pt;'> copyright@iso.org </p>
|
1935
|
+
<p class='zzCopyright' style='text-indent:20.15pt;'> Phone: +41 22 749 01 11 </p>
|
1936
|
+
<p class='zzCopyright' style='text-indent:20.15pt;'> Email: copyright@iso.org </p>
|
1941
1937
|
<p class='zzCopyright' style='text-indent:20.15pt;'> www.iso.org</p>
|
1942
1938
|
</div>
|
1943
1939
|
</div>
|
1944
1940
|
OUTPUT
|
1945
1941
|
end
|
1942
|
+
|
1943
|
+
it "deals with Simple Template styles" do
|
1944
|
+
input = <<~INPUT
|
1945
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1946
|
+
<bibdata>
|
1947
|
+
<status><stage>20</stage></status>
|
1948
|
+
</bibdata>
|
1949
|
+
<sections>
|
1950
|
+
<clause id="A"><title>Clause Title</title>
|
1951
|
+
<ul><li>List</li></ul>
|
1952
|
+
<note id="B"><p>Note</p>
|
1953
|
+
<ul><li>Note List</li></ul>
|
1954
|
+
</note>
|
1955
|
+
<example id="C"><p>Example</p>
|
1956
|
+
<ul><li>Example List</li></ul>
|
1957
|
+
</example>
|
1958
|
+
<figure id="D"><name>Figure Title</name></figure>
|
1959
|
+
<sourcecode id="E">XYZ</sourcecode>
|
1960
|
+
<table id="F"><name>Table</name></table>
|
1961
|
+
</clause>
|
1962
|
+
</sections>
|
1963
|
+
<annex id="G"><title>Annex Title</title>
|
1964
|
+
<table id="H"><name>Annex Table</name></table>
|
1965
|
+
<clause id="I"><title>Annex Clause Title</title>
|
1966
|
+
</clause>
|
1967
|
+
</annex>
|
1968
|
+
<bibliography>
|
1969
|
+
<references id="_normative_references" normative="false" obligation="informative">
|
1970
|
+
<title>Bibliography</title>
|
1971
|
+
<bibitem id="ISO712" type="standard">
|
1972
|
+
<formattedref>ALUFFI, Paolo, ed. (2022). <em><span class="std_class">Facets of Algebraic Geometry: A Collection in Honor of William Fulton's 80th Birthday</span></em>, 1st edition. Cambridge, UK: CUP.</formattedref>
|
1973
|
+
<docidentifier type="ISO">ISO/IEC 712-3:2022</docidentifier>
|
1974
|
+
</bibitem>
|
1975
|
+
</references>
|
1976
|
+
</bibliography>
|
1977
|
+
</iso-standard>
|
1978
|
+
INPUT
|
1979
|
+
word = <<~WORD
|
1980
|
+
<div class='WordSection3'>
|
1981
|
+
<p class='zzSTDTitle1'/>
|
1982
|
+
<div>
|
1983
|
+
<a name='A' id='A'/>
|
1984
|
+
<h1>Clause Title</h1>
|
1985
|
+
<p style='mso-list:l3 level1 lfo1;' class='MsoListParagraphCxSpFirst'>List</p>
|
1986
|
+
<div class='Note'>
|
1987
|
+
<a name='B' id='B'/>
|
1988
|
+
<p class='Note'>
|
1989
|
+
<span class='note_label'/>
|
1990
|
+
<span style='mso-tab-count:1'> </span>
|
1991
|
+
Note
|
1992
|
+
</p>
|
1993
|
+
<p style='font-size:10.0pt;;mso-list:l3 level1 lfo2;' class='MsoListParagraphCxSpFirst'>Note List</p>
|
1994
|
+
</div>
|
1995
|
+
<div class='Example'>
|
1996
|
+
<a name='C' id='C'/>
|
1997
|
+
<p class='Example'>
|
1998
|
+
<span style='mso-tab-count:1'> </span>
|
1999
|
+
Example
|
2000
|
+
</p>
|
2001
|
+
<p style='font-size:10.0pt;;mso-list:l3 level1 lfo3;' class='MsoListParagraphCxSpFirst'>Example List</p>
|
2002
|
+
</div>
|
2003
|
+
<div class='MsoNormal' style='text-align:center;'>
|
2004
|
+
<a name='D' id='D'/>
|
2005
|
+
<p class='FigureTitle' style='text-align:center;'>Figure Title</p>
|
2006
|
+
</div>
|
2007
|
+
<p class='Code'>
|
2008
|
+
<a name='E' id='E'/>
|
2009
|
+
XYZ
|
2010
|
+
</p>
|
2011
|
+
<p class='Tabletitle' style='text-align:center;'>Table</p>
|
2012
|
+
<div align='center' class='table_container'>
|
2013
|
+
<table class='MsoISOTable' style='mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
|
2014
|
+
<a name='F' id='F'/>
|
2015
|
+
</table>
|
2016
|
+
</div>
|
2017
|
+
</div>
|
2018
|
+
<p class='MsoNormal'>
|
2019
|
+
<br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
|
2020
|
+
</p>
|
2021
|
+
<div class='Section3'>
|
2022
|
+
<a name='G' id='G'/>
|
2023
|
+
<p class='ANNEX'>Annex Title</p>
|
2024
|
+
<p class='AnnexTableTitle' style='text-align:center;'>Annex Table</p>
|
2025
|
+
<div align='center' class='table_container'>
|
2026
|
+
<table class='MsoISOTable' style='mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
|
2027
|
+
<a name='H' id='H'/>
|
2028
|
+
</table>
|
2029
|
+
</div>
|
2030
|
+
<div>
|
2031
|
+
<a name='I' id='I'/>
|
2032
|
+
<p class='a2'>Annex Clause Title</p>
|
2033
|
+
</div>
|
2034
|
+
</div>
|
2035
|
+
<p class='MsoNormal'>
|
2036
|
+
<br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
|
2037
|
+
</p>
|
2038
|
+
<div>
|
2039
|
+
<p class='BiblioTitle'>Bibliography</p>
|
2040
|
+
<p class='MsoNormal'>
|
2041
|
+
<a name='ISO712' id='ISO712'/>
|
2042
|
+
[1]
|
2043
|
+
<span style='mso-tab-count:1'> </span>
|
2044
|
+
ISO/IEC 712-3:2022, ALUFFI, Paolo, ed. (2022).
|
2045
|
+
<i>
|
2046
|
+
Facets of Algebraic Geometry: A Collection in Honor of William Fulton's
|
2047
|
+
80th Birthday
|
2048
|
+
</i>
|
2049
|
+
, 1st edition. Cambridge, UK: CUP.
|
2050
|
+
</p>
|
2051
|
+
</div>
|
2052
|
+
</div>
|
2053
|
+
WORD
|
2054
|
+
FileUtils.rm_f "test.doc"
|
2055
|
+
IsoDoc::Iso::WordConvert.new({}).convert("test", input, false)
|
2056
|
+
expect(File.exist?("test.doc")).to be true
|
2057
|
+
output = File.read("test.doc", encoding: "UTF-8")
|
2058
|
+
.sub(/^.*<html/m, "<html")
|
2059
|
+
.sub(/<\/html>.*$/m, "</html>")
|
2060
|
+
expect(strip_guid(xmlpp(Nokogiri::XML(output)
|
2061
|
+
.at("//xmlns:div[@class = 'WordSection3']").to_xml)))
|
2062
|
+
.to be_equivalent_to xmlpp(word)
|
2063
|
+
end
|
1946
2064
|
end
|
data/spec/metanorma/base_spec.rb
CHANGED
@@ -940,8 +940,8 @@ RSpec.describe Metanorma::ISO do
|
|
940
940
|
INPUT
|
941
941
|
expect(xmlpp(output.sub(%r{<boilerplate>.*</boilerplate>}m, "")))
|
942
942
|
.to be_equivalent_to xmlpp(<<~"OUTPUT")
|
943
|
-
|
944
|
-
|
943
|
+
<iso-standard xmlns="https://www.metanorma.org/ns/iso" type="semantic" version="#{Metanorma::ISO::VERSION}">
|
944
|
+
<bibdata type='standard'>
|
945
945
|
<contributor>
|
946
946
|
<role type='author'/>
|
947
947
|
<organization>
|
@@ -1009,13 +1009,13 @@ RSpec.describe Metanorma::ISO do
|
|
1009
1009
|
<title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
|
1010
1010
|
<title type='main' format='text/plain' language='en' script='Latn'>Rubber latex — Sampling</title>
|
1011
1011
|
<title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc</title>
|
1012
|
-
<title type='title-main' format='text/plain' language='fr' script='Latn'
|
1013
|
-
<title type='main' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc
|
1012
|
+
<title type='title-main' format='text/plain' language='fr' script='Latn'>Échantillonnage</title>
|
1013
|
+
<title type='main' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc — Échantillonnage</title>
|
1014
1014
|
<uri type='src'>https://www.iso.org/standard/23281.html</uri>
|
1015
1015
|
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
1016
1016
|
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
1017
1017
|
<docidentifier type='ISO' primary="true">ISO 123:2001</docidentifier>
|
1018
|
-
<docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3
|
1018
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3</docidentifier>
|
1019
1019
|
<docnumber>123</docnumber>
|
1020
1020
|
<date type='published'><on>2001-05</on></date>
|
1021
1021
|
<contributor>
|
@@ -1037,16 +1037,15 @@ RSpec.describe Metanorma::ISO do
|
|
1037
1037
|
contained in drums, tank cars or tanks. The procedures may also be
|
1038
1038
|
used for sampling plastics dispersions.
|
1039
1039
|
</abstract>
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
</abstract>
|
1040
|
+
<abstract format='text/plain' language='fr' script='Latn'>
|
1041
|
+
La présente Norme internationale spécifie des méthodes
|
1042
|
+
d’échantillonnage pour des concentrés de latex de caoutchouc naturel
|
1043
|
+
et pour échantillonner des latex de caoutchouc synthétique et des
|
1044
|
+
latex artificiels. Elle s’applique également à l’échantillonnage de
|
1045
|
+
latex de caoutchouc contenus dans des fûts, citernes routières ou de
|
1046
|
+
stockage. Le mode opératoire peut aussi être utilisé pour
|
1047
|
+
l’échantillonnage de dispersions de plastiques.
|
1048
|
+
</abstract>
|
1050
1049
|
<status>
|
1051
1050
|
<stage>90</stage>
|
1052
1051
|
<substage>93</substage>
|
@@ -1062,6 +1061,7 @@ RSpec.describe Metanorma::ISO do
|
|
1062
1061
|
<relation type='obsoletes'>
|
1063
1062
|
<bibitem type='standard'>
|
1064
1063
|
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
1064
|
+
<docidentifier type='ISO' primary='true'>ISO 123:1985</docidentifier>
|
1065
1065
|
</bibitem>
|
1066
1066
|
</relation>
|
1067
1067
|
<place>Geneva</place>
|
@@ -1088,7 +1088,7 @@ RSpec.describe Metanorma::ISO do
|
|
1088
1088
|
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:72849:en</uri>
|
1089
1089
|
<uri type='rss'>https://www.iso.org/contents/data/standard/07/28/72849.detail.rss</uri>
|
1090
1090
|
<docidentifier type='ISO' primary="true">ISO 125</docidentifier>
|
1091
|
-
<docidentifier type='URN'>urn:iso:std:iso:125:stage-60.60:ed-7
|
1091
|
+
<docidentifier type='URN'>urn:iso:std:iso:125:stage-60.60:ed-7</docidentifier>
|
1092
1092
|
<docnumber>125</docnumber>
|
1093
1093
|
<contributor>
|
1094
1094
|
<role type='publisher'/>
|
@@ -1117,6 +1117,7 @@ RSpec.describe Metanorma::ISO do
|
|
1117
1117
|
<relation type='obsoletes'>
|
1118
1118
|
<bibitem type='standard'>
|
1119
1119
|
<formattedref format='text/plain'>ISO 125:2011</formattedref>
|
1120
|
+
<docidentifier type='ISO' primary='true'>ISO 125:2011</docidentifier>
|
1120
1121
|
</bibitem>
|
1121
1122
|
</relation>
|
1122
1123
|
<relation type='instance'>
|
@@ -1139,7 +1140,7 @@ RSpec.describe Metanorma::ISO do
|
|
1139
1140
|
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:72849:en</uri>
|
1140
1141
|
<uri type='rss'>https://www.iso.org/contents/data/standard/07/28/72849.detail.rss</uri>
|
1141
1142
|
<docidentifier type='ISO' primary="true">ISO 125:2020</docidentifier>
|
1142
|
-
<docidentifier type='URN'>urn:iso:std:iso:125:stage-60.60:ed-7
|
1143
|
+
<docidentifier type='URN'>urn:iso:std:iso:125:stage-60.60:ed-7</docidentifier>
|
1143
1144
|
<docnumber>125</docnumber>
|
1144
1145
|
<date type='published'>
|
1145
1146
|
<on>2020-02</on>
|
@@ -1192,6 +1193,7 @@ RSpec.describe Metanorma::ISO do
|
|
1192
1193
|
<relation type='obsoletes'>
|
1193
1194
|
<bibitem type='standard'>
|
1194
1195
|
<formattedref format='text/plain'>ISO 125:2011</formattedref>
|
1196
|
+
<docidentifier type='ISO' primary='true'>ISO 125:2011</docidentifier>
|
1195
1197
|
</bibitem>
|
1196
1198
|
</relation>
|
1197
1199
|
<place>Geneva</place>
|