metanorma-iso 1.7.1 → 1.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +0 -4
  3. data/lib/asciidoctor/iso/base.rb +12 -12
  4. data/lib/asciidoctor/iso/cleanup.rb +1 -1
  5. data/lib/asciidoctor/iso/isodoc.rng +19 -1
  6. data/lib/asciidoctor/iso/isostandard-amd.rng +3 -0
  7. data/lib/asciidoctor/iso/isostandard.rng +6 -0
  8. data/lib/metanorma/iso/version.rb +1 -1
  9. data/spec/asciidoctor-iso/amd_spec.rb +575 -573
  10. data/spec/asciidoctor-iso/base_spec.rb +445 -454
  11. data/spec/asciidoctor-iso/blocks_spec.rb +333 -288
  12. data/spec/asciidoctor-iso/cleanup_spec.rb +813 -704
  13. data/spec/asciidoctor-iso/inline_spec.rb +116 -91
  14. data/spec/asciidoctor-iso/lists_spec.rb +128 -121
  15. data/spec/asciidoctor-iso/refs_spec.rb +308 -250
  16. data/spec/asciidoctor-iso/section_spec.rb +273 -242
  17. data/spec/asciidoctor-iso/table_spec.rb +258 -242
  18. data/spec/asciidoctor-iso/validate_spec.rb +1099 -1165
  19. data/spec/isodoc/amd_spec.rb +967 -946
  20. data/spec/isodoc/blocks_spec.rb +530 -507
  21. data/spec/isodoc/i18n_spec.rb +953 -911
  22. data/spec/isodoc/inline_spec.rb +355 -293
  23. data/spec/isodoc/iso_spec.rb +338 -314
  24. data/spec/isodoc/metadata_spec.rb +392 -382
  25. data/spec/isodoc/postproc_spec.rb +833 -656
  26. data/spec/isodoc/ref_spec.rb +374 -331
  27. data/spec/isodoc/section_spec.rb +608 -525
  28. data/spec/isodoc/table_spec.rb +472 -411
  29. data/spec/isodoc/terms_spec.rb +209 -185
  30. data/spec/isodoc/xref_spec.rb +1370 -1236
  31. data/spec/metanorma/processor_spec.rb +28 -26
  32. data/spec/spec_helper.rb +176 -193
  33. metadata +2 -4
  34. data/.rubocop.ribose.yml +0 -66
  35. data/spec/assets/xref_error.adoc +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9af9da09f9e17f25423843c284ed66d9f2206535631b334263bea9f80211acf6
4
- data.tar.gz: 9987c2fcb45025dee73bc95fd21939104495dbf3e07e79afac877b7b9fcf81f4
3
+ metadata.gz: 69530242f8dcfcd209289f65397818d2d73e69920a2588b1bfa4c30b712ada50
4
+ data.tar.gz: 72261437fe21d308b4c01e4ba3ce7f9fe15a5c3a35dce4828dc7b04e2c941df4
5
5
  SHA512:
6
- metadata.gz: f947d939ce553a170f712c09c903bf5d8c1192c7de45063d9407b4a7c300d31ee325cb269db9046d917a0184a18c78f654377922e23b2eca33add015139e5af9
7
- data.tar.gz: c5d5d07e2c558293c926c3f4a4be46ff96659670082f2c09951f58dada582f6d93a3d8ccaeba15016bc0548dceda5c5f32d664a8cb05110d69e25179c67f1c4d
6
+ metadata.gz: 8a01d3c261513bddc48ce11f6b331ab025939d41e234a02e6e63cd39ef15c865af2a7f086768a38cbbecbec8aac76fabbb1ea5febcb3f4fb0852aab58ba7b794
7
+ data.tar.gz: d83d323c7e9ca83dc5afaead3e837da9bc952074a4f913f5eb28dce637d98ffce6f4e6206b96ff8ef3a05a585b8a75c2de215fae8a36dfae325c1b632a0cb68a
data/.rubocop.yml CHANGED
@@ -4,7 +4,3 @@
4
4
 
5
5
  inherit_from:
6
6
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
7
- AllCops:
8
- TargetRubyVersion: 2.3
9
- Rails:
10
- Enabled: true
@@ -44,23 +44,23 @@ module Asciidoctor
44
44
  @amd = %w(amendment technical-corrigendum).include? doctype(node)
45
45
  end
46
46
 
47
- def ol_attrs(node)
47
+ def ol_attrs(node)
48
48
  attr_code(keep_attrs(node).
49
49
  merge(id: ::Metanorma::Utils::anchor_or_uuid(node)))
50
50
  end
51
51
 
52
52
  def outputs(node, ret)
53
- File.open(@filename + ".xml", "w:UTF-8") { |f| f.write(ret) }
54
- presentation_xml_converter(node).convert(@filename + ".xml")
55
- html_converter_alt(node).convert(@filename + ".presentation.xml",
56
- nil, false, "#{@filename}_alt.html")
57
- html_converter(node).convert(@filename + ".presentation.xml",
58
- nil, false, "#{@filename}.html")
59
- doc_converter(node).convert(@filename + ".presentation.xml",
60
- nil, false, "#{@filename}.doc")
61
- pdf_converter(node)&.convert(@filename + ".presentation.xml",
62
- nil, false, "#{@filename}.pdf")
63
- #sts_converter(node)&.convert(@filename + ".xml")
53
+ File.open(@filename + ".xml", "w:UTF-8") { |f| f.write(ret) }
54
+ presentation_xml_converter(node).convert(@filename + ".xml")
55
+ html_converter_alt(node).convert(@filename + ".presentation.xml",
56
+ nil, false, "#{@filename}_alt.html")
57
+ html_converter(node).convert(@filename + ".presentation.xml",
58
+ nil, false, "#{@filename}.html")
59
+ doc_converter(node).convert(@filename + ".presentation.xml",
60
+ nil, false, "#{@filename}.doc")
61
+ pdf_converter(node)&.convert(@filename + ".presentation.xml",
62
+ nil, false, "#{@filename}.pdf")
63
+ #sts_converter(node)&.convert(@filename + ".xml")
64
64
  end
65
65
  end
66
66
  end
@@ -61,7 +61,7 @@ module Asciidoctor
61
61
  id.content = id_prefix(prefix, id)
62
62
  end
63
63
 
64
- def format_ref(ref, type, isopub)
64
+ def format_ref(ref, type)
65
65
  ref = ref.sub(/ \(All Parts\)/i, "")
66
66
  super
67
67
  end
@@ -919,6 +919,9 @@
919
919
  </choice>
920
920
  </attribute>
921
921
  <ref name="bibdata"/>
922
+ <optional>
923
+ <ref name="misccontainer"/>
924
+ </optional>
922
925
  <optional>
923
926
  <ref name="boilerplate"/>
924
927
  </optional>
