metanorma-standoc 2.2.3.1 → 2.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/metanorma/standoc/base.rb +2 -1
- data/lib/metanorma/standoc/biblio.rng +32 -1
- data/lib/metanorma/standoc/blocks.rb +2 -1
- data/lib/metanorma/standoc/cleanup_biblio.rb +111 -23
- data/lib/metanorma/standoc/cleanup_boilerplate.rb +2 -2
- data/lib/metanorma/standoc/front.rb +1 -0
- data/lib/metanorma/standoc/isodoc.rng +9 -0
- data/lib/metanorma/standoc/macros_plantuml.rb +23 -10
- data/lib/metanorma/standoc/render.rb +1 -0
- data/lib/metanorma/standoc/term_lookup_cleanup.rb +32 -13
- data/lib/metanorma/standoc/utils.rb +3 -3
- data/lib/metanorma/standoc/validate.rb +12 -3
- data/lib/metanorma/standoc/version.rb +1 -1
- data/metanorma-standoc.gemspec +2 -2
- data/spec/metanorma/base_spec.rb +10 -1
- data/spec/metanorma/biblio_spec.rb +47 -17
- data/spec/metanorma/blocks_spec.rb +2 -2
- data/spec/metanorma/cleanup_sections_spec.rb +2 -1
- data/spec/metanorma/inline_spec.rb +10 -9
- data/spec/metanorma/isobib_cache_spec.rb +2 -2
- data/spec/metanorma/macros_concept_spec.rb +1 -1
- data/spec/metanorma/macros_spec.rb +2 -2
- data/spec/metanorma/refs_spec.rb +25 -25
- data/spec/metanorma/validate_spec.rb +33 -0
- data/spec/vcr_cassettes/bsi16341.yml +38 -38
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +64 -64
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec1.yml +13 -13
- data/spec/vcr_cassettes/hide_refs.yml +53 -53
- data/spec/vcr_cassettes/isobib_get_123.yml +11 -11
- data/spec/vcr_cassettes/isobib_get_123_1.yml +22 -22
- data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +54 -54
- data/spec/vcr_cassettes/isobib_get_123_2.yml +24 -24
- data/spec/vcr_cassettes/isobib_get_123_2001.yml +12 -12
- data/spec/vcr_cassettes/isobib_get_124.yml +11 -11
- data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +22 -24
- data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +55 -55
- data/spec/vcr_cassettes/std-link.yml +13 -13
- metadata +6 -10
- data/spec/requirements/default/blocks_spec.rb +0 -250
- data/spec/requirements/default/cleanup_spec.rb +0 -173
- data/spec/requirements/modspec/cleanup_spec.rb +0 -333
- data/spec/requirements/modspec/validate_spec.rb +0 -330
@@ -896,12 +896,12 @@ RSpec.describe Metanorma::Standoc do
|
|
896
896
|
[bibliography]
|
897
897
|
=== Normative References
|
898
898
|
|
899
|
-
* [[[A, B]]], span:surname[Wozniak], span:initials[S.] & span:givenname[Steve] span:surname[Jobs]. span:
|
899
|
+
* [[[A, B]]], span:surname[Wozniak], span:initials[S.] & span:givenname[Steve] span:surname[Jobs]. span:date.issued[1991]. span:date[1996]. span:title[_Work_]. span:in_surname.editor[Gates], span:in_initials.editor[W. H] & span:in_organization[UNICEF], span:in_title[Collected Essays]. _span:series[Bibliographers Anonymous]_. span:docid.ISO[ISO 1234]. span:pubplace[Geneva]: span:publisher[International Standardization Organization]. span:uri.citation[http://www.example.com]. span:volume[4] span:issue[2–3] span:pages[12-13] span:pages[19]. span:type[inbook]
|
900
900
|
INPUT
|
901
901
|
output = <<~OUTPUT
|
902
902
|
#{BLANK_HDR}
|
903
903
|
<sections> </sections>
|
904
|
-
|
904
|
+
<bibliography>
|
905
905
|
<references id='_' normative='true' obligation='informative'>
|
906
906
|
<title>Normative references</title>
|
907
907
|
<p id='_'>
|
@@ -911,14 +911,15 @@ RSpec.describe Metanorma::Standoc do
|
|
911
911
|
references, the latest edition of the referenced document (including any
|
912
912
|
amendments) applies.
|
913
913
|
</p>
|
914
|
-
<bibitem id='A' type=
|
914
|
+
<bibitem id='A' type='inbook'>
|
915
915
|
<formattedref format='application/x-isodoc+xml'>
|
916
|
-
Wozniak, S. & Steve Jobs. 1996.
|
916
|
+
Wozniak, S. & Steve Jobs. 1991. 1996.
|
917
917
|
<em>Work</em>
|
918
|
-
.
|
919
|
-
|
918
|
+
. Gates, W. H & UNICEF, Collected Essays.
|
919
|
+
<em>Bibliographers Anonymous</em>
|
920
|
+
. ISO 1234. Geneva: International Standardization Organization.
|
920
921
|
<link target='http://www.example.com'/>
|
921
|
-
.
|
922
|
+
. 4 2–3 12-13 19.
|
922
923
|
</formattedref>
|
923
924
|
<title>
|
924
925
|
<em>Work</em>
|
@@ -928,6 +929,7 @@ RSpec.describe Metanorma::Standoc do
|
|
928
929
|
</uri>
|
929
930
|
<docidentifier>B</docidentifier>
|
930
931
|
<docidentifier type='ISO'>ISO 1234</docidentifier>
|
932
|
+
<date type='issued'>1991</date>
|
931
933
|
<date type='published'>1996</date>
|
932
934
|
<contributor>
|
933
935
|
<role type='author'/>
|
@@ -947,22 +949,50 @@ RSpec.describe Metanorma::Standoc do
|
|
947
949
|
</name>
|
948
950
|
</person>
|
949
951
|
</contributor>
|
950
|
-
<contributor>
|
951
|
-
<role type='editor'/>
|
952
|
-
<person>
|
953
|
-
<name>
|
954
|
-
<formatted-initials>W. H</formatted-initials>
|
955
|
-
<surname>Gates</surname>
|
956
|
-
</name>
|
957
|
-
</person>
|
958
|
-
</contributor>
|
959
952
|
<contributor>
|
960
953
|
<role type='publisher'/>
|
961
954
|
<organization>
|
962
955
|
<name>International Standardization Organization</name>
|
963
956
|
</organization>
|
964
957
|
</contributor>
|
965
|
-
<place
|
958
|
+
<place>Geneva</place>
|
959
|
+
<relation type='includedIn'>
|
960
|
+
<bibitem type='book'>
|
961
|
+
<title>Collected Essays</title>
|
962
|
+
<contributor>
|
963
|
+
<role type='editor'/>
|
964
|
+
<person>
|
965
|
+
<name>
|
966
|
+
<formatted-initials>W. H</formatted-initials>
|
967
|
+
<surname>Gates</surname>
|
968
|
+
</name>
|
969
|
+
</person>
|
970
|
+
</contributor>
|
971
|
+
<contributor>
|
972
|
+
<role type='author'/>
|
973
|
+
<organization>
|
974
|
+
<name>UNICEF</name>
|
975
|
+
</organization>
|
976
|
+
</contributor>
|
977
|
+
<series>
|
978
|
+
<title>Bibliographers Anonymous</title>
|
979
|
+
</series>
|
980
|
+
</bibitem>
|
981
|
+
</relation>
|
982
|
+
<extent type='volume'>
|
983
|
+
<referenceFrom>4</referenceFrom>
|
984
|
+
</extent>
|
985
|
+
<extent type='issue'>
|
986
|
+
<referenceFrom>2</referenceFrom>
|
987
|
+
<referenceTo>3</referenceTo>
|
988
|
+
</extent>
|
989
|
+
<extent type='page'>
|
990
|
+
<referenceFrom>12</referenceFrom>
|
991
|
+
<referenceTo>13</referenceTo>
|
992
|
+
</extent>
|
993
|
+
<extent type='page'>
|
994
|
+
<referenceFrom>19</referenceFrom>
|
995
|
+
</extent>
|
966
996
|
</bibitem>
|
967
997
|
</references>
|
968
998
|
</bibliography>
|
@@ -1135,7 +1135,7 @@ RSpec.describe Metanorma::Standoc do
|
|
1135
1135
|
#{ASCIIDOC_BLANK_HDR}
|
1136
1136
|
|
1137
1137
|
[[ABC]]
|
1138
|
-
[%unnumbered,number=3]
|
1138
|
+
[%unnumbered,number=3,class=plate]
|
1139
1139
|
.Split-it-right sample divider
|
1140
1140
|
image::spec/examples/rice_images/rice_image1.png[alttext]
|
1141
1141
|
|
@@ -1143,7 +1143,7 @@ RSpec.describe Metanorma::Standoc do
|
|
1143
1143
|
output = <<~OUTPUT
|
1144
1144
|
#{BLANK_HDR}
|
1145
1145
|
<sections>
|
1146
|
-
<figure id="ABC" unnumbered="true" number="3">
|
1146
|
+
<figure id="ABC" unnumbered="true" number="3" class="plate">
|
1147
1147
|
<name>Split-it-right sample divider</name>
|
1148
1148
|
<image src="spec/examples/rice_images/rice_image1.png" id="_" mimetype="image/png" height="auto" width="auto" alt="alttext"/>
|
1149
1149
|
</figure>
|
@@ -3,6 +3,7 @@ require "relaton_iec"
|
|
3
3
|
require "fileutils"
|
4
4
|
|
5
5
|
RSpec.describe Metanorma::Standoc do
|
6
|
+
=begin
|
6
7
|
it "appends any initial user-supplied text to boilerplate in terms and definitions" do
|
7
8
|
input = <<~INPUT
|
8
9
|
#{ASCIIDOC_BLANK_HDR}
|
@@ -1354,7 +1355,7 @@ RSpec.describe Metanorma::Standoc do
|
|
1354
1355
|
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1355
1356
|
.to be_equivalent_to xmlpp(output)
|
1356
1357
|
end
|
1357
|
-
|
1358
|
+
=end
|
1358
1359
|
it "processes section names, internationalisation file" do
|
1359
1360
|
input = <<~INPUT
|
1360
1361
|
#{ASCIIDOC_BLANK_HDR.sub(/:nodoc:/, ":no-pdf:\n:i18nyaml: spec/assets/i18n.yaml")}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
3
|
RSpec.describe Metanorma::Standoc do
|
4
|
+
=begin
|
4
5
|
it "handles spacing around markup" do
|
5
6
|
input = <<~INPUT
|
6
7
|
#{ASCIIDOC_BLANK_HDR}
|
@@ -336,7 +337,7 @@ RSpec.describe Metanorma::Standoc do
|
|
336
337
|
expect((strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
337
338
|
.to be_equivalent_to(output)
|
338
339
|
end
|
339
|
-
|
340
|
+
=end
|
340
341
|
it "processes crossreferences" do
|
341
342
|
input = <<~INPUT
|
342
343
|
#{ASCIIDOC_BLANK_HDR}
|
@@ -389,8 +390,8 @@ RSpec.describe Metanorma::Standoc do
|
|
389
390
|
</sections>
|
390
391
|
</standard-document>
|
391
392
|
OUTPUT
|
392
|
-
expect((strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
393
|
-
.to be_equivalent_to(output)
|
393
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
394
|
+
.to be_equivalent_to(xmlpp(output))
|
394
395
|
end
|
395
396
|
|
396
397
|
it "processes formatting within crossreferences" do
|
@@ -417,8 +418,8 @@ RSpec.describe Metanorma::Standoc do
|
|
417
418
|
</sections>
|
418
419
|
</standard-document>
|
419
420
|
OUTPUT
|
420
|
-
expect((strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
421
|
-
.to be_equivalent_to(output)
|
421
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
422
|
+
.to be_equivalent_to(xmlpp(output))
|
422
423
|
end
|
423
424
|
|
424
425
|
it "processes formatting within crossreferences to non-existent anchor" do
|
@@ -444,8 +445,8 @@ RSpec.describe Metanorma::Standoc do
|
|
444
445
|
</sections>
|
445
446
|
</standard-document>
|
446
447
|
OUTPUT
|
447
|
-
expect((strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
448
|
-
.to be_equivalent_to(output)
|
448
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
449
|
+
.to be_equivalent_to(xmlpp(output))
|
449
450
|
end
|
450
451
|
|
451
452
|
it "processes combinations of crossreferences" do
|
@@ -475,8 +476,8 @@ RSpec.describe Metanorma::Standoc do
|
|
475
476
|
</sections>
|
476
477
|
</standard-document>
|
477
478
|
OUTPUT
|
478
|
-
expect((strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
479
|
-
.to be_equivalent_to(output)
|
479
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
480
|
+
.to be_equivalent_to(xmlpp(output))
|
480
481
|
end
|
481
482
|
|
482
483
|
it "processes bibliographic anchors" do
|
@@ -50,7 +50,7 @@ ISO_124_DATED = <<~XML.freeze
|
|
50
50
|
<uri type="obp">https://www.iso.org/obp/ui/#!iso:std:61884:en</uri>
|
51
51
|
<uri type="rss">https://www.iso.org/contents/data/standard/06/18/61884.detail.rss</uri>
|
52
52
|
<docidentifier type="ISO" primary="true">ISO 124:2014</docidentifier>
|
53
|
-
<docidentifier type='URN'>urn:iso:std:iso:124:
|
53
|
+
<docidentifier type='URN'>urn:iso:std:iso:124:ed-7</docidentifier>
|
54
54
|
<docnumber>124</docnumber>
|
55
55
|
<date type="published">
|
56
56
|
<on>2014-03</on>
|
@@ -210,7 +210,7 @@ ISO_123_DATED = <<~XML.freeze
|
|
210
210
|
<uri type="obp">https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
211
211
|
<uri type="rss">https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
212
212
|
<docidentifier type="ISO" primary="true">ISO 123:2001</docidentifier>
|
213
|
-
<docidentifier type='URN'>urn:iso:std:iso:123:
|
213
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:ed-3</docidentifier>
|
214
214
|
<docnumber>123</docnumber>
|
215
215
|
<date type="published">
|
216
216
|
<on>2001-05</on>
|
@@ -975,7 +975,7 @@ RSpec.describe Metanorma::Standoc do
|
|
975
975
|
<uri type='src'>https://www.iso.org/standard/3944.html</uri>
|
976
976
|
<uri type='rss'>https://www.iso.org/contents/data/standard/00/39/3944.detail.rss</uri>
|
977
977
|
<docidentifier type='ISO' primary='true'>ISO 131</docidentifier>
|
978
|
-
<docidentifier type='URN'>urn:iso:std:iso:131:
|
978
|
+
<docidentifier type='URN'>urn:iso:std:iso:131:ed-1</docidentifier>
|
979
979
|
<docnumber>131</docnumber>
|
980
980
|
<contributor>
|
981
981
|
<role type='publisher'/>
|
@@ -1018,7 +1018,7 @@ RSpec.describe Metanorma::Standoc do
|
|
1018
1018
|
<uri type='src'>https://www.iso.org/standard/3944.html</uri>
|
1019
1019
|
<uri type='rss'>https://www.iso.org/contents/data/standard/00/39/3944.detail.rss</uri>
|
1020
1020
|
<docidentifier type='ISO' primary='true'>ISO 131:1979</docidentifier>
|
1021
|
-
<docidentifier type='URN'>urn:iso:std:iso:131:
|
1021
|
+
<docidentifier type='URN'>urn:iso:std:iso:131:ed-1</docidentifier>
|
1022
1022
|
<docnumber>131</docnumber>
|
1023
1023
|
<date type='published'>
|
1024
1024
|
<on>1979-11</on>
|
data/spec/metanorma/refs_spec.rb
CHANGED
@@ -285,7 +285,7 @@ RSpec.describe Metanorma::Standoc do
|
|
285
285
|
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
286
286
|
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
287
287
|
<docidentifier type='ISO' primary="true">ISO 123</docidentifier>
|
288
|
-
<docidentifier type='URN'>urn:iso:std:iso:123:
|
288
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:ed-3</docidentifier>
|
289
289
|
<docnumber>123</docnumber>
|
290
290
|
<contributor>
|
291
291
|
<role type='publisher'/>
|
@@ -326,7 +326,7 @@ RSpec.describe Metanorma::Standoc do
|
|
326
326
|
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
327
327
|
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
328
328
|
<docidentifier type='ISO' primary="true">ISO 123:2001</docidentifier>
|
329
|
-
<docidentifier type='URN'>urn:iso:std:iso:123:
|
329
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:ed-3</docidentifier>
|
330
330
|
<docnumber>123</docnumber>
|
331
331
|
<date type='published'>
|
332
332
|
<on>2001-05</on>
|
@@ -382,7 +382,7 @@ RSpec.describe Metanorma::Standoc do
|
|
382
382
|
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
383
383
|
<docidentifier type='ISO' primary="true">ISO 123</docidentifier>
|
384
384
|
<docidentifier type='metanorma'>[1]</docidentifier>
|
385
|
-
<docidentifier type='URN'>urn:iso:std:iso:123:
|
385
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:ed-3</docidentifier>
|
386
386
|
<docnumber>123</docnumber>
|
387
387
|
<contributor>
|
388
388
|
<role type='publisher'/>
|
@@ -423,7 +423,7 @@ RSpec.describe Metanorma::Standoc do
|
|
423
423
|
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
424
424
|
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
425
425
|
<docidentifier type='ISO' primary="true">ISO 123:2001</docidentifier>
|
426
|
-
<docidentifier type='URN'>urn:iso:std:iso:123:
|
426
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:ed-3</docidentifier>
|
427
427
|
<docnumber>123</docnumber>
|
428
428
|
<date type='published'>
|
429
429
|
<on>2001-05</on>
|
@@ -519,7 +519,7 @@ RSpec.describe Metanorma::Standoc do
|
|
519
519
|
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
520
520
|
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
521
521
|
<docidentifier type='ISO' primary="true">ISO 123</docidentifier>
|
522
|
-
<docidentifier type='URN'>urn:iso:std:iso:123:
|
522
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:ed-3</docidentifier>
|
523
523
|
<docnumber>123</docnumber>
|
524
524
|
<contributor>
|
525
525
|
<role type='publisher'/>
|
@@ -561,7 +561,7 @@ RSpec.describe Metanorma::Standoc do
|
|
561
561
|
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
562
562
|
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
563
563
|
<docidentifier type='ISO' primary="true">ISO 123:2001</docidentifier>
|
564
|
-
<docidentifier type='URN'>urn:iso:std:iso:123:
|
564
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:ed-3</docidentifier>
|
565
565
|
<docnumber>123</docnumber>
|
566
566
|
<date type='published'>
|
567
567
|
<on>2001-05</on>
|
@@ -622,7 +622,7 @@ RSpec.describe Metanorma::Standoc do
|
|
622
622
|
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
623
623
|
<docidentifier type='ISO' primary="true">ISO 123</docidentifier>
|
624
624
|
<docidentifier type='metanorma'>[1]</docidentifier>
|
625
|
-
<docidentifier type='URN'>urn:iso:std:iso:123:
|
625
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:ed-3</docidentifier>
|
626
626
|
<docnumber>123</docnumber>
|
627
627
|
<contributor>
|
628
628
|
<role type='publisher'/>
|
@@ -664,7 +664,7 @@ RSpec.describe Metanorma::Standoc do
|
|
664
664
|
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
665
665
|
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
666
666
|
<docidentifier type='ISO' primary="true">ISO 123:2001</docidentifier>
|
667
|
-
<docidentifier type='URN'>urn:iso:std:iso:123:
|
667
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:ed-3</docidentifier>
|
668
668
|
<docnumber>123</docnumber>
|
669
669
|
<date type='published'>
|
670
670
|
<on>2001-05</on>
|
@@ -798,7 +798,7 @@ RSpec.describe Metanorma::Standoc do
|
|
798
798
|
<uri type="obp">https://www.iso.org/obp/ui/#!iso:std:21071:en</uri>
|
799
799
|
<uri type="rss">https://www.iso.org/contents/data/standard/02/10/21071.detail.rss</uri>
|
800
800
|
<docidentifier type="ISO" primary="true">ISO/IEC TR 12382:1992</docidentifier>
|
801
|
-
<docidentifier type='URN'>urn:iso:std:iso-iec:tr:12382:
|
801
|
+
<docidentifier type='URN'>urn:iso:std:iso-iec:tr:12382:ed-2</docidentifier>
|
802
802
|
<docnumber>12382</docnumber>
|
803
803
|
<date type="published">
|
804
804
|
<on>1992-12</on>
|
@@ -846,7 +846,7 @@ RSpec.describe Metanorma::Standoc do
|
|
846
846
|
<uri type="obp">https://www.iso.org/obp/ui/#!iso:std:61884:en</uri>
|
847
847
|
<uri type="rss">https://www.iso.org/contents/data/standard/06/18/61884.detail.rss</uri>
|
848
848
|
<docidentifier type="ISO" primary="true">ISO 124:2014</docidentifier>
|
849
|
-
<docidentifier type='URN'>urn:iso:std:iso:124:
|
849
|
+
<docidentifier type='URN'>urn:iso:std:iso:124:ed-7</docidentifier>
|
850
850
|
<docnumber>124</docnumber>
|
851
851
|
<date type="published">
|
852
852
|
<on>2014-03</on>
|
@@ -892,7 +892,7 @@ RSpec.describe Metanorma::Standoc do
|
|
892
892
|
<uri type="rss">https://www.iso.org/contents/data/standard/02/10/21071.detail.rss</uri>
|
893
893
|
<docidentifier type="ISO" primary="true">ISO/IEC TR 12382:1992</docidentifier>
|
894
894
|
<docidentifier type='metanorma'>[1]</docidentifier>
|
895
|
-
<docidentifier type='URN'>urn:iso:std:iso-iec:tr:12382:
|
895
|
+
<docidentifier type='URN'>urn:iso:std:iso-iec:tr:12382:ed-2</docidentifier>
|
896
896
|
<docnumber>12382</docnumber>
|
897
897
|
<date type="published">
|
898
898
|
<on>1992-12</on>
|
@@ -941,7 +941,7 @@ RSpec.describe Metanorma::Standoc do
|
|
941
941
|
<uri type="rss">https://www.iso.org/contents/data/standard/06/18/61884.detail.rss</uri>
|
942
942
|
<docidentifier type="ISO" primary="true">ISO 124:2014</docidentifier>
|
943
943
|
<docidentifier type='metanorma'>[1]</docidentifier>
|
944
|
-
<docidentifier type='URN'>urn:iso:std:iso:124:
|
944
|
+
<docidentifier type='URN'>urn:iso:std:iso:124:ed-7</docidentifier>
|
945
945
|
<docnumber>124</docnumber>
|
946
946
|
<date type="published">
|
947
947
|
<on>2014-03</on>
|
@@ -1021,7 +1021,7 @@ RSpec.describe Metanorma::Standoc do
|
|
1021
1021
|
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:61884:en</uri>
|
1022
1022
|
<uri type='rss'>https://www.iso.org/contents/data/standard/06/18/61884.detail.rss</uri>
|
1023
1023
|
<docidentifier type='ISO' primary="true">ISO 124:2014</docidentifier>
|
1024
|
-
<docidentifier type='URN'>urn:iso:std:iso:124:
|
1024
|
+
<docidentifier type='URN'>urn:iso:std:iso:124:ed-7</docidentifier>
|
1025
1025
|
<docnumber>124</docnumber>
|
1026
1026
|
<date type='published'>
|
1027
1027
|
<on>2014-03</on>
|
@@ -1118,7 +1118,7 @@ RSpec.describe Metanorma::Standoc do
|
|
1118
1118
|
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:61884:en</uri>
|
1119
1119
|
<uri type='rss'>https://www.iso.org/contents/data/standard/06/18/61884.detail.rss</uri>
|
1120
1120
|
<docidentifier type='ISO' primary="true">ISO 124</docidentifier>
|
1121
|
-
<docidentifier type='URN'>urn:iso:std:iso:124:
|
1121
|
+
<docidentifier type='URN'>urn:iso:std:iso:124:ed-7</docidentifier>
|
1122
1122
|
<docnumber>124</docnumber>
|
1123
1123
|
<contributor>
|
1124
1124
|
<role type='publisher'/>
|
@@ -1159,7 +1159,7 @@ RSpec.describe Metanorma::Standoc do
|
|
1159
1159
|
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:61884:en</uri>
|
1160
1160
|
<uri type='rss'>https://www.iso.org/contents/data/standard/06/18/61884.detail.rss</uri>
|
1161
1161
|
<docidentifier type='ISO' primary="true">ISO 124:2014</docidentifier>
|
1162
|
-
<docidentifier type='URN'>urn:iso:std:iso:124:
|
1162
|
+
<docidentifier type='URN'>urn:iso:std:iso:124:ed-7</docidentifier>
|
1163
1163
|
<docnumber>124</docnumber>
|
1164
1164
|
<date type='published'>
|
1165
1165
|
<on>2014-03</on>
|
@@ -1218,7 +1218,7 @@ RSpec.describe Metanorma::Standoc do
|
|
1218
1218
|
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:72849:en</uri>
|
1219
1219
|
<uri type='rss'>https://www.iso.org/contents/data/standard/07/28/72849.detail.rss</uri>
|
1220
1220
|
<docidentifier type='ISO' primary="true">ISO 125</docidentifier>
|
1221
|
-
<docidentifier type='URN'>urn:iso:std:iso:125:
|
1221
|
+
<docidentifier type='URN'>urn:iso:std:iso:125:ed-7</docidentifier>
|
1222
1222
|
<docnumber>125</docnumber>
|
1223
1223
|
<contributor>
|
1224
1224
|
<role type='publisher'/>
|
@@ -1262,7 +1262,7 @@ RSpec.describe Metanorma::Standoc do
|
|
1262
1262
|
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:72849:en</uri>
|
1263
1263
|
<uri type='rss'>https://www.iso.org/contents/data/standard/07/28/72849.detail.rss</uri>
|
1264
1264
|
<docidentifier type='ISO' primary="true">ISO 125:2020</docidentifier>
|
1265
|
-
<docidentifier type='URN'>urn:iso:std:iso:125:
|
1265
|
+
<docidentifier type='URN'>urn:iso:std:iso:125:ed-7</docidentifier>
|
1266
1266
|
<docnumber>125</docnumber>
|
1267
1267
|
<date type='published'>
|
1268
1268
|
<on>2020-02</on>
|
@@ -1325,7 +1325,7 @@ RSpec.describe Metanorma::Standoc do
|
|
1325
1325
|
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:72849:en</uri>
|
1326
1326
|
<uri type='rss'>https://www.iso.org/contents/data/standard/07/28/72849.detail.rss</uri>
|
1327
1327
|
<docidentifier type='ISO' primary="true">ISO 125</docidentifier>
|
1328
|
-
<docidentifier type='URN'>urn:iso:std:iso:125:
|
1328
|
+
<docidentifier type='URN'>urn:iso:std:iso:125:ed-7</docidentifier>
|
1329
1329
|
<docnumber>125</docnumber>
|
1330
1330
|
<contributor>
|
1331
1331
|
<role type='publisher'/>
|
@@ -1369,7 +1369,7 @@ RSpec.describe Metanorma::Standoc do
|
|
1369
1369
|
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:72849:en</uri>
|
1370
1370
|
<uri type='rss'>https://www.iso.org/contents/data/standard/07/28/72849.detail.rss</uri>
|
1371
1371
|
<docidentifier type='ISO' primary="true">ISO 125:2020</docidentifier>
|
1372
|
-
<docidentifier type='URN'>urn:iso:std:iso:125:
|
1372
|
+
<docidentifier type='URN'>urn:iso:std:iso:125:ed-7</docidentifier>
|
1373
1373
|
<docnumber>125</docnumber>
|
1374
1374
|
<date type='published'>
|
1375
1375
|
<on>2020-02</on>
|
@@ -1432,7 +1432,7 @@ RSpec.describe Metanorma::Standoc do
|
|
1432
1432
|
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:61884:en</uri>
|
1433
1433
|
<uri type='rss'>https://www.iso.org/contents/data/standard/06/18/61884.detail.rss</uri>
|
1434
1434
|
<docidentifier type='ISO' primary="true">ISO 124</docidentifier>
|
1435
|
-
<docidentifier type='URN'>urn:iso:std:iso:124:
|
1435
|
+
<docidentifier type='URN'>urn:iso:std:iso:124:ed-7</docidentifier>
|
1436
1436
|
<docnumber>124</docnumber>
|
1437
1437
|
<contributor>
|
1438
1438
|
<role type='publisher'/>
|
@@ -1473,7 +1473,7 @@ RSpec.describe Metanorma::Standoc do
|
|
1473
1473
|
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:61884:en</uri>
|
1474
1474
|
<uri type='rss'>https://www.iso.org/contents/data/standard/06/18/61884.detail.rss</uri>
|
1475
1475
|
<docidentifier type='ISO' primary="true">ISO 124:2014</docidentifier>
|
1476
|
-
<docidentifier type='URN'>urn:iso:std:iso:124:
|
1476
|
+
<docidentifier type='URN'>urn:iso:std:iso:124:ed-7</docidentifier>
|
1477
1477
|
<docnumber>124</docnumber>
|
1478
1478
|
<date type='published'>
|
1479
1479
|
<on>2014-03</on>
|
@@ -2307,7 +2307,7 @@ RSpec.describe Metanorma::Standoc do
|
|
2307
2307
|
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
2308
2308
|
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
2309
2309
|
<docidentifier type='ISO' primary="true">ISO 123</docidentifier>
|
2310
|
-
<docidentifier type='URN'>urn:iso:std:iso:123:
|
2310
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:ed-3</docidentifier>
|
2311
2311
|
<docnumber>123</docnumber>
|
2312
2312
|
<contributor>
|
2313
2313
|
<role type='publisher'/>
|
@@ -2348,7 +2348,7 @@ RSpec.describe Metanorma::Standoc do
|
|
2348
2348
|
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
2349
2349
|
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
2350
2350
|
<docidentifier type='ISO' primary="true">ISO 123:2001</docidentifier>
|
2351
|
-
<docidentifier type='URN'>urn:iso:std:iso:123:
|
2351
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:ed-3</docidentifier>
|
2352
2352
|
<docnumber>123</docnumber>
|
2353
2353
|
<date type='published'>
|
2354
2354
|
<on>2001-05</on>
|
@@ -2414,7 +2414,7 @@ RSpec.describe Metanorma::Standoc do
|
|
2414
2414
|
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
2415
2415
|
<docidentifier type='ISO' primary="true">ISO 123</docidentifier>
|
2416
2416
|
<docidentifier type='metanorma'>[1]</docidentifier>
|
2417
|
-
<docidentifier type='URN'>urn:iso:std:iso:123:
|
2417
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:ed-3</docidentifier>
|
2418
2418
|
<docnumber>123</docnumber>
|
2419
2419
|
<contributor>
|
2420
2420
|
<role type='publisher'/>
|
@@ -2455,7 +2455,7 @@ RSpec.describe Metanorma::Standoc do
|
|
2455
2455
|
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
2456
2456
|
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
2457
2457
|
<docidentifier type='ISO' primary="true">ISO 123:2001</docidentifier>
|
2458
|
-
<docidentifier type='URN'>urn:iso:std:iso:123:
|
2458
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:ed-3</docidentifier>
|
2459
2459
|
<docnumber>123</docnumber>
|
2460
2460
|
<date type='published'>
|
2461
2461
|
<on>2001-05</on>
|
@@ -381,18 +381,31 @@ RSpec.describe Metanorma::Standoc do
|
|
381
381
|
== Clause 1
|
382
382
|
[[ghi]]A:: B
|
383
383
|
|
384
|
+
== Terms and Definitions
|
385
|
+
|
386
|
+
[[jkl]]
|
387
|
+
=== Term1
|
388
|
+
|
389
|
+
==== Term2
|
390
|
+
|
384
391
|
== Symbols and Abbreviated Terms
|
385
392
|
[[def]]DEF:: def
|
386
393
|
|
394
|
+
{{<<jkl>>,term1}}
|
387
395
|
{{<<abc>>,term}}
|
388
396
|
{{<<def>>,term}}
|
389
397
|
{{<<ghi>>,term}}
|
398
|
+
{{Terms and Definitions}}
|
390
399
|
INPUT
|
391
400
|
expect do
|
392
401
|
Asciidoctor.convert(input, *OPTIONS)
|
393
402
|
end.to raise_error(SystemExit)
|
394
403
|
rescue SystemExit
|
395
404
|
end
|
405
|
+
expect(File.read("test.err"))
|
406
|
+
.to include %(Term reference to `Terms-and-Definitions` missing: "Terms-and-Definitions" is not defined in document. Did you mean to point to a subterm?)
|
407
|
+
expect(File.read("test.err"))
|
408
|
+
.to include "Concept term1 is pointing to jkl, which is not a term or symbol. Did you mean to point to a subterm?"
|
396
409
|
expect(File.read("test.err"))
|
397
410
|
.to include "Concept term is pointing to abc, which is not a term or symbol"
|
398
411
|
expect(File.read("test.err"))
|
@@ -741,6 +754,26 @@ RSpec.describe Metanorma::Standoc do
|
|
741
754
|
INPUT
|
742
755
|
expect(File.read("test.err"))
|
743
756
|
.to include "Error: Term reference to `xyz` missing:"
|
757
|
+
expect(File.read("test.err"))
|
758
|
+
.not_to include "Did you mean to point to a subterm?"
|
759
|
+
|
760
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
761
|
+
#{VALIDATING_BLANK_HDR}
|
762
|
+
|
763
|
+
[[xyz]]
|
764
|
+
== Terms and definitions
|
765
|
+
|
766
|
+
=== Term 1
|
767
|
+
|
768
|
+
related:see[xyz]
|
769
|
+
|
770
|
+
Definition
|
771
|
+
|
772
|
+
INPUT
|
773
|
+
expect(File.read("test.err"))
|
774
|
+
.to include "Error: Term reference to `xyz` missing:"
|
775
|
+
expect(File.read("test.err"))
|
776
|
+
.to include "Did you mean to point to a subterm?"
|
744
777
|
|
745
778
|
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
746
779
|
#{VALIDATING_BLANK_HDR}
|