metanorma-iec 1.4.2 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +4 -32
  3. data/.gitignore +14 -0
  4. data/Gemfile +6 -0
  5. data/Rakefile +1 -1
  6. data/lib/isodoc/iec/base_convert.rb +25 -59
  7. data/lib/isodoc/iec/html/htmlstyle.css +38 -6
  8. data/lib/isodoc/iec/html/htmlstyle.scss +35 -6
  9. data/lib/isodoc/iec/html/isodoc.css +1 -2
  10. data/lib/isodoc/iec/html/isodoc.scss +1 -2
  11. data/lib/isodoc/iec/html/scripts.html +0 -1
  12. data/lib/isodoc/iec/html/wordstyle.css +13 -11
  13. data/lib/isodoc/iec/html/wordstyle.scss +13 -11
  14. data/lib/isodoc/iec/html_convert.rb +2 -1
  15. data/lib/isodoc/iec/iec.international-standard.xsl +724 -330
  16. data/lib/isodoc/iec/presentation_xml_convert.rb +193 -5
  17. data/lib/isodoc/iec/xref.rb +9 -8
  18. data/lib/{asciidoctor → metanorma}/iec/basicdoc.rng +0 -0
  19. data/lib/{asciidoctor → metanorma}/iec/biblio.rng +0 -0
  20. data/lib/metanorma/iec/converter.rb +143 -0
  21. data/lib/{asciidoctor → metanorma}/iec/front.rb +3 -4
  22. data/lib/{asciidoctor → metanorma}/iec/iec.rng +48 -0
  23. data/lib/{asciidoctor → metanorma}/iec/iec_intro_en.xml +0 -0
  24. data/lib/{asciidoctor → metanorma}/iec/iec_intro_fr.xml +0 -0
  25. data/lib/{asciidoctor → metanorma}/iec/isodoc.rng +90 -18
  26. data/lib/{asciidoctor → metanorma}/iec/isostandard.rng +14 -0
  27. data/lib/metanorma/iec/processor.rb +15 -8
  28. data/lib/{asciidoctor → metanorma}/iec/reqt.rng +0 -0
  29. data/lib/metanorma/iec/version.rb +1 -1
  30. data/lib/metanorma-iec.rb +1 -1
  31. data/metanorma-iec.gemspec +3 -3
  32. data/spec/isodoc/iev_spec.rb +462 -120
  33. data/spec/isodoc/postproc_spec.rb +2 -5
  34. data/spec/isodoc/ref_spec.rb +359 -353
  35. data/spec/isodoc/terms_spec.rb +183 -181
  36. data/spec/{asciidoctor → metanorma}/base_spec.rb +1 -5
  37. data/spec/{asciidoctor → metanorma}/blocks_spec.rb +1 -1
  38. data/spec/metanorma/cleanup_spec.rb +374 -0
  39. data/spec/metanorma/iev_spec.rb +248 -0
  40. data/spec/{asciidoctor → metanorma}/inline_spec.rb +1 -1
  41. data/spec/{asciidoctor → metanorma}/lists_spec.rb +1 -1
  42. data/spec/metanorma/processor_spec.rb +139 -44
  43. data/spec/{asciidoctor → metanorma}/section_spec.rb +1 -1
  44. data/spec/{asciidoctor → metanorma}/validate_spec.rb +1 -1
  45. data/spec/spec_helper.rb +12 -14
  46. metadata +26 -26
  47. data/lib/asciidoctor/iec/converter.rb +0 -105
  48. data/spec/asciidoctor/cleanup_spec.rb +0 -345
  49. data/spec/asciidoctor/iev_spec.rb +0 -243
