metanorma-iso 1.5.14 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +17 -0
- data/.rubocop.yml +0 -4
- data/lib/asciidoctor/iso/base.rb +13 -13
- data/lib/asciidoctor/iso/basicdoc.rng +20 -3
- data/lib/asciidoctor/iso/cleanup.rb +1 -1
- data/lib/asciidoctor/iso/front.rb +5 -5
- data/lib/asciidoctor/iso/isodoc.rng +118 -4
- data/lib/asciidoctor/iso/isostandard-amd.rng +11 -4
- data/lib/asciidoctor/iso/isostandard.rng +22 -10
- data/lib/asciidoctor/iso/validate.rb +78 -0
- data/lib/asciidoctor/iso/validate_section.rb +12 -9
- data/lib/isodoc/iso/html/header.html +12 -12
- data/lib/isodoc/iso/html/html_iso_intro.html +1 -1
- data/lib/isodoc/iso/html/html_iso_titlepage.html +1 -1
- data/lib/isodoc/iso/html/word_iso_intro.html +1 -1
- data/lib/isodoc/iso/html/word_iso_titlepage.html +1 -1
- data/lib/isodoc/iso/html_convert.rb +2 -2
- data/lib/isodoc/iso/i18n-en.yaml +2 -0
- data/lib/isodoc/iso/i18n-fr.yaml +1 -1
- data/lib/isodoc/iso/i18n-zh-Hans.yaml +1 -1
- data/lib/isodoc/iso/iso.amendment.xsl +451 -208
- data/lib/isodoc/iso/iso.international-standard.xsl +451 -208
- data/lib/isodoc/iso/sections.rb +1 -1
- data/lib/isodoc/iso/word_convert.rb +2 -2
- data/lib/isodoc/iso/xref.rb +28 -12
- data/lib/metanorma/iso/processor.rb +11 -0
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +2 -2
- data/spec/asciidoctor-iso/amd_spec.rb +575 -573
- data/spec/asciidoctor-iso/base_spec.rb +449 -458
- data/spec/asciidoctor-iso/blocks_spec.rb +333 -288
- data/spec/asciidoctor-iso/cleanup_spec.rb +814 -699
- data/spec/asciidoctor-iso/inline_spec.rb +116 -91
- data/spec/asciidoctor-iso/lists_spec.rb +128 -121
- data/spec/asciidoctor-iso/refs_spec.rb +308 -250
- data/spec/asciidoctor-iso/section_spec.rb +273 -242
- data/spec/asciidoctor-iso/table_spec.rb +258 -242
- data/spec/asciidoctor-iso/validate_spec.rb +1223 -919
- data/spec/isodoc/amd_spec.rb +967 -946
- data/spec/isodoc/blocks_spec.rb +530 -507
- data/spec/isodoc/i18n_spec.rb +953 -911
- data/spec/isodoc/inline_spec.rb +355 -293
- data/spec/isodoc/iso_spec.rb +340 -316
- data/spec/isodoc/metadata_spec.rb +392 -382
- data/spec/isodoc/postproc_spec.rb +834 -656
- data/spec/isodoc/ref_spec.rb +374 -331
- data/spec/isodoc/section_spec.rb +608 -525
- data/spec/isodoc/table_spec.rb +472 -411
- data/spec/isodoc/terms_spec.rb +209 -185
- data/spec/isodoc/xref_spec.rb +1370 -1236
- data/spec/metanorma/processor_spec.rb +28 -26
- data/spec/spec_helper.rb +184 -189
- metadata +7 -10
- data/.rubocop.ribose.yml +0 -66
- data/lib/metanorma/iso/fonts_manifest.yaml +0 -6
- data/spec/assets/xref_error.adoc +0 -7
data/lib/isodoc/iso/sections.rb
CHANGED
@@ -16,9 +16,9 @@ module IsoDoc
|
|
16
16
|
|
17
17
|
def default_fonts(options)
|
18
18
|
{
|
19
|
-
bodyfont: (options[:script] == "Hans" ? '"
|
19
|
+
bodyfont: (options[:script] == "Hans" ? '"Source Han Sans",serif' :
|
20
20
|
'"Cambria",serif'),
|
21
|
-
headerfont: (options[:script] == "Hans" ? '"
|
21
|
+
headerfont: (options[:script] == "Hans" ? '"Source Han Sans",sans-serif' :
|
22
22
|
'"Cambria",serif'),
|
23
23
|
monospacefont: '"Courier New",monospace',
|
24
24
|
normalfontsize: "11.0pt",
|
data/lib/isodoc/iso/xref.rb
CHANGED
@@ -1,10 +1,14 @@
|
|
1
1
|
module IsoDoc
|
2
2
|
module Iso
|
3
|
+
class Counter < IsoDoc::XrefGen::Counter
|
4
|
+
end
|
5
|
+
|
3
6
|
class Xref < IsoDoc::Xref
|
4
7
|
def initial_anchor_names(d)
|
5
8
|
if @klass.amd(d)
|
6
9
|
d.xpath(ns("//preface/*")).each { |c| c.element? and preface_names(c) }
|
7
10
|
sequential_asset_names(d.xpath(ns("//preface/*")))
|
11
|
+
d.xpath(ns("//sections/clause")).each { |c| c.element? and preface_names(c) }
|
8
12
|
middle_section_asset_names(d)
|
9
13
|
termnote_anchor_names(d)
|
10
14
|
termexample_anchor_names(d)
|
@@ -19,8 +23,10 @@ module IsoDoc
|
|
19
23
|
return if clause.nil?
|
20
24
|
clause.at(ns("./clause")) and @anchors[clause["id"]] =
|
21
25
|
{ label: "0", level: 1, xref: clause.at(ns("./title"))&.text, type: "clause" }
|
22
|
-
|
23
|
-
|
26
|
+
i = Counter.new
|
27
|
+
clause.xpath(ns("./clause")).each do |c|
|
28
|
+
i.increment(c)
|
29
|
+
section_names1(c, "0.#{i.print}", 2)
|
24
30
|
end
|
25
31
|
end
|
26
32
|
|
@@ -30,12 +36,16 @@ module IsoDoc
|
|
30
36
|
end
|
31
37
|
|
32
38
|
def appendix_names(clause, num)
|
33
|
-
|
34
|
-
|
39
|
+
i = Counter.new
|
40
|
+
clause.xpath(ns("./appendix")).each do |c|
|
41
|
+
i.increment(c)
|
42
|
+
@anchors[c["id"]] = anchor_struct(i.print, nil, @labels["appendix"], "clause")
|
35
43
|
@anchors[c["id"]][:level] = 2
|
36
44
|
@anchors[c["id"]][:container] = clause["id"]
|
37
|
-
|
38
|
-
|
45
|
+
j = Counter.new
|
46
|
+
c.xpath(ns("./clause | ./references")).each do |c1|
|
47
|
+
j.increment(c1)
|
48
|
+
appendix_names1(c1, l10n("#{@labels["appendix"]} #{i.print}.#{j.print}"), 3, clause["id"])
|
39
49
|
end
|
40
50
|
end
|
41
51
|
end
|
@@ -44,24 +54,30 @@ module IsoDoc
|
|
44
54
|
@anchors[clause["id"]] =
|
45
55
|
{ label: num, level: level, xref: num }
|
46
56
|
# subclauses are not prefixed with "Clause"
|
57
|
+
i = Counter.new
|
47
58
|
clause.xpath(ns("./clause | ./terms | ./term | ./definitions | "\
|
48
59
|
"./references")).
|
49
|
-
|
50
|
-
|
60
|
+
each do |c|
|
61
|
+
i.increment(c)
|
62
|
+
section_names1(c, "#{num}.#{i.print}", level + 1)
|
51
63
|
end
|
52
64
|
end
|
53
65
|
|
54
66
|
def annex_names1(clause, num, level)
|
55
67
|
@anchors[clause["id"]] = { label: num, xref: num, level: level }
|
56
|
-
|
57
|
-
|
68
|
+
i = Counter.new
|
69
|
+
clause.xpath(ns("./clause | ./references")).each do |c|
|
70
|
+
i.increment(c)
|
71
|
+
annex_names1(c, "#{num}.#{i.print}", level + 1)
|
58
72
|
end
|
59
73
|
end
|
60
74
|
|
61
75
|
def appendix_names1(clause, num, level, container)
|
62
76
|
@anchors[clause["id"]] = { label: num, xref: num, level: level, container: container }
|
63
|
-
|
64
|
-
|
77
|
+
i = Counter.new
|
78
|
+
clause.xpath(ns("./clause | ./references")).each do |c|
|
79
|
+
i.increment(c)
|
80
|
+
appendix_names1(c, "#{num}.#{i.print}", level + 1, container)
|
65
81
|
end
|
66
82
|
end
|
67
83
|
|
@@ -25,6 +25,17 @@ module Metanorma
|
|
25
25
|
"Metanorma::ISO #{Metanorma::ISO::VERSION}"
|
26
26
|
end
|
27
27
|
|
28
|
+
def fonts_manifest
|
29
|
+
{
|
30
|
+
"Cambria" => nil,
|
31
|
+
"Cambria Math" => nil,
|
32
|
+
"Times New Roman" => nil,
|
33
|
+
"Source Han Sans" => nil,
|
34
|
+
"Courier" => nil,
|
35
|
+
"Courier New" => nil,
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
28
39
|
def use_presentation_xml(ext)
|
29
40
|
return true if ext == :html_alt
|
30
41
|
super
|
data/metanorma-iso.gemspec
CHANGED
@@ -30,8 +30,8 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
|
31
31
|
|
32
32
|
spec.add_dependency "ruby-jing"
|
33
|
-
spec.add_dependency "isodoc", "~> 1.
|
34
|
-
spec.add_dependency "metanorma-standoc", "~> 1.
|
33
|
+
spec.add_dependency "isodoc", "~> 1.5.0"
|
34
|
+
spec.add_dependency "metanorma-standoc", "~> 1.8.0"
|
35
35
|
spec.add_dependency "tokenizer", "~> 0.3.0"
|
36
36
|
spec.add_dependency "twitter_cldr"
|
37
37
|
spec.add_dependency "mn2sts", "~> 1.5.0"
|
@@ -1,9 +1,8 @@
|
|
1
1
|
require "spec_helper"
|
2
|
-
require "fileutils"
|
3
2
|
|
4
3
|
RSpec.describe Asciidoctor::ISO do
|
5
|
-
|
6
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
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
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
</iso-standard>
|
130
|
-
|
131
|
-
|
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
|
-
|
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
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
</title>
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
</
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
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
|
-
|
287
|
-
|
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
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
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
|
-
|
355
|
-
|
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
|
-
<
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
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
|
-
|
423
|
-
|
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
|
-
<
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
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
|
-
|
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
|
-
<
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
</
|
554
|
-
|
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
|
-
|
558
|
-
|
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
|
-
<
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
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
|
-
|
626
|
-
|
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
|
-
<
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
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
|