metanorma-iso 2.2.2 → 2.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/lib/isodoc/iso/html/header-dis.html +111 -29
  3. data/lib/isodoc/iso/html/isodoc-dis.css +65 -64
  4. data/lib/isodoc/iso/html/isodoc-dis.scss +65 -64
  5. data/lib/isodoc/iso/html/style-human.css +7 -2
  6. data/lib/isodoc/iso/html/style-human.scss +0 -1
  7. data/lib/isodoc/iso/html/style-iso.css +7 -2
  8. data/lib/isodoc/iso/html/style-iso.scss +0 -1
  9. data/lib/isodoc/iso/html/wordstyle-dis.css +160 -4
  10. data/lib/isodoc/iso/html/wordstyle-dis.scss +154 -4
  11. data/lib/isodoc/iso/html/wordstyle.css +150 -0
  12. data/lib/isodoc/iso/html/wordstyle.scss +144 -0
  13. data/lib/isodoc/iso/i18n-en.yaml +4 -4
  14. data/lib/isodoc/iso/iso.amendment.xsl +1649 -1199
  15. data/lib/isodoc/iso/iso.international-standard.xsl +1649 -1199
  16. data/lib/isodoc/iso/presentation_bibdata.rb +13 -9
  17. data/lib/isodoc/iso/presentation_xml_convert.rb +5 -3
  18. data/lib/isodoc/iso/word_convert.rb +6 -4
  19. data/lib/isodoc/iso/word_dis_cleanup.rb +30 -8
  20. data/lib/isodoc/iso/word_dis_convert.rb +5 -2
  21. data/lib/metanorma/iso/base.rb +2 -1
  22. data/lib/metanorma/iso/biblio.rng +5 -0
  23. data/lib/metanorma/iso/isodoc.rng +47 -13
  24. data/lib/metanorma/iso/validate.rb +2 -2
  25. data/lib/metanorma/iso/version.rb +1 -1
  26. data/metanorma-iso.gemspec +5 -2
  27. metadata +4 -87
  28. data/.github/workflows/automerge.yml +0 -31
  29. data/.github/workflows/rake.yml +0 -15
  30. data/.github/workflows/release.yml +0 -24
  31. data/.github/workflows/ubuntu.yml +0 -41
  32. data/Rakefile +0 -8
  33. data/bin/rspec +0 -17
  34. data/spec/assets/header.html +0 -7
  35. data/spec/assets/html.css +0 -2
  36. data/spec/assets/htmlcover.html +0 -4
  37. data/spec/assets/htmlintro.html +0 -5
  38. data/spec/assets/i18n.yaml +0 -2
  39. data/spec/assets/iso.adoc +0 -10
  40. data/spec/assets/iso.headless.html +0 -33
  41. data/spec/assets/iso.xml +0 -71
  42. data/spec/assets/rice_image1.png +0 -0
  43. data/spec/assets/scripts.html +0 -3
  44. data/spec/assets/std.css +0 -2
  45. data/spec/assets/word.css +0 -2
  46. data/spec/assets/wordcover.html +0 -3
  47. data/spec/assets/wordintro.html +0 -4
  48. data/spec/examples/103_01_02.html +0 -247
  49. data/spec/examples/english.yaml +0 -69
  50. data/spec/examples/iso_123_.xml +0 -45
  51. data/spec/examples/iso_123_all_parts.xml +0 -45
  52. data/spec/examples/iso_123_no_year_note.xml +0 -46
  53. data/spec/examples/iso_124_.xml +0 -41
  54. data/spec/examples/iso_216_.xml +0 -47
  55. data/spec/examples/iso_iec_12382_.xml +0 -48
  56. data/spec/examples/rice.adoc +0 -714
  57. data/spec/examples/rice.preview.html +0 -1870
  58. data/spec/examples/rice.sh +0 -4
  59. data/spec/examples/rice_img/1000-1_ed2amd3fig1a.png +0 -0
  60. data/spec/examples/rice_img/1000-1_ed2amd3fig1b.png +0 -0
  61. data/spec/examples/rice_img/1000-1_ed2amd3fig2.png +0 -0
  62. data/spec/examples/rice_img/1000-1_ed2amd3fig3.png +0 -0
  63. data/spec/examples/rice_img/1000-1_ed2amd3fig4.png +0 -0
  64. data/spec/examples/rice_img/1000-1_ed2amd3fig5_f.png +0 -0
  65. data/spec/examples/rice_img/1000-1_ed2amd3figA.png +0 -0
  66. data/spec/examples/rice_img/1000-1_ed2amd3figA1.png +0 -0
  67. data/spec/examples/rice_img/1000-1_ed2amd3figA2.png +0 -0
  68. data/spec/examples/rice_img/1000-1_ed2amd3figTab1.png +0 -0
  69. data/spec/examples/rice_img/1000-1_ed2amd3figTab2.png +0 -0
  70. data/spec/examples/rice_img/1001_ed2amd3fig1.png +0 -0
  71. data/spec/examples/rice_img/ISO_1213_1.png +0 -0
  72. data/spec/examples/rice_img/SL1000-1_ed2amd3fig1.png +0 -0
  73. data/spec/examples/rice_img/rice_image1.png +0 -0
  74. data/spec/examples/rice_img/rice_image2.png +0 -0
  75. data/spec/examples/rice_img/rice_image3_1.png +0 -0
  76. data/spec/examples/rice_img/rice_image3_2.png +0 -0
  77. data/spec/examples/rice_img/rice_image3_3.png +0 -0
  78. data/spec/isodoc/amd_spec.rb +0 -986
  79. data/spec/isodoc/blocks_spec.rb +0 -1174
  80. data/spec/isodoc/i18n_spec.rb +0 -1579
  81. data/spec/isodoc/inline_spec.rb +0 -1060
  82. data/spec/isodoc/iso_spec.rb +0 -255
  83. data/spec/isodoc/metadata_spec.rb +0 -701
  84. data/spec/isodoc/postproc_spec.rb +0 -1089
  85. data/spec/isodoc/ref_spec.rb +0 -439
  86. data/spec/isodoc/section_spec.rb +0 -998
  87. data/spec/isodoc/table_spec.rb +0 -420
  88. data/spec/isodoc/terms_spec.rb +0 -314
  89. data/spec/isodoc/word_dis_spec.rb +0 -2064
  90. data/spec/isodoc/xref_spec.rb +0 -1747
  91. data/spec/metanorma/amd_spec.rb +0 -724
  92. data/spec/metanorma/base_spec.rb +0 -1384
  93. data/spec/metanorma/blank_spec.rb +0 -38
  94. data/spec/metanorma/blocks_spec.rb +0 -624
  95. data/spec/metanorma/cleanup_spec.rb +0 -1645
  96. data/spec/metanorma/inline_spec.rb +0 -203
  97. data/spec/metanorma/lists_spec.rb +0 -197
  98. data/spec/metanorma/macros_spec.rb +0 -99
  99. data/spec/metanorma/processor_spec.rb +0 -161
  100. data/spec/metanorma/refs_spec.rb +0 -672
  101. data/spec/metanorma/section_spec.rb +0 -492
  102. data/spec/metanorma/table_spec.rb +0 -329
  103. data/spec/metanorma/validate_spec.rb +0 -2153
  104. data/spec/relaton/render_spec.rb +0 -568
  105. data/spec/requirements/requirement_components_spec.rb +0 -610
  106. data/spec/requirements/requirements_spec.rb +0 -1596
  107. data/spec/requirements/xref_spec.rb +0 -1211
  108. data/spec/spec_helper.rb +0 -313
  109. data/spec/vcr_cassettes/docrels.yml +0 -385
  110. data/spec/vcr_cassettes/withdrawn_iso.yml +0 -295