@@ -0,0 +1,374 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe Metanorma::Iec do
4
+ before(:all) do
5
+ @blank_hdr = blank_hdr_gen
6
+ end
7
+
8
+ it "moves note from TC/SC officers to metadata" do
9
+ input = <<~INPUT
10
+ #{ASCIIDOC_BLANK_HDR}
11
+ == {blank}
12
+
13
+ [NOTE]
14
+ .Note from TC/SC Officers
15
+ ====
16
+ This FDIS is the result of the discussion between the IEC SC21A experts WG 3 during the meeting held in
17
+ Chicago (USA) on April 9th
18
+
19
+ This document is also of interest for ISO/ TC114/ WG1 Requirements for Watch batteries
20
+ ====
21
+ INPUT
22
+ output = <<~OUTPUT
23
+ <iec-standard xmlns="https://www.metanorma.org/ns/iec" type="semantic" version="#{Metanorma::Iec::VERSION}">
24
+ <bibdata type="standard">
25
+ <contributor>
26
+ <role type="author"/>
27
+ <organization>
28
+ <name>International Electrotechnical Commission</name>
29
+ <abbreviation>IEC</abbreviation>
30
+ </organization>
31
+ </contributor>
32
+ <contributor>
33
+ <role type="publisher"/>
34
+ <organization>
35
+ <name>International Electrotechnical Commission</name>
36
+ <abbreviation>IEC</abbreviation>
37
+ </organization>
38
+ </contributor>
39
+ <language>en</language>
40
+ <script>Latn</script>
41
+ <status>
42
+ <stage abbreviation="PPUB">60</stage>
43
+ <substage abbreviation="PPUB">60</substage>
44
+ </status>
45
+ <copyright>
46
+ <from>#{Time.new.year}</from>
47
+ <owner>
48
+ <organization>
49
+ <name>International Electrotechnical Commission</name>
50
+ <abbreviation>IEC</abbreviation>
51
+ </organization>
52
+ </owner>
53
+ </copyright>
54
+ <ext>
55
+ <doctype>article</doctype>
56
+ <editorialgroup>
57
+ <technical-committee/>
58
+ <subcommittee/>
59
+ <workgroup/>
60
+ </editorialgroup>
61
+ <stagename>International standard</stagename>
62
+ <tc-sc-officers-note>
63
+ <p id='_'>
64
+ This FDIS is the result of the discussion between the IEC SC21A
65
+ experts WG 3 during the meeting held in Chicago (USA) on April 9th
66
+ </p>
67
+ <p id='_'>
68
+ This document is also of interest for ISO/ TC114/ WG1 Requirements for
69
+ Watch batteries
70
+ </p>
71
+ </tc-sc-officers-note>
72
+ </ext>
73
+ </bibdata>
74
+ #{boilerplate(Nokogiri::XML(BLANK_HDR + '</iec-standard>'))}
75
+ <sections>
76
+ <clause id="_" inline-header="false" obligation="normative">
77
+
78
+ </clause>
79
+ </sections>
80
+ </iec-standard>
81
+ OUTPUT
82
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
83
+ .to be_equivalent_to xmlpp(output)
84
+ end
85
+
86
+ it "removes empty text elements" do
87
+ input = <<~INPUT
88
+ #{ASCIIDOC_BLANK_HDR}
89
+ == {blank}
90
+ INPUT
91
+ output = <<~OUTPUT
92
+ #{@blank_hdr}
93
+ <sections>
94
+ <clause id="_" inline-header="false" obligation="normative">
95
+
96
+ </clause>
97
+ </sections>
98
+ </iec-standard>
99
+ OUTPUT
100
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
101
+ .to be_equivalent_to xmlpp(output)
102
+ end
103
+
104
+ it "keeps any initial boilerplate from terms and definitions" do
105
+ input = <<~INPUT
106
+ #{ASCIIDOC_BLANK_HDR}
107
+ == Terms and Definitions
108
+
109
+ I am boilerplate
110
+
111
+ * So am I
112
+
113
+ === Time
114
+
115
+ This paragraph is extraneous
116
+ INPUT
117
+ output = <<~OUTPUT
118
+ #{@blank_hdr}
119
+ <sections>
120
+ <terms id="_" obligation="normative"><title>Terms and definitions</title>
121
+ <p id="_">For the purposes of this document,
122
+ the following terms and definitions apply.</p>
123
+ #{TERMS_BOILERPLATE}
124
+ <p id='_'>I am boilerplate</p>
125
+ <ul id='_'>
126
+ <li>
127
+ <p id='_'>So am I</p>
128
+ </li>
129
+ </ul>
130
+ <term id="term-time">
131
+ <preferred><expression><name>Time</name></expression></preferred>
132
+ <definition><verbal-definition><p id="_">This paragraph is extraneous</p></verbal-definition></definition>
133
+ </term></terms>
134
+ </sections>
135
+ </iec-standard>
136
+ OUTPUT
137
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
138
+ .to be_equivalent_to xmlpp(output)
139
+ end
140
+
141
+ it "strips type from xrefs" do
142
+ input = <<~INPUT
143
+ #{ASCIIDOC_BLANK_HDR}
144
+ <<iso216>>
145
+
146
+ [bibliography]
147
+ == Clause
148
+ * [[[iso216,ISO 216]]], _Reference_
149
+ INPUT
150
+ output = <<~OUTPUT
151
+ #{@blank_hdr}
152
+ <preface>
153
+ <foreword id="_" obligation="informative">
154
+ <title>FOREWORD</title>
155
+ <p id="_">
156
+ <eref type="inline" bibitemid="iso216" citeas="ISO 216"/>
157
+ </p>
158
+ </foreword></preface><sections>
159
+ </sections><bibliography><references id="_" obligation="informative" normative="false">
160
+ <title>Bibliography</title>
161
+ <bibitem id="iso216" type="standard">
162
+ <title format="text/plain">Reference</title>
163
+ <docidentifier>ISO 216</docidentifier>
164
+ <docnumber>216</docnumber>
165
+ <contributor>
166
+ <role type="publisher"/>
167
+ <organization>
168
+ <name>International Organization for Standardization</name>
169
+ <abbreviation>ISO</abbreviation>
170
+ </organization>
171
+ </contributor>
172
+ </bibitem>
173
+ </references></bibliography>
174
+ </iec-standard>
175
+ OUTPUT
176
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
177
+ .to be_equivalent_to xmlpp(output)
178
+ end
179
+
180
+ it "removes extraneous material from Normative References" do
181
+ input = <<~INPUT
182
+ #{ASCIIDOC_BLANK_HDR}
183
+ [bibliography]
184
+ == Normative References
185
+
186
+ This is extraneous information
187
+
188
+ * [[[iso216,ISO 216]]], _Reference_
189
+ INPUT
190
+ output = <<~OUTPUT
191
+ #{@blank_hdr}
192
+ <sections></sections>
193
+ <bibliography><references id="_" obligation="informative" normative="true"><title>Normative references</title>
194
+ <p id="_">The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>
195
+ <bibitem id="iso216" type="standard">
196
+ <title format="text/plain">Reference</title>
197
+ <docidentifier>ISO 216</docidentifier>
198
+ <docnumber>216</docnumber>
199
+ <contributor>
200
+ <role type="publisher"/>
201
+ <organization>
202
+ <name>International Organization for Standardization</name>
203
+ <abbreviation>ISO</abbreviation>
204
+ </organization>
205
+ </contributor>
206
+ </bibitem>
207
+ </references>
208
+ </bibliography>
209
+ </iec-standard>
210
+ OUTPUT
211
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
212
+ .to be_equivalent_to xmlpp(output)
213
+ end
214
+
215
+ it "inserts IDs into paragraphs" do
216
+ input = <<~INPUT
217
+ #{ASCIIDOC_BLANK_HDR}
218
+ Paragraph
219
+ INPUT
220
+ output = <<~OUTPUT
221
+ #{@blank_hdr}
222
+ <sections>
223
+ <p id="_">Paragraph</p>
224
+ </sections>
225
+ </iec-standard>
226
+ OUTPUT
227
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
228
+ .to be_equivalent_to xmlpp(output)
229
+ end
230
+
231
+ it "inserts IDs into notes" do
232
+ input = <<~INPUT
233
+ #{ASCIIDOC_BLANK_HDR}
234
+ [example]
235
+ ====
236
+ NOTE: This note has no ID
237
+ ====
238
+ INPUT
239
+ output = <<~OUTPUT
240
+ #{@blank_hdr}
241
+ <sections>
242
+ <example id="_">
243
+ <note id="_">
244
+ <p id="_">This note has no ID</p>
245
+ </note>
246
+ </example>
247
+ </sections>
248
+ </iec-standard>
249
+ OUTPUT
250
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
251
+ .to be_equivalent_to xmlpp(output)
252
+ end
253
+
254
+ it "moves footnotes inside figures" do
255
+ input = <<~INPUT
256
+ #{ASCIIDOC_BLANK_HDR}
257
+ image::spec/examples/rice_images/rice_image1.png[]
258
+
259
+ footnote:[This is a footnote to a figure]
260
+
261
+ footnote:[This is another footnote to a figure]
262
+ INPUT
263
+ output = <<~OUTPUT
264
+ #{@blank_hdr}
265
+ <sections><figure id="_">
266
+ <image src="spec/examples/rice_images/rice_image1.png" id="_" mimetype="image/png" height="auto" width="auto"/>
267
+ <fn reference="a">
268
+ <p id="_">This is a footnote to a figure</p>
269
+ </fn><fn reference="b">
270
+ <p id="_">This is another footnote to a figure</p>
271
+ </fn></figure>
272
+
273
+ </sections>
274
+
275
+ </iec-standard>
276
+ OUTPUT
277
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
278
+ .to be_equivalent_to xmlpp(output)
279
+ end
280
+
281
+ it "defaults section obligations" do
282
+ input = <<~INPUT
283
+ #{ASCIIDOC_BLANK_HDR}
284
+
285
+ == Clause
286
+ Text
287
+
288
+ [appendix]
289
+ == Clause
290
+
291
+ Text
292
+ INPUT
293
+ output = <<~OUTPUT
294
+ #{@blank_hdr}
295
+ <sections><clause id="_" inline-header="false" obligation="normative">
296
+ <title>Clause</title>
297
+ <p id="_">Text</p>
298
+ </clause>
299
+ </sections><annex id="_" inline-header="false" obligation="normative">
300
+ <title>Clause</title>
301
+ <p id="_">Text</p>
302
+ </annex>
303
+ </iec-standard>
304
+ OUTPUT
305
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
306
+ .to be_equivalent_to xmlpp(output)
307
+ end
308
+
309
+ it "extends clause levels past 5" do
310
+ input = <<~INPUT
311
+ #{ASCIIDOC_BLANK_HDR}
312
+
313
+ == Clause1
314
+
315
+ === Clause2
316
+
317
+ ==== Clause3
318
+
319
+ ===== Clause4
320
+
321
+ ====== Clause 5
322
+
323
+ [level=6]
324
+ ====== Clause 6
325
+
326
+ [level=7]
327
+ ====== Clause 7A
328
+
329
+ [level=7]
330
+ ====== Clause 7B
331
+
332
+ [level=6]
333
+ ====== Clause 6B
334
+
335
+ ====== Clause 5B
336
+
337
+ INPUT
338
+ output = <<~OUTPUT
339
+ #{@blank_hdr}
340
+ <sections>
341
+ <clause id="_" inline-header="false" obligation="normative">
342
+ <title>Clause1</title>
343
+ <clause id="_" inline-header="false" obligation="normative">
344
+ <title>Clause2</title>
345
+ <clause id="_" inline-header="false" obligation="normative">
346
+ <title>Clause3</title>
347
+ <clause id="_" inline-header="false" obligation="normative"><title>Clause4</title><clause id="_" inline-header="false" obligation="normative">
348
+ <title>Clause 5</title>
349
+ <clause id="_" inline-header="false" obligation="normative">
350
+ <title>Clause 6</title>
351
+ <clause id="_" inline-header="false" obligation="normative">
352
+ <title>Clause 7A</title>
353
+ </clause><clause id="_" inline-header="false" obligation="normative">
354
+ <title>Clause 7B</title>
355
+ </clause></clause><clause id="_" inline-header="false" obligation="normative">
356
+ <title>Clause 6B</title>
357
+ </clause></clause>
358
+
359
+
360
+
361
+
362
+ <clause id="_" inline-header="false" obligation="normative">
363
+ <title>Clause 5B</title>
364
+ </clause></clause>
365
+ </clause>
366
+ </clause>
367
+ </clause>
368
+ </sections>
369
+ </iec-standard>
370
+ OUTPUT
371
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
372
+ .to be_equivalent_to xmlpp(output)
373
+ end
374
+ end
@@ -0,0 +1,248 @@
1
+ require "spec_helper"
2
+ require "fileutils"
3
+
4
+ RSpec.describe Metanorma::Iec do
5
+ before(:all) do
6
+ @boilerplate = boilerplate(Nokogiri::XML("#{BLANK_HDR}</iec-standard>"))
7
+ end
8
+
9
+ it "generates reference boilerplate for IEV" do
10
+ input = <<~INPUT
11
+ = Document title
12
+ Author
13
+ :docfile: test.adoc
14
+ :nodoc:
15
+ :novalid:
16
+ :no-isobib:
17
+ :docnumber: 60050
18
+
19
+ [bibliography]
20
+ == Normative References
21
+
22
+ * [[[A,B]]], _TITLE_
23
+ INPUT
24
+ output = <<~OUTPUT
25
+ <?xml version='1.0' encoding='UTF-8'?>
26
+ <iec-standard xmlns='https://www.metanorma.org/ns/iec' type="semantic" version="#{Metanorma::Iec::VERSION}">
27
+ <bibdata type='standard'>
28
+ <docidentifier type='ISO'>IEC 60050 ED 1</docidentifier>
29
+ <docnumber>60050</docnumber>
30
+ <contributor>
31
+ <role type='author'/>
32
+ <organization>
33
+ <name>International Electrotechnical Commission</name>
34
+ <abbreviation>IEC</abbreviation>
35
+ </organization>
36
+ </contributor>
37
+ <contributor>
38
+ <role type='publisher'/>
39
+ <organization>
40
+ <name>International Electrotechnical Commission</name>
41
+ <abbreviation>IEC</abbreviation>
42
+ </organization>
43
+ </contributor>
44
+ <language>en</language>
45
+ <script>Latn</script>
46
+ <status>
47
+ <stage abbreviation="PPUB">60</stage>
48
+ <substage abbreviation="PPUB">60</substage>
49
+ </status>
50
+ <copyright>
51
+ <from>#{Time.now.year}</from>
52
+ <owner>
53
+ <organization>
54
+ <name>International Electrotechnical Commission</name>
55
+ <abbreviation>IEC</abbreviation>
56
+ </organization>
57
+ </owner>
58
+ </copyright>
59
+ <ext>
60
+ <doctype>article</doctype>
61
+ <subdoctype>vocabulary</subdoctype>
62
+ <editorialgroup>
63
+ <technical-committee/>
64
+ <subcommittee/>
65
+ <workgroup/>
66
+ </editorialgroup>
67
+ <structuredidentifier>
68
+ <project-number>IEC 60050</project-number>
69
+ </structuredidentifier>
70
+ <stagename>International standard</stagename>
71
+ </ext>
72
+ </bibdata>
73
+ #{@boilerplate}
74
+ <sections> </sections>
75
+ <bibliography>
76
+ <references id='_' obligation='informative' normative="true">
77
+ <title>Normative references</title>
78
+ <p id='_'>There are no normative references in this document.</p>
79
+ <bibitem id='A'>
80
+ <formattedref format='application/x-isodoc+xml'>
81
+ <em>TITLE</em>
82
+ </formattedref>
83
+ <docidentifier>B</docidentifier>
84
+ </bibitem>
85
+ </references>
86
+ </bibliography>
87
+ </iec-standard>
88
+ OUTPUT
89
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
90
+ .to be_equivalent_to xmlpp(output)
91
+ end
92
+
93
+ it "generates terms boilerplate for IEV" do
94
+ input = <<~INPUT
95
+ = Document title
96
+ Author
97
+ :docfile: test.adoc
98
+ :nodoc:
99
+ :novalid:
100
+ :no-isobib:
101
+ :docnumber: 60050
102
+
103
+ == Terms and definitions
104
+ === General
105
+ ==== Term 1
106
+ INPUT
107
+ output = <<~OUTPUT
108
+ <iec-standard xmlns='https://www.metanorma.org/ns/iec' type="semantic" version="#{Metanorma::Iec::VERSION}">
109
+ <bibdata type='standard'>
110
+ <docidentifier type='ISO'>IEC 60050 ED 1</docidentifier>
111
+ <docnumber>60050</docnumber>
112
+ <contributor>
113
+ <role type='author'/>
114
+ <organization>
115
+ <name>International Electrotechnical Commission</name>
116
+ <abbreviation>IEC</abbreviation>
117
+ </organization>
118
+ </contributor>
119
+ <contributor>
120
+ <role type='publisher'/>
121
+ <organization>
122
+ <name>International Electrotechnical Commission</name>
123
+ <abbreviation>IEC</abbreviation>
124
+ </organization>
125
+ </contributor>
126
+ <language>en</language>
127
+ <script>Latn</script>
128
+ <status>
129
+ <stage abbreviation="PPUB">60</stage>
130
+ <substage abbreviation="PPUB">60</substage>
131
+ </status>
132
+ <copyright>
133
+ <from>#{Time.now.year}</from>
134
+ <owner>
135
+ <organization>
136
+ <name>International Electrotechnical Commission</name>
137
+ <abbreviation>IEC</abbreviation>
138
+ </organization>
139
+ </owner>
140
+ </copyright>
141
+ <ext>
142
+ <doctype>article</doctype>
143
+ <subdoctype>vocabulary</subdoctype>
144
+ <editorialgroup>
145
+ <technical-committee/>
146
+ <subcommittee/>
147
+ <workgroup/>
148
+ </editorialgroup>
149
+ <structuredidentifier>
150
+ <project-number>IEC 60050</project-number>
151
+ </structuredidentifier>
152
+ <stagename>International standard</stagename>
153
+ </ext>
154
+ </bibdata>
155
+ #{@boilerplate}
156
+ <sections>
157
+ <clause id='_' obligation='normative'>
158
+ <title>Terms and definitions</title>
159
+ <terms id='_' obligation='normative'>
160
+ <title>General</title>
161
+ <term id='term-term-1'>
162
+ <preferred><expression><name>Term 1</name></expression></preferred>
163
+ </term>
164
+ </terms>
165
+ </clause>
166
+ </sections>
167
+ </iec-standard>
168
+
169
+ OUTPUT
170
+ end
171
+
172
+ it "uses IEV introduction title" do
173
+ input = <<~INPUT
174
+ = Document title
175
+ Author
176
+ :docfile: test.adoc
177
+ :nodoc:
178
+ :novalid:
179
+ :no-isobib:
180
+ :docnumber: 60050
181
+
182
+ == Introduction
183
+
184
+ Text
185
+ INPUT
186
+ output = <<~OUTPUT
187
+ <?xml version='1.0' encoding='UTF-8'?>
188
+ <iec-standard xmlns='https://www.metanorma.org/ns/iec' type="semantic" version="#{Metanorma::Iec::VERSION}">
189
+ <bibdata type='standard'>
190
+ <docidentifier type='ISO'>IEC 60050 ED 1</docidentifier>
191
+ <docnumber>60050</docnumber>
192
+ <contributor>
193
+ <role type='author'/>
194
+ <organization>
195
+ <name>International Electrotechnical Commission</name>
196
+ <abbreviation>IEC</abbreviation>
197
+ </organization>
198
+ </contributor>
199
+ <contributor>
200
+ <role type='publisher'/>
201
+ <organization>
202
+ <name>International Electrotechnical Commission</name>
203
+ <abbreviation>IEC</abbreviation>
204
+ </organization>
205
+ </contributor>
206
+ <language>en</language>
207
+ <script>Latn</script>
208
+ <status>
209
+ <stage abbreviation='PPUB'>60</stage>
210
+ <substage abbreviation='PPUB'>60</substage>
211
+ </status>
212
+ <copyright>
213
+ <from>#{Time.now.year}</from>
214
+ <owner>
215
+ <organization>
216
+ <name>International Electrotechnical Commission</name>
217
+ <abbreviation>IEC</abbreviation>
218
+ </organization>
219
+ </owner>
220
+ </copyright>
221
+ <ext>
222
+ <doctype>article</doctype>
223
+ <subdoctype>vocabulary</subdoctype>
224
+ <editorialgroup>
225
+ <technical-committee/>
226
+ <subcommittee/>
227
+ <workgroup/>
228
+ </editorialgroup>
229
+ <structuredidentifier>
230
+ <project-number>IEC 60050</project-number>
231
+ </structuredidentifier>
232
+ <stagename>International standard</stagename>
233
+ </ext>
234
+ </bibdata>
235
+ #{@boilerplate}
236
+ <preface>
237
+ <introduction id='_' obligation='informative'>
238
+ <title>INTRODUCTION<br/>Principles and rules followed</title>
239
+ <p id='_'>Text</p>
240
+ </introduction>
241
+ </preface>
242
+ <sections> </sections>
243
+ </iec-standard>
244
+ OUTPUT
245
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
246
+ .to be_equivalent_to xmlpp(output)
247
+ end
248
+ end
@@ -1,6 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- RSpec.describe Asciidoctor::Iec do
3
+ RSpec.describe Metanorma::Iec do
4
4
  before(:all) do
5
5
  @blank_hdr = blank_hdr_gen
6
6
  end
@@ -1,6 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- RSpec.describe Asciidoctor::Iec do
3
+ RSpec.describe Metanorma::Iec do
4
4
  before(:all) do
5
5
  @blank_hdr = blank_hdr_gen
6
6
  end