metanorma-iso 1.10.1 → 1.10.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ubuntu.yml +1 -1
- data/Gemfile +1 -1
- data/lib/asciidoctor/iso/base.rb +1 -1
- data/lib/asciidoctor/iso/basicdoc.rng +1 -11
- data/lib/asciidoctor/iso/biblio.rng +0 -2
- data/lib/asciidoctor/iso/front.rb +17 -4
- data/lib/asciidoctor/iso/front_id.rb +20 -17
- data/lib/asciidoctor/iso/isodoc.rng +61 -19
- data/lib/asciidoctor/iso/isostandard-amd.rng +1 -1
- data/lib/asciidoctor/iso/isostandard.rng +15 -3
- data/lib/asciidoctor/iso/reqt.rng +1 -1
- data/lib/asciidoctor/iso/section.rb +1 -1
- data/lib/asciidoctor/iso/validate.rb +1 -1
- data/lib/asciidoctor/iso/validate_image.rb +1 -1
- data/lib/asciidoctor/iso/validate_section.rb +1 -1
- data/lib/isodoc/iso/base_convert.rb +14 -31
- data/lib/isodoc/iso/html/isodoc.css +0 -1
- data/lib/isodoc/iso/html/isodoc.scss +0 -1
- data/lib/isodoc/iso/html/style-human.css +40 -9
- data/lib/isodoc/iso/html/style-human.scss +36 -9
- data/lib/isodoc/iso/html/style-iso.css +35 -6
- data/lib/isodoc/iso/html/style-iso.scss +31 -6
- data/lib/isodoc/iso/html/wordstyle.css +10 -8
- data/lib/isodoc/iso/html/wordstyle.scss +10 -8
- data/lib/isodoc/iso/html_convert.rb +81 -22
- data/lib/isodoc/iso/index.rb +53 -45
- data/lib/isodoc/iso/iso.amendment.xsl +333 -113
- data/lib/isodoc/iso/iso.international-standard.xsl +333 -113
- data/lib/isodoc/iso/isosts_convert.rb +6 -2
- data/lib/isodoc/iso/metadata.rb +27 -22
- data/lib/isodoc/iso/presentation_xml_convert.rb +60 -25
- data/lib/isodoc/iso/sts_convert.rb +3 -2
- data/lib/isodoc/iso/word_convert.rb +0 -2
- data/lib/metanorma/iso/processor.rb +2 -2
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +3 -3
- data/spec/asciidoctor/base_spec.rb +397 -545
- data/spec/asciidoctor/blocks_spec.rb +4 -4
- data/spec/asciidoctor/cleanup_spec.rb +15 -12
- data/spec/asciidoctor/refs_spec.rb +87 -84
- data/spec/isodoc/amd_spec.rb +261 -250
- data/spec/isodoc/i18n_spec.rb +7 -7
- data/spec/isodoc/inline_spec.rb +242 -216
- data/spec/isodoc/iso_spec.rb +3 -1
- data/spec/isodoc/postproc_spec.rb +111 -28
- data/spec/isodoc/section_spec.rb +3 -3
- data/spec/isodoc/terms_spec.rb +34 -41
- data/spec/isodoc/xref_spec.rb +3 -3
- data/spec/metanorma/processor_spec.rb +110 -14
- data/spec/vcr_cassettes/docrels.yml +37 -427
- metadata +8 -8
data/spec/isodoc/amd_spec.rb
CHANGED
@@ -2,70 +2,72 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
RSpec.describe IsoDoc do
|
4
4
|
it "cross-references notes in amendments" do
|
5
|
-
output = IsoDoc::Iso::PresentationXMLConvert.new({})
|
6
|
-
|
7
|
-
<
|
8
|
-
<
|
9
|
-
<
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
<
|
14
|
-
<
|
15
|
-
<xref target="N"/>
|
16
|
-
<xref target="note1"/>
|
17
|
-
<xref target="note2"/>
|
18
|
-
<xref target="AN"/>
|
19
|
-
<xref target="Anote1"/>
|
20
|
-
<xref target="Anote2"/>
|
21
|
-
</p>
|
22
|
-
</foreword>
|
23
|
-
</preface>
|
24
|
-
<sections>
|
25
|
-
<clause id="scope">
|
26
|
-
<title>Scope</title>
|
27
|
-
<note id="N">
|
28
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
29
|
-
</note>
|
30
|
-
<p>
|
31
|
-
<xref target="N"/>
|
32
|
-
</p>
|
33
|
-
</clause>
|
34
|
-
<terms id="terms"/>
|
35
|
-
<clause id="widgets">
|
36
|
-
<title>Widgets</title>
|
37
|
-
<clause id="widgets1">
|
38
|
-
<note id="note1">
|
39
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
40
|
-
</note>
|
41
|
-
<note id="note2">
|
42
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
|
43
|
-
</note>
|
5
|
+
output = IsoDoc::Iso::PresentationXMLConvert.new({})
|
6
|
+
.convert("test", <<~"INPUT", true)
|
7
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
8
|
+
<bibdata>
|
9
|
+
<ext>
|
10
|
+
<doctype>amendment</doctype>
|
11
|
+
</ext>
|
12
|
+
</bibdata>
|
13
|
+
<preface>
|
14
|
+
<foreword>
|
44
15
|
<p>
|
16
|
+
<xref target="N"/>
|
45
17
|
<xref target="note1"/>
|
46
18
|
<xref target="note2"/>
|
19
|
+
<xref target="AN"/>
|
20
|
+
<xref target="Anote1"/>
|
21
|
+
<xref target="Anote2"/>
|
22
|
+
</p>
|
23
|
+
</foreword>
|
24
|
+
</preface>
|
25
|
+
<sections>
|
26
|
+
<clause id="scope">
|
27
|
+
<title>Scope</title>
|
28
|
+
<note id="N">
|
29
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
30
|
+
</note>
|
31
|
+
<p>
|
32
|
+
<xref target="N"/>
|
47
33
|
</p>
|
48
34
|
</clause>
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
35
|
+
<terms id="terms"/>
|
36
|
+
<clause id="widgets">
|
37
|
+
<title>Widgets</title>
|
38
|
+
<clause id="widgets1">
|
39
|
+
<note id="note1">
|
40
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
41
|
+
</note>
|
42
|
+
<note id="note2">
|
43
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
|
44
|
+
</note>
|
45
|
+
<p>
|
46
|
+
<xref target="note1"/>
|
47
|
+
<xref target="note2"/>
|
48
|
+
</p>
|
49
|
+
</clause>
|
50
|
+
</clause>
|
51
|
+
</sections>
|
52
|
+
<annex id="annex1">
|
53
|
+
<clause id="annex1a">
|
54
|
+
<note id="AN">
|
55
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
56
|
+
</note>
|
57
|
+
</clause>
|
58
|
+
<clause id="annex1b">
|
59
|
+
<note id="Anote1">
|
60
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
61
|
+
</note>
|
62
|
+
<note id="Anote2">
|
63
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
|
64
|
+
</note>
|
65
|
+
</clause>
|
66
|
+
</annex>
|
67
|
+
</iso-standard>
|
68
|
+
INPUT
|
69
|
+
expect(xmlpp(output)
|
70
|
+
.sub(%r{<localized-strings>.*</localized-strings>}m, ""))
|
69
71
|
.to be_equivalent_to xmlpp(<<~"OUTPUT")
|
70
72
|
<?xml version='1.0'?>
|
71
73
|
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
@@ -156,7 +158,8 @@ RSpec.describe IsoDoc do
|
|
156
158
|
end
|
157
159
|
|
158
160
|
it "cross-references sections" do
|
159
|
-
output = IsoDoc::Iso::PresentationXMLConvert.new({})
|
161
|
+
output = IsoDoc::Iso::PresentationXMLConvert.new({})
|
162
|
+
.convert("test", <<~"INPUT", true)
|
160
163
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
161
164
|
<bibdata>
|
162
165
|
<ext>
|
@@ -233,104 +236,105 @@ RSpec.describe IsoDoc do
|
|
233
236
|
</bibliography>
|
234
237
|
</iso-standard>
|
235
238
|
INPUT
|
236
|
-
expect(xmlpp(output)
|
239
|
+
expect(xmlpp(output)
|
240
|
+
.sub(%r{<localized-strings>.*</localized-strings>}m, ""))
|
237
241
|
.to be_equivalent_to xmlpp(<<~"OUTPUT")
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
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
|
-
|
242
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
|
243
|
+
<bibdata>
|
244
|
+
<ext>
|
245
|
+
<doctype language=''>amendment</doctype>
|
246
|
+
</ext>
|
247
|
+
</bibdata>
|
248
|
+
|
249
|
+
<preface>
|
250
|
+
<foreword obligation='informative' displayorder='1'>
|
251
|
+
<title>Foreword</title>
|
252
|
+
<p id='A'>
|
253
|
+
This is a preamble
|
254
|
+
<xref target='C'>0.1</xref>
|
255
|
+
<xref target='C1'>0.2</xref>
|
256
|
+
<xref target='D'>Scope</xref>
|
257
|
+
<xref target='H'>[H]</xref>
|
258
|
+
<xref target='I'>[I]</xref>
|
259
|
+
<xref target='J'>[J]</xref>
|
260
|
+
<xref target='K'>[K]</xref>
|
261
|
+
<xref target='L'>[L]</xref>
|
262
|
+
<xref target='M'>Clause 4</xref>
|
263
|
+
<xref target='N'>Introduction</xref>
|
264
|
+
<xref target='O'>Clause 4.2</xref>
|
265
|
+
<xref target='P'>Annex A</xref>
|
266
|
+
<xref target='Q'>A.1</xref>
|
267
|
+
<xref target='Q1'>A.1.1</xref>
|
268
|
+
<xref target='Q2'>Annex A, Appendix 1</xref>
|
269
|
+
<xref target='R'>[R]</xref>
|
270
|
+
</p>
|
271
|
+
</foreword>
|
272
|
+
<introduction id='B' obligation='informative' displayorder='2'>
|
273
|
+
<title depth='1'>Introduction</title>
|
274
|
+
<clause id='C' inline-header='false' obligation='informative'>
|
275
|
+
<title depth='2'>Introduction Subsection</title>
|
276
|
+
</clause>
|
277
|
+
<clause id='C1' inline-header='true' obligation='informative'>Text</clause>
|
278
|
+
</introduction>
|
279
|
+
</preface>
|
280
|
+
<sections>
|
281
|
+
<clause id='D' obligation='normative' type='scope' displayorder='3'>
|
282
|
+
<title depth='1'>Scope</title>
|
283
|
+
<p id='E'>Text</p>
|
284
|
+
</clause>
|
285
|
+
<clause id='M' inline-header='false' obligation='normative' displayorder='5'>
|
286
|
+
<title depth='1'>Clause 4</title>
|
287
|
+
<clause id='N' inline-header='false' obligation='normative'>
|
288
|
+
<title depth='2'>Introduction</title>
|
289
|
+
</clause>
|
290
|
+
<clause id='O' inline-header='false' obligation='normative'>
|
291
|
+
<title depth='2'>Clause 4.2</title>
|
292
|
+
</clause>
|
293
|
+
</clause>
|
294
|
+
</sections>
|
295
|
+
<annex id='P' inline-header='false' obligation='normative' displayorder='6'>
|
296
|
+
<title>
|
297
|
+
<strong>Annex A</strong>
|
298
|
+
<br/>
|
299
|
+
(normative)
|
300
|
+
<br/>
|
301
|
+
<br/>
|
302
|
+
<strong>Annex</strong>
|
303
|
+
</title>
|
304
|
+
<clause id='Q' inline-header='false' obligation='normative'>
|
305
|
+
<title depth='2'>
|
306
|
+
A.1
|
307
|
+
<tab/>
|
308
|
+
Annex A.1
|
309
|
+
</title>
|
310
|
+
<clause id='Q1' inline-header='false' obligation='normative'>
|
311
|
+
<title depth='3'>
|
312
|
+
A.1.1
|
313
|
+
<tab/>
|
314
|
+
Annex A.1a
|
315
|
+
</title>
|
316
|
+
</clause>
|
317
|
+
</clause>
|
318
|
+
<appendix id='Q2' inline-header='false' obligation='normative'>
|
319
|
+
<title depth='2'>
|
320
|
+
Appendix 1
|
321
|
+
<tab/>
|
322
|
+
An Appendix
|
323
|
+
</title>
|
324
|
+
</appendix>
|
325
|
+
</annex>
|
326
|
+
<bibliography>
|
327
|
+
<references id='R' normative='true' obligation='informative' displayorder='4'>
|
328
|
+
<title depth='1'>Normative References</title>
|
329
|
+
</references>
|
330
|
+
<clause id='S' obligation='informative' displayorder='7'>
|
331
|
+
<title depth='1'>Bibliography</title>
|
332
|
+
<references id='T' normative='false' obligation='informative'>
|
333
|
+
<title depth='2'>Bibliography Subsection</title>
|
334
|
+
</references>
|
335
|
+
</clause>
|
336
|
+
</bibliography>
|
337
|
+
</iso-standard>
|
334
338
|
OUTPUT
|
335
339
|
end
|
336
340
|
|
@@ -428,96 +432,96 @@ RSpec.describe IsoDoc do
|
|
428
432
|
</iso-standard>
|
429
433
|
INPUT
|
430
434
|
presxml = <<~OUTPUT
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
435
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
|
436
|
+
<bibdata>
|
437
|
+
<ext>
|
438
|
+
<doctype language="">amendment</doctype>
|
439
|
+
</ext>
|
440
|
+
</bibdata>
|
441
|
+
<boilerplate>
|
442
|
+
<copyright-statement>
|
443
|
+
<clause>
|
444
|
+
<title depth="1">Copyright</title>
|
445
|
+
</clause>
|
446
|
+
</copyright-statement>
|
447
|
+
<license-statement>
|
448
|
+
<clause>
|
449
|
+
<title depth="1">License</title>
|
450
|
+
</clause>
|
451
|
+
</license-statement>
|
452
|
+
<legal-statement>
|
453
|
+
<clause>
|
454
|
+
<title depth="1">Legal</title>
|
455
|
+
</clause>
|
456
|
+
</legal-statement>
|
457
|
+
<feedback-statement>
|
458
|
+
<clause>
|
459
|
+
<title depth="1">Feedback</title>
|
460
|
+
</clause>
|
461
|
+
</feedback-statement>
|
462
|
+
</boilerplate>
|
463
|
+
<preface>
|
464
|
+
<abstract obligation="informative" displayorder="1">
|
465
|
+
<title>Abstract</title>
|
466
|
+
</abstract>
|
467
|
+
<foreword obligation="informative" displayorder="2">
|
468
|
+
<title>Foreword</title>
|
469
|
+
<p id="A">This is a preamble</p>
|
470
|
+
</foreword>
|
471
|
+
<introduction id="B" obligation="informative" displayorder="3">
|
472
|
+
<title depth="1">Introduction</title>
|
473
|
+
<clause id="C" inline-header="false" obligation="informative">
|
474
|
+
<title depth="2">Introduction Subsection</title>
|
475
|
+
</clause>
|
476
|
+
</introduction>
|
477
|
+
<clause id="B1" displayorder="4">
|
478
|
+
<title depth="1">Dedication</title>
|
479
|
+
</clause>
|
480
|
+
<clause id="B2" displayorder="5">
|
481
|
+
<title depth="1">Note to reader</title>
|
482
|
+
</clause>
|
483
|
+
<acknowledgements obligation="informative" displayorder="6">
|
484
|
+
<title>Acknowledgements</title>
|
485
|
+
</acknowledgements>
|
486
|
+
</preface>
|
487
|
+
<sections>
|
488
|
+
<clause id="M" inline-header="false" obligation="normative" displayorder="8">
|
489
|
+
<title depth="1">Clause 4</title>
|
490
|
+
<clause id="N" inline-header="false" obligation="normative">
|
491
|
+
<title depth="2">Introduction</title>
|
492
|
+
</clause>
|
493
|
+
<clause id="O" inline-header="false" obligation="normative">
|
494
|
+
<title depth="2">Clause 4.2</title>
|
495
|
+
</clause>
|
496
|
+
<clause id="O1" inline-header="true" obligation="normative"/>
|
497
|
+
</clause>
|
498
|
+
<clause id="D" obligation="normative" displayorder="9">
|
499
|
+
<title depth="1">Scope</title>
|
500
|
+
<p id="E">Text</p>
|
501
|
+
</clause>
|
502
|
+
</sections>
|
503
|
+
<annex id="P" inline-header="false" obligation="normative" displayorder="10">
|
504
|
+
<title><strong>Annex A</strong><br/>(normative)<br/><br/><strong>Annex</strong></title>
|
505
|
+
<clause id="Q" inline-header="false" obligation="normative">
|
506
|
+
<title depth="2">A.1<tab/>Annex A.1</title>
|
507
|
+
<clause id="Q1" inline-header="false" obligation="normative">
|
508
|
+
<title depth="3">A.1.1<tab/>Annex A.1a</title>
|
509
|
+
</clause>
|
510
|
+
</clause>
|
511
|
+
</annex>
|
512
|
+
<annex id="P1" inline-header="false" obligation="normative" displayorder="11"><title><strong>Annex B</strong><br/>(normative)</title></annex>
|
513
|
+
<bibliography>
|
514
|
+
<references id="R" normative="true" obligation="informative" displayorder="7">
|
515
|
+
<title depth="1">Normative References</title>
|
516
|
+
</references>
|
517
|
+
<clause id="S" obligation="informative" displayorder="12">
|
518
|
+
<title depth="1">Bibliography</title>
|
519
|
+
<references id="T" normative="false" obligation="informative">
|
520
|
+
<title depth="2">Bibliography Subsection</title>
|
521
|
+
</references>
|
522
|
+
</clause>
|
523
|
+
</bibliography>
|
524
|
+
</iso-standard>
|
521
525
|
OUTPUT
|
522
526
|
html = <<~OUTPUT
|
523
527
|
<html lang="en" xmlns:epub="http://www.idpf.org/2007/ops">
|
@@ -634,7 +638,8 @@ RSpec.describe IsoDoc do
|
|
634
638
|
OUTPUT
|
635
639
|
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", input, true))
|
636
640
|
.sub(%r{<localized-strings>.*</localized-strings>}m, "")).to be_equivalent_to xmlpp(presxml)
|
637
|
-
expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", presxml,
|
641
|
+
expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", presxml,
|
642
|
+
true))).to be_equivalent_to xmlpp(html)
|
638
643
|
end
|
639
644
|
|
640
645
|
it "processes IsoXML metadata" do
|
@@ -642,7 +647,7 @@ RSpec.describe IsoDoc do
|
|
642
647
|
_ = c.convert_init(<<~"INPUT", "test", false)
|
643
648
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
644
649
|
INPUT
|
645
|
-
|
650
|
+
input = <<~INPUT
|
646
651
|
<iso-standard xmlns="https://www.metanorma.org/ns/iso">
|
647
652
|
<bibdata type="standard">
|
648
653
|
<title format="text/plain" language="en" type="main">Introduction — Main Title — Title — Title Part — Mass fraction of
|
@@ -733,6 +738,7 @@ RSpec.describe IsoDoc do
|
|
733
738
|
<sections/>
|
734
739
|
</iso-standard>
|
735
740
|
INPUT
|
741
|
+
output = <<~OUTPUT
|
736
742
|
{:accesseddate=>"XXX",
|
737
743
|
:agency=>"ISO",
|
738
744
|
:circulateddate=>"XXX",
|
@@ -792,6 +798,8 @@ RSpec.describe IsoDoc do
|
|
792
798
|
:vote_starteddate=>"XXX",
|
793
799
|
:wg=>"C 3"}
|
794
800
|
OUTPUT
|
801
|
+
expect(metadata(c.info(Nokogiri::XML(input), nil)))
|
802
|
+
.to be_equivalent_to output
|
795
803
|
end
|
796
804
|
|
797
805
|
it "processes IsoXML metadata in French" do
|
@@ -803,7 +811,7 @@ RSpec.describe IsoDoc do
|
|
803
811
|
</bibdata>
|
804
812
|
</iso-standard>
|
805
813
|
INPUT
|
806
|
-
|
814
|
+
input = <<~INPUT
|
807
815
|
<iso-standard xmlns="https://www.metanorma.org/ns/iso">
|
808
816
|
<bibdata type="standard">
|
809
817
|
<title format="text/plain" language="en" type="main">Introduction — Main Title — Title — Title Part — Mass fraction of
|
@@ -895,6 +903,7 @@ RSpec.describe IsoDoc do
|
|
895
903
|
<sections/>
|
896
904
|
</iso-standard>
|
897
905
|
INPUT
|
906
|
+
output = <<~OUTPUT
|
898
907
|
{:accesseddate=>"XXX",
|
899
908
|
:agency=>"ISO",
|
900
909
|
:circulateddate=>"XXX",
|
@@ -954,6 +963,8 @@ RSpec.describe IsoDoc do
|
|
954
963
|
:vote_starteddate=>"XXX",
|
955
964
|
:wg=>"C 3"}
|
956
965
|
OUTPUT
|
966
|
+
expect(metadata(c.info(Nokogiri::XML(input), nil)))
|
967
|
+
.to be_equivalent_to output
|
957
968
|
end
|
958
969
|
|
959
970
|
it "processes middle title" do
|