@@ -1,724 +0,0 @@
1
- require "spec_helper"
2
-
3
- RSpec.describe Metanorma::ISO do
4
- it "processes amendment sections" do
5
- input = <<~INPUT
6
- #{AMD_BLANK_HDR}
7
- == Foreword
8
-
9
- Text
10
-
11
- == Introduction
12
-
13
- === Introduction Subsection
14
-
15
- == Scope
16
-
17
- Text
18
-
19
- == Acknowledgements
20
-
21
- == Normative References
22
-
23
- == Terms and Definitions
24
-
25
- === Term1
26
-
27
- == Terms, Definitions, Symbols and Abbreviated Terms
28
-
29
- === Normal Terms
30
-
31
- ==== Term2
32
-
33
- === Symbols and Abbreviated Terms
34
-
35
- == Symbols and Abbreviated Terms
36
-
37
- == Clause 4
38
-
39
- === Introduction
40
-
41
- === Clause 4.2
42
-
43
- == Terms and Definitions
44
-
45
- [appendix]
46
- == Annex
47
-
48
- === Annex A.1
49
-
50
- [%appendix]
51
- === Appendix 1
52
-
53
- == Bibliography
54
-
55
- === Bibliography Subsection
56
- INPUT
57
- output = <<~OUTPUT
58
- #{BLANK_HDR.sub(%r{<doctype>standard</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
- OUTPUT
131
- expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
132
- .to be_equivalent_to xmlpp(output)
133
- end
134
-
135
- it "processes default metadata, amendment" do
136
- input = Asciidoctor.convert(<<~"INPUT", *OPTIONS)
137
- = Document title
138
- Author
139
- :docfile: test.adoc
140
- :nodoc:
141
- :novalid:
142
- :no-isobib:
143
- :docnumber: 17301
144
- :partnumber: 1
145
- :edition: 2
146
- :revdate: 2000-01-01
147
- :draft: 0.3.4
148
- :technical-committee: TC
149
- :technical-committee-number: 1
150
- :technical-committee-type: A
151
- :subcommittee: SC
152
- :subcommittee-number: 2
153
- :subcommittee-type: B
154
- :workgroup: WG
155
- :workgroup-number: 3
156
- :workgroup-type: C
157
- :technical-committee_2: TC1
158
- :technical-committee-number_2: 11
159
- :technical-committee-type_2: A1
160
- :subcommittee_2: SC1
161
- :subcommittee-number_2: 21
162
- :subcommittee-type_2: B1
163
- :workgroup_2: WG1
164
- :workgroup-number_2: 31
165
- :workgroup-type_2: C1
166
- :secretariat: SECRETARIAT
167
- :docstage: 10
168
- :docsubstage: 20
169
- :iteration: 3
170
- :language: en
171
- :title-intro-en: Introduction
172
- :title-main-en: Main Title -- Title
173
- :title-part-en: Title Part
174
- :title-intro-fr: Introduction Française
175
- :title-main-fr: Titre Principal
176
- :title-part-fr: Part du Titre
177
- :copyright-year: 2017
178
- :updates: ISO 17301-1:2016
179
- :created-date: 2016-05-01
180
- :amendment-number: 1
181
- :title-amendment-en: Mass fraction of extraneous matter, milled rice (nonglutinous), sample dividers and recommendations relating to storage and transport conditions
182
- :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
183
- :doctype: amendment
184
- :updates-document-type: international-standard
185
- INPUT
186
-
187
- output = <<~OUTPUT
188
- <iso-standard type="semantic" version="#{Metanorma::ISO::VERSION}" xmlns="https://www.metanorma.org/ns/iso">
189
- <bibdata type="standard">
190
- <title format="text/plain" language="en" type="main">Introduction — Main Title — Title — Title Part — Mass fraction of
191
- extraneous matter, milled rice (nonglutinous), sample dividers and
192
- recommendations relating to storage and transport conditions</title>
193
- <title format="text/plain" language="en" type="title-intro">Introduction</title>
194
- <title format="text/plain" language="en" type="title-main">Main Title — Title</title>
195
- <title format="text/plain" language="en" type="title-part">Title Part</title>
196
- <title format="text/plain" language="en" type="title-amd">Mass fraction of extraneous matter, milled rice (nonglutinous), sample
197
- dividers and recommendations relating to storage and transport conditions
198
- </title>
199
- <title format="text/plain" language="fr" type="main">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 format="text/plain" language="fr" type="title-intro">Introduction Française</title>
205
- <title format="text/plain" language="fr" type="title-main">Titre Principal</title>
206
- <title format="text/plain" language="fr" type="title-part">Part du Titre</title>
207
- <title format="text/plain" language="fr" type="title-amd">Fraction massique de matière étrangère, riz usiné (non gluant), diviseurs
208
- d’échantillon et recommandations relatives aux conditions d’entreposage et
209
- de transport
210
- </title>
211
- <docidentifier type="ISO">ISO 17301-1:2016/PreNP Amd 1</docidentifier>
212
- <docidentifier type='iso-undated'>ISO 17301-1/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 Amd">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
- <agency>ISO</agency>
258
- <technical-committee number="1" type="A">TC</technical-committee>
259
- <technical-committee number="11" type="A1">TC1</technical-committee>
260
- <subcommittee number="2" type="B">SC</subcommittee>
261
- <subcommittee number="21" type="B1">SC1</subcommittee>
262
- <workgroup number="3" type="C">WG</workgroup>
263
- <workgroup number="31" type="C1">WG1</workgroup>
264
- <secretariat>SECRETARIAT</secretariat>
265
- </editorialgroup>
266
- <approvalgroup>
267
- <agency>ISO</agency>
268
- <technical-committee number="1" type="A">TC</technical-committee>
269
- <technical-committee number="11" type="A1">TC1</technical-committee>
270
- <subcommittee number="2" type="B">SC</subcommittee>
271
- <subcommittee number="21" type="B1">SC1</subcommittee>
272
- <workgroup number="3" type="C">WG</workgroup>
273
- <workgroup number="31" type="C1">WG1</workgroup>
274
- </approvalgroup>
275
- <structuredidentifier>
276
- <project-number amendment="1" origyr="2016-05-01" part="1">17301</project-number>
277
- </structuredidentifier>
278
- <stagename>New work item proposal</stagename>
279
- <updates-document-type>international-standard</updates-document-type>
280
- </ext>
281
- </bibdata>
282
- <sections/>
283
- </iso-standard>
284
- OUTPUT
285
- expect(xmlpp(input.sub(%r{<boilerplate>.*</boilerplate>}m, "")))
286
- .to be_equivalent_to xmlpp(output)
287
- end
288
-
289
- it "processes metadata, amendment, stage 30" do
290
- input = Asciidoctor.convert(<<~"INPUT", *OPTIONS)
291
- = Document title
292
- Author
293
- :docfile: test.adoc
294
- :nodoc:
295
- :novalid:
296
- :no-isobib:
297
- :docnumber: 17301
298
- :partnumber: 1
299
- :doctype: amendment
300
- :docstage: 30
301
- :updates: ISO 17301-1:2030
302
- :amendment-number: 1
303
- INPUT
304
- output = <<~OUTPUT
305
- <iso-standard type="semantic" version="#{Metanorma::ISO::VERSION}" xmlns="https://www.metanorma.org/ns/iso">
306
- <bibdata type="standard">
307
- <docidentifier type="ISO">ISO 17301-1:2030/CD Amd 1</docidentifier>
308
- <docidentifier type='iso-undated'>ISO 17301-1/CD Amd 1</docidentifier>
309
- <docidentifier type="iso-with-lang">ISO 17301-1:2030/CD Amd 1(E)</docidentifier>
310
- <docidentifier type="iso-reference">ISO 17301-1:2030/CD Amd 1(E)</docidentifier>
311
- <docnumber>17301</docnumber>
312
- <contributor>
313
- <role type="author"/>
314
- <organization>
315
- <name>International Organization for Standardization</name>
316
- <abbreviation>ISO</abbreviation>
317
- </organization>
318
- </contributor>
319
- <contributor>
320
- <role type="publisher"/>
321
- <organization>
322
- <name>International Organization for Standardization</name>
323
- <abbreviation>ISO</abbreviation>
324
- </organization>
325
- </contributor>
326
- <language>en</language>
327
- <script>Latn</script>
328
- <status>
329
- <stage abbreviation="CD Amd">30</stage>
330
- <substage>00</substage>
331
- </status>
332
- <copyright>
333
- <from>#{Time.now.year}</from>
334
- <owner>
335
- <organization>
336
- <name>International Organization for Standardization</name>
337
- <abbreviation>ISO</abbreviation>
338
- </organization>
339
- </owner>
340
- </copyright>
341
- <ext>
342
- <doctype>amendment</doctype>
343
- <editorialgroup>
344
- <agency>ISO</agency>
345
- </editorialgroup>
346
- <approvalgroup>
347
- <agency>ISO</agency>
348
- </approvalgroup>
349
- <structuredidentifier>
350
- <project-number amendment="1" part="1">17301</project-number>
351
- </structuredidentifier>
352
- <stagename>Committee draft</stagename>
353
- </ext>
354
- </bibdata>
355
- <sections/>
356
- </iso-standard>
357
- OUTPUT
358
- expect(xmlpp(input.sub(%r{<boilerplate>.*</boilerplate>}m, "")))
359
- .to be_equivalent_to xmlpp(output)
360
- end
361
-
362
- it "processes metadata, amendment, stage 40" do
363
- input = Asciidoctor.convert(<<~"INPUT", *OPTIONS)
364
- = Document title
365
- Author
366
- :docfile: test.adoc
367
- :nodoc:
368
- :novalid:
369
- :no-isobib:
370
- :docnumber: 17301
371
- :partnumber: 1
372
- :doctype: amendment
373
- :docstage: 40
374
- :updates: ISO 17301-1:2030
375
- :amendment-number: 1
376
- INPUT
377
- output = <<~OUTPUT
378
- <iso-standard type="semantic" version="#{Metanorma::ISO::VERSION}" xmlns="https://www.metanorma.org/ns/iso">
379
- <bibdata type="standard">
380
- <docidentifier type="ISO">ISO 17301-1:2030/DAmd 1</docidentifier>
381
- <docidentifier type='iso-undated'>ISO 17301-1/DAmd 1</docidentifier>
382
- <docidentifier type="iso-with-lang">ISO 17301-1:2030/DAmd 1(E)</docidentifier>
383
- <docidentifier type="iso-reference">ISO 17301-1:2030/DAmd 1(E)</docidentifier>
384
- <docnumber>17301</docnumber>
385
- <contributor>
386
- <role type="author"/>
387
- <organization>
388
- <name>International Organization for Standardization</name>
389
- <abbreviation>ISO</abbreviation>
390
- </organization>
391
- </contributor>
392
- <contributor>
393
- <role type="publisher"/>
394
- <organization>
395
- <name>International Organization for Standardization</name>
396
- <abbreviation>ISO</abbreviation>
397
- </organization>
398
- </contributor>
399
- <language>en</language>
400
- <script>Latn</script>
401
- <status>
402
- <stage abbreviation="DAmd">40</stage>
403
- <substage>00</substage>
404
- </status>
405
- <copyright>
406
- <from>#{Time.now.year}</from>
407
- <owner>
408
- <organization>
409
- <name>International Organization for Standardization</name>
410
- <abbreviation>ISO</abbreviation>
411
- </organization>
412
- </owner>
413
- </copyright>
414
- <ext>
415
- <doctype>amendment</doctype>
416
- <editorialgroup>
417
- <agency>ISO</agency>
418
- </editorialgroup>
419
- <approvalgroup>
420
- <agency>ISO</agency>
421
- </approvalgroup>
422
- <structuredidentifier>
423
- <project-number amendment="1" part="1">17301</project-number>
424
- </structuredidentifier>
425
- <stagename>Draft</stagename>
426
- </ext>
427
- </bibdata>
428
- <sections/>
429
- </iso-standard>
430
- OUTPUT
431
- expect(xmlpp(input.sub(%r{<boilerplate>.*</boilerplate>}m, "")))
432
- .to be_equivalent_to xmlpp(output)
433
- end
434
-
435
- it "processes metadata, amendment, published" do
436
- input = Asciidoctor.convert(<<~"INPUT", *OPTIONS)
437
- = Document title
438
- Author
439
- :docfile: test.adoc
440
- :nodoc:
441
- :novalid:
442
- :no-isobib:
443
- :docnumber: 17301
444
- :partnumber: 1
445
- :doctype: amendment
446
- :updates: ISO 17301-1:2030
447
- :amendment-number: 1
448
- INPUT
449
- output = <<~OUTPUT
450
- <iso-standard type="semantic" version="#{Metanorma::ISO::VERSION}" xmlns="https://www.metanorma.org/ns/iso">
451
- <bibdata type="standard">
452
- <docidentifier type="ISO">ISO 17301-1:2030/Amd 1</docidentifier>
453
- <docidentifier type='iso-undated'>ISO 17301-1/Amd 1</docidentifier>
454
- <docidentifier type="iso-with-lang">ISO 17301-1:2030/Amd 1(E)</docidentifier>
455
- <docidentifier type="iso-reference">ISO 17301-1:2030/Amd 1(E)</docidentifier>
456
- <docnumber>17301</docnumber>
457
- <contributor>
458
- <role type="author"/>
459
- <organization>
460
- <name>International Organization for Standardization</name>
461
- <abbreviation>ISO</abbreviation>
462
- </organization>
463
- </contributor>
464
- <contributor>
465
- <role type="publisher"/>
466
- <organization>
467
- <name>International Organization for Standardization</name>
468
- <abbreviation>ISO</abbreviation>
469
- </organization>
470
- </contributor>
471
- <language>en</language>
472
- <script>Latn</script>
473
- <status>
474
- <stage abbreviation="IS">60</stage>
475
- <substage>60</substage>
476
- </status>
477
- <copyright>
478
- <from>#{Time.now.year}</from>
479
- <owner>
480
- <organization>
481
- <name>International Organization for Standardization</name>
482
- <abbreviation>ISO</abbreviation>
483
- </organization>
484
- </owner>
485
- </copyright>
486
- <ext>
487
- <doctype>amendment</doctype>
488
- <editorialgroup>
489
- <agency>ISO</agency>
490
- </editorialgroup>
491
- <approvalgroup>
492
- <agency>ISO</agency>
493
- </approvalgroup>
494
- <structuredidentifier>
495
- <project-number amendment="1" part="1">17301</project-number>
496
- </structuredidentifier>
497
- <stagename>International standard</stagename>
498
- </ext>
499
- </bibdata>
500
- <sections/>
501
- </iso-standard>
502
- OUTPUT
503
- expect(xmlpp(input.sub(%r{<boilerplate>.*</boilerplate>}m, "")))
504
- .to be_equivalent_to xmlpp(output)
505
- end
506
-
507
- it "processes metadata, corrigendum, stage 30" do
508
- input = Asciidoctor.convert(<<~"INPUT", *OPTIONS)
509
- = Document title
510
- Author
511
- :docfile: test.adoc
512
- :nodoc:
513
- :novalid:
514
- :no-isobib:
515
- :docnumber: 17301
516
- :partnumber: 1
517
- :doctype: technical-corrigendum
518
- :docstage: 30
519
- :updates: ISO 17301-1:2030
520
- :corrigendum-number: 3
521
- INPUT
522
- output = <<~OUTPUT
523
- <iso-standard type="semantic" version="#{Metanorma::ISO::VERSION}" xmlns="https://www.metanorma.org/ns/iso">
524
- <bibdata type="standard">
525
- <docidentifier type="ISO">ISO 17301-1:2030/CD Cor.3</docidentifier>
526
- <docidentifier type='iso-undated'>ISO 17301-1/CD Cor.3</docidentifier>
527
- <docidentifier type="iso-with-lang">ISO 17301-1:2030/CD Cor.3(E)</docidentifier>
528
- <docidentifier type="iso-reference">ISO 17301-1:2030/CD Cor.3(E)</docidentifier>
529
- <docnumber>17301</docnumber>
530
- <contributor>
531
- <role type="author"/>
532
- <organization>
533
- <name>International Organization for Standardization</name>
534
- <abbreviation>ISO</abbreviation>
535
- </organization>
536
- </contributor>
537
- <contributor>
538
- <role type="publisher"/>
539
- <organization>
540
- <name>International Organization for Standardization</name>
541
- <abbreviation>ISO</abbreviation>
542
- </organization>
543
- </contributor>
544
- <language>en</language>
545
- <script>Latn</script>
546
- <status>
547
- <stage abbreviation="CD Cor">30</stage>
548
- <substage>00</substage>
549
- </status>
550
- <copyright>
551
- <from>#{Time.now.year}</from>
552
- <owner>
553
- <organization>
554
- <name>International Organization for Standardization</name>
555
- <abbreviation>ISO</abbreviation>
556
- </organization>
557
- </owner>
558
- </copyright>
559
- <ext>
560
- <doctype>technical-corrigendum</doctype>
561
- <editorialgroup>
562
- <agency>ISO</agency>
563
- </editorialgroup>
564
- <approvalgroup>
565
- <agency>ISO</agency>
566
- </approvalgroup>
567
- <structuredidentifier>
568
- <project-number corrigendum="3" part="1">17301</project-number>
569
- </structuredidentifier>
570
- <stagename>Committee draft</stagename>
571
- </ext>
572
- </bibdata>
573
- <sections/>
574
- </iso-standard>
575
- OUTPUT
576
- expect(xmlpp(input.sub(%r{<boilerplate>.*</boilerplate>}m, "")))
577
- .to be_equivalent_to xmlpp(output)
578
- end
579
-
580
- it "processes metadata, corrigendum, stage 50" do
581
- input = Asciidoctor.convert(<<~"INPUT", *OPTIONS)
582
- = Document title
583
- Author
584
- :docfile: test.adoc
585
- :nodoc:
586
- :novalid:
587
- :no-isobib:
588
- :docnumber: 17301
589
- :partnumber: 1
590
- :doctype: technical-corrigendum
591
- :docstage: 50
592
- :updates: ISO 17301-1:2030
593
- :corrigendum-number: 3
594
- INPUT
595
- output = <<~OUTPUT
596
- <iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
597
- <bibdata type='standard'>
598
- <docidentifier type='ISO'>ISO 17301-1:2030/FDCor.3</docidentifier>
599
- <docidentifier type='iso-undated'>ISO 17301-1/FDCor.3</docidentifier>
600
- <docidentifier type='iso-with-lang'>ISO 17301-1:2030/FDCor.3(E)</docidentifier>
601
- <docidentifier type='iso-reference'>ISO 17301-1:2030/FDCor.3(E)</docidentifier>
602
- <docnumber>17301</docnumber>
603
- <contributor>
604
- <role type='author'/>
605
- <organization>
606
- <name>International Organization for Standardization</name>
607
- <abbreviation>ISO</abbreviation>
608
- </organization>
609
- </contributor>
610
- <contributor>
611
- <role type='publisher'/>
612
- <organization>
613
- <name>International Organization for Standardization</name>
614
- <abbreviation>ISO</abbreviation>
615
- </organization>
616
- </contributor>
617
- <language>en</language>
618
- <script>Latn</script>
619
- <status>
620
- <stage abbreviation='FDCor'>50</stage>
621
- <substage>00</substage>
622
- </status>
623
- <copyright>
624
- <from>#{Time.now.year}</from>
625
- <owner>
626
- <organization>
627
- <name>International Organization for Standardization</name>
628
- <abbreviation>ISO</abbreviation>
629
- </organization>
630
- </owner>
631
- </copyright>
632
- <ext>
633
- <doctype>technical-corrigendum</doctype>
634
- <editorialgroup>
635
- <agency>ISO</agency>
636
- </editorialgroup>
637
- <approvalgroup>
638
- <agency>ISO</agency>
639
- </approvalgroup>
640
- <structuredidentifier>
641
- <project-number part='1' corrigendum='3'>17301</project-number>
642
- </structuredidentifier>
643
- <stagename>Final draft</stagename>
644
- </ext>
645
- </bibdata>
646
- <sections/>
647
- </iso-standard>
648
- OUTPUT
649
- expect(xmlpp(input.sub(%r{<boilerplate>.*</boilerplate>}m, "")))
650
- .to be_equivalent_to xmlpp(output)
651
- end
652
-
653
- it "processes metadata, corrigendum, published" do
654
- input = Asciidoctor.convert(<<~"INPUT", *OPTIONS)
655
- = Document title
656
- Author
657
- :docfile: test.adoc
658
- :nodoc:
659
- :novalid:
660
- :no-isobib:
661
- :docnumber: 17301
662
- :partnumber: 1
663
- :doctype: technical-corrigendum
664
- :updates: ISO 17301-1:2030
665
- :corrigendum-number: 3
666
- INPUT
667
- output = <<~OUTPUT
668
- <iso-standard type="semantic" version="#{Metanorma::ISO::VERSION}" xmlns="https://www.metanorma.org/ns/iso">
669
- <bibdata type="standard">
670
- <docidentifier type="ISO">ISO 17301-1:2030/Cor.3</docidentifier>
671
- <docidentifier type='iso-undated'>ISO 17301-1/Cor.3</docidentifier>
672
- <docidentifier type="iso-with-lang">ISO 17301-1:2030/Cor.3(E)</docidentifier>
673
- <docidentifier type="iso-reference">ISO 17301-1:2030/Cor.3(E)</docidentifier>
674
- <docnumber>17301</docnumber>
675
- <contributor>
676
- <role type="author"/>
677
- <organization>
678
- <name>International Organization for Standardization</name>
679
- <abbreviation>ISO</abbreviation>
680
- </organization>
681
- </contributor>
682
- <contributor>
683
- <role type="publisher"/>
684
- <organization>
685
- <name>International Organization for Standardization</name>
686
- <abbreviation>ISO</abbreviation>
687
- </organization>
688
- </contributor>
689
- <language>en</language>
690
- <script>Latn</script>
691
- <status>
692
- <stage abbreviation="IS">60</stage>
693
- <substage>60</substage>
694
- </status>
695
- <copyright>
696
- <from>#{Time.now.year}</from>
697
- <owner>
698
- <organization>
699
- <name>International Organization for Standardization</name>
700
- <abbreviation>ISO</abbreviation>
701
- </organization>
702
- </owner>
703
- </copyright>
704
- <ext>
705
- <doctype>technical-corrigendum</doctype>
706
- <editorialgroup>
707
- <agency>ISO</agency>
708
- </editorialgroup>
709
- <approvalgroup>
710
- <agency>ISO</agency>
711
- </approvalgroup>
712
- <structuredidentifier>
713
- <project-number corrigendum="3" part="1">17301</project-number>
714
- </structuredidentifier>
715
- <stagename>International standard</stagename>
716
- </ext>
717
- </bibdata>
718
- <sections/>
719
- </iso-standard>
720
- OUTPUT
721
- expect(xmlpp(input.sub(%r{<boilerplate>.*</boilerplate>}m, "")))
722
- .to be_equivalent_to xmlpp(output)
723
- end
724
- end