metanorma-iso 1.3.24 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/macos.yml +8 -1
- data/.github/workflows/ubuntu.yml +14 -3
- data/.github/workflows/windows.yml +8 -1
- data/lib/asciidoctor/iso/base.rb +21 -13
- data/lib/asciidoctor/iso/biblio.rng +36 -6
- data/lib/asciidoctor/iso/cleanup.rb +10 -1
- data/lib/asciidoctor/iso/front.rb +16 -110
- data/lib/asciidoctor/iso/front_id.rb +196 -0
- data/lib/asciidoctor/iso/isodoc.rng +444 -1
- data/lib/asciidoctor/iso/isostandard-amd.rng +98 -0
- data/lib/asciidoctor/iso/isostandard.rng +12 -1
- data/lib/asciidoctor/iso/reqt.rng +23 -0
- data/lib/asciidoctor/iso/section.rb +12 -0
- data/lib/asciidoctor/iso/term_lookup_cleanup.rb +7 -10
- data/lib/asciidoctor/iso/validate.rb +40 -23
- data/lib/asciidoctor/iso/validate_requirements.rb +1 -1
- data/lib/asciidoctor/iso/validate_style.rb +6 -5
- data/lib/asciidoctor/iso/validate_title.rb +1 -1
- data/lib/isodoc/iso/base_convert.rb +68 -87
- data/lib/isodoc/iso/html/header.html +5 -1
- data/lib/isodoc/iso/html/html_iso_titlepage.html +25 -16
- data/lib/isodoc/iso/html/isodoc.scss +25 -0
- data/lib/isodoc/iso/html/scripts.html +18 -0
- data/lib/isodoc/iso/html/style-human.scss +23 -0
- data/lib/isodoc/iso/html/style-iso.scss +18 -0
- data/lib/isodoc/iso/html/word_iso_intro.html +4 -0
- data/lib/isodoc/iso/html/word_iso_titlepage.html +21 -0
- data/lib/isodoc/iso/html/wordstyle.scss +45 -4
- data/lib/isodoc/iso/iso.amendment.xsl +5082 -0
- data/lib/isodoc/iso/iso.international-standard.xsl +1226 -530
- data/lib/isodoc/iso/metadata.rb +67 -23
- data/lib/isodoc/iso/pdf_convert.rb +5 -11
- data/lib/isodoc/iso/presentation_xml_convert.rb +13 -0
- data/lib/isodoc/iso/sections.rb +66 -0
- data/lib/isodoc/iso/sts_convert.rb +31 -0
- data/lib/isodoc/iso/xref.rb +111 -0
- data/lib/metanorma-iso.rb +2 -0
- data/lib/metanorma/iso/processor.rb +20 -9
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +5 -2
- data/spec/asciidoctor-iso/amd_spec.rb +726 -0
- data/spec/asciidoctor-iso/base_spec.rb +24 -20
- data/spec/asciidoctor-iso/cleanup_spec.rb +2 -2
- data/spec/asciidoctor-iso/macros_spec.rb +33 -17
- data/spec/asciidoctor-iso/refs_spec.rb +1 -1
- data/spec/asciidoctor-iso/table_spec.rb +1 -1
- data/spec/isodoc/amd_spec.rb +652 -0
- data/spec/isodoc/blocks_spec.rb +112 -27
- data/spec/isodoc/inline_spec.rb +2 -2
- data/spec/isodoc/metadata_spec.rb +88 -4
- data/spec/isodoc/postproc_spec.rb +11 -11
- data/spec/isodoc/ref_spec.rb +7 -7
- data/spec/isodoc/section_spec.rb +28 -1
- data/spec/isodoc/table_spec.rb +29 -29
- data/spec/isodoc/terms_spec.rb +4 -4
- data/spec/isodoc/xref_spec.rb +32 -26
- data/spec/metanorma/processor_spec.rb +2 -2
- data/spec/spec_helper.rb +11 -0
- metadata +61 -11
data/metanorma-iso.gemspec
CHANGED
@@ -30,8 +30,11 @@ 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.1.0"
|
34
|
+
spec.add_dependency "metanorma-standoc", "~> 1.4.0"
|
35
|
+
spec.add_dependency "tokenizer", "~> 0.3.0"
|
36
|
+
spec.add_dependency "twitter_cldr"
|
37
|
+
spec.add_dependency "mn2sts", "~> 1.2.0"
|
35
38
|
|
36
39
|
spec.add_development_dependency "byebug"
|
37
40
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
@@ -0,0 +1,726 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
require "fileutils"
|
3
|
+
|
4
|
+
RSpec.describe Asciidoctor::ISO do
|
5
|
+
it "validates amendment document against distinct ISO XML schema" do
|
6
|
+
FileUtils.rm_f "test.err"
|
7
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
8
|
+
= Document title
|
9
|
+
Author
|
10
|
+
:docfile: test.adoc
|
11
|
+
:nodoc:
|
12
|
+
:no-isobib:
|
13
|
+
:doctype: amendment
|
14
|
+
|
15
|
+
[change=mid-air]
|
16
|
+
== Para
|
17
|
+
INPUT
|
18
|
+
expect(File.read("test.err")).to include 'value of attribute "change" is invalid; must be equal to'
|
19
|
+
end
|
20
|
+
|
21
|
+
it "processes amendment sections" do
|
22
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
23
|
+
#{AMD_BLANK_HDR}
|
24
|
+
== Foreword
|
25
|
+
|
26
|
+
Text
|
27
|
+
|
28
|
+
== Introduction
|
29
|
+
|
30
|
+
=== Introduction Subsection
|
31
|
+
|
32
|
+
== Scope
|
33
|
+
|
34
|
+
Text
|
35
|
+
|
36
|
+
== Acknowledgements
|
37
|
+
|
38
|
+
== Normative References
|
39
|
+
|
40
|
+
== Terms and Definitions
|
41
|
+
|
42
|
+
=== Term1
|
43
|
+
|
44
|
+
== Terms, Definitions, Symbols and Abbreviated Terms
|
45
|
+
|
46
|
+
=== Normal Terms
|
47
|
+
|
48
|
+
==== Term2
|
49
|
+
|
50
|
+
=== Symbols and Abbreviated Terms
|
51
|
+
|
52
|
+
== Symbols and Abbreviated Terms
|
53
|
+
|
54
|
+
== Clause 4
|
55
|
+
|
56
|
+
=== Introduction
|
57
|
+
|
58
|
+
=== Clause 4.2
|
59
|
+
|
60
|
+
== Terms and Definitions
|
61
|
+
|
62
|
+
[appendix]
|
63
|
+
== Annex
|
64
|
+
|
65
|
+
=== Annex A.1
|
66
|
+
|
67
|
+
[%appendix]
|
68
|
+
=== Appendix 1
|
69
|
+
|
70
|
+
== Bibliography
|
71
|
+
|
72
|
+
=== Bibliography Subsection
|
73
|
+
INPUT
|
74
|
+
#{BLANK_HDR.sub(%r{<doctype>article</doctype>}, "<doctype>amendment</doctype>")}
|
75
|
+
<sections>
|
76
|
+
<clause id='_' obligation='normative'>
|
77
|
+
<title>Foreword</title>
|
78
|
+
<p id='_'>Text</p>
|
79
|
+
</clause>
|
80
|
+
<clause id='_' obligation='normative'>
|
81
|
+
<title>Introduction</title>
|
82
|
+
<clause id='_' obligation='normative'>
|
83
|
+
<title>Introduction Subsection</title>
|
84
|
+
</clause>
|
85
|
+
</clause>
|
86
|
+
<clause id='_' obligation='normative'>
|
87
|
+
<title>Scope</title>
|
88
|
+
<p id='_'>Text</p>
|
89
|
+
</clause>
|
90
|
+
<clause id='_' obligation='normative'>
|
91
|
+
<title>Acknowledgements</title>
|
92
|
+
</clause>
|
93
|
+
<clause id='_' obligation='normative'>
|
94
|
+
<title>Normative References</title>
|
95
|
+
</clause>
|
96
|
+
<clause id='_' obligation='normative'>
|
97
|
+
<title>Terms and Definitions</title>
|
98
|
+
<clause id='_' obligation='normative'>
|
99
|
+
<title>Term1</title>
|
100
|
+
</clause>
|
101
|
+
</clause>
|
102
|
+
<clause id='_' obligation='normative'>
|
103
|
+
<title>Terms, Definitions, Symbols and Abbreviated Terms</title>
|
104
|
+
<clause id='_' obligation='normative'>
|
105
|
+
<title>Normal Terms</title>
|
106
|
+
<clause id='_' obligation='normative'>
|
107
|
+
<title>Term2</title>
|
108
|
+
</clause>
|
109
|
+
</clause>
|
110
|
+
<clause id='_' obligation='normative'>
|
111
|
+
<title>Symbols and Abbreviated Terms</title>
|
112
|
+
</clause>
|
113
|
+
</clause>
|
114
|
+
<clause id='_' obligation='normative'>
|
115
|
+
<title>Symbols and Abbreviated Terms</title>
|
116
|
+
</clause>
|
117
|
+
<clause id='_' obligation='normative'>
|
118
|
+
<title>Clause 4</title>
|
119
|
+
<clause id='_' obligation='normative'>
|
120
|
+
<title>Introduction</title>
|
121
|
+
</clause>
|
122
|
+
<clause id='_' obligation='normative'>
|
123
|
+
<title>Clause 4.2</title>
|
124
|
+
</clause>
|
125
|
+
</clause>
|
126
|
+
<clause id='_' obligation='normative'>
|
127
|
+
<title>Terms and Definitions</title>
|
128
|
+
</clause>
|
129
|
+
<clause id='_' obligation='normative'>
|
130
|
+
<title>Bibliography</title>
|
131
|
+
<clause id='_' obligation='normative'>
|
132
|
+
<title>Bibliography Subsection</title>
|
133
|
+
</clause>
|
134
|
+
</clause>
|
135
|
+
</sections>
|
136
|
+
<annex id='_' obligation='normative'>
|
137
|
+
<title>Annex</title>
|
138
|
+
<clause id='_' obligation='normative'>
|
139
|
+
<title>Annex A.1</title>
|
140
|
+
</clause>
|
141
|
+
<appendix id='_' obligation='normative'>
|
142
|
+
<title>Appendix 1</title>
|
143
|
+
</appendix>
|
144
|
+
</annex>
|
145
|
+
</iso-standard>
|
146
|
+
|
147
|
+
OUTPUT
|
148
|
+
end
|
149
|
+
|
150
|
+
it "processes section attributes" do
|
151
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
152
|
+
#{AMD_BLANK_HDR}
|
153
|
+
[change=delete,locality="clause=introduction,paragraph=4-7",inline-header="true"]
|
154
|
+
== Clause 1
|
155
|
+
|
156
|
+
INPUT
|
157
|
+
#{BLANK_HDR.sub(%r{<doctype>article</doctype>}, "<doctype>amendment</doctype>")}
|
158
|
+
<sections><clause id="_" obligation="normative" change="delete" locality="clause=introduction,paragraph=4-7">
|
159
|
+
<title>Clause 1</title>
|
160
|
+
</clause>
|
161
|
+
</sections>
|
162
|
+
</iso-standard>
|
163
|
+
OUTPUT
|
164
|
+
end
|
165
|
+
|
166
|
+
it "processes default metadata, amendment" do
|
167
|
+
expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
168
|
+
= Document title
|
169
|
+
Author
|
170
|
+
:docfile: test.adoc
|
171
|
+
:nodoc:
|
172
|
+
:novalid:
|
173
|
+
:no-isobib:
|
174
|
+
:docnumber: 17301
|
175
|
+
:partnumber: 1
|
176
|
+
:edition: 2
|
177
|
+
:revdate: 2000-01-01
|
178
|
+
:draft: 0.3.4
|
179
|
+
:technical-committee: TC
|
180
|
+
:technical-committee-number: 1
|
181
|
+
:technical-committee-type: A
|
182
|
+
:subcommittee: SC
|
183
|
+
:subcommittee-number: 2
|
184
|
+
:subcommittee-type: B
|
185
|
+
:workgroup: WG
|
186
|
+
:workgroup-number: 3
|
187
|
+
:workgroup-type: C
|
188
|
+
:technical-committee_2: TC1
|
189
|
+
:technical-committee-number_2: 11
|
190
|
+
:technical-committee-type_2: A1
|
191
|
+
:subcommittee_2: SC1
|
192
|
+
:subcommittee-number_2: 21
|
193
|
+
:subcommittee-type_2: B1
|
194
|
+
:workgroup_2: WG1
|
195
|
+
:workgroup-number_2: 31
|
196
|
+
:workgroup-type_2: C1
|
197
|
+
:secretariat: SECRETARIAT
|
198
|
+
:docstage: 10
|
199
|
+
:docsubstage: 20
|
200
|
+
:iteration: 3
|
201
|
+
:language: en
|
202
|
+
:title-intro-en: Introduction
|
203
|
+
:title-main-en: Main Title -- Title
|
204
|
+
:title-part-en: Title Part
|
205
|
+
:title-intro-fr: Introduction Française
|
206
|
+
:title-main-fr: Titre Principal
|
207
|
+
:title-part-fr: Part du Titre
|
208
|
+
:library-ics: 1,2,3
|
209
|
+
:copyright-year: 2017
|
210
|
+
:updates: ISO 17301-1:2016
|
211
|
+
:created-date: 2016-05-01
|
212
|
+
:amendment-number: 1
|
213
|
+
:title-amendment-en: Mass fraction of extraneous matter, milled rice (nonglutinous), sample dividers and recommendations relating to storage and transport conditions
|
214
|
+
:title-amendment-fr: Fraction massique de matière étrangère, riz usiné (non gluant), diviseurs d’échantillon et recommandations relatives aux conditions d’entreposage et de transport
|
215
|
+
:doctype: amendment
|
216
|
+
:updates-document-type: international-standard
|
217
|
+
INPUT
|
218
|
+
<iso-standard xmlns='https://www.metanorma.org/ns/iso'>
|
219
|
+
<bibdata type='standard'>
|
220
|
+
<title language='en' format='text/plain' type='main'>Introduction — Main Title — Title — Title Part — Mass fraction of
|
221
|
+
extraneous matter, milled rice (nonglutinous), sample dividers and
|
222
|
+
recommendations relating to storage and transport conditions</title>
|
223
|
+
<title language='en' format='text/plain' type='title-intro'>Introduction</title>
|
224
|
+
<title language='en' format='text/plain' type='title-main'>Main Title — Title</title>
|
225
|
+
<title language='en' format='text/plain' type='title-part'>Title Part</title>
|
226
|
+
<title language='en' format='text/plain' type='title-amd'>
|
227
|
+
Mass fraction of extraneous matter, milled rice (nonglutinous), sample
|
228
|
+
dividers and recommendations relating to storage and transport conditions
|
229
|
+
</title>
|
230
|
+
<title language='fr' format='text/plain' type='main'>
|
231
|
+
Introduction Française — Titre Principal — Part du Titre — Fraction
|
232
|
+
massique de matière étrangère, riz usiné (non gluant), diviseurs
|
233
|
+
d’échantillon et recommandations relatives aux conditions d’entreposage et
|
234
|
+
de transport
|
235
|
+
</title>
|
236
|
+
<title language='fr' format='text/plain' type='title-intro'>Introduction Française</title>
|
237
|
+
<title language='fr' format='text/plain' type='title-main'>Titre Principal</title>
|
238
|
+
<title language='fr' format='text/plain' type='title-part'>Part du Titre</title>
|
239
|
+
<title language='fr' format='text/plain' type='title-amd'>
|
240
|
+
Fraction massique de matière étrangère, riz usiné (non gluant), diviseurs
|
241
|
+
d’échantillon et recommandations relatives aux conditions d’entreposage et
|
242
|
+
de transport
|
243
|
+
</title>
|
244
|
+
<docidentifier type='ISO'>ISO 17301-1:2016/PreNP Amd 1</docidentifier>
|
245
|
+
<docidentifier type='iso-with-lang'>ISO 17301-1:2016/PreNP Amd 1(E)</docidentifier>
|
246
|
+
<docidentifier type='iso-reference'>ISO 17301-1:2016/PreNP Amd 1:2017(E)</docidentifier>
|
247
|
+
<docnumber>17301</docnumber>
|
248
|
+
<date type='created'>
|
249
|
+
<on>2016-05-01</on>
|
250
|
+
</date>
|
251
|
+
<contributor>
|
252
|
+
<role type='author'/>
|
253
|
+
<organization>
|
254
|
+
<name>International Organization for Standardization</name>
|
255
|
+
<abbreviation>ISO</abbreviation>
|
256
|
+
</organization>
|
257
|
+
</contributor>
|
258
|
+
<contributor>
|
259
|
+
<role type='publisher'/>
|
260
|
+
<organization>
|
261
|
+
<name>International Organization for Standardization</name>
|
262
|
+
<abbreviation>ISO</abbreviation>
|
263
|
+
</organization>
|
264
|
+
</contributor>
|
265
|
+
<edition>2</edition>
|
266
|
+
<version>
|
267
|
+
<revision-date>2000-01-01</revision-date>
|
268
|
+
<draft>0.3.4</draft>
|
269
|
+
</version>
|
270
|
+
<language>en</language>
|
271
|
+
<script>Latn</script>
|
272
|
+
<status>
|
273
|
+
<stage abbreviation='NP'>10</stage>
|
274
|
+
<substage>20</substage>
|
275
|
+
<iteration>3</iteration>
|
276
|
+
</status>
|
277
|
+
<copyright>
|
278
|
+
<from>2017</from>
|
279
|
+
<owner>
|
280
|
+
<organization>
|
281
|
+
<name>International Organization for Standardization</name>
|
282
|
+
<abbreviation>ISO</abbreviation>
|
283
|
+
</organization>
|
284
|
+
</owner>
|
285
|
+
</copyright>
|
286
|
+
<ext>
|
287
|
+
<doctype>amendment</doctype>
|
288
|
+
<editorialgroup>
|
289
|
+
<technical-committee number='1' type='A'>TC</technical-committee>
|
290
|
+
<technical-committee number='11' type='A1'>TC1</technical-committee>
|
291
|
+
<subcommittee number='2' type='B'>SC</subcommittee>
|
292
|
+
<subcommittee number='21' type='B1'>SC1</subcommittee>
|
293
|
+
<workgroup number='3' type='C'>WG</workgroup>
|
294
|
+
<workgroup number='31' type='C1'>WG1</workgroup>
|
295
|
+
<secretariat>SECRETARIAT</secretariat>
|
296
|
+
</editorialgroup>
|
297
|
+
<ics>
|
298
|
+
<code>1</code>
|
299
|
+
</ics>
|
300
|
+
<ics>
|
301
|
+
<code>2</code>
|
302
|
+
</ics>
|
303
|
+
<ics>
|
304
|
+
<code>3</code>
|
305
|
+
</ics>
|
306
|
+
<structuredidentifier>
|
307
|
+
<project-number part='1' amendment='1' origyr='2016-05-01'>17301</project-number>
|
308
|
+
</structuredidentifier>
|
309
|
+
<stagename>New work item proposal</stagename>
|
310
|
+
<updates-document-type>international-standard</updates-document-type>
|
311
|
+
</ext>
|
312
|
+
</bibdata>
|
313
|
+
<sections/>
|
314
|
+
</iso-standard>
|
315
|
+
OUTPUT
|
316
|
+
end
|
317
|
+
|
318
|
+
it "processes metadata, amendment" do
|
319
|
+
expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
320
|
+
= Document title
|
321
|
+
Author
|
322
|
+
:docfile: test.adoc
|
323
|
+
:nodoc:
|
324
|
+
:novalid:
|
325
|
+
:no-isobib:
|
326
|
+
:docnumber: 17301
|
327
|
+
:partnumber: 1
|
328
|
+
:doctype: amendment
|
329
|
+
:docstage: 30
|
330
|
+
:updates: ISO 17301-1:2030
|
331
|
+
:amendment-number: 1
|
332
|
+
INPUT
|
333
|
+
<iso-standard xmlns='https://www.metanorma.org/ns/iso'>
|
334
|
+
<bibdata type='standard'>
|
335
|
+
<docidentifier type='ISO'>ISO 17301-1:2030/CD Amd 1</docidentifier>
|
336
|
+
<docidentifier type='iso-with-lang'>ISO 17301-1:2030/CD Amd 1(E)</docidentifier>
|
337
|
+
<docidentifier type='iso-reference'>ISO 17301-1:2030/CD Amd 1(E)</docidentifier>
|
338
|
+
<docnumber>17301</docnumber>
|
339
|
+
<contributor>
|
340
|
+
<role type='author'/>
|
341
|
+
<organization>
|
342
|
+
<name>International Organization for Standardization</name>
|
343
|
+
<abbreviation>ISO</abbreviation>
|
344
|
+
</organization>
|
345
|
+
</contributor>
|
346
|
+
<contributor>
|
347
|
+
<role type='publisher'/>
|
348
|
+
<organization>
|
349
|
+
<name>International Organization for Standardization</name>
|
350
|
+
<abbreviation>ISO</abbreviation>
|
351
|
+
</organization>
|
352
|
+
</contributor>
|
353
|
+
<language>en</language>
|
354
|
+
<script>Latn</script>
|
355
|
+
<status>
|
356
|
+
<stage abbreviation='CD'>30</stage>
|
357
|
+
<substage>00</substage>
|
358
|
+
</status>
|
359
|
+
<copyright>
|
360
|
+
<from>2020</from>
|
361
|
+
<owner>
|
362
|
+
<organization>
|
363
|
+
<name>International Organization for Standardization</name>
|
364
|
+
<abbreviation>ISO</abbreviation>
|
365
|
+
</organization>
|
366
|
+
</owner>
|
367
|
+
</copyright>
|
368
|
+
<ext>
|
369
|
+
<doctype>amendment</doctype>
|
370
|
+
<editorialgroup>
|
371
|
+
<technical-committee/>
|
372
|
+
<subcommittee/>
|
373
|
+
<workgroup/>
|
374
|
+
</editorialgroup>
|
375
|
+
<structuredidentifier>
|
376
|
+
<project-number part='1' amendment='1'>17301</project-number>
|
377
|
+
</structuredidentifier>
|
378
|
+
<stagename>Committee draft</stagename>
|
379
|
+
</ext>
|
380
|
+
</bibdata>
|
381
|
+
<sections/>
|
382
|
+
</iso-standard>
|
383
|
+
OUTPUT
|
384
|
+
end
|
385
|
+
|
386
|
+
it "processes metadata, amendment" do
|
387
|
+
expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
388
|
+
= Document title
|
389
|
+
Author
|
390
|
+
:docfile: test.adoc
|
391
|
+
:nodoc:
|
392
|
+
:novalid:
|
393
|
+
:no-isobib:
|
394
|
+
:docnumber: 17301
|
395
|
+
:partnumber: 1
|
396
|
+
:doctype: amendment
|
397
|
+
:docstage: 40
|
398
|
+
:updates: ISO 17301-1:2030
|
399
|
+
:amendment-number: 1
|
400
|
+
INPUT
|
401
|
+
<iso-standard xmlns='https://www.metanorma.org/ns/iso'>
|
402
|
+
<bibdata type='standard'>
|
403
|
+
<docidentifier type='ISO'>ISO 17301-1:2030/DAmd 1</docidentifier>
|
404
|
+
<docidentifier type='iso-with-lang'>ISO 17301-1:2030/DAmd 1(E)</docidentifier>
|
405
|
+
<docidentifier type='iso-reference'>ISO 17301-1:2030/DAmd 1(E)</docidentifier>
|
406
|
+
<docnumber>17301</docnumber>
|
407
|
+
<contributor>
|
408
|
+
<role type='author'/>
|
409
|
+
<organization>
|
410
|
+
<name>International Organization for Standardization</name>
|
411
|
+
<abbreviation>ISO</abbreviation>
|
412
|
+
</organization>
|
413
|
+
</contributor>
|
414
|
+
<contributor>
|
415
|
+
<role type='publisher'/>
|
416
|
+
<organization>
|
417
|
+
<name>International Organization for Standardization</name>
|
418
|
+
<abbreviation>ISO</abbreviation>
|
419
|
+
</organization>
|
420
|
+
</contributor>
|
421
|
+
<language>en</language>
|
422
|
+
<script>Latn</script>
|
423
|
+
<status>
|
424
|
+
<stage abbreviation='D'>40</stage>
|
425
|
+
<substage>00</substage>
|
426
|
+
</status>
|
427
|
+
<copyright>
|
428
|
+
<from>2020</from>
|
429
|
+
<owner>
|
430
|
+
<organization>
|
431
|
+
<name>International Organization for Standardization</name>
|
432
|
+
<abbreviation>ISO</abbreviation>
|
433
|
+
</organization>
|
434
|
+
</owner>
|
435
|
+
</copyright>
|
436
|
+
<ext>
|
437
|
+
<doctype>amendment</doctype>
|
438
|
+
<editorialgroup>
|
439
|
+
<technical-committee/>
|
440
|
+
<subcommittee/>
|
441
|
+
<workgroup/>
|
442
|
+
</editorialgroup>
|
443
|
+
<structuredidentifier>
|
444
|
+
<project-number part='1' amendment='1'>17301</project-number>
|
445
|
+
</structuredidentifier>
|
446
|
+
<stagename>Draft</stagename>
|
447
|
+
</ext>
|
448
|
+
</bibdata>
|
449
|
+
<sections/>
|
450
|
+
</iso-standard>
|
451
|
+
OUTPUT
|
452
|
+
end
|
453
|
+
|
454
|
+
it "processes metadata, amendment" do
|
455
|
+
expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
456
|
+
= Document title
|
457
|
+
Author
|
458
|
+
:docfile: test.adoc
|
459
|
+
:nodoc:
|
460
|
+
:novalid:
|
461
|
+
:no-isobib:
|
462
|
+
:docnumber: 17301
|
463
|
+
:partnumber: 1
|
464
|
+
:doctype: amendment
|
465
|
+
:updates: ISO 17301-1:2030
|
466
|
+
:amendment-number: 1
|
467
|
+
INPUT
|
468
|
+
<iso-standard xmlns='https://www.metanorma.org/ns/iso'>
|
469
|
+
<bibdata type='standard'>
|
470
|
+
<docidentifier type='ISO'>ISO 17301-1:2030/Amd 1</docidentifier>
|
471
|
+
<docidentifier type='iso-with-lang'>ISO 17301-1:2030/Amd 1(E)</docidentifier>
|
472
|
+
<docidentifier type='iso-reference'>ISO 17301-1:2030/Amd 1(E)</docidentifier>
|
473
|
+
<docnumber>17301</docnumber>
|
474
|
+
<contributor>
|
475
|
+
<role type='author'/>
|
476
|
+
<organization>
|
477
|
+
<name>International Organization for Standardization</name>
|
478
|
+
<abbreviation>ISO</abbreviation>
|
479
|
+
</organization>
|
480
|
+
</contributor>
|
481
|
+
<contributor>
|
482
|
+
<role type='publisher'/>
|
483
|
+
<organization>
|
484
|
+
<name>International Organization for Standardization</name>
|
485
|
+
<abbreviation>ISO</abbreviation>
|
486
|
+
</organization>
|
487
|
+
</contributor>
|
488
|
+
<language>en</language>
|
489
|
+
<script>Latn</script>
|
490
|
+
<status>
|
491
|
+
<stage abbreviation='IS'>60</stage>
|
492
|
+
<substage>60</substage>
|
493
|
+
</status>
|
494
|
+
<copyright>
|
495
|
+
<from>2020</from>
|
496
|
+
<owner>
|
497
|
+
<organization>
|
498
|
+
<name>International Organization for Standardization</name>
|
499
|
+
<abbreviation>ISO</abbreviation>
|
500
|
+
</organization>
|
501
|
+
</owner>
|
502
|
+
</copyright>
|
503
|
+
<ext>
|
504
|
+
<doctype>amendment</doctype>
|
505
|
+
<editorialgroup>
|
506
|
+
<technical-committee/>
|
507
|
+
<subcommittee/>
|
508
|
+
<workgroup/>
|
509
|
+
</editorialgroup>
|
510
|
+
<structuredidentifier>
|
511
|
+
<project-number part='1' amendment='1'>17301</project-number>
|
512
|
+
</structuredidentifier>
|
513
|
+
<stagename>International standard</stagename>
|
514
|
+
</ext>
|
515
|
+
</bibdata>
|
516
|
+
<sections/>
|
517
|
+
</iso-standard>
|
518
|
+
OUTPUT
|
519
|
+
end
|
520
|
+
|
521
|
+
it "processes metadata, corrigendum" do
|
522
|
+
expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
523
|
+
= Document title
|
524
|
+
Author
|
525
|
+
:docfile: test.adoc
|
526
|
+
:nodoc:
|
527
|
+
:novalid:
|
528
|
+
:no-isobib:
|
529
|
+
:docnumber: 17301
|
530
|
+
:partnumber: 1
|
531
|
+
:doctype: technical-corrigendum
|
532
|
+
:docstage: 30
|
533
|
+
:updates: ISO 17301-1:2030
|
534
|
+
:corrigendum-number: 3
|
535
|
+
INPUT
|
536
|
+
<iso-standard xmlns='https://www.metanorma.org/ns/iso'>
|
537
|
+
<bibdata type='standard'>
|
538
|
+
<docidentifier type='ISO'>ISO 17301-1:2030/CD Cor.3</docidentifier>
|
539
|
+
<docidentifier type='iso-with-lang'>ISO 17301-1:2030/CD Cor.3(E)</docidentifier>
|
540
|
+
<docidentifier type='iso-reference'>ISO 17301-1:2030/CD Cor.3(E)</docidentifier>
|
541
|
+
<docnumber>17301</docnumber>
|
542
|
+
<contributor>
|
543
|
+
<role type='author'/>
|
544
|
+
<organization>
|
545
|
+
<name>International Organization for Standardization</name>
|
546
|
+
<abbreviation>ISO</abbreviation>
|
547
|
+
</organization>
|
548
|
+
</contributor>
|
549
|
+
<contributor>
|
550
|
+
<role type='publisher'/>
|
551
|
+
<organization>
|
552
|
+
<name>International Organization for Standardization</name>
|
553
|
+
<abbreviation>ISO</abbreviation>
|
554
|
+
</organization>
|
555
|
+
</contributor>
|
556
|
+
<language>en</language>
|
557
|
+
<script>Latn</script>
|
558
|
+
<status>
|
559
|
+
<stage abbreviation='CD'>30</stage>
|
560
|
+
<substage>00</substage>
|
561
|
+
</status>
|
562
|
+
<copyright>
|
563
|
+
<from>2020</from>
|
564
|
+
<owner>
|
565
|
+
<organization>
|
566
|
+
<name>International Organization for Standardization</name>
|
567
|
+
<abbreviation>ISO</abbreviation>
|
568
|
+
</organization>
|
569
|
+
</owner>
|
570
|
+
</copyright>
|
571
|
+
<ext>
|
572
|
+
<doctype>technical-corrigendum</doctype>
|
573
|
+
<editorialgroup>
|
574
|
+
<technical-committee/>
|
575
|
+
<subcommittee/>
|
576
|
+
<workgroup/>
|
577
|
+
</editorialgroup>
|
578
|
+
<structuredidentifier>
|
579
|
+
<project-number part='1' corrigendum='3'>17301</project-number>
|
580
|
+
</structuredidentifier>
|
581
|
+
<stagename>Committee draft</stagename>
|
582
|
+
</ext>
|
583
|
+
</bibdata>
|
584
|
+
<sections/>
|
585
|
+
</iso-standard>
|
586
|
+
OUTPUT
|
587
|
+
end
|
588
|
+
|
589
|
+
it "processes metadata, corrigendum" do
|
590
|
+
expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
591
|
+
= Document title
|
592
|
+
Author
|
593
|
+
:docfile: test.adoc
|
594
|
+
:nodoc:
|
595
|
+
:novalid:
|
596
|
+
:no-isobib:
|
597
|
+
:docnumber: 17301
|
598
|
+
:partnumber: 1
|
599
|
+
:doctype: technical-corrigendum
|
600
|
+
:docstage: 50
|
601
|
+
:updates: ISO 17301-1:2030
|
602
|
+
:corrigendum-number: 3
|
603
|
+
INPUT
|
604
|
+
<iso-standard xmlns='https://www.metanorma.org/ns/iso'>
|
605
|
+
<bibdata type='standard'>
|
606
|
+
<docidentifier type='ISO'>ISO 17301-1:2030/FDCor.3</docidentifier>
|
607
|
+
<docidentifier type='iso-with-lang'>ISO 17301-1:2030/FDCor.3(E)</docidentifier>
|
608
|
+
<docidentifier type='iso-reference'>ISO 17301-1:2030/FDCor.3(E)</docidentifier>
|
609
|
+
<docnumber>17301</docnumber>
|
610
|
+
<contributor>
|
611
|
+
<role type='author'/>
|
612
|
+
<organization>
|
613
|
+
<name>International Organization for Standardization</name>
|
614
|
+
<abbreviation>ISO</abbreviation>
|
615
|
+
</organization>
|
616
|
+
</contributor>
|
617
|
+
<contributor>
|
618
|
+
<role type='publisher'/>
|
619
|
+
<organization>
|
620
|
+
<name>International Organization for Standardization</name>
|
621
|
+
<abbreviation>ISO</abbreviation>
|
622
|
+
</organization>
|
623
|
+
</contributor>
|
624
|
+
<language>en</language>
|
625
|
+
<script>Latn</script>
|
626
|
+
<status>
|
627
|
+
<stage abbreviation='FD'>50</stage>
|
628
|
+
<substage>00</substage>
|
629
|
+
</status>
|
630
|
+
<copyright>
|
631
|
+
<from>2020</from>
|
632
|
+
<owner>
|
633
|
+
<organization>
|
634
|
+
<name>International Organization for Standardization</name>
|
635
|
+
<abbreviation>ISO</abbreviation>
|
636
|
+
</organization>
|
637
|
+
</owner>
|
638
|
+
</copyright>
|
639
|
+
<ext>
|
640
|
+
<doctype>technical-corrigendum</doctype>
|
641
|
+
<editorialgroup>
|
642
|
+
<technical-committee/>
|
643
|
+
<subcommittee/>
|
644
|
+
<workgroup/>
|
645
|
+
</editorialgroup>
|
646
|
+
<structuredidentifier>
|
647
|
+
<project-number part='1' corrigendum='3'>17301</project-number>
|
648
|
+
</structuredidentifier>
|
649
|
+
<stagename>Final draft</stagename>
|
650
|
+
</ext>
|
651
|
+
</bibdata>
|
652
|
+
<sections/>
|
653
|
+
</iso-standard>
|
654
|
+
OUTPUT
|
655
|
+
end
|
656
|
+
|
657
|
+
it "processes metadata, corrigendum" do
|
658
|
+
expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
659
|
+
= Document title
|
660
|
+
Author
|
661
|
+
:docfile: test.adoc
|
662
|
+
:nodoc:
|
663
|
+
:novalid:
|
664
|
+
:no-isobib:
|
665
|
+
:docnumber: 17301
|
666
|
+
:partnumber: 1
|
667
|
+
:doctype: technical-corrigendum
|
668
|
+
:updates: ISO 17301-1:2030
|
669
|
+
:corrigendum-number: 3
|
670
|
+
INPUT
|
671
|
+
<iso-standard xmlns='https://www.metanorma.org/ns/iso'>
|
672
|
+
<bibdata type='standard'>
|
673
|
+
<docidentifier type='ISO'>ISO 17301-1:2030/Cor.3</docidentifier>
|
674
|
+
<docidentifier type='iso-with-lang'>ISO 17301-1:2030/Cor.3(E)</docidentifier>
|
675
|
+
<docidentifier type='iso-reference'>ISO 17301-1:2030/Cor.3(E)</docidentifier>
|
676
|
+
<docnumber>17301</docnumber>
|
677
|
+
<contributor>
|
678
|
+
<role type='author'/>
|
679
|
+
<organization>
|
680
|
+
<name>International Organization for Standardization</name>
|
681
|
+
<abbreviation>ISO</abbreviation>
|
682
|
+
</organization>
|
683
|
+
</contributor>
|
684
|
+
<contributor>
|
685
|
+
<role type='publisher'/>
|
686
|
+
<organization>
|
687
|
+
<name>International Organization for Standardization</name>
|
688
|
+
<abbreviation>ISO</abbreviation>
|
689
|
+
</organization>
|
690
|
+
</contributor>
|
691
|
+
<language>en</language>
|
692
|
+
<script>Latn</script>
|
693
|
+
<status>
|
694
|
+
<stage abbreviation='IS'>60</stage>
|
695
|
+
<substage>60</substage>
|
696
|
+
</status>
|
697
|
+
<copyright>
|
698
|
+
<from>2020</from>
|
699
|
+
<owner>
|
700
|
+
<organization>
|
701
|
+
<name>International Organization for Standardization</name>
|
702
|
+
<abbreviation>ISO</abbreviation>
|
703
|
+
</organization>
|
704
|
+
</owner>
|
705
|
+
</copyright>
|
706
|
+
<ext>
|
707
|
+
<doctype>technical-corrigendum</doctype>
|
708
|
+
<editorialgroup>
|
709
|
+
<technical-committee/>
|
710
|
+
<subcommittee/>
|
711
|
+
<workgroup/>
|
712
|
+
</editorialgroup>
|
713
|
+
<structuredidentifier>
|
714
|
+
<project-number part='1' corrigendum='3'>17301</project-number>
|
715
|
+
</structuredidentifier>
|
716
|
+
<stagename>International standard</stagename>
|
717
|
+
</ext>
|
718
|
+
</bibdata>
|
719
|
+
<sections/>
|
720
|
+
</iso-standard>
|
721
|
+
OUTPUT
|
722
|
+
end
|
723
|
+
|
724
|
+
|
725
|
+
|
726
|
+
end
|