@@ -929,11 +932,21 @@
929
932
  <zeroOrMore>
930
933
  <ref name="annex"/>
931
934
  </zeroOrMore>
935
+ <optional>
936
+ <ref name="bibliography"/>
937
+ </optional>
932
938
  <zeroOrMore>
933
- <ref name="references"/>
939
+ <ref name="indexsect"/>
934
940
  </zeroOrMore>
935
941
  </element>
936
942
  </define>
943
+ <define name="misccontainer">
944
+ <element name="misc-container">
945
+ <oneOrMore>
946
+ <ref name="AnyElement"/>
947
+ </oneOrMore>
948
+ </element>
949
+ </define>
937
950
  <define name="preface">
938
951
  <element name="preface">
939
952
  <oneOrMore>
@@ -957,6 +970,11 @@
957
970
  <ref name="Content-Section"/>
958
971
  </element>
959
972
  </define>
973
+ <define name="indexsect">
974
+ <element name="indexsect">
975
+ <ref name="Content-Section"/>
976
+ </element>
977
+ </define>
960
978
  <define name="boilerplate">
961
979
  <element name="boilerplate">
962
980
  <optional>
@@ -39,6 +39,9 @@
39
39
  </choice>
40
40
  </attribute>
41
41
  <ref name="bibdata"/>
42
+ <optional>
43
+ <ref name="misccontainer"/>
44
+ </optional>
42
45
  <optional>
43
46
  <ref name="boilerplate"/>
44
47
  </optional>
@@ -428,6 +428,9 @@
428
428
  <zeroOrMore>
429
429
  <ref name="termdocsource"/>
430
430
  </zeroOrMore>
431
+ <optional>
432
+ <ref name="misccontainer"/>
433
+ </optional>
431
434
  <optional>
432
435
  <ref name="boilerplate"/>
433
436
  </optional>
@@ -439,6 +442,9 @@
439
442
  <ref name="annex"/>
440
443
  </zeroOrMore>
441
444
  <ref name="bibliography"/>
445
+ <zeroOrMore>
446
+ <ref name="indexsect"/>
447
+ </zeroOrMore>
442
448
  </element>
443
449
  </define>
444
450
  <define name="horizontal">
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ISO
3
- VERSION = "1.7.1".freeze
3
+ VERSION = "1.7.2".freeze
4
4
  end
5
5
  end
@@ -1,9 +1,8 @@
1
1
  require "spec_helper"
2
- require "fileutils"
3
2
 
4
3
  RSpec.describe Asciidoctor::ISO do
5
- it "processes amendment sections" do
6
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
4
+ it "processes amendment sections" do
5
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
7
6
  #{AMD_BLANK_HDR}
8
7
  == Foreword
9
8
 
@@ -55,84 +54,83 @@ RSpec.describe Asciidoctor::ISO do
55
54
 
56
55
  === Bibliography Subsection
57
56
  INPUT
58
- #{BLANK_HDR.sub(%r{<doctype>article</doctype>}, "<doctype>amendment</doctype>")}
59
- <sections>
60
- <clause id='_' obligation='normative'>
61
- <title>Foreword</title>
62
- <p id='_'>Text</p>
63
- </clause>
64
- <clause id='_' obligation='normative'>
65
- <title>Introduction</title>
66
- <clause id='_' obligation='normative'>
67
- <title>Introduction Subsection</title>
68
- </clause>
69
- </clause>
70
- <clause id='_' obligation='normative'>
71
- <title>Scope</title>
72
- <p id='_'>Text</p>
73
- </clause>
74
- <clause id='_' obligation='normative'>
75
- <title>Acknowledgements</title>
76
- </clause>
77
- <clause id='_' obligation='normative'>
78
- <title>Normative References</title>
79
- </clause>
80
- <clause id='_' obligation='normative'>
81
- <title>Terms and Definitions</title>
82
- <clause id='_' obligation='normative'>
83
- <title>Term1</title>
84
- </clause>
85
- </clause>
86
- <clause id='_' obligation='normative'>
87
- <title>Terms, Definitions, Symbols and Abbreviated Terms</title>
88
- <clause id='_' obligation='normative'>
89
- <title>Normal Terms</title>
90
- <clause id='_' obligation='normative'>
91
- <title>Term2</title>
92
- </clause>
93
- </clause>
94
- <clause id='_' obligation='normative'>
95
- <title>Symbols and Abbreviated Terms</title>
96
- </clause>
97
- </clause>
98
- <clause id='_' obligation='normative'>
99
- <title>Symbols and Abbreviated Terms</title>
100
- </clause>
101
- <clause id='_' obligation='normative'>
102
- <title>Clause 4</title>
103
- <clause id='_' obligation='normative'>
104
- <title>Introduction</title>
105
- </clause>
106
- <clause id='_' obligation='normative'>
107
- <title>Clause 4.2</title>
108
- </clause>
109
- </clause>
110
- <clause id='_' obligation='normative'>
111
- <title>Terms and Definitions</title>
112
- </clause>
113
- <clause id='_' obligation='normative'>
114
- <title>Bibliography</title>
115
- <clause id='_' obligation='normative'>
116
- <title>Bibliography Subsection</title>
117
- </clause>
118
- </clause>
119
- </sections>
120
- <annex id='_' obligation='normative'>
121
- <title>Annex</title>
122
- <clause id='_' obligation='normative'>
123
- <title>Annex A.1</title>
124
- </clause>
125
- <appendix id='_' obligation='normative'>
126
- <title>Appendix 1</title>
127
- </appendix>
128
- </annex>
129
- </iso-standard>
130
-
131
- OUTPUT
132
- end
57
+ #{BLANK_HDR.sub(%r{<doctype>article</doctype>}, '<doctype>amendment</doctype>')}
58
+ <sections>
59
+ <clause id="_" obligation="normative">
60
+ <title>Foreword</title>
61
+ <p id="_">Text</p>
62
+ </clause>
63
+ <clause id="_" obligation="normative">
64
+ <title>Introduction</title>
65
+ <clause id="_" obligation="normative">
66
+ <title>Introduction Subsection</title>
67
+ </clause>
68
+ </clause>
69
+ <clause id="_" obligation="normative">
70
+ <title>Scope</title>
71
+ <p id="_">Text</p>
72
+ </clause>
73
+ <clause id="_" obligation="normative">
74
+ <title>Acknowledgements</title>
75
+ </clause>
76
+ <clause id="_" obligation="normative">
77
+ <title>Normative References</title>
78
+ </clause>
79
+ <clause id="_" obligation="normative">
80
+ <title>Terms and Definitions</title>
81
+ <clause id="_" obligation="normative">
82
+ <title>Term1</title>
83
+ </clause>
84
+ </clause>
85
+ <clause id="_" obligation="normative">
86
+ <title>Terms, Definitions, Symbols and Abbreviated Terms</title>
87
+ <clause id="_" obligation="normative">
88
+ <title>Normal Terms</title>
89
+ <clause id="_" obligation="normative">
90
+ <title>Term2</title>
91
+ </clause>
92
+ </clause>
93
+ <clause id="_" obligation="normative">
94
+ <title>Symbols and Abbreviated Terms</title>
95
+ </clause>
96
+ </clause>
97
+ <clause id="_" obligation="normative">
98
+ <title>Symbols and Abbreviated Terms</title>
99
+ </clause>
100
+ <clause id="_" obligation="normative">
101
+ <title>Clause 4</title>
102
+ <clause id="_" obligation="normative">
103
+ <title>Introduction</title>
104
+ </clause>
105
+ <clause id="_" obligation="normative">
106
+ <title>Clause 4.2</title>
107
+ </clause>
108
+ </clause>
109
+ <clause id="_" obligation="normative">
110
+ <title>Terms and Definitions</title>
111
+ </clause>
112
+ <clause id="_" obligation="normative">
113
+ <title>Bibliography</title>
114
+ <clause id="_" obligation="normative">
115
+ <title>Bibliography Subsection</title>
116
+ </clause>
117
+ </clause>
118
+ </sections>
119
+ <annex id='_' obligation='normative'>
120
+ <title>Annex</title>
121
+ <clause id='_' obligation='normative'>
122
+ <title>Annex A.1</title>
123
+ </clause>
124
+ <appendix id='_' obligation='normative'>
125
+ <title>Appendix 1</title>
126
+ </appendix>
127
+ </annex>
128
+ </iso-standard>
129
+ OUTPUT
130
+ end
133
131
 
