metanorma-standoc 1.4.4 → 1.6.0
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/macos.yml +4 -9
- data/.github/workflows/ubuntu.yml +1 -5
- data/.github/workflows/windows.yml +2 -12
- data/.rubocop.yml +1 -1
- data/lib/asciidoctor/standoc/base.rb +11 -5
- data/lib/asciidoctor/standoc/base_structured_text_preprocessor.rb +123 -0
- data/lib/asciidoctor/standoc/basicdoc.rng +23 -0
- data/lib/asciidoctor/standoc/cleanup.rb +32 -12
- data/lib/asciidoctor/standoc/cleanup_amend.rb +54 -0
- data/lib/asciidoctor/standoc/cleanup_block.rb +0 -2
- data/lib/asciidoctor/standoc/cleanup_boilerplate.rb +11 -24
- data/lib/asciidoctor/standoc/cleanup_footnotes.rb +0 -3
- data/lib/asciidoctor/standoc/cleanup_inline.rb +62 -1
- data/lib/asciidoctor/standoc/cleanup_ref.rb +10 -7
- data/lib/asciidoctor/standoc/cleanup_section.rb +91 -8
- data/lib/asciidoctor/standoc/cleanup_terms.rb +12 -2
- data/lib/asciidoctor/standoc/converter.rb +3 -3
- data/lib/asciidoctor/standoc/front.rb +0 -12
- data/lib/asciidoctor/standoc/front_contributor.rb +51 -10
- data/lib/asciidoctor/standoc/inline.rb +21 -31
- data/lib/asciidoctor/standoc/isodoc.rng +137 -21
- data/lib/asciidoctor/standoc/json2_text_preprocessor.rb +44 -0
- data/lib/asciidoctor/standoc/log.rb +10 -1
- data/lib/asciidoctor/standoc/macros.rb +45 -33
- data/lib/asciidoctor/standoc/ref.rb +45 -45
- data/lib/asciidoctor/standoc/section.rb +39 -30
- data/lib/asciidoctor/standoc/table.rb +3 -2
- data/lib/asciidoctor/standoc/utils.rb +18 -1
- data/lib/asciidoctor/standoc/validate.rb +30 -18
- data/lib/asciidoctor/standoc/validate_section.rb +1 -1
- data/lib/asciidoctor/standoc/views/datamodel/model_representation.adoc.erb +10 -10
- data/lib/asciidoctor/standoc/yaml2_text_preprocessor.rb +46 -0
- data/lib/liquid/custom_blocks/key_iterator.rb +21 -0
- data/lib/liquid/custom_filters/values.rb +7 -0
- data/lib/metanorma/standoc.rb +0 -5
- data/lib/metanorma/standoc/version.rb +20 -1
- data/metanorma-standoc.gemspec +4 -5
- data/spec/asciidoctor-standoc/base_spec.rb +140 -7
- data/spec/asciidoctor-standoc/blocks_spec.rb +275 -149
- data/spec/asciidoctor-standoc/cleanup_spec.rb +1372 -56
- data/spec/asciidoctor-standoc/inline_spec.rb +133 -6
- data/spec/asciidoctor-standoc/isobib_cache_spec.rb +9 -7
- data/spec/asciidoctor-standoc/macros_json2text_spec.rb +10 -0
- data/spec/asciidoctor-standoc/macros_spec.rb +43 -23
- data/spec/asciidoctor-standoc/macros_yaml2text_spec.rb +5 -560
- data/spec/asciidoctor-standoc/refs_dl_spec.rb +9 -7
- data/spec/asciidoctor-standoc/refs_spec.rb +43 -34
- data/spec/asciidoctor-standoc/section_spec.rb +42 -39
- data/spec/asciidoctor-standoc/table_spec.rb +119 -113
- data/spec/asciidoctor-standoc/validate_spec.rb +45 -1
- data/spec/assets/i18n.yaml +17 -2
- data/spec/examples/codes_table.html +1365 -1365
- data/spec/fixtures/macros_datamodel/address_class_profile.xml +46 -46
- data/spec/fixtures/macros_datamodel/address_component_profile.xml +21 -21
- data/spec/fixtures/macros_datamodel/blank_definition_profile.xml +21 -21
- data/spec/metanorma/processor_spec.rb +1 -2
- data/spec/spec_helper.rb +110 -109
- data/spec/support/shared_examples/structured_data_2_text_preprocessor.rb +629 -0
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +71 -71
- data/spec/vcr_cassettes/isobib_get_123.yml +16 -16
- data/spec/vcr_cassettes/isobib_get_123_1.yml +36 -36
- data/spec/vcr_cassettes/isobib_get_123_2001.yml +16 -16
- data/spec/vcr_cassettes/isobib_get_124.yml +17 -17
- data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +8 -8
- data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +39 -37
- metadata +29 -14
- data/lib/asciidoctor-yaml/i18n-en.yaml +0 -20
- data/lib/asciidoctor-yaml/i18n-fr.yaml +0 -13
- data/lib/asciidoctor-yaml/i18n-zh-Hans.yaml +0 -15
- data/lib/asciidoctor/standoc/i18n.rb +0 -39
- data/lib/asciidoctor/standoc/macros_yaml2text.rb +0 -165
- data/lib/metanorma/standoc/latexml_requirement.rb +0 -62
- data/lib/metanorma/standoc/requirement.rb +0 -13
@@ -39,7 +39,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
39
39
|
#{BLANK_HDR}
|
40
40
|
<sections>
|
41
41
|
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
42
|
-
<title>Normative
|
42
|
+
<title>Normative references</title>
|
43
43
|
#{NORM_REF_BOILERPLATE}
|
44
44
|
<bibitem id="iso123" type="standard">
|
45
45
|
<fetched>#{Date.today}</fetched>
|
@@ -77,9 +77,9 @@ it "processes complex dl reference" do
|
|
77
77
|
[bibliography]
|
78
78
|
== Normative References
|
79
79
|
|
80
|
-
[[
|
80
|
+
[[ISOTC211]]
|
81
81
|
[%bibitem]
|
82
|
-
===
|
82
|
+
=== Other Title
|
83
83
|
fetched:: 2019-06-30
|
84
84
|
title::
|
85
85
|
type::: main
|
@@ -289,12 +289,14 @@ formattedref::
|
|
289
289
|
#{BLANK_HDR}
|
290
290
|
<sections>
|
291
291
|
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
292
|
-
<title>Normative
|
292
|
+
<title>Normative references</title>
|
293
293
|
#{NORM_REF_BOILERPLATE}
|
294
294
|
<bibitem id="TC211" type="standard">
|
295
295
|
<fetched>2019-06-30</fetched>
|
296
296
|
<title type="main" format="text/plain">Geographic information</title>
|
297
297
|
<title type="subtitle" format="text/plain" language="en" script="Latn">Geographic information subtitle</title>
|
298
|
+
<title type='title-main' format='text/plain'>Other Title</title>
|
299
|
+
<title type='main' format='text/plain'>Other Title</title>
|
298
300
|
<uri type="src">https://www.iso.org/standard/53798.html</uri>
|
299
301
|
<uri type="obp">https://www.iso.org/obp/ui/#!iso:std:53798:en</uri>
|
300
302
|
<uri type="rss">https://www.iso.org/contents/data/standard/05/37/53798.detail.rss</uri>
|
@@ -446,7 +448,7 @@ OUTPUT
|
|
446
448
|
[bibliography]
|
447
449
|
== Normative References
|
448
450
|
|
449
|
-
[[
|
451
|
+
[[ISOTC211]]
|
450
452
|
[%bibitem]
|
451
453
|
=== {blank}
|
452
454
|
fetched:: 2019-06-30
|
@@ -607,7 +609,7 @@ series.formattedref.script:: Latn
|
|
607
609
|
#{BLANK_HDR}
|
608
610
|
<sections>
|
609
611
|
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
610
|
-
<title>Normative
|
612
|
+
<title>Normative references</title>
|
611
613
|
#{NORM_REF_BOILERPLATE}
|
612
614
|
<bibitem id="TC211" type="standard">
|
613
615
|
<fetched>2019-06-30</fetched>
|
@@ -807,7 +809,7 @@ OUTPUT
|
|
807
809
|
<title>Subsection</title>
|
808
810
|
</clause>
|
809
811
|
<references id='_' obligation='informative' normative="true">
|
810
|
-
<title>Normative
|
812
|
+
<title>Normative references</title>
|
811
813
|
<bibitem id='A'>
|
812
814
|
<formattedref format='application/x-isodoc+xml'>Title</formattedref>
|
813
815
|
<docidentifier>B</docidentifier>
|
@@ -15,7 +15,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
15
15
|
#{BLANK_HDR}
|
16
16
|
<sections>
|
17
17
|
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
18
|
-
<title>Normative
|
18
|
+
<title>Normative references</title>
|
19
19
|
#{NORM_REF_BOILERPLATE}
|
20
20
|
<bibitem id="iso123" type="standard">
|
21
21
|
<title format="text/plain">Standard</title>
|
@@ -30,7 +30,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
30
30
|
</bibitem>
|
31
31
|
<bibitem id='iso124' type='standard'>
|
32
32
|
<title format='text/plain'>Standard</title>
|
33
|
-
<docidentifier type='metanorma'>[
|
33
|
+
<docidentifier type='metanorma'>[2]</docidentifier>
|
34
34
|
<docidentifier>ISO 123</docidentifier>
|
35
35
|
<docnumber>123</docnumber>
|
36
36
|
<contributor>
|
@@ -58,7 +58,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
58
58
|
#{BLANK_HDR}
|
59
59
|
<sections>
|
60
60
|
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
61
|
-
<title>Normative
|
61
|
+
<title>Normative references</title>
|
62
62
|
#{NORM_REF_BOILERPLATE}
|
63
63
|
<bibitem id="iso123" type="standard">
|
64
64
|
<title format="text/plain">Standard</title>
|
@@ -77,7 +77,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
77
77
|
</bibitem>
|
78
78
|
<bibitem id="iso124" type="standard">
|
79
79
|
<title format="text/plain">Standard</title>
|
80
|
-
<docidentifier type='metanorma'>[
|
80
|
+
<docidentifier type='metanorma'>[2]</docidentifier>
|
81
81
|
<docidentifier>ISO 123:1066-1067</docidentifier>
|
82
82
|
<docnumber>123</docnumber>
|
83
83
|
<date type="published">
|
@@ -120,12 +120,12 @@ RSpec.describe Asciidoctor::Standoc do
|
|
120
120
|
<title>Foreword</title>
|
121
121
|
<p id='_'>
|
122
122
|
<eref type='inline' bibitemid='iso123' citeas='ISO 123'/>
|
123
|
-
<eref type='inline' bibitemid='iso124' citeas='[
|
123
|
+
<eref type='inline' bibitemid='iso124' citeas='[2]'/>
|
124
124
|
</p>
|
125
125
|
</foreword>
|
126
126
|
</preface>
|
127
127
|
<sections>
|
128
|
-
</sections><bibliography><references id="_" obligation="informative" normative="true"><title>Normative
|
128
|
+
</sections><bibliography><references id="_" obligation="informative" normative="true"><title>Normative references</title>
|
129
129
|
#{NORM_REF_BOILERPLATE}
|
130
130
|
<bibitem type="standard" id="iso123">
|
131
131
|
<uri type="src">https://www.iso.org/standard/23281.html</uri>
|
@@ -213,7 +213,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
213
213
|
</bibitem>
|
214
214
|
</relation>
|
215
215
|
<docidentifier>ISO 123</docidentifier>
|
216
|
-
<docidentifier type='metanorma'>[
|
216
|
+
<docidentifier type='metanorma'>[2]</docidentifier>
|
217
217
|
<title><em>Standard</em></title>
|
218
218
|
</bibitem>
|
219
219
|
</references></bibliography>
|
@@ -224,7 +224,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
224
224
|
|
225
225
|
it "fetches simple ISO reference" do
|
226
226
|
# mock_isobib_get_123
|
227
|
-
VCR.use_cassette "isobib_get_123_1" do
|
227
|
+
VCR.use_cassette "isobib_get_123_1", :re_record_interval => 25200 do
|
228
228
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp( <<~"OUTPUT")
|
229
229
|
#{ISOBIB_BLANK_HDR}
|
230
230
|
[bibliography]
|
@@ -236,7 +236,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
236
236
|
#{BLANK_HDR}
|
237
237
|
<sections>
|
238
238
|
|
239
|
-
</sections><bibliography><references id="_" obligation="informative" normative="true"><title>Normative
|
239
|
+
</sections><bibliography><references id="_" obligation="informative" normative="true"><title>Normative references</title>
|
240
240
|
#{NORM_REF_BOILERPLATE}
|
241
241
|
<bibitem id='iso123' type='standard'>
|
242
242
|
<fetched>#{Date.today}</fetched>
|
@@ -250,6 +250,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
250
250
|
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
251
251
|
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
252
252
|
<docidentifier type='ISO'>ISO 123 (all parts)</docidentifier>
|
253
|
+
<docidentifier type='URN'>urn:iso:std:iso:123</docidentifier>
|
253
254
|
<docnumber>123</docnumber>
|
254
255
|
<date type='published'>
|
255
256
|
<on>2001</on>
|
@@ -296,6 +297,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
296
297
|
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
297
298
|
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
298
299
|
<docidentifier type='ISO'>ISO 123:2001</docidentifier>
|
300
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:en,fr</docidentifier>
|
299
301
|
<docnumber>123</docnumber>
|
300
302
|
<date type='published'>
|
301
303
|
<on>2001</on>
|
@@ -356,7 +358,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
356
358
|
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
357
359
|
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
358
360
|
<docidentifier type='ISO'>ISO 123 (all parts)</docidentifier>
|
359
|
-
<docidentifier type='metanorma'>[
|
361
|
+
<docidentifier type='metanorma'>[2]</docidentifier>
|
362
|
+
<docidentifier type='URN'>urn:iso:std:iso:123</docidentifier>
|
360
363
|
<docnumber>123</docnumber>
|
361
364
|
<date type='published'>
|
362
365
|
<on>2001</on>
|
@@ -403,6 +406,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
403
406
|
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
404
407
|
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
405
408
|
<docidentifier type='ISO'>ISO 123:2001</docidentifier>
|
409
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:en,fr</docidentifier>
|
406
410
|
<docnumber>123</docnumber>
|
407
411
|
<date type='published'>
|
408
412
|
<on>2001</on>
|
@@ -470,7 +474,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
470
474
|
#{BLANK_HDR}
|
471
475
|
<sections>
|
472
476
|
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
473
|
-
<title>Normative
|
477
|
+
<title>Normative references</title>
|
474
478
|
#{NORM_REF_BOILERPLATE}
|
475
479
|
<bibitem id="iso123" type="standard">
|
476
480
|
<title format="text/plain">Standard</title>
|
@@ -485,7 +489,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
485
489
|
</bibitem>
|
486
490
|
<bibitem id='iso124' type='standard'>
|
487
491
|
<title format='text/plain'>Standard</title>
|
488
|
-
<docidentifier type='metanorma'>[
|
492
|
+
<docidentifier type='metanorma'>[2]</docidentifier>
|
489
493
|
<docidentifier>IEC 123</docidentifier>
|
490
494
|
<docnumber>123</docnumber>
|
491
495
|
<contributor>
|
@@ -504,7 +508,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
504
508
|
it "processes dated ISO reference and joint ISO/IEC references" do
|
505
509
|
# mock_isobib_get_iec12382
|
506
510
|
# mock_isobib_get_124
|
507
|
-
VCR.use_cassette "dated_iso_ref_joint_iso_iec" do
|
511
|
+
VCR.use_cassette "dated_iso_ref_joint_iso_iec", :re_record_interval => 25200 do
|
508
512
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp( <<~"OUTPUT")
|
509
513
|
#{ISOBIB_BLANK_HDR}
|
510
514
|
[bibliography]
|
@@ -519,7 +523,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
519
523
|
<sections>
|
520
524
|
|
521
525
|
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
522
|
-
<title>Normative
|
526
|
+
<title>Normative references</title>
|
523
527
|
#{NORM_REF_BOILERPLATE}
|
524
528
|
<bibitem type="standard" id="iso123">
|
525
529
|
<fetched>#{Date.today}</fetched>
|
@@ -531,6 +535,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
531
535
|
<uri type="obp">https://www.iso.org/obp/ui/#!iso:std:21071:en</uri>
|
532
536
|
<uri type="rss">https://www.iso.org/contents/data/standard/02/10/21071.detail.rss</uri>
|
533
537
|
<docidentifier type="ISO">ISO/IEC TR 12382:1992</docidentifier>
|
538
|
+
<docidentifier type='URN'>urn:iso:std:iso-iec:tr:12382:stage-90.93:ed-2:en,fr</docidentifier>
|
534
539
|
<docnumber>12382</docnumber>
|
535
540
|
<date type="published">
|
536
541
|
<on>1992</on>
|
@@ -583,6 +588,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
583
588
|
<uri type="obp">https://www.iso.org/obp/ui/#!iso:std:61884:en</uri>
|
584
589
|
<uri type="rss">https://www.iso.org/contents/data/standard/06/18/61884.detail.rss</uri>
|
585
590
|
<docidentifier type="ISO">ISO 124:2014</docidentifier>
|
591
|
+
<docidentifier type='URN'>urn:iso:std:iso:124:stage-90.93:ed-7:en,fr</docidentifier>
|
586
592
|
<docnumber>124</docnumber>
|
587
593
|
<date type="published">
|
588
594
|
<on>2014</on>
|
@@ -630,7 +636,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
630
636
|
<uri type="obp">https://www.iso.org/obp/ui/#!iso:std:21071:en</uri>
|
631
637
|
<uri type="rss">https://www.iso.org/contents/data/standard/02/10/21071.detail.rss</uri>
|
632
638
|
<docidentifier type="ISO">ISO/IEC TR 12382:1992</docidentifier>
|
633
|
-
<docidentifier type='metanorma'>[
|
639
|
+
<docidentifier type='metanorma'>[3]</docidentifier>
|
640
|
+
<docidentifier type='URN'>urn:iso:std:iso-iec:tr:12382:stage-90.93:ed-2:en,fr</docidentifier>
|
634
641
|
<docnumber>12382</docnumber>
|
635
642
|
<date type="published">
|
636
643
|
<on>1992</on>
|
@@ -683,7 +690,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
683
690
|
<uri type="obp">https://www.iso.org/obp/ui/#!iso:std:61884:en</uri>
|
684
691
|
<uri type="rss">https://www.iso.org/contents/data/standard/06/18/61884.detail.rss</uri>
|
685
692
|
<docidentifier type="ISO">ISO 124:2014</docidentifier>
|
686
|
-
<docidentifier type='metanorma'>[
|
693
|
+
<docidentifier type='metanorma'>[4]</docidentifier>
|
694
|
+
<docidentifier type='URN'>urn:iso:std:iso:124:stage-90.93:ed-7:en,fr</docidentifier>
|
687
695
|
<docnumber>124</docnumber>
|
688
696
|
<date type="published">
|
689
697
|
<on>2014</on>
|
@@ -729,7 +737,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
729
737
|
end
|
730
738
|
|
731
739
|
it "declines to fetch individual references" do
|
732
|
-
VCR.use_cassette "dated_iso_ref_joint_iso_iec" do
|
740
|
+
VCR.use_cassette "dated_iso_ref_joint_iso_iec", :re_record_interval => 25200 do
|
733
741
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp( <<~"OUTPUT")
|
734
742
|
#{ISOBIB_BLANK_HDR}
|
735
743
|
[bibliography]
|
@@ -742,7 +750,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
742
750
|
<sections>
|
743
751
|
|
744
752
|
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
745
|
-
<title>Normative
|
753
|
+
<title>Normative references</title>
|
746
754
|
#{NORM_REF_BOILERPLATE}
|
747
755
|
<bibitem id='iso123'>
|
748
756
|
<formattedref format='application/x-isodoc+xml'>
|
@@ -763,6 +771,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
763
771
|
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:61884:en</uri>
|
764
772
|
<uri type='rss'>https://www.iso.org/contents/data/standard/06/18/61884.detail.rss</uri>
|
765
773
|
<docidentifier type='ISO'>ISO 124:2014</docidentifier>
|
774
|
+
<docidentifier type='URN'>urn:iso:std:iso:124:stage-90.93:ed-7:en,fr</docidentifier>
|
766
775
|
<docnumber>124</docnumber>
|
767
776
|
<date type='published'>
|
768
777
|
<on>2014</on>
|
@@ -821,7 +830,7 @@ OUTPUT
|
|
821
830
|
#{BLANK_HDR}
|
822
831
|
<sections>
|
823
832
|
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
824
|
-
<title>Normative
|
833
|
+
<title>Normative references</title>
|
825
834
|
#{NORM_REF_BOILERPLATE}
|
826
835
|
<bibitem id="iso123" type="standard">
|
827
836
|
<title format="text/plain">Standard</title>
|
@@ -869,7 +878,7 @@ OUTPUT
|
|
869
878
|
</bibitem>
|
870
879
|
<bibitem id='iso126' type='standard'>
|
871
880
|
<title format='text/plain'>Standard</title>
|
872
|
-
<docidentifier type='metanorma'>[
|
881
|
+
<docidentifier type='metanorma'>[4]</docidentifier>
|
873
882
|
<docidentifier>ISO 123:—</docidentifier>
|
874
883
|
<docnumber>123</docnumber>
|
875
884
|
<date type='published'>
|
@@ -902,7 +911,7 @@ OUTPUT
|
|
902
911
|
#{BLANK_HDR}
|
903
912
|
<sections>
|
904
913
|
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
905
|
-
<title>Normative
|
914
|
+
<title>Normative references</title>
|
906
915
|
#{NORM_REF_BOILERPLATE}
|
907
916
|
<bibitem id="iso123" type="standard">
|
908
917
|
<title format="text/plain">Standard</title>
|
@@ -923,7 +932,7 @@ OUTPUT
|
|
923
932
|
</bibitem>
|
924
933
|
<bibitem id='iso124' type='standard'>
|
925
934
|
<title format='text/plain'>Standard</title>
|
926
|
-
<docidentifier type='metanorma'>[
|
935
|
+
<docidentifier type='metanorma'>[2]</docidentifier>
|
927
936
|
<docidentifier>ISO 123:1066 (all parts)</docidentifier>
|
928
937
|
<docnumber>123</docnumber>
|
929
938
|
<date type='published'>
|
@@ -947,7 +956,7 @@ OUTPUT
|
|
947
956
|
|
948
957
|
it "processes RFC reference in Normative References" do
|
949
958
|
# mock_rfcbib_get_rfc8341
|
950
|
-
VCR.use_cassette "rfcbib_get_rfc8341" do
|
959
|
+
VCR.use_cassette "rfcbib_get_rfc8341", :re_record_interval => 25200 do
|
951
960
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp( <<~"OUTPUT")
|
952
961
|
#{ISOBIB_BLANK_HDR}
|
953
962
|
[bibliography]
|
@@ -969,7 +978,7 @@ OUTPUT
|
|
969
978
|
</p>
|
970
979
|
</clause>
|
971
980
|
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
972
|
-
<title>Normative
|
981
|
+
<title>Normative references</title>
|
973
982
|
#{NORM_REF_BOILERPLATE}
|
974
983
|
<bibitem id="iso123" type="standard">
|
975
984
|
<fetched>#{Date.today}</fetched>
|
@@ -1036,7 +1045,7 @@ OUTPUT
|
|
1036
1045
|
<uri type='xml'>https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8341.xml</uri>
|
1037
1046
|
<uri type="src">https://www.rfc-editor.org/info/rfc8341</uri>
|
1038
1047
|
<docidentifier type="IETF">RFC 8341</docidentifier>
|
1039
|
-
<docidentifier type='metanorma'>[
|
1048
|
+
<docidentifier type='metanorma'>[2]</docidentifier>
|
1040
1049
|
<docidentifier type='rfc-anchor'>RFC8341</docidentifier>
|
1041
1050
|
<docidentifier type="DOI">10.17487/RFC8341</docidentifier>
|
1042
1051
|
<date type="published">
|
@@ -1110,7 +1119,7 @@ OUTPUT
|
|
1110
1119
|
<sections>
|
1111
1120
|
|
1112
1121
|
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
1113
|
-
<title>Normative
|
1122
|
+
<title>Normative references</title>
|
1114
1123
|
#{NORM_REF_BOILERPLATE}
|
1115
1124
|
<bibitem id="iso123">
|
1116
1125
|
<formattedref format="application/x-isodoc+xml">
|
@@ -1123,7 +1132,7 @@ OUTPUT
|
|
1123
1132
|
<formattedref format='application/x-isodoc+xml'>
|
1124
1133
|
<em>Standard</em>
|
1125
1134
|
</formattedref>
|
1126
|
-
<docidentifier type='metanorma'>[
|
1135
|
+
<docidentifier type='metanorma'>[2]</docidentifier>
|
1127
1136
|
<docidentifier>XYZ 123:1066 (all parts)</docidentifier>
|
1128
1137
|
<docnumber>123:1066 (all parts)</docnumber>
|
1129
1138
|
</bibitem>
|
@@ -1198,7 +1207,7 @@ OUTPUT
|
|
1198
1207
|
* [[[iso124,(1)ISO 123]]] _Standard_
|
1199
1208
|
INPUT
|
1200
1209
|
<?xml version="1.0" encoding="UTF-8"?>
|
1201
|
-
<standard-document xmlns="https://www.metanorma.org/ns/standoc">
|
1210
|
+
<standard-document xmlns="https://www.metanorma.org/ns/standoc" type="semantic" version="#{Metanorma::Standoc::VERSION}">
|
1202
1211
|
<bibdata type="standard">
|
1203
1212
|
<title language="en" format="text/plain">Document title</title>
|
1204
1213
|
<language>en</language>
|
@@ -1214,7 +1223,7 @@ OUTPUT
|
|
1214
1223
|
<sections>
|
1215
1224
|
|
1216
1225
|
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
1217
|
-
<title>Normative
|
1226
|
+
<title>Normative references</title>
|
1218
1227
|
#{NORM_REF_BOILERPLATE}
|
1219
1228
|
<bibitem id="iso123" type="standard">
|
1220
1229
|
<title format="text/plain">Standard</title>
|
@@ -1229,7 +1238,7 @@ OUTPUT
|
|
1229
1238
|
</bibitem>
|
1230
1239
|
<bibitem id='iso124' type='standard'>
|
1231
1240
|
<title format='text/plain'>Standard</title>
|
1232
|
-
<docidentifier type='metanorma'>[
|
1241
|
+
<docidentifier type='metanorma'>[2]</docidentifier>
|
1233
1242
|
<docidentifier type='ISO'>ISO 123</docidentifier>
|
1234
1243
|
<docnumber>123</docnumber>
|
1235
1244
|
<contributor>
|
@@ -1260,7 +1269,7 @@ OUTPUT
|
|
1260
1269
|
INPUT
|
1261
1270
|
#{BLANK_HDR}
|
1262
1271
|
<sections>
|
1263
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
1272
|
+
<clause id='_' inline-header='false' obligation='normative' type="scope">
|
1264
1273
|
<title>Scope</title>
|
1265
1274
|
<p id='_'>
|
1266
1275
|
<eref type='inline' bibitemid='iso123' citeas='ISO 123'/>
|
@@ -1278,7 +1287,7 @@ OUTPUT
|
|
1278
1287
|
</sections>
|
1279
1288
|
<bibliography>
|
1280
1289
|
<references id='_' normative='true' obligation='informative'>
|
1281
|
-
<title>Normative
|
1290
|
+
<title>Normative references</title>
|
1282
1291
|
<p id='_'>
|
1283
1292
|
The following documents are referred to in the text in such a way that
|
1284
1293
|
some or all of their content constitutes requirements of this document.
|
@@ -1321,7 +1330,7 @@ OUTPUT
|
|
1321
1330
|
INPUT
|
1322
1331
|
#{BLANK_HDR}
|
1323
1332
|
<sections>
|
1324
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
1333
|
+
<clause id='_' inline-header='false' obligation='normative' type="scope">
|
1325
1334
|
<title>Scope</title>
|
1326
1335
|
<p id='_'>
|
1327
1336
|
<eref type='inline' bibitemid='iso123' citeas='ISO 123 (all parts)'/>
|
@@ -1360,7 +1369,7 @@ OUTPUT
|
|
1360
1369
|
</sections>
|
1361
1370
|
<bibliography>
|
1362
1371
|
<references id='_' normative='true' obligation='informative'>
|
1363
|
-
<title>Normative
|
1372
|
+
<title>Normative references</title>
|
1364
1373
|
<p id='_'>
|
1365
1374
|
The following documents are referred to in the text in such a way that
|
1366
1375
|
some or all of their content constitutes requirements of this document.
|
@@ -59,7 +59,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
59
59
|
[.nonterm]
|
60
60
|
==== General
|
61
61
|
|
62
|
-
==== Symbols
|
62
|
+
==== Symbols
|
63
63
|
|
64
64
|
== Abbreviated Terms
|
65
65
|
|
@@ -82,6 +82,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
82
82
|
INPUT
|
83
83
|
#{BLANK_HDR.sub(/<status>/, "<abstract> <p>Text</p> </abstract><status>")}
|
84
84
|
<preface><abstract id="_">
|
85
|
+
<title>Abstract</title>
|
85
86
|
<p id="_">Text</p>
|
86
87
|
</abstract><foreword id='_' obligation="informative">
|
87
88
|
<title>Foreword</title>
|
@@ -101,7 +102,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
101
102
|
</preface><sections>
|
102
103
|
|
103
104
|
|
104
|
-
<clause id="_" inline-header="false" obligation="normative">
|
105
|
+
<clause id="_" inline-header="false" obligation="normative" type="scope">
|
105
106
|
<title>Scope</title>
|
106
107
|
<p id="_">Text</p>
|
107
108
|
</clause>
|
@@ -143,14 +144,14 @@ RSpec.describe Asciidoctor::Standoc do
|
|
143
144
|
<preferred>Term2</preferred>
|
144
145
|
</term>
|
145
146
|
</terms>
|
146
|
-
<definitions id="_"><title>Symbols and
|
147
|
+
<definitions id="_" obligation="normative"><title>Symbols and abbreviated terms</title><clause id="_" inline-header="false" obligation="normative">
|
147
148
|
<title>General</title>
|
148
149
|
</clause>
|
149
|
-
<definitions id="_">
|
150
|
-
<title>Symbols
|
150
|
+
<definitions id="_" obligation="normative" type="symbols">
|
151
|
+
<title>Symbols</title>
|
151
152
|
</definitions></definitions></clause>
|
152
|
-
<definitions id="_">
|
153
|
-
<title>Abbreviated
|
153
|
+
<definitions id="_" obligation="normative" type="abbreviated_terms">
|
154
|
+
<title>Abbreviated terms</title>
|
154
155
|
</definitions>
|
155
156
|
<clause id="_" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="_" inline-header="false" obligation="normative">
|
156
157
|
<title>Introduction</title>
|
@@ -168,7 +169,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
168
169
|
<title>Annex A.1</title>
|
169
170
|
</clause>
|
170
171
|
</annex><bibliography><references id="_" obligation="informative" normative="true">
|
171
|
-
<title>Normative
|
172
|
+
<title>Normative references</title>
|
172
173
|
<p id="_">There are no normative references in this document.</p>
|
173
174
|
</references><clause id="_" obligation="informative">
|
174
175
|
<title>Bibliography</title>
|
@@ -256,7 +257,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
256
257
|
[language=en,script=Latn]
|
257
258
|
==== General
|
258
259
|
|
259
|
-
==== Symbols
|
260
|
+
==== Symbols
|
260
261
|
|
261
262
|
[language=en,script=Latn]
|
262
263
|
== Abbreviated Terms
|
@@ -287,6 +288,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
287
288
|
INPUT
|
288
289
|
#{BLANK_HDR.sub(/<status>/, "<abstract> <p>Text</p> </abstract><status>")}
|
289
290
|
<preface><abstract id="_" language="en" script="Latn">
|
291
|
+
<title>Abstract</title>
|
290
292
|
<p id="_">Text</p>
|
291
293
|
</abstract><foreword id='_' language='en' script='Latn' obligation='informative'>
|
292
294
|
<title>Foreword</title>
|
@@ -306,7 +308,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
306
308
|
</preface><sections>
|
307
309
|
|
308
310
|
|
309
|
-
<clause id="_" language="en" script="Latn" inline-header="false" obligation="normative">
|
311
|
+
<clause id="_" language="en" script="Latn" inline-header="false" obligation="normative" type="scope">
|
310
312
|
<title>Scope</title>
|
311
313
|
<p id="_">Text</p>
|
312
314
|
</clause>
|
@@ -348,14 +350,14 @@ RSpec.describe Asciidoctor::Standoc do
|
|
348
350
|
<preferred>Term2</preferred>
|
349
351
|
</term>
|
350
352
|
</terms>
|
351
|
-
<definitions id="_" language="en" script="Latn"><title>Symbols and
|
353
|
+
<definitions id="_" language="en" script="Latn" obligation="normative"><title>Symbols and abbreviated terms</title><clause id="_" language="en" script="Latn" inline-header="false" obligation="normative">
|
352
354
|
<title>General</title>
|
353
355
|
</clause>
|
354
|
-
<definitions id="_">
|
355
|
-
<title>Symbols
|
356
|
+
<definitions id="_" obligation="normative" type="symbols">
|
357
|
+
<title>Symbols</title>
|
356
358
|
</definitions></definitions></clause>
|
357
|
-
<definitions id="_" language="en" script="Latn">
|
358
|
-
<title>Abbreviated
|
359
|
+
<definitions id="_" language="en" script="Latn" obligation="normative" type="abbreviated_terms">
|
360
|
+
<title>Abbreviated terms</title>
|
359
361
|
</definitions>
|
360
362
|
<clause id="_" language="en" script="Latn" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="_" language="en" script="Latn" inline-header="false" obligation="normative">
|
361
363
|
<title>Introduction</title>
|
@@ -373,7 +375,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
373
375
|
<title>Annex A.1</title>
|
374
376
|
</clause>
|
375
377
|
</annex><bibliography><references id="_" language="en" script="Latn" obligation="informative" normative="true">
|
376
|
-
<title>Normative
|
378
|
+
<title>Normative references</title>
|
377
379
|
<p id="_">There are no normative references in this document.</p>
|
378
380
|
</references><clause id="_" language="en" script="Latn" obligation="informative">
|
379
381
|
<title>Bibliography</title>
|
@@ -420,10 +422,10 @@ RSpec.describe Asciidoctor::Standoc do
|
|
420
422
|
|
421
423
|
==== Term2
|
422
424
|
|
423
|
-
[heading=symbols
|
425
|
+
[heading=symbols]
|
424
426
|
=== Σύμβολα και Συντομογραφίες
|
425
427
|
|
426
|
-
[heading=
|
428
|
+
[heading=abbreviated terms]
|
427
429
|
== Σύμβολα και Συντομογραφίες
|
428
430
|
|
429
431
|
== Clause 4
|
@@ -445,6 +447,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
445
447
|
#{BLANK_HDR.sub(/<status>/, "<abstract> <p>Text</p> </abstract><status>")}
|
446
448
|
<preface>
|
447
449
|
<abstract id='_'>
|
450
|
+
<title>Abstract</title>
|
448
451
|
<p id='_'>Text</p>
|
449
452
|
</abstract>
|
450
453
|
<foreword id='_' obligation='informative'>
|
@@ -458,7 +461,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
458
461
|
</clause>
|
459
462
|
</introduction>
|
460
463
|
<acknowledgements id='_' obligation='informative'>
|
461
|
-
<title
|
464
|
+
<title>Acknowledgements</title>
|
462
465
|
</acknowledgements>
|
463
466
|
</preface>
|
464
467
|
<sections>
|
@@ -470,7 +473,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
470
473
|
</term>
|
471
474
|
</terms>
|
472
475
|
<clause id='_' obligation='normative'>
|
473
|
-
<title>Terms and
|
476
|
+
<title>Terms, definitions and symbols</title>
|
474
477
|
<p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
|
475
478
|
<terms id='_' obligation='normative'>
|
476
479
|
<title>Normal Terms</title>
|
@@ -478,12 +481,12 @@ RSpec.describe Asciidoctor::Standoc do
|
|
478
481
|
<preferred>Term2</preferred>
|
479
482
|
</term>
|
480
483
|
</terms>
|
481
|
-
<definitions id='_'>
|
482
|
-
<title
|
484
|
+
<definitions id='_' obligation="normative" type="symbols">
|
485
|
+
<title>Symbols</title>
|
483
486
|
</definitions>
|
484
487
|
</clause>
|
485
|
-
<definitions id='_'>
|
486
|
-
<title
|
488
|
+
<definitions id='_' obligation="normative" type="abbreviated_terms">
|
489
|
+
<title>Abbreviated terms</title>
|
487
490
|
</definitions>
|
488
491
|
<clause id='_' inline-header='false' obligation='normative'>
|
489
492
|
<title>Clause 4</title>
|
@@ -503,7 +506,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
503
506
|
</annex>
|
504
507
|
<bibliography>
|
505
508
|
<references id='_' obligation='informative' normative="true">
|
506
|
-
<title>Normative
|
509
|
+
<title>Normative references</title>
|
507
510
|
<p id="_">There are no normative references in this document.</p>
|
508
511
|
</references>
|
509
512
|
<clause id='_' obligation='informative'>
|
@@ -517,7 +520,6 @@ RSpec.describe Asciidoctor::Standoc do
|
|
517
520
|
OUTPUT
|
518
521
|
end
|
519
522
|
|
520
|
-
|
521
523
|
it "varies terms & symbols title" do
|
522
524
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
523
525
|
#{ASCIIDOC_BLANK_HDR}
|
@@ -537,7 +539,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
537
539
|
<term id='_'>
|
538
540
|
<preferred>Term</preferred>
|
539
541
|
</term>
|
540
|
-
<definitions id='_'>
|
542
|
+
<definitions id='_' obligation="normative" type="symbols">
|
541
543
|
<title>Symbols</title>
|
542
544
|
</definitions>
|
543
545
|
</terms>
|
@@ -554,6 +556,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
554
556
|
|
555
557
|
=== Term
|
556
558
|
|
559
|
+
[heading="abbreviated terms"]
|
557
560
|
=== Symbols
|
558
561
|
|
559
562
|
INPUT
|
@@ -565,8 +568,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
565
568
|
<term id='_'>
|
566
569
|
<preferred>Term</preferred>
|
567
570
|
</term>
|
568
|
-
<definitions id='_'>
|
569
|
-
<title>
|
571
|
+
<definitions id='_' obligation="normative" type="abbreviated_terms">
|
572
|
+
<title>Abbreviated terms</title>
|
570
573
|
</definitions>
|
571
574
|
</terms>
|
572
575
|
</sections>
|
@@ -671,12 +674,12 @@ RSpec.describe Asciidoctor::Standoc do
|
|
671
674
|
#{BLANK_HDR}
|
672
675
|
<sections>
|
673
676
|
<terms id='_' obligation='normative'>
|
674
|
-
<title>Terms, definitions
|
677
|
+
<title>Terms, definitions and symbols</title>
|
675
678
|
<p id='_'>No terms and definitions are listed in this document.</p>
|
676
679
|
<clause id='_' inline-header='false' obligation='normative'>
|
677
680
|
<title>Terms and definitions</title>
|
678
681
|
</clause>
|
679
|
-
<definitions id='_'>
|
682
|
+
<definitions id='_' obligation="normative" type="symbols">
|
680
683
|
<title>Symbols</title>
|
681
684
|
</definitions>
|
682
685
|
</terms>
|
@@ -787,11 +790,11 @@ RSpec.describe Asciidoctor::Standoc do
|
|
787
790
|
#{BLANK_HDR.sub(%r{<language>en</language>}, "<language>fr</language>")}
|
788
791
|
<termdocsource bibitemid="iso1234"/><termdocsource bibitemid="iso5678"/>
|
789
792
|
<preface><foreword id='_' obligation="informative">
|
790
|
-
<title>
|
793
|
+
<title>Avant-propos</title>
|
791
794
|
<p id="_">Foreword</p>
|
792
795
|
</foreword></preface><sections>
|
793
796
|
<terms id="_" obligation="normative">
|
794
|
-
<title>Terms
|
797
|
+
<title>Terms et définitions</title>
|
795
798
|
<p id="_">Pour les besoins du présent document, les termes et définitions de <eref bibitemid="iso1234"/> et <eref bibitemid="iso5678"/> s’appliquent.</p>
|
796
799
|
|
797
800
|
|
@@ -820,11 +823,11 @@ RSpec.describe Asciidoctor::Standoc do
|
|
820
823
|
INPUT
|
821
824
|
#{BLANK_HDR.sub(%r{<language>en</language>}, "<language>zh</language>").sub(%r{<script>Latn</script>}, "<script>Hans</script>")}
|
822
825
|
<termdocsource bibitemid="iso1234"/><termdocsource bibitemid="iso5678"/><preface><foreword id='_' obligation="informative">
|
823
|
-
<title
|
826
|
+
<title>前言</title>
|
824
827
|
<p id="_">Foreword</p>
|
825
828
|
</foreword></preface><sections>
|
826
829
|
<terms id="_" obligation="normative">
|
827
|
-
<title
|
830
|
+
<title>术语和定义</title><p id="_"><eref bibitemid="iso1234"/>和<eref bibitemid="iso5678"/>界定的术语和定义适用于本文件。</p>
|
828
831
|
|
829
832
|
|
830
833
|
|
@@ -858,12 +861,12 @@ INPUT
|
|
858
861
|
#{BLANK_HDR}
|
859
862
|
<sections>
|
860
863
|
<terms id='tda' obligation='normative'>
|
861
|
-
<title>Terms, definitions
|
864
|
+
<title>Terms, definitions and symbols</title>
|
862
865
|
<p id='_'>No terms and definitions are listed in this document.</p>
|
863
866
|
<clause id='terms' inline-header='false' obligation='normative'>
|
864
867
|
<title>Terms and definitions</title>
|
865
868
|
</clause>
|
866
|
-
<definitions id='_'>
|
869
|
+
<definitions id='_' obligation="normative" type="symbols">
|
867
870
|
<title>Symbols</title>
|
868
871
|
</definitions>
|
869
872
|
</terms>
|
@@ -895,7 +898,7 @@ _time_ (<<term-time>>) on the _calendar_ (<<term-calendar>>) _time scale_ (<<ter
|
|
895
898
|
INPUT
|
896
899
|
#{BLANK_HDR}
|
897
900
|
<sections>
|
898
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
901
|
+
<clause id='_' inline-header='false' obligation='normative' type="scope">
|
899
902
|
<title>Scope</title>
|
900
903
|
</clause>
|
901
904
|
<clause id='tda' obligation='normative'>
|
@@ -963,7 +966,7 @@ INPUT
|
|
963
966
|
</preface>
|
964
967
|
<sections> </sections>
|
965
968
|
<annex id='_' obligation='' language='fr' script=''>
|
966
|
-
<definitions id='sym' language='fr'>
|
969
|
+
<definitions id='sym' language='fr' obligation="normative">
|
967
970
|
<title>Symbols and abbreviated terms</title>
|
968
971
|
</definitions>
|
969
972
|
</annex>
|