metanorma-iso 1.5.11 → 1.6.1
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/.github/workflows/rake.yml +83 -0
- data/README.adoc +5 -6
- data/lib/asciidoctor/iso/base.rb +5 -5
- data/lib/asciidoctor/iso/basicdoc.rng +50 -3
- data/lib/asciidoctor/iso/boilerplate-fr.xml +2 -2
- data/lib/asciidoctor/iso/cleanup.rb +33 -6
- data/lib/asciidoctor/iso/front.rb +5 -0
- data/lib/asciidoctor/iso/isodoc.rng +61 -3
- data/lib/asciidoctor/iso/isostandard-amd.rng +8 -4
- data/lib/asciidoctor/iso/isostandard.rng +27 -10
- data/lib/asciidoctor/iso/validate.rb +13 -1
- data/lib/asciidoctor/iso/validate_section.rb +21 -9
- data/lib/isodoc/iso/base_convert.rb +2 -1
- data/lib/isodoc/iso/html/header.html +4 -8
- data/lib/isodoc/iso/html/htmlstyle.css +1 -1
- data/lib/isodoc/iso/html/htmlstyle.scss +1 -1
- data/lib/isodoc/iso/html/isodoc.css +42 -42
- data/lib/isodoc/iso/html/isodoc.scss +42 -42
- data/lib/isodoc/iso/html/style-human.css +9 -9
- data/lib/isodoc/iso/html/style-human.scss +7 -7
- data/lib/isodoc/iso/html/style-iso.css +7 -7
- data/lib/isodoc/iso/html/style-iso.scss +5 -5
- data/lib/isodoc/iso/html/wordstyle.css +67 -67
- data/lib/isodoc/iso/html/wordstyle.scss +67 -67
- data/lib/isodoc/iso/html_convert.rb +4 -0
- data/lib/isodoc/iso/i18n-en.yaml +1 -0
- data/lib/isodoc/iso/i18n-fr.yaml +2 -0
- data/lib/isodoc/iso/i18n-zh-Hans.yaml +1 -0
- data/lib/isodoc/iso/i18n.rb +10 -11
- data/lib/isodoc/iso/iso.amendment.xsl +381 -86
- data/lib/isodoc/iso/iso.international-standard.xsl +381 -86
- data/lib/isodoc/iso/metadata.rb +1 -0
- data/lib/isodoc/iso/sections.rb +1 -1
- data/lib/isodoc/iso/word_convert.rb +4 -0
- data/lib/isodoc/iso/xref.rb +34 -8
- data/lib/metanorma/iso/processor.rb +11 -9
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +2 -2
- data/spec/asciidoctor-iso/amd_spec.rb +14 -14
- data/spec/asciidoctor-iso/base_spec.rb +20 -18
- data/spec/asciidoctor-iso/blocks_spec.rb +22 -22
- data/spec/asciidoctor-iso/cleanup_spec.rb +36 -30
- data/spec/asciidoctor-iso/inline_spec.rb +7 -7
- data/spec/asciidoctor-iso/lists_spec.rb +9 -9
- data/spec/asciidoctor-iso/refs_spec.rb +177 -146
- data/spec/asciidoctor-iso/section_spec.rb +12 -7
- data/spec/asciidoctor-iso/table_spec.rb +4 -4
- data/spec/asciidoctor-iso/validate_spec.rb +401 -85
- data/spec/isodoc/amd_spec.rb +13 -13
- data/spec/isodoc/blocks_spec.rb +1 -0
- data/spec/isodoc/metadata_spec.rb +2 -0
- data/spec/isodoc/ref_spec.rb +2 -2
- data/spec/isodoc/section_spec.rb +20 -0
- data/spec/isodoc/xref_spec.rb +12 -0
- metadata +7 -12
- data/.github/workflows/macos.yml +0 -49
- data/.github/workflows/ubuntu.yml +0 -53
- data/.github/workflows/windows.yml +0 -50
- data/lib/asciidoctor/iso/macros.rb +0 -21
- data/lib/asciidoctor/iso/term_lookup_cleanup.rb +0 -86
- data/spec/asciidoctor-iso/macros_spec.rb +0 -310
@@ -2,7 +2,7 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
RSpec.describe Asciidoctor::ISO do
|
4
4
|
it "removes empty text elements" do
|
5
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
5
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
6
6
|
#{ASCIIDOC_BLANK_HDR}
|
7
7
|
== {blank}
|
8
8
|
INPUT
|
@@ -17,7 +17,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
17
17
|
end
|
18
18
|
|
19
19
|
it "processes stem-only terms as admitted" do
|
20
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
20
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
21
21
|
#{ASCIIDOC_BLANK_HDR}
|
22
22
|
== Terms and Definitions
|
23
23
|
|
@@ -53,7 +53,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
53
53
|
end
|
54
54
|
|
55
55
|
it "moves term domains out of the term definition paragraph" do
|
56
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
56
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
57
57
|
#{ASCIIDOC_BLANK_HDR}
|
58
58
|
== Terms and Definitions
|
59
59
|
|
@@ -77,7 +77,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
77
77
|
end
|
78
78
|
|
79
79
|
it "permits multiple blocks in term definition paragraph" do
|
80
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
80
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
81
81
|
= Document title
|
82
82
|
Author
|
83
83
|
:docfile: test.adoc
|
@@ -124,8 +124,8 @@ RSpec.describe Asciidoctor::ISO do
|
|
124
124
|
OUTPUT
|
125
125
|
end
|
126
126
|
|
127
|
-
it "
|
128
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
127
|
+
it "keeps any initial boilerplate from terms and definitions" do
|
128
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
129
129
|
#{ASCIIDOC_BLANK_HDR}
|
130
130
|
== Terms and Definitions
|
131
131
|
|
@@ -142,6 +142,12 @@ RSpec.describe Asciidoctor::ISO do
|
|
142
142
|
<terms id="_" obligation="normative"><title>Terms and definitions</title>
|
143
143
|
|
144
144
|
#{TERM_BOILERPLATE}
|
145
|
+
<p id='_'>I am boilerplate</p>
|
146
|
+
<ul id='_'>
|
147
|
+
<li>
|
148
|
+
<p id='_'>So am I</p>
|
149
|
+
</li>
|
150
|
+
</ul>
|
145
151
|
<term id="term-time">
|
146
152
|
<preferred>Time</preferred>
|
147
153
|
<definition><p id="_">This paragraph is extraneous</p></definition>
|
@@ -152,7 +158,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
152
158
|
end
|
153
159
|
|
154
160
|
it "moves notes inside preceding blocks, if they are not at clause end, and the blocks are not delimited" do
|
155
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
161
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
156
162
|
#{ASCIIDOC_BLANK_HDR}
|
157
163
|
[stem]
|
158
164
|
++++
|
@@ -177,7 +183,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
177
183
|
end
|
178
184
|
|
179
185
|
it "does not move notes inside preceding blocks, if they are at clause end" do
|
180
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
186
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
181
187
|
#{ASCIIDOC_BLANK_HDR}
|
182
188
|
[source,ruby]
|
183
189
|
[1...x].each do |y|
|
@@ -198,7 +204,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
198
204
|
end
|
199
205
|
|
200
206
|
it "converts xrefs to references into erefs" do
|
201
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
207
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
202
208
|
#{ASCIIDOC_BLANK_HDR}
|
203
209
|
<<iso216>>
|
204
210
|
|
@@ -238,7 +244,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
238
244
|
end
|
239
245
|
|
240
246
|
it "extracts localities from erefs" do
|
241
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
247
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
242
248
|
#{ASCIIDOC_BLANK_HDR}
|
243
249
|
<<iso216,whole,clause=3,example=9-11,locality:prelude=33,locality:entirety:the reference>>
|
244
250
|
|
@@ -279,7 +285,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
279
285
|
|
280
286
|
|
281
287
|
it "strips type from xrefs" do
|
282
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
288
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
283
289
|
#{ASCIIDOC_BLANK_HDR}
|
284
290
|
<<iso216>>
|
285
291
|
|
@@ -315,7 +321,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
315
321
|
end
|
316
322
|
|
317
323
|
it "processes localities in term sources" do
|
318
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
324
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
319
325
|
#{ASCIIDOC_BLANK_HDR}
|
320
326
|
== Terms and Definitions
|
321
327
|
|
@@ -346,7 +352,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
346
352
|
end
|
347
353
|
|
348
354
|
it "removes extraneous material from Normative References" do
|
349
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
355
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
350
356
|
#{ASCIIDOC_BLANK_HDR}
|
351
357
|
[bibliography]
|
352
358
|
== Normative References
|
@@ -378,7 +384,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
378
384
|
end
|
379
385
|
|
380
386
|
it "inserts IDs into paragraphs" do
|
381
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
387
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
382
388
|
#{ASCIIDOC_BLANK_HDR}
|
383
389
|
Paragraph
|
384
390
|
INPUT
|
@@ -391,7 +397,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
391
397
|
end
|
392
398
|
|
393
399
|
it "inserts IDs into notes" do
|
394
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
400
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
395
401
|
#{ASCIIDOC_BLANK_HDR}
|
396
402
|
[example]
|
397
403
|
====
|
@@ -411,7 +417,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
411
417
|
end
|
412
418
|
|
413
419
|
it "moves table key inside table" do
|
414
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
420
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
415
421
|
#{ASCIIDOC_BLANK_HDR}
|
416
422
|
|===
|
417
423
|
|a |b |c
|
@@ -430,7 +436,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
430
436
|
<td valign="top" align="left">c</td>
|
431
437
|
</tr>
|
432
438
|
</tbody>
|
433
|
-
<dl id="_">
|
439
|
+
<dl id="_" key="true">
|
434
440
|
<dt>a</dt>
|
435
441
|
<dd>
|
436
442
|
<p id="_">b</p>
|
@@ -443,7 +449,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
443
449
|
end
|
444
450
|
|
445
451
|
it "processes headerrows attribute for table without header rows" do
|
446
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
452
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
447
453
|
#{ASCIIDOC_BLANK_HDR}
|
448
454
|
[headerrows=3]
|
449
455
|
|===
|
@@ -482,7 +488,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
482
488
|
end
|
483
489
|
|
484
490
|
it "processes headerrows attribute for table with header rows" do
|
485
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
491
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
486
492
|
#{ASCIIDOC_BLANK_HDR}
|
487
493
|
[headerrows=3]
|
488
494
|
|===
|
@@ -527,7 +533,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
527
533
|
end
|
528
534
|
|
529
535
|
it "moves table notes inside table" do
|
530
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
536
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
531
537
|
#{ASCIIDOC_BLANK_HDR}
|
532
538
|
|===
|
533
539
|
|a |b |c
|
@@ -558,7 +564,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
558
564
|
end
|
559
565
|
|
560
566
|
it "moves formula key inside formula" do
|
561
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
567
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
562
568
|
#{ASCIIDOC_BLANK_HDR}
|
563
569
|
[stem]
|
564
570
|
++++
|
@@ -572,7 +578,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
572
578
|
#{BLANK_HDR}
|
573
579
|
<sections><formula id="_">
|
574
580
|
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>F</mi><mi>or</mi><mi>μ</mi><mi>l</mi><mi>a</mi></math></stem>
|
575
|
-
<dl id="_">
|
581
|
+
<dl id="_" key="true">
|
576
582
|
<dt>a</dt>
|
577
583
|
<dd>
|
578
584
|
<p id="_">b</p>
|
@@ -585,7 +591,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
585
591
|
end
|
586
592
|
|
587
593
|
it "moves footnotes inside figures" do
|
588
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
594
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
589
595
|
#{ASCIIDOC_BLANK_HDR}
|
590
596
|
image::spec/examples/rice_images/rice_image1.png[]
|
591
597
|
|
@@ -609,7 +615,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
609
615
|
end
|
610
616
|
|
611
617
|
it "moves figure key inside figure" do
|
612
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
618
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
613
619
|
#{ASCIIDOC_BLANK_HDR}
|
614
620
|
image::spec/examples/rice_images/rice_image1.png[]
|
615
621
|
|
@@ -620,7 +626,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
620
626
|
#{BLANK_HDR}
|
621
627
|
<sections><figure id="_">
|
622
628
|
<image src="spec/examples/rice_images/rice_image1.png" id="_" mimetype="image/png" height="auto" width="auto"/>
|
623
|
-
<dl id="_">
|
629
|
+
<dl id="_" key="true">
|
624
630
|
<dt>a</dt>
|
625
631
|
<dd>
|
626
632
|
<p id="_">b</p>
|
@@ -634,7 +640,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
634
640
|
end
|
635
641
|
|
636
642
|
it "numbers bibliographic notes and footnotes sequentially" do
|
637
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
643
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
638
644
|
#{ASCIIDOC_BLANK_HDR}
|
639
645
|
footnote:[Footnote]
|
640
646
|
|
@@ -678,7 +684,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
678
684
|
<abbreviation>ISO</abbreviation>
|
679
685
|
</organization>
|
680
686
|
</contributor>
|
681
|
-
<note format="text/plain" type="
|
687
|
+
<note format="text/plain" type="Unpublished-Status">The standard is in press</note>
|
682
688
|
</bibitem>
|
683
689
|
</references>
|
684
690
|
</bibliography>
|
@@ -687,7 +693,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
687
693
|
end
|
688
694
|
|
689
695
|
it "defaults section obligations" do
|
690
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
696
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
691
697
|
#{ASCIIDOC_BLANK_HDR}
|
692
698
|
|
693
699
|
== Clause
|
@@ -712,7 +718,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
712
718
|
end
|
713
719
|
|
714
720
|
it "extends clause levels past 5" do
|
715
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
721
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
716
722
|
#{ASCIIDOC_BLANK_HDR}
|
717
723
|
|
718
724
|
== Clause1
|
@@ -775,7 +781,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
775
781
|
end
|
776
782
|
|
777
783
|
it "reorders references in bibliography, and renumbers citations accordingly" do
|
778
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
784
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
779
785
|
#{ASCIIDOC_BLANK_HDR}
|
780
786
|
|
781
787
|
== Clause 1
|
@@ -2,7 +2,7 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
RSpec.describe Asciidoctor::ISO do
|
4
4
|
it "processes inline_quoted formatting" do
|
5
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
5
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
6
6
|
#{ASCIIDOC_BLANK_HDR}
|
7
7
|
_emphasis_
|
8
8
|
*strong*
|
@@ -47,7 +47,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
47
47
|
end
|
48
48
|
|
49
49
|
it "processes breaks" do
|
50
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
50
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
51
51
|
#{ASCIIDOC_BLANK_HDR}
|
52
52
|
Line break +
|
53
53
|
line break
|
@@ -66,7 +66,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
66
66
|
end
|
67
67
|
|
68
68
|
it "processes links" do
|
69
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
69
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
70
70
|
#{ASCIIDOC_BLANK_HDR}
|
71
71
|
mailto:fred@example.com
|
72
72
|
http://example.com[]
|
@@ -83,7 +83,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
83
83
|
end
|
84
84
|
|
85
85
|
it "processes bookmarks" do
|
86
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
86
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
87
87
|
#{ASCIIDOC_BLANK_HDR}
|
88
88
|
Text [[bookmark]] Text
|
89
89
|
INPUT
|
@@ -96,7 +96,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
96
96
|
end
|
97
97
|
|
98
98
|
it "processes crossreferences" do
|
99
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
99
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
100
100
|
#{ASCIIDOC_BLANK_HDR}
|
101
101
|
[[reference]]
|
102
102
|
== Section
|
@@ -121,7 +121,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
121
121
|
end
|
122
122
|
|
123
123
|
it "processes bibliographic anchors" do
|
124
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
124
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
125
125
|
#{ASCIIDOC_BLANK_HDR}
|
126
126
|
[bibliography]
|
127
127
|
== Normative References
|
@@ -152,7 +152,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
152
152
|
end
|
153
153
|
|
154
154
|
it "processes footnotes" do
|
155
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
155
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
156
156
|
#{ASCIIDOC_BLANK_HDR}
|
157
157
|
Hello!footnote:[Footnote text]
|
158
158
|
INPUT
|
@@ -2,7 +2,7 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
RSpec.describe Asciidoctor::ISO do
|
4
4
|
it "processes simple lists" do
|
5
|
-
output = Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
5
|
+
output = Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
6
6
|
#{ASCIIDOC_BLANK_HDR}
|
7
7
|
* List 1
|
8
8
|
* List 2
|
@@ -28,7 +28,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
28
28
|
</li>
|
29
29
|
<li>
|
30
30
|
<p id="_">List 3</p>
|
31
|
-
<ol id="_"
|
31
|
+
<ol id="_">
|
32
32
|
<li>
|
33
33
|
<p id="_">List A</p>
|
34
34
|
</li>
|
@@ -57,7 +57,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
57
57
|
end
|
58
58
|
|
59
59
|
it "processes complex lists" do
|
60
|
-
output = Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
60
|
+
output = Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
61
61
|
#{ASCIIDOC_BLANK_HDR}
|
62
62
|
[[id]]
|
63
63
|
* First
|
@@ -107,13 +107,13 @@ RSpec.describe Asciidoctor::ISO do
|
|
107
107
|
<li><p id="_">Second</p><p id="_">entry1</p>
|
108
108
|
<p id="_">entry2</p></li>
|
109
109
|
</ul>
|
110
|
-
<ol id="id1"
|
110
|
+
<ol id="id1">
|
111
111
|
<li>
|
112
112
|
<p id="_">First</p>
|
113
113
|
</li>
|
114
114
|
<li>
|
115
115
|
<p id="_">Second</p>
|
116
|
-
<ol id="_"
|
116
|
+
<ol id="_">
|
117
117
|
<li>
|
118
118
|
<p id="_">Third</p>
|
119
119
|
</li>
|
@@ -129,19 +129,19 @@ RSpec.describe Asciidoctor::ISO do
|
|
129
129
|
<p id="_">Sixth</p>
|
130
130
|
</li>
|
131
131
|
</ol>
|
132
|
-
<ol id="_"
|
132
|
+
<ol id="_">
|
133
133
|
<li>
|
134
134
|
<p id="_">A</p>
|
135
135
|
</li>
|
136
136
|
<li>
|
137
137
|
<p id="_">B</p>
|
138
|
-
<ol id="_"
|
138
|
+
<ol id="_">
|
139
139
|
<li>
|
140
140
|
<p id="_">C</p>
|
141
141
|
</li>
|
142
142
|
<li>
|
143
143
|
<p id="_">D</p>
|
144
|
-
<ol id="_"
|
144
|
+
<ol id="_">
|
145
145
|
<li>
|
146
146
|
<p id="_">E</p>
|
147
147
|
</li>
|
@@ -165,7 +165,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
165
165
|
end
|
166
166
|
|
167
167
|
it "anchors lists and list items" do
|
168
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
168
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
169
169
|
#{ASCIIDOC_BLANK_HDR}
|
170
170
|
[[id1]]
|
171
171
|
* [[id2]] List item
|
@@ -4,38 +4,177 @@ require "relaton_ietf"
|
|
4
4
|
|
5
5
|
RSpec.describe Asciidoctor::ISO do
|
6
6
|
it "processes draft ISO reference" do
|
7
|
-
|
7
|
+
mock_fdis
|
8
|
+
#mock_isobib_get_123
|
9
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
10
|
+
#{ISOBIB_BLANK_HDR}
|
11
|
+
== Clause
|
12
|
+
<<iso123>>
|
13
|
+
<<iso123>>
|
14
|
+
A.footnote:[a footnote]
|
15
|
+
<<fdis>>
|
16
|
+
<<fdis>>
|
8
17
|
|
9
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
10
|
-
#{ASCIIDOC_BLANK_HDR}
|
11
18
|
[bibliography]
|
12
19
|
== Normative References
|
13
20
|
|
14
21
|
* [[[iso123,ISO 123:--]]] footnote:[The standard is in press] _Standard_
|
22
|
+
* [[[fdis,ISO/FDIS 17664-1]]] Title
|
15
23
|
INPUT
|
16
24
|
#{BLANK_HDR}
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
25
|
+
<sections>
|
26
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
27
|
+
<title>Clause</title>
|
28
|
+
<p id='_'>
|
29
|
+
<eref type='inline' bibitemid='iso123' citeas='ISO 123:--'/>
|
30
|
+
<fn reference='1'>The standard is in press</fn>
|
31
|
+
<eref type='inline' bibitemid='iso123' citeas='ISO 123:--'/>
|
32
|
+
A.
|
33
|
+
<fn reference='2'>
|
34
|
+
<p id='_'>a footnote</p>
|
35
|
+
</fn>
|
36
|
+
<eref type='inline' bibitemid='fdis' citeas='ISO/FDIS 17664-1'/>
|
37
|
+
<fn reference='3'>
|
38
|
+
<p id='_'>Under preparation. (Stage at the time of publication ISO/FDIS 17664-1).</p>
|
39
|
+
</fn>
|
40
|
+
<eref type='inline' bibitemid='fdis' citeas='ISO/FDIS 17664-1'/>
|
41
|
+
</p>
|
42
|
+
</clause>
|
43
|
+
</sections>
|
44
|
+
<bibliography>
|
45
|
+
<references id='_' normative='true' obligation='informative'>
|
46
|
+
<title>Normative references</title>
|
47
|
+
<p id='_'>
|
48
|
+
The following documents are referred to in the text in such a way that
|
49
|
+
some or all of their content constitutes requirements of this document.
|
50
|
+
For dated references, only the edition cited applies. For undated
|
51
|
+
references, the latest edition of the referenced document (including any
|
52
|
+
amendments) applies.
|
53
|
+
</p>
|
54
|
+
<bibitem id='iso123' type='standard'>
|
55
|
+
<title format='text/plain'>Standard</title>
|
56
|
+
<docidentifier type='ISO'>ISO 123:—</docidentifier>
|
57
|
+
<docnumber>123</docnumber>
|
58
|
+
<date type='published'>
|
59
|
+
<on>–</on>
|
60
|
+
</date>
|
61
|
+
<contributor>
|
62
|
+
<role type='publisher'/>
|
63
|
+
<organization>
|
64
|
+
<name>International Organization for Standardization</name>
|
65
|
+
<abbreviation>ISO</abbreviation>
|
66
|
+
</organization>
|
67
|
+
</contributor>
|
68
|
+
<note format='text/plain' type='Unpublished-Status'>The standard is in press</note>
|
69
|
+
</bibitem>
|
70
|
+
<bibitem id='fdis' type='standard'>
|
71
|
+
<fetched>#{Date.today}</fetched>
|
72
|
+
<title type='title-intro' format='text/plain' language='fr' script='Latn'>Traitement de produits de soins de santé</title>
|
73
|
+
<title type='title-main' format='text/plain' language='fr' script='Latn'>
|
74
|
+
Informations relatives au traitement des dispositifs médicaux à
|
75
|
+
fournir par le fabricant du dispositif
|
76
|
+
</title>
|
77
|
+
<title type='title-part' format='text/plain' language='fr' script='Latn'>Partie 1: Titre manque</title>
|
78
|
+
<title type='main' format='text/plain' language='fr' script='Latn'>
|
79
|
+
Traitement de produits de soins de santé — Informations relatives au
|
80
|
+
traitement des dispositifs médicaux à fournir par le fabricant du
|
81
|
+
dispositif — Partie 1: Titre manque
|
82
|
+
</title>
|
83
|
+
<uri type='src'>https://www.iso.org/standard/81720.html</uri>
|
84
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/08/17/81720.detail.rss</uri>
|
85
|
+
<docidentifier type='ISO'>ISO/FDIS 17664-1</docidentifier>
|
86
|
+
<docidentifier type='URN'>urn:iso:std:iso-fdis:17664:-1:stage-50.00:ed-1:fr</docidentifier>
|
87
|
+
<docnumber>17664</docnumber>
|
88
|
+
<contributor>
|
89
|
+
<role type='publisher'/>
|
90
|
+
<organization>
|
91
|
+
<name>International Organization for Standardization</name>
|
92
|
+
<abbreviation>ISO</abbreviation>
|
93
|
+
<uri>www.iso.org</uri>
|
94
|
+
</organization>
|
95
|
+
</contributor>
|
96
|
+
<edition>1</edition>
|
97
|
+
<note type='Unpublished-Status'>
|
98
|
+
<p id='_'>Under preparation. (Stage at the time of publication ISO/FDIS 17664-1).</p>
|
99
|
+
</note>
|
100
|
+
<language>en</language>
|
101
|
+
<language>fr</language>
|
102
|
+
<script>Latn</script>
|
103
|
+
<status>
|
104
|
+
<stage>50</stage>
|
105
|
+
<substage>00</substage>
|
106
|
+
</status>
|
107
|
+
<copyright>
|
108
|
+
<from>unknown</from>
|
109
|
+
<owner>
|
110
|
+
<organization>
|
111
|
+
<name>ISO/FDIS</name>
|
112
|
+
</organization>
|
113
|
+
</owner>
|
114
|
+
</copyright>
|
115
|
+
<relation type='obsoletes'>
|
116
|
+
<bibitem type='standard'>
|
117
|
+
<formattedref format='text/plain'>ISO 17664:2017</formattedref>
|
118
|
+
</bibitem>
|
119
|
+
</relation>
|
120
|
+
<relation type='instance'>
|
121
|
+
<bibitem type='standard'>
|
122
|
+
<fetched>2020-11-03</fetched>
|
123
|
+
<title type='title-intro' format='text/plain' language='fr' script='Latn'>Traitement de produits de soins de santé</title>
|
124
|
+
<title type='title-main' format='text/plain' language='fr' script='Latn'>
|
125
|
+
Informations relatives au traitement des dispositifs médicaux à
|
126
|
+
fournir par le fabricant du dispositif
|
127
|
+
</title>
|
128
|
+
<title type='title-part' format='text/plain' language='fr' script='Latn'>Partie 1: Titre manque</title>
|
129
|
+
<title type='main' format='text/plain' language='fr' script='Latn'>
|
130
|
+
Traitement de produits de soins de santé — Informations relatives
|
131
|
+
au traitement des dispositifs médicaux à fournir par le fabricant
|
132
|
+
du dispositif — Partie 1: Titre manque
|
133
|
+
</title>
|
134
|
+
<uri type='src'>https://www.iso.org/standard/81720.html</uri>
|
135
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/08/17/81720.detail.rss</uri>
|
136
|
+
<docidentifier type='ISO'>ISO/FDIS 17664-1</docidentifier>
|
137
|
+
<docidentifier type='URN'>urn:iso:std:iso-fdis:17664:-1:stage-50.00:ed-1:fr</docidentifier>
|
138
|
+
<docnumber>17664</docnumber>
|
139
|
+
<contributor>
|
140
|
+
<role type='publisher'/>
|
141
|
+
<organization>
|
142
|
+
<name>International Organization for Standardization</name>
|
143
|
+
<abbreviation>ISO</abbreviation>
|
144
|
+
<uri>www.iso.org</uri>
|
145
|
+
</organization>
|
146
|
+
</contributor>
|
147
|
+
<edition>1</edition>
|
148
|
+
<note type='Unpublished-Status'>
|
149
|
+
<p id='_'>Under preparation. (Stage at the time of publication ISO/FDIS 17664-1).</p>
|
150
|
+
</note>
|
151
|
+
<language>en</language>
|
152
|
+
<language>fr</language>
|
153
|
+
<script>Latn</script>
|
154
|
+
<status>
|
155
|
+
<stage>50</stage>
|
156
|
+
<substage>00</substage>
|
157
|
+
</status>
|
158
|
+
<copyright>
|
159
|
+
<from>unknown</from>
|
160
|
+
<owner>
|
161
|
+
<organization>
|
162
|
+
<name>ISO/FDIS</name>
|
163
|
+
</organization>
|
164
|
+
</owner>
|
165
|
+
</copyright>
|
166
|
+
<relation type='obsoletes'>
|
167
|
+
<bibitem type='standard'>
|
168
|
+
<formattedref format='text/plain'>ISO 17664:2017</formattedref>
|
169
|
+
</bibitem>
|
170
|
+
</relation>
|
171
|
+
<place>Geneva</place>
|
172
|
+
</bibitem>
|
173
|
+
</relation>
|
174
|
+
<place>Geneva</place>
|
175
|
+
</bibitem>
|
176
|
+
</references>
|
177
|
+
</bibliography>
|
39
178
|
</iso-standard>
|
40
179
|
OUTPUT
|
41
180
|
end
|
@@ -43,7 +182,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
43
182
|
it "processes all-parts ISO reference" do
|
44
183
|
#stub_fetch_ref(all_parts: true)
|
45
184
|
|
46
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
185
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
47
186
|
#{ASCIIDOC_BLANK_HDR}
|
48
187
|
|
49
188
|
== Clause
|
@@ -90,7 +229,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
90
229
|
end
|
91
230
|
|
92
231
|
it "processes non-ISO reference in Normative References" do
|
93
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
232
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
94
233
|
#{ASCIIDOC_BLANK_HDR}
|
95
234
|
[bibliography]
|
96
235
|
== Normative References
|
@@ -117,7 +256,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
117
256
|
end
|
118
257
|
|
119
258
|
it "processes non-ISO reference in Bibliography" do
|
120
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
259
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
121
260
|
#{ASCIIDOC_BLANK_HDR}
|
122
261
|
[bibliography]
|
123
262
|
== Bibliography
|
@@ -141,132 +280,16 @@ RSpec.describe Asciidoctor::ISO do
|
|
141
280
|
OUTPUT
|
142
281
|
end
|
143
282
|
|
144
|
-
private
|
145
|
-
|
146
283
|
private
|
147
284
|
|
148
285
|
def mock_isobib_get_123
|
149
|
-
expect(
|
150
|
-
|
286
|
+
expect(RelatonIso::IsoBibliography).to receive(:get).with("ISO 123", nil, {:lang=>"en", :title=>"Title", :usrlbl=>nil}) do
|
287
|
+
RelatonIsoBib::XMLParser.from_xml(<<~"OUTPUT")
|
151
288
|
<bibitem type=\"international-standard\" id=\"ISO123\">\n <fetched>#{Date.today}</fetched>\n<title format=\"text/plain\" language=\"en\" script=\"Latn\">Rubber latex -- Sampling</title>\n <title format=\"text/plain\" language=\"fr\" script=\"Latn\">Latex de caoutchouc -- ?chantillonnage</title>\n <uri type=\"src\">https://www.iso.org/standard/23281.html</uri>\n <uri type=\"obp\">https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>\n <uri type=\"rss\">https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>\n <docidentifier type="ISO">ISO 123:2001</docidentifier>\n <date type=\"published\">\n <on>2001</on>\n </date>\n <contributor>\n <role type=\"publisher\"/>\n <organization>\n <name>International Organization for Standardization</name>\n <abbreviation>ISO</abbreviation>\n <uri>www.iso.org</uri>\n </organization>\n </contributor>\n <edition>3</edition>\n <language>en</language>\n <language>fr</language>\n <script>Latn</script>\n <status>Published</status>\n <copyright>\n <from>2001</from>\n <owner>\n <organization>\n <name>ISO</name>\n <abbreviation></abbreviation>\n </organization>\n </owner>\n </copyright>\n <relation type=\"obsoletes\">\n <bibitem>\n <formattedref>ISO 123:1985</formattedref>\n </bibitem>\n </relation>\n <relation type=\"updates\">\n <bibitem>\n <formattedref>ISO 123:2001</formattedref>\n </bibitem>\n </relation>\n</bibitem>
|
152
289
|
OUTPUT
|
153
290
|
end
|
154
291
|
end
|
155
292
|
|
156
|
-
def mock_isobib_get_124
|
157
|
-
expect(Isobib::IsoBibliography).to receive(:get).with("ISO 124", "2014", {}) do
|
158
|
-
IsoBibItem::XMLParser.from_xml(<<~"OUTPUT")
|
159
|
-
<bibitem type="international-standard" id="iso124">
|
160
|
-
<fetched>#{Date.today}</fetched>
|
161
|
-
<title format="text/plain" language="en" script="Latn">Latex, rubber -- Determination of total solids content</title>
|
162
|
-
<title format="text/plain" language="fr" script="Latn">Latex de caoutchouc -- Détermination des matières solides totales</title>
|
163
|
-
<uri type="src">https://www.iso.org/standard/61884.html</uri>
|
164
|
-
<uri type="obp">https://www.iso.org/obp/ui/#!iso:std:61884:en</uri>
|
165
|
-
<uri type="rss">https://www.iso.org/contents/data/standard/06/18/61884.detail.rss</uri>
|
166
|
-
<docidentifier type="ISO">ISO 124:2014</docidentifier>
|
167
|
-
<date type="published">
|
168
|
-
<on>2014</on>
|
169
|
-
</date>
|
170
|
-
<contributor>
|
171
|
-
<role type="publisher"/>
|
172
|
-
<organization>
|
173
|
-
<name>International Organization for Standardization</name>
|
174
|
-
<abbreviation>ISO</abbreviation>
|
175
|
-
<uri>www.iso.org</uri>
|
176
|
-
</organization>
|
177
|
-
</contributor>
|
178
|
-
<edition>7</edition>
|
179
|
-
<language>en</language>
|
180
|
-
<language>fr</language>
|
181
|
-
<script>Latn</script>
|
182
|
-
<abstract format="plain" language="en" script="Latn">ISO 124:2014 specifies methods for the determination of the total solids content of natural rubber field and concentrated latices and synthetic rubber latex. These methods are not necessarily suitable for latex from natural sources other than the Hevea brasiliensis, for vulcanized latex, for compounded latex, or for artificial dispersions of rubber.</abstract>
|
183
|
-
<status>Published</status>
|
184
|
-
<copyright>
|
185
|
-
<from>2014</from>
|
186
|
-
<owner>
|
187
|
-
<organization>
|
188
|
-
<name>ISO</name>
|
189
|
-
<abbreviation/>
|
190
|
-
</organization>
|
191
|
-
</owner>
|
192
|
-
</copyright>
|
193
|
-
<relation type="obsoletes">
|
194
|
-
<bibitem>
|
195
|
-
<formattedref>ISO 124:2011</formattedref>
|
196
|
-
</bibitem>
|
197
|
-
</relation>
|
198
|
-
<ics>
|
199
|
-
<code>83.040.10</code>
|
200
|
-
<text>Latex and raw rubber</text>
|
201
|
-
</ics>
|
202
|
-
</bibitem>
|
203
|
-
OUTPUT
|
204
|
-
end
|
205
|
-
end
|
206
|
-
|
207
|
-
def mock_isobib_get_iec12382
|
208
|
-
expect(Isobib::IsoBibliography).to receive(:get).with("ISO/IEC TR 12382", "1992", {}) do
|
209
|
-
IsoBibItem::XMLParser.from_xml(<<~"OUTPUT")
|
210
|
-
<bibitem type="international-standard" id="iso123">
|
211
|
-
<fetched>#{Date.today}</fetched>
|
212
|
-
<title format="text/plain" language="en" script="Latn">Permuted index of the vocabulary of information technology</title>
|
213
|
-
<title format="text/plain" language="fr" script="Latn">Index permuté du vocabulaire des technologies de l'information</title>
|
214
|
-
<uri type="src">https://www.iso.org/standard/21071.html</uri>
|
215
|
-
<uri type="obp">https://www.iso.org/obp/ui/#!iso:std:21071:en</uri>
|
216
|
-
<uri type="rss">https://www.iso.org/contents/data/standard/02/10/21071.detail.rss</uri>
|
217
|
-
<docidentifier type="ISO">ISO/IEC 12382:1992</docidentifier>
|
218
|
-
<date type="published">
|
219
|
-
<on>1992</on>
|
220
|
-
</date>
|
221
|
-
<contributor>
|
222
|
-
<role type="publisher"/>
|
223
|
-
<organization>
|
224
|
-
<name>International Organization for Standardization</name>
|
225
|
-
<abbreviation>ISO</abbreviation>
|
226
|
-
<uri>www.iso.org</uri>
|
227
|
-
</organization>
|
228
|
-
</contributor>
|
229
|
-
<contributor>
|
230
|
-
<role type="publisher"/>
|
231
|
-
<organization>
|
232
|
-
<name>International Electrotechnical Commission</name>
|
233
|
-
<abbreviation>IEC</abbreviation>
|
234
|
-
<uri>www.iec.ch</uri>
|
235
|
-
</organization>
|
236
|
-
</contributor>
|
237
|
-
<edition>2</edition>
|
238
|
-
<language>en</language>
|
239
|
-
<language>fr</language>
|
240
|
-
<script>Latn</script>
|
241
|
-
<abstract format="plain" language="en" script="Latn">Contains a permuted index of all terms included in the parts 1 - 28 of ISO 2382. If any of these parts has been revised, the present TR refers to the revision.</abstract>
|
242
|
-
<status>Published</status>
|
243
|
-
<copyright>
|
244
|
-
<from>1992</from>
|
245
|
-
<owner>
|
246
|
-
<organization>
|
247
|
-
<name>ISO/IEC</name>
|
248
|
-
<abbreviation/>
|
249
|
-
</organization>
|
250
|
-
</owner>
|
251
|
-
</copyright>
|
252
|
-
<relation type="updates">
|
253
|
-
<bibitem>
|
254
|
-
<formattedref>ISO/IEC TR 12382:1992</formattedref>
|
255
|
-
</bibitem>
|
256
|
-
</relation>
|
257
|
-
<ics>
|
258
|
-
<code>35.020</code>
|
259
|
-
<text>Information technology (IT) in general</text>
|
260
|
-
</ics>
|
261
|
-
<ics>
|
262
|
-
<code>01.040.35</code>
|
263
|
-
<text>Information technology (Vocabularies)</text>
|
264
|
-
</ics>
|
265
|
-
</bibitem>
|
266
|
-
OUTPUT
|
267
|
-
end
|
268
|
-
end
|
269
|
-
|
270
293
|
def mock_rfcbib_get_rfc8341
|
271
294
|
expect(IETFBib::RfcBibliography).to receive(:get).with("RFC 8341", nil, {}) do
|
272
295
|
IETFBib::XMLParser.from_xml(<<~"OUTPUT")
|
@@ -283,4 +306,12 @@ OUTPUT
|
|
283
306
|
end
|
284
307
|
end
|
285
308
|
|
309
|
+
def mock_fdis
|
310
|
+
expect(RelatonIso::IsoBibliography).to receive(:get).with("ISO/FDIS 17664-1", nil, {:lang=>"en", :title=>"Title", :usrlbl=>nil}) do
|
311
|
+
RelatonIsoBib::XMLParser.from_xml(<<~"OUTPUT")
|
312
|
+
<bibitem id="x" type="standard"> <fetched>#{Date.today}</fetched> <title type="title-intro" format="text/plain" language="fr" script="Latn">Traitement de produits de soins de santé</title> <title type="title-main" format="text/plain" language="fr" script="Latn">Informations relatives au traitement des dispositifs médicaux à fournir par le fabricant du dispositif</title> <title type="title-part" format="text/plain" language="fr" script="Latn">Partie 1: Titre manque</title> <title type="main" format="text/plain" language="fr" script="Latn">Traitement de produits de soins de santé — Informations relatives au traitement des dispositifs médicaux à fournir par le fabricant du dispositif — Partie 1: Titre manque</title> <uri type="src">https://www.iso.org/standard/81720.html</uri> <uri type="rss">https://www.iso.org/contents/data/standard/08/17/81720.detail.rss</uri> <docidentifier type="ISO">ISO/FDIS 17664-1</docidentifier> <docidentifier type="URN">urn:iso:std:iso-fdis:17664:-1:stage-50.00:ed-1:fr</docidentifier> <docnumber>17664</docnumber> <contributor> <role type="publisher"/> <organization> <name>International Organization for Standardization</name> <abbreviation>ISO</abbreviation> <uri>www.iso.org</uri> </organization> </contributor> <edition>1</edition> <language>en</language> <language>fr</language> <script>Latn</script> <status> <stage>50</stage> <substage>00</substage> </status> <copyright> <from>unknown</from> <owner> <organization> <name>ISO/FDIS</name> </organization> </owner> </copyright> <relation type="obsoletes"> <bibitem type="standard"> <formattedref format="text/plain">ISO 17664:2017</formattedref> </bibitem> </relation> <relation type="instance"> <bibitem type="standard"> <fetched>2020-11-03</fetched> <title type="title-intro" format="text/plain" language="fr" script="Latn">Traitement de produits de soins de santé</title> <title type="title-main" format="text/plain" language="fr" script="Latn">Informations relatives au traitement des dispositifs médicaux à fournir par le fabricant du dispositif</title> <title type="title-part" format="text/plain" language="fr" script="Latn">Partie 1: Titre manque</title> <title type="main" format="text/plain" language="fr" script="Latn">Traitement de produits de soins de santé — Informations relatives au traitement des dispositifs médicaux à fournir par le fabricant du dispositif — Partie 1: Titre manque</title> <uri type="src">https://www.iso.org/standard/81720.html</uri> <uri type="rss">https://www.iso.org/contents/data/standard/08/17/81720.detail.rss</uri> <docidentifier type="ISO">ISO/FDIS 17664-1</docidentifier> <docidentifier type="URN">urn:iso:std:iso-fdis:17664:-1:stage-50.00:ed-1:fr</docidentifier> <docnumber>17664</docnumber> <contributor> <role type="publisher"/> <organization> <name>International Organization for Standardization</name> <abbreviation>ISO</abbreviation> <uri>www.iso.org</uri> </organization> </contributor> <edition>1</edition> <language>en</language> <language>fr</language> <script>Latn</script> <status> <stage>50</stage> <substage>00</substage> </status> <copyright> <from>unknown</from> <owner> <organization> <name>ISO/FDIS</name> </organization> </owner> </copyright> <relation type="obsoletes"> <bibitem type="standard"> <formattedref format="text/plain">ISO 17664:2017</formattedref> </bibitem> </relation> <place>Geneva</place> </bibitem> </relation> <place>Geneva</place></bibitem>
|
313
|
+
OUTPUT
|
314
|
+
end
|
315
|
+
end
|
316
|
+
|
286
317
|
end
|