134
132
  it "processes default metadata, amendment" do
135
- expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
133
+ output = Asciidoctor.convert(<<~"INPUT", *OPTIONS)
136
134
  = Document title
137
135
  Author
138
136
  :docfile: test.adoc
@@ -183,512 +181,516 @@ OUTPUT
183
181
  :doctype: amendment
184
182
  :updates-document-type: international-standard
185
183
  INPUT
186
- <iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
187
- <bibdata type='standard'>
188
- <title language='en' format='text/plain' type='main'>Introduction — Main Title — Title — Title Part — Mass fraction of
189
- extraneous matter, milled rice (nonglutinous), sample dividers and
190
- recommendations relating to storage and transport conditions</title>
191
- <title language='en' format='text/plain' type='title-intro'>Introduction</title>
192
- <title language='en' format='text/plain' type='title-main'>Main Title — Title</title>
193
- <title language='en' format='text/plain' type='title-part'>Title Part</title>
194
- <title language='en' format='text/plain' type='title-amd'>
195
- Mass fraction of extraneous matter, milled rice (nonglutinous), sample
196
- dividers and recommendations relating to storage and transport conditions
197
- </title>
198
- <title language='fr' format='text/plain' type='main'>
199
- Introduction Française — Titre Principal — Part du Titre — Fraction
200
- massique de matière étrangère, riz usiné (non gluant), diviseurs
201
- d’échantillon et recommandations relatives aux conditions d’entreposage et
202
- de transport
203
- </title>
204
- <title language='fr' format='text/plain' type='title-intro'>Introduction Française</title>
205
- <title language='fr' format='text/plain' type='title-main'>Titre Principal</title>
206
- <title language='fr' format='text/plain' type='title-part'>Part du Titre</title>
207
- <title language='fr' format='text/plain' type='title-amd'>
208
- Fraction massique de matière étrangère, riz usiné (non gluant), diviseurs
209
- d’échantillon et recommandations relatives aux conditions d’entreposage et
210
- de transport
211
- </title>
212
- <docidentifier type='ISO'>ISO 17301-1:2016/PreNP Amd 1</docidentifier>
213
- <docidentifier type='iso-with-lang'>ISO 17301-1:2016/PreNP Amd 1(E)</docidentifier>
214
- <docidentifier type='iso-reference'>ISO 17301-1:2016/PreNP Amd 1:2017(E)</docidentifier>
215
- <docnumber>17301</docnumber>
216
- <date type='created'>
217
- <on>2016-05-01</on>
218
- </date>
219
- <contributor>
220
- <role type='author'/>
221
- <organization>
222
- <name>International Organization for Standardization</name>
223
- <abbreviation>ISO</abbreviation>
224
- </organization>
225
- </contributor>
226
- <contributor>
227
- <role type='publisher'/>
228
- <organization>
229
- <name>International Organization for Standardization</name>
230
- <abbreviation>ISO</abbreviation>
231
- </organization>
232
- </contributor>
233
- <edition>2</edition>
234
- <version>
235
- <revision-date>2000-01-01</revision-date>
236
- <draft>0.3.4</draft>
237
- </version>
238
- <language>en</language>
239
- <script>Latn</script>
240
- <status>
241
- <stage abbreviation='NP'>10</stage>
242
- <substage>20</substage>
243
- <iteration>3</iteration>
244
- </status>
245
- <copyright>
246
- <from>2017</from>
247
- <owner>
248
- <organization>
249
- <name>International Organization for Standardization</name>
250
- <abbreviation>ISO</abbreviation>
251
- </organization>
252
- </owner>
253
- </copyright>
254
- <ext>
255
- <doctype>amendment</doctype>
256
- <editorialgroup>
257
- <technical-committee number='1' type='A'>TC</technical-committee>
258
- <technical-committee number='11' type='A1'>TC1</technical-committee>
259
- <subcommittee number='2' type='B'>SC</subcommittee>
260
- <subcommittee number='21' type='B1'>SC1</subcommittee>
261
- <workgroup number='3' type='C'>WG</workgroup>
262
- <workgroup number='31' type='C1'>WG1</workgroup>
263
- <secretariat>SECRETARIAT</secretariat>
264
- </editorialgroup>
265
- <ics>
266
- <code>1</code>
267
- </ics>
268
- <ics>
269
- <code>2</code>
270
- </ics>
271
- <ics>
272
- <code>3</code>
273
- </ics>
274
- <structuredidentifier>
275
- <project-number part='1' amendment='1' origyr='2016-05-01'>17301</project-number>
276
- </structuredidentifier>
277
- <stagename>New work item proposal</stagename>
278
- <updates-document-type>international-standard</updates-document-type>
279
- </ext>
280
- </bibdata>
281
- <sections/>
282
- </iso-standard>
283
- OUTPUT
184
+
185
+ expect(xmlpp(output.sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
186
+ <iso-standard type="semantic" version="#{Metanorma::ISO::VERSION}" xmlns="https://www.metanorma.org/ns/iso">
187
+ <bibdata type="standard">
188
+ <title format="text/plain" language="en" type="main">Introduction — Main Title — Title — Title Part — Mass fraction of
189
+ extraneous matter, milled rice (nonglutinous), sample dividers and
190
+ recommendations relating to storage and transport conditions</title>
191
+ <title format="text/plain" language="en" type="title-intro">Introduction</title>
192
+ <title format="text/plain" language="en" type="title-main">Main Title — Title</title>
193
+ <title format="text/plain" language="en" type="title-part">Title Part</title>
194
+ <title format="text/plain" language="en" type="title-amd">Mass fraction of extraneous matter, milled rice (nonglutinous), sample
195
+ dividers and recommendations relating to storage and transport conditions
196
+ </title>
197
+ <title format="text/plain" language="fr" type="main">Introduction Française — Titre Principal — Part du Titre — Fraction
198
+ massique de matière étrangère, riz usiné (non gluant), diviseurs
199
+ d’échantillon et recommandations relatives aux conditions d’entreposage et
200
+ de transport
201
+ </title>
202
+ <title format="text/plain" language="fr" type="title-intro">Introduction Française</title>
203
+ <title format="text/plain" language="fr" type="title-main">Titre Principal</title>
204
+ <title format="text/plain" language="fr" type="title-part">Part du Titre</title>
205
+ <title format="text/plain" language="fr" type="title-amd">Fraction massique de matière étrangère, riz usiné (non gluant), diviseurs
206
+ d’échantillon et recommandations relatives aux conditions d’entreposage et
207
+ de transport
208
+ </title>
209
+ <docidentifier type="ISO">ISO 17301-1:2016/PreNP Amd 1</docidentifier>
210
+ <docidentifier type="iso-with-lang">ISO 17301-1:2016/PreNP Amd 1(E)</docidentifier>
211
+ <docidentifier type="iso-reference">ISO 17301-1:2016/PreNP Amd 1:2017(E)</docidentifier>
212
+ <docnumber>17301</docnumber>
213
+ <date type="created">
214
+ <on>2016-05-01</on>
215
+ </date>
216
+ <contributor>
217
+ <role type="author"/>
218
+ <organization>
219
+ <name>International Organization for Standardization</name>
220
+ <abbreviation>ISO</abbreviation>
221
+ </organization>
222
+ </contributor>
223
+ <contributor>
224
+ <role type="publisher"/>
225
+ <organization>
226
+ <name>International Organization for Standardization</name>
227
+ <abbreviation>ISO</abbreviation>
228
+ </organization>
229
+ </contributor>
230
+ <edition>2</edition>
231
+ <version>
232
+ <revision-date>2000-01-01</revision-date>
233
+ <draft>0.3.4</draft>
234
+ </version>
235
+ <language>en</language>
236
+ <script>Latn</script>
237
+ <status>
238
+ <stage abbreviation="NP">10</stage>
239
+ <substage>20</substage>
240
+ <iteration>3</iteration>
241
+ </status>
242
+ <copyright>
243
+ <from>2017</from>
244
+ <owner>
245
+ <organization>
246
+ <name>International Organization for Standardization</name>
247
+ <abbreviation>ISO</abbreviation>
248
+ </organization>
249
+ </owner>
250
+ </copyright>
251
+ <ext>
252
+ <doctype>amendment</doctype>
253
+ <editorialgroup>
254
+ <technical-committee number="1" type="A">TC</technical-committee>
255
+ <technical-committee number="11" type="A1">TC1</technical-committee>
256
+ <subcommittee number="2" type="B">SC</subcommittee>
257
+ <subcommittee number="21" type="B1">SC1</subcommittee>
258
+ <workgroup number="3" type="C">WG</workgroup>
259
+ <workgroup number="31" type="C1">WG1</workgroup>
260
+ <secretariat>SECRETARIAT</secretariat>
261
+ </editorialgroup>
262
+ <ics>
263
+ <code>1</code>
264
+ </ics>
265
+ <ics>
266
+ <code>2</code>
267
+ </ics>
268
+ <ics>
269
+ <code>3</code>
270
+ </ics>
271
+ <structuredidentifier>
272
+ <project-number amendment="1" origyr="2016-05-01" part="1">17301</project-number>
273
+ </structuredidentifier>
274
+ <stagename>New work item proposal</stagename>
275
+ <updates-document-type>international-standard</updates-document-type>
276
+ </ext>
277
+ </bibdata>
278
+ <sections/>
279
+ </iso-standard>
280
+ OUTPUT
284
281
  end
285
282
 
286
- it "processes metadata, amendment" do
287
- expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
288
- = Document title
289
- Author
290
- :docfile: test.adoc
291
- :nodoc:
292
- :novalid:
293
- :no-isobib:
294
- :docnumber: 17301
295
- :partnumber: 1
296
- :doctype: amendment
297
- :docstage: 30
298
- :updates: ISO 17301-1:2030
299
- :amendment-number: 1
300
- INPUT
301
- <iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
302
- <bibdata type='standard'>
303
- <docidentifier type='ISO'>ISO 17301-1:2030/CD Amd 1</docidentifier>
304
- <docidentifier type='iso-with-lang'>ISO 17301-1:2030/CD Amd 1(E)</docidentifier>
305
- <docidentifier type='iso-reference'>ISO 17301-1:2030/CD Amd 1(E)</docidentifier>
306
- <docnumber>17301</docnumber>
307
- <contributor>
308
- <role type='author'/>
309
- <organization>
310
- <name>International Organization for Standardization</name>
311
- <abbreviation>ISO</abbreviation>
312
- </organization>
313
- </contributor>
314
- <contributor>
315
- <role type='publisher'/>
316
- <organization>
317
- <name>International Organization for Standardization</name>
318
- <abbreviation>ISO</abbreviation>
319
- </organization>
320
- </contributor>
321
- <language>en</language>
322
- <script>Latn</script>
323
- <status>
324
- <stage abbreviation='CD'>30</stage>
325
- <substage>00</substage>
326
- </status>
327
- <copyright>
328
- <from>#{Time.now.year}</from>
329
- <owner>
330
- <organization>
331
- <name>International Organization for Standardization</name>
332
- <abbreviation>ISO</abbreviation>
333
- </organization>
334
- </owner>
335
- </copyright>
336
- <ext>
337
- <doctype>amendment</doctype>
338
- <editorialgroup>
339
- <technical-committee/>
340
- <subcommittee/>
341
- <workgroup/>
342
- </editorialgroup>
343
- <structuredidentifier>
344
- <project-number part='1' amendment='1'>17301</project-number>
345
- </structuredidentifier>
346
- <stagename>Committee draft</stagename>
347
- </ext>
348
- </bibdata>
349
- <sections/>
350
- </iso-standard>
351
- OUTPUT
283
+ it "processes metadata, amendment" do
284
+ output = Asciidoctor.convert(<<~"INPUT", *OPTIONS)
285
+ = Document title
286
+ Author
287
+ :docfile: test.adoc
288
+ :nodoc:
289
+ :novalid:
290
+ :no-isobib:
291
+ :docnumber: 17301
292
+ :partnumber: 1
293
+ :doctype: amendment
294
+ :docstage: 30
295
+ :updates: ISO 17301-1:2030
296
+ :amendment-number: 1
297
+ INPUT
298
+ expect(xmlpp(output.sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
299
+
300
+ <iso-standard type="semantic" version="#{Metanorma::ISO::VERSION}" xmlns="https://www.metanorma.org/ns/iso">
301
+ <bibdata type="standard">
302
+ <docidentifier type="ISO">ISO 17301-1:2030/CD Amd 1</docidentifier>
303
+ <docidentifier type="iso-with-lang">ISO 17301-1:2030/CD Amd 1(E)</docidentifier>
304
+ <docidentifier type="iso-reference">ISO 17301-1:2030/CD Amd 1(E)</docidentifier>
305
+ <docnumber>17301</docnumber>
306
+ <contributor>
307
+ <role type="author"/>
308
+ <organization>
309
+ <name>International Organization for Standardization</name>
310
+ <abbreviation>ISO</abbreviation>
311
+ </organization>
312
+ </contributor>
313
+ <contributor>
314
+ <role type="publisher"/>
315
+ <organization>
316
+ <name>International Organization for Standardization</name>
317
+ <abbreviation>ISO</abbreviation>
318
+ </organization>
319
+ </contributor>
320
+ <language>en</language>
321
+ <script>Latn</script>
322
+ <status>
323
+ <stage abbreviation="CD">30</stage>
324
+ <substage>00</substage>
325
+ </status>
326
+ <copyright>
327
+ <from>#{Time.now.year}</from>
328
+ <owner>
329
+ <organization>
330
+ <name>International Organization for Standardization</name>
331
+ <abbreviation>ISO</abbreviation>
332
+ </organization>
333
+ </owner>
334
+ </copyright>
335
+ <ext>
336
+ <doctype>amendment</doctype>
337
+ <editorialgroup>
338
+ <technical-committee/>
339
+ <subcommittee/>
340
+ <workgroup/>
341
+ </editorialgroup>
342
+ <structuredidentifier>
343
+ <project-number amendment="1" part="1">17301</project-number>
344
+ </structuredidentifier>
345
+ <stagename>Committee draft</stagename>
346
+ </ext>
347
+ </bibdata>
348
+ <sections/>
349
+ </iso-standard>
350
+ OUTPUT
352
351
  end
353
352
 
354
- it "processes metadata, amendment" do
355
- expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
356
- = Document title
357
- Author
358
- :docfile: test.adoc
359
- :nodoc:
360
- :novalid:
361
- :no-isobib:
362
- :docnumber: 17301
363
- :partnumber: 1
364
- :doctype: amendment
365
- :docstage: 40
366
- :updates: ISO 17301-1:2030
367
- :amendment-number: 1
368
- INPUT
369
- <iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
370
- <bibdata type='standard'>
371
- <docidentifier type='ISO'>ISO 17301-1:2030/DAmd 1</docidentifier>
372
- <docidentifier type='iso-with-lang'>ISO 17301-1:2030/DAmd 1(E)</docidentifier>
373
- <docidentifier type='iso-reference'>ISO 17301-1:2030/DAmd 1(E)</docidentifier>
374
- <docnumber>17301</docnumber>
375
- <contributor>
376
- <role type='author'/>
377
- <organization>
378
- <name>International Organization for Standardization</name>
379
- <abbreviation>ISO</abbreviation>
380
- </organization>
381
- </contributor>
382
- <contributor>
383
- <role type='publisher'/>
384
- <organization>
385
- <name>International Organization for Standardization</name>
386
- <abbreviation>ISO</abbreviation>
387
- </organization>
388
- </contributor>
389
- <language>en</language>
390
- <script>Latn</script>
391
- <status>
392
- <stage abbreviation='D'>40</stage>
393
- <substage>00</substage>
394
- </status>
395
- <copyright>
396
- <from>#{Time.now.year}</from>
397
- <owner>
398
- <organization>
399
- <name>International Organization for Standardization</name>
400
- <abbreviation>ISO</abbreviation>
401
- </organization>
402
- </owner>
403
- </copyright>
404
- <ext>
405
- <doctype>amendment</doctype>
406
- <editorialgroup>
407
- <technical-committee/>
408
- <subcommittee/>
409
- <workgroup/>
410
- </editorialgroup>
411
- <structuredidentifier>
412
- <project-number part='1' amendment='1'>17301</project-number>
413
- </structuredidentifier>
414
- <stagename>Draft</stagename>
415
- </ext>
416
- </bibdata>
417
- <sections/>
418
- </iso-standard>
419
- OUTPUT
353
+ it "processes metadata, amendment" do
354
+ output = Asciidoctor.convert(<<~"INPUT", *OPTIONS)
355
+ = Document title
356
+ Author
357
+ :docfile: test.adoc
358
+ :nodoc:
359
+ :novalid:
360
+ :no-isobib:
361
+ :docnumber: 17301
362
+ :partnumber: 1
363
+ :doctype: amendment
364
+ :docstage: 40
365
+ :updates: ISO 17301-1:2030
366
+ :amendment-number: 1
367
+ INPUT
368
+ expect(xmlpp(output.sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
369
+ <iso-standard type="semantic" version="#{Metanorma::ISO::VERSION}" xmlns="https://www.metanorma.org/ns/iso">
370
+ <bibdata type="standard">
371
+ <docidentifier type="ISO">ISO 17301-1:2030/DAmd 1</docidentifier>
372
+ <docidentifier type="iso-with-lang">ISO 17301-1:2030/DAmd 1(E)</docidentifier>
373
+ <docidentifier type="iso-reference">ISO 17301-1:2030/DAmd 1(E)</docidentifier>
374
+ <docnumber>17301</docnumber>
375
+ <contributor>
376
+ <role type="author"/>
377
+ <organization>
378
+ <name>International Organization for Standardization</name>
379
+ <abbreviation>ISO</abbreviation>
380
+ </organization>
381
+ </contributor>
382
+ <contributor>
383
+ <role type="publisher"/>
384
+ <organization>
385
+ <name>International Organization for Standardization</name>
386
+ <abbreviation>ISO</abbreviation>
387
+ </organization>
388
+ </contributor>
389
+ <language>en</language>
390
+ <script>Latn</script>
391
+ <status>
392
+ <stage abbreviation="D">40</stage>
393
+ <substage>00</substage>
394
+ </status>
395
+ <copyright>
396
+ <from>#{Time.now.year}</from>
397
+ <owner>
398
+ <organization>
399
+ <name>International Organization for Standardization</name>
400
+ <abbreviation>ISO</abbreviation>
401
+ </organization>
402
+ </owner>
403
+ </copyright>
404
+ <ext>
405
+ <doctype>amendment</doctype>
406
+ <editorialgroup>
407
+ <technical-committee/>
408
+ <subcommittee/>
409
+ <workgroup/>
410
+ </editorialgroup>
411
+ <structuredidentifier>
412
+ <project-number amendment="1" part="1">17301</project-number>
413
+ </structuredidentifier>
414
+ <stagename>Draft</stagename>
415
+ </ext>
416
+ </bibdata>
417
+ <sections/>
418
+ </iso-standard>
419
+ OUTPUT
420
420
  end
421
421
 
422
- it "processes metadata, amendment" do
423
- expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
424
- = Document title
425
- Author
426
- :docfile: test.adoc
427
- :nodoc:
428
- :novalid:
429
- :no-isobib:
430
- :docnumber: 17301
431
- :partnumber: 1
432
- :doctype: amendment
433
- :updates: ISO 17301-1:2030
434
- :amendment-number: 1
435
- INPUT
436
- <iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
437
- <bibdata type='standard'>
438
- <docidentifier type='ISO'>ISO 17301-1:2030/Amd 1</docidentifier>
439
- <docidentifier type='iso-with-lang'>ISO 17301-1:2030/Amd 1(E)</docidentifier>
440
- <docidentifier type='iso-reference'>ISO 17301-1:2030/Amd 1(E)</docidentifier>
441
- <docnumber>17301</docnumber>
442
- <contributor>
443
- <role type='author'/>
444
- <organization>
445
- <name>International Organization for Standardization</name>
446
- <abbreviation>ISO</abbreviation>
447
- </organization>
448
- </contributor>
449
- <contributor>
450
- <role type='publisher'/>
451
- <organization>
452
- <name>International Organization for Standardization</name>
453
- <abbreviation>ISO</abbreviation>
454
- </organization>
455
- </contributor>
456
- <language>en</language>
457
- <script>Latn</script>
458
- <status>
459
- <stage abbreviation='IS'>60</stage>
460
- <substage>60</substage>
461
- </status>
462
- <copyright>
463
- <from>#{Time.now.year}</from>
464
- <owner>
465
- <organization>
466
- <name>International Organization for Standardization</name>
467
- <abbreviation>ISO</abbreviation>
468
- </organization>
469
- </owner>
470
- </copyright>
471
- <ext>
472
- <doctype>amendment</doctype>
473
- <editorialgroup>
474
- <technical-committee/>
475
- <subcommittee/>
476
- <workgroup/>
477
- </editorialgroup>
478
- <structuredidentifier>
479
- <project-number part='1' amendment='1'>17301</project-number>
480
- </structuredidentifier>
481
- <stagename>International standard</stagename>
482
- </ext>
483
- </bibdata>
484
- <sections/>
485
- </iso-standard>
486
- OUTPUT
422
+ it "processes metadata, amendment" do
423
+ output = Asciidoctor.convert(<<~"INPUT", *OPTIONS)
424
+ = Document title
425
+ Author
426
+ :docfile: test.adoc
427
+ :nodoc:
428
+ :novalid:
429
+ :no-isobib:
430
+ :docnumber: 17301
431
+ :partnumber: 1
432
+ :doctype: amendment
433
+ :updates: ISO 17301-1:2030
434
+ :amendment-number: 1
435
+ INPUT
436
+ expect(xmlpp(output.sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
437
+ <iso-standard type="semantic" version="#{Metanorma::ISO::VERSION}" xmlns="https://www.metanorma.org/ns/iso">
438
+ <bibdata type="standard">
439
+ <docidentifier type="ISO">ISO 17301-1:2030/Amd 1</docidentifier>
440
+ <docidentifier type="iso-with-lang">ISO 17301-1:2030/Amd 1(E)</docidentifier>
441
+ <docidentifier type="iso-reference">ISO 17301-1:2030/Amd 1(E)</docidentifier>
442
+ <docnumber>17301</docnumber>
443
+ <contributor>
444
+ <role type="author"/>
445
+ <organization>
446
+ <name>International Organization for Standardization</name>
447
+ <abbreviation>ISO</abbreviation>
448
+ </organization>
449
+ </contributor>
450
+ <contributor>
451
+ <role type="publisher"/>
452
+ <organization>
453
+ <name>International Organization for Standardization</name>
454
+ <abbreviation>ISO</abbreviation>
455
+ </organization>
456
+ </contributor>
457
+ <language>en</language>
458
+ <script>Latn</script>
459
+ <status>
460
+ <stage abbreviation="IS">60</stage>
461
+ <substage>60</substage>
462
+ </status>
463
+ <copyright>
464
+ <from>#{Time.now.year}</from>
465
+ <owner>
466
+ <organization>
467
+ <name>International Organization for Standardization</name>
468
+ <abbreviation>ISO</abbreviation>
469
+ </organization>
470
+ </owner>
471
+ </copyright>
472
+ <ext>
473
+ <doctype>amendment</doctype>
474
+ <editorialgroup>
475
+ <technical-committee/>
476
+ <subcommittee/>
477
+ <workgroup/>
478
+ </editorialgroup>
479
+ <structuredidentifier>
480
+ <project-number amendment="1" part="1">17301</project-number>
481
+ </structuredidentifier>
482
+ <stagename>International standard</stagename>
483
+ </ext>
484
+ </bibdata>
485
+ <sections/>
486
+ </iso-standard>
487
+ OUTPUT
487
488
  end
488
489
 
489
490
  it "processes metadata, corrigendum" do
490
- expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
491
- = Document title
492
- Author
493
- :docfile: test.adoc
494
- :nodoc:
495
- :novalid:
496
- :no-isobib:
497
- :docnumber: 17301
498
- :partnumber: 1
499
- :doctype: technical-corrigendum
500
- :docstage: 30
501
- :updates: ISO 17301-1:2030
502
- :corrigendum-number: 3
503
- INPUT
504
- <iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
505
- <bibdata type='standard'>
506
- <docidentifier type='ISO'>ISO 17301-1:2030/CD Cor.3</docidentifier>
507
- <docidentifier type='iso-with-lang'>ISO 17301-1:2030/CD Cor.3(E)</docidentifier>
508
- <docidentifier type='iso-reference'>ISO 17301-1:2030/CD Cor.3(E)</docidentifier>
509
- <docnumber>17301</docnumber>
510
- <contributor>
511
- <role type='author'/>
512
- <organization>
513
- <name>International Organization for Standardization</name>
514
- <abbreviation>ISO</abbreviation>
515
- </organization>
516
- </contributor>
517
- <contributor>
518
- <role type='publisher'/>
519
- <organization>
520
- <name>International Organization for Standardization</name>
521
- <abbreviation>ISO</abbreviation>
522
- </organization>
523
- </contributor>
524
- <language>en</language>
525
- <script>Latn</script>
526
- <status>
527
- <stage abbreviation='CD'>30</stage>
528
- <substage>00</substage>
529
- </status>
530
- <copyright>
531
- <from>#{Time.now.year}</from>
532
- <owner>
533
- <organization>
534
- <name>International Organization for Standardization</name>
535
- <abbreviation>ISO</abbreviation>
536
- </organization>
537
- </owner>
538
- </copyright>
539
- <ext>
540
- <doctype>technical-corrigendum</doctype>
541
- <editorialgroup>
542
- <technical-committee/>
543
- <subcommittee/>
544
- <workgroup/>
545
- </editorialgroup>
546
- <structuredidentifier>
547
- <project-number part='1' corrigendum='3'>17301</project-number>
548
- </structuredidentifier>
549
- <stagename>Committee draft</stagename>
550
- </ext>
551
- </bibdata>
552
- <sections/>
553
- </iso-standard>
554
- OUTPUT
491
+ output = Asciidoctor.convert(<<~"INPUT", *OPTIONS)
492
+ = Document title
493
+ Author
494
+ :docfile: test.adoc
495
+ :nodoc:
496
+ :novalid:
497
+ :no-isobib:
498
+ :docnumber: 17301
499
+ :partnumber: 1
500
+ :doctype: technical-corrigendum
501
+ :docstage: 30
502
+ :updates: ISO 17301-1:2030
503
+ :corrigendum-number: 3
504
+ INPUT
505
+ expect(xmlpp(output.sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
506
+ #{' '}
507
+ <iso-standard type="semantic" version="#{Metanorma::ISO::VERSION}" xmlns="https://www.metanorma.org/ns/iso">
508
+ <bibdata type="standard">
509
+ <docidentifier type="ISO">ISO 17301-1:2030/CD Cor.3</docidentifier>
510
+ <docidentifier type="iso-with-lang">ISO 17301-1:2030/CD Cor.3(E)</docidentifier>
511
+ <docidentifier type="iso-reference">ISO 17301-1:2030/CD Cor.3(E)</docidentifier>
512
+ <docnumber>17301</docnumber>
513
+ <contributor>
514
+ <role type="author"/>
515
+ <organization>
516
+ <name>International Organization for Standardization</name>
517
+ <abbreviation>ISO</abbreviation>
518
+ </organization>
519
+ </contributor>
520
+ <contributor>
521
+ <role type="publisher"/>
522
+ <organization>
523
+ <name>International Organization for Standardization</name>
524
+ <abbreviation>ISO</abbreviation>
525
+ </organization>
526
+ </contributor>
527
+ <language>en</language>
528
+ <script>Latn</script>
529
+ <status>
530
+ <stage abbreviation="CD">30</stage>
531
+ <substage>00</substage>
532
+ </status>
533
+ <copyright>
534
+ <from>#{Time.now.year}</from>
535
+ <owner>
536
+ <organization>
537
+ <name>International Organization for Standardization</name>
538
+ <abbreviation>ISO</abbreviation>
539
+ </organization>
540
+ </owner>
541
+ </copyright>
542
+ <ext>
543
+ <doctype>technical-corrigendum</doctype>
544
+ <editorialgroup>
545
+ <technical-committee/>
546
+ <subcommittee/>
547
+ <workgroup/>
548
+ </editorialgroup>
549
+ <structuredidentifier>
550
+ <project-number corrigendum="3" part="1">17301</project-number>
551
+ </structuredidentifier>
552
+ <stagename>Committee draft</stagename>
553
+ </ext>
554
+ </bibdata>
555
+ <sections/>
556
+ </iso-standard>
557
+ OUTPUT
555
558
  end
556
559
 
557
- it "processes metadata, corrigendum" do
558
- expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
559
- = Document title
560
- Author
561
- :docfile: test.adoc
562
- :nodoc:
563
- :novalid:
564
- :no-isobib:
565
- :docnumber: 17301
566
- :partnumber: 1
567
- :doctype: technical-corrigendum
568
- :docstage: 50
569
- :updates: ISO 17301-1:2030
570
- :corrigendum-number: 3
571
- INPUT
572
- <iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
573
- <bibdata type='standard'>
574
- <docidentifier type='ISO'>ISO 17301-1:2030/FDCor.3</docidentifier>
575
- <docidentifier type='iso-with-lang'>ISO 17301-1:2030/FDCor.3(E)</docidentifier>
576
- <docidentifier type='iso-reference'>ISO 17301-1:2030/FDCor.3(E)</docidentifier>
577
- <docnumber>17301</docnumber>
578
- <contributor>
579
- <role type='author'/>
580
- <organization>
581
- <name>International Organization for Standardization</name>
582
- <abbreviation>ISO</abbreviation>
583
- </organization>
584
- </contributor>
585
- <contributor>
586
- <role type='publisher'/>
587
- <organization>
588
- <name>International Organization for Standardization</name>
589
- <abbreviation>ISO</abbreviation>
590
- </organization>
591
- </contributor>
592
- <language>en</language>
593
- <script>Latn</script>
594
- <status>
595
- <stage abbreviation='FD'>50</stage>
596
- <substage>00</substage>
597
- </status>
598
- <copyright>
599
- <from>#{Time.now.year}</from>
600
- <owner>
601
- <organization>
602
- <name>International Organization for Standardization</name>
603
- <abbreviation>ISO</abbreviation>
604
- </organization>
605
- </owner>
606
- </copyright>
607
- <ext>
608
- <doctype>technical-corrigendum</doctype>
609
- <editorialgroup>
610
- <technical-committee/>
611
- <subcommittee/>
612
- <workgroup/>
613
- </editorialgroup>
614
- <structuredidentifier>
615
- <project-number part='1' corrigendum='3'>17301</project-number>
616
- </structuredidentifier>
617
- <stagename>Final draft</stagename>
618
- </ext>
619
- </bibdata>
620
- <sections/>
621
- </iso-standard>
622
- OUTPUT
560
+ it "processes metadata, corrigendum" do
561
+ output = Asciidoctor.convert(<<~"INPUT", *OPTIONS)
562
+ = Document title
563
+ Author
564
+ :docfile: test.adoc
565
+ :nodoc:
566
+ :novalid:
567
+ :no-isobib:
568
+ :docnumber: 17301
569
+ :partnumber: 1
570
+ :doctype: technical-corrigendum
571
+ :docstage: 50
572
+ :updates: ISO 17301-1:2030
573
+ :corrigendum-number: 3
574
+ INPUT
575
+ expect(xmlpp(output.sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
576
+ <iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
577
+ <bibdata type='standard'>
578
+ <docidentifier type='ISO'>ISO 17301-1:2030/FDCor.3</docidentifier>
579
+ <docidentifier type='iso-with-lang'>ISO 17301-1:2030/FDCor.3(E)</docidentifier>
580
+ <docidentifier type='iso-reference'>ISO 17301-1:2030/FDCor.3(E)</docidentifier>
581
+ <docnumber>17301</docnumber>
582
+ <contributor>
583
+ <role type='author'/>
584
+ <organization>
585
+ <name>International Organization for Standardization</name>
586
+ <abbreviation>ISO</abbreviation>
587
+ </organization>
588
+ </contributor>
589
+ <contributor>
590
+ <role type='publisher'/>
591
+ <organization>
592
+ <name>International Organization for Standardization</name>
593
+ <abbreviation>ISO</abbreviation>
594
+ </organization>
595
+ </contributor>
596
+ <language>en</language>
597
+ <script>Latn</script>
598
+ <status>
599
+ <stage abbreviation='FD'>50</stage>
600
+ <substage>00</substage>
601
+ </status>
602
+ <copyright>
603
+ <from>#{Time.now.year}</from>
604
+ <owner>
605
+ <organization>
606
+ <name>International Organization for Standardization</name>
607
+ <abbreviation>ISO</abbreviation>
608
+ </organization>
609
+ </owner>
610
+ </copyright>
611
+ <ext>
612
+ <doctype>technical-corrigendum</doctype>
613
+ <editorialgroup>
614
+ <technical-committee/>
615
+ <subcommittee/>
616
+ <workgroup/>
617
+ </editorialgroup>
618
+ <structuredidentifier>
619
+ <project-number part='1' corrigendum='3'>17301</project-number>
620
+ </structuredidentifier>
621
+ <stagename>Final draft</stagename>
622
+ </ext>
623
+ </bibdata>
624
+ <sections/>
625
+ </iso-standard>
626
+ OUTPUT
623
627
  end
624
628
 
625
- it "processes metadata, corrigendum" do
626
- expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
627
- = Document title
628
- Author
629
- :docfile: test.adoc
630
- :nodoc:
631
- :novalid:
632
- :no-isobib:
633
- :docnumber: 17301
634
- :partnumber: 1
635
- :doctype: technical-corrigendum
636
- :updates: ISO 17301-1:2030
637
- :corrigendum-number: 3
638
- INPUT
639
- <iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
640
- <bibdata type='standard'>
641
- <docidentifier type='ISO'>ISO 17301-1:2030/Cor.3</docidentifier>
642
- <docidentifier type='iso-with-lang'>ISO 17301-1:2030/Cor.3(E)</docidentifier>
643
- <docidentifier type='iso-reference'>ISO 17301-1:2030/Cor.3(E)</docidentifier>
644
- <docnumber>17301</docnumber>
645
- <contributor>
646
- <role type='author'/>
647
- <organization>
648
- <name>International Organization for Standardization</name>
649
- <abbreviation>ISO</abbreviation>
650
- </organization>
651
- </contributor>
652
- <contributor>
653
- <role type='publisher'/>
654
- <organization>
655
- <name>International Organization for Standardization</name>
656
- <abbreviation>ISO</abbreviation>
657
- </organization>
658
- </contributor>
659
- <language>en</language>
660
- <script>Latn</script>
661
- <status>
662
- <stage abbreviation='IS'>60</stage>
663
- <substage>60</substage>
664
- </status>
665
- <copyright>
666
- <from>#{Time.now.year}</from>
667
- <owner>
668
- <organization>
669
- <name>International Organization for Standardization</name>
670
- <abbreviation>ISO</abbreviation>
671
- </organization>
672
- </owner>
673
- </copyright>
674
- <ext>
675
- <doctype>technical-corrigendum</doctype>
676
- <editorialgroup>
677
- <technical-committee/>
678
- <subcommittee/>
679
- <workgroup/>
680
- </editorialgroup>
681
- <structuredidentifier>
682
- <project-number part='1' corrigendum='3'>17301</project-number>
683
- </structuredidentifier>
684
- <stagename>International standard</stagename>
685
- </ext>
686
- </bibdata>
687
- <sections/>
688
- </iso-standard>
689
- OUTPUT
629
+ it "processes metadata, corrigendum" do
630
+ output = Asciidoctor.convert(<<~"INPUT", *OPTIONS)
631
+ = Document title
632
+ Author
633
+ :docfile: test.adoc
634
+ :nodoc:
635
+ :novalid:
636
+ :no-isobib:
637
+ :docnumber: 17301
638
+ :partnumber: 1
639
+ :doctype: technical-corrigendum
640
+ :updates: ISO 17301-1:2030
641
+ :corrigendum-number: 3
642
+ INPUT
643
+ expect(xmlpp(output.sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
644
+ <iso-standard type="semantic" version="#{Metanorma::ISO::VERSION}" xmlns="https://www.metanorma.org/ns/iso">
645
+ <bibdata type="standard">
646
+ <docidentifier type="ISO">ISO 17301-1:2030/Cor.3</docidentifier>
647
+ <docidentifier type="iso-with-lang">ISO 17301-1:2030/Cor.3(E)</docidentifier>
648
+ <docidentifier type="iso-reference">ISO 17301-1:2030/Cor.3(E)</docidentifier>
649
+ <docnumber>17301</docnumber>
650
+ <contributor>
651
+ <role type="author"/>
652
+ <organization>
653
+ <name>International Organization for Standardization</name>
654
+ <abbreviation>ISO</abbreviation>
655
+ </organization>
656
+ </contributor>
657
+ <contributor>
658
+ <role type="publisher"/>
659
+ <organization>
660
+ <name>International Organization for Standardization</name>
661
+ <abbreviation>ISO</abbreviation>
662
+ </organization>
663
+ </contributor>
664
+ <language>en</language>
665
+ <script>Latn</script>
666
+ <status>
667
+ <stage abbreviation="IS">60</stage>
668
+ <substage>60</substage>
669
+ </status>
670
+ <copyright>
671
+ <from>#{Time.now.year}</from>
672
+ <owner>
673
+ <organization>
674
+ <name>International Organization for Standardization</name>
675
+ <abbreviation>ISO</abbreviation>
676
+ </organization>
677
+ </owner>
678
+ </copyright>
679
+ <ext>
680
+ <doctype>technical-corrigendum</doctype>
681
+ <editorialgroup>
682
+ <technical-committee/>
683
+ <subcommittee/>
684
+ <workgroup/>
685
+ </editorialgroup>
686
+ <structuredidentifier>
687
+ <project-number corrigendum="3" part="1">17301</project-number>
688
+ </structuredidentifier>
689
+ <stagename>International standard</stagename>
690
+ </ext>
691
+ </bibdata>
692
+ <sections/>
693
+ </iso-standard>
694
+ OUTPUT
690
695
  end
691
-
692
-
693
-
694
696
  end