metanorma-iec 2.0.8 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -71,7 +71,7 @@ RSpec.describe IsoDoc::Iec do
71
71
 
72
72
  </references><references id="_bibliography" obligation="informative" normative="false">
73
73
  <title>Bibliography</title>
74
- <bibitem id="ISBN" type="ISBN">
74
+ <bibitem id="ISBN" type="book">
75
75
  <title format="text/plain">Chemicals for analytical laboratory use</title>
76
76
  <docidentifier type="ISBN">ISBN</docidentifier>
77
77
  <docidentifier type="metanorma">[1]</docidentifier>
@@ -82,7 +82,7 @@ RSpec.describe IsoDoc::Iec do
82
82
  </organization>
83
83
  </contributor>
84
84
  </bibitem>
85
- <bibitem id="ISSN" type="ISSN">
85
+ <bibitem id="ISSN" type="journal">
86
86
  <title format="text/plain">Instruments for analytical laboratory use</title>
87
87
  <docidentifier type="ISSN">ISSN</docidentifier>
88
88
  <docidentifier type="metanorma">[2]</docidentifier>
@@ -145,44 +145,18 @@ RSpec.describe IsoDoc::Iec do
145
145
  <bibliography><references id="_normative_references" obligation="informative" normative="true" displayorder="2"><title depth="1">1<tab/>Normative References</title>
146
146
  <p>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>
147
147
  <bibitem id="ISO712" type="standard">
148
- <title format="text/plain">Cereals or cereal products</title>
149
- <title type="main" format="text/plain">Cereals and cereal products</title>
148
+ <formattedref><em><span class='stddocTitle'>Cereals and cereal products</span></em></formattedref>
150
149
  <docidentifier type="ISO">ISO 712</docidentifier>
151
150
  <docidentifier type="metanorma">[110]</docidentifier>
152
- <contributor>
153
- <role type="publisher"/>
154
- <organization>
155
- <name>International Organization for Standardization</name>
156
- </organization>
157
- </contributor>
158
151
  </bibitem>
159
152
  <bibitem id="ISO16634" type="standard">
160
- <title language="x" format="text/plain">Cereals, pulses, milled cereal products, xxxx, oilseeds and animal feeding stuffs</title>
161
- <title language="en" format="text/plain">Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</title>
153
+ <formattedref><em><span class='stddocTitle'>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</span></em></formattedref>
162
154
  <docidentifier type="ISO">ISO 16634:-- (all parts)</docidentifier>
163
- <date type="published"><on>--</on></date>
164
- <contributor>
165
- <role type="publisher"/>
166
- <organization>
167
- <abbreviation>ISO</abbreviation>
168
- </organization>
169
- </contributor>
170
155
  <note format="text/plain" reference="1" type="Unpublished-Status">Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
171
- <extent type="part">
172
- <referenceFrom>all</referenceFrom>
173
- </extent>
174
-
175
156
  </bibitem>
176
157
  <bibitem id="ISO20483" type="standard">
177
- <title format="text/plain">Cereals and pulses</title>
158
+ <formattedref><em><span class='stddocTitle'>Cereals and pulses</span></em></formattedref>
178
159
  <docidentifier type="ISO">ISO 20483:2013-2014</docidentifier>
179
- <date type="published"><from>2013</from><to>2014</to></date>
180
- <contributor>
181
- <role type="publisher"/>
182
- <organization>
183
- <name>International Organization for Standardization</name>
184
- </organization>
185
- </contributor>
186
160
  </bibitem>
187
161
  <bibitem id="ref1">
188
162
  <formattedref format="application/x-isodoc+xml"><smallcap>Standard No I.C.C 167</smallcap>. <em>Determination of the protein content in cereal and cereal products for food and animal feeding stuffs according to the Dumas combustion method</em> (see <link target="http://www.icc.or.at"/>)</formattedref>
@@ -190,51 +164,31 @@ RSpec.describe IsoDoc::Iec do
190
164
  </bibitem>
191
165
  <note><name>NOTE</name><p>This is an annotation of ISO 20483:2013-2014</p></note>
192
166
  <bibitem id="zip_ffs"><formattedref format="application/x-isodoc+xml">Title 5</formattedref><docidentifier type="metanorma">[5]</docidentifier></bibitem>
193
-
194
-
195
167
  </references><references id="_bibliography" obligation="informative" normative="false" displayorder="3">
196
168
  <title depth="1">Bibliography</title>
197
- <bibitem id="ISBN" type="ISBN">
198
- <title format="text/plain">Chemicals for analytical laboratory use</title>
169
+ <bibitem id="ISBN" type="book">
170
+ <formattedref><em>Chemicals for analytical laboratory use</em>. ISBN.</formattedref>
199
171
  <docidentifier type="ISBN">ISBN</docidentifier>
200
172
  <docidentifier type="metanorma">[1]</docidentifier>
201
- <contributor>
202
- <role type="publisher"/>
203
- <organization>
204
- <abbreviation>ISBN</abbreviation>
205
- </organization>
206
- </contributor>
207
173
  </bibitem>
208
- <bibitem id="ISSN" type="ISSN">
209
- <title format="text/plain">Instruments for analytical laboratory use</title>
174
+ <bibitem id="ISSN" type="journal">
175
+ <formattedref><em>Instruments for analytical laboratory use</em>. ISSN.</formattedref>
210
176
  <docidentifier type="ISSN">ISSN</docidentifier>
211
177
  <docidentifier type="metanorma">[2]</docidentifier>
212
- <contributor>
213
- <role type="publisher"/>
214
- <organization>
215
- <abbreviation>ISSN</abbreviation>
216
- </organization>
217
- </contributor>
218
178
  </bibitem>
219
179
  <note><name>NOTE</name><p>This is an annotation of document ISSN.</p></note>
220
180
  <note><name>NOTE</name><p>This is another annotation of document ISSN.</p></note>
221
181
  <bibitem id="ISO3696" type="standard">
222
- <title format="text/plain">Water for analytical laboratory use</title>
182
+ <formattedref><em><span class='stddocTitle'>Water for analytical laboratory use</span></em></formattedref>
223
183
  <docidentifier type='metanorma-ordinal'>[3]</docidentifier>
224
184
  <docidentifier type="ISO">ISO 3696</docidentifier>
225
- <contributor>
226
- <role type="publisher"/>
227
- <organization>
228
- <abbreviation>ISO</abbreviation>
229
- </organization>
230
- </contributor>
231
185
  </bibitem>
232
186
  <bibitem id="ref10">
233
187
  <formattedref format="application/x-isodoc+xml"><smallcap>Standard No I.C.C 167</smallcap>. <em>Determination of the protein content in cereal and cereal products for food and animal feeding stuffs according to the Dumas combustion method</em> (see <link target="http://www.icc.or.at"/>)</formattedref>
234
188
  <docidentifier type="metanorma">[10]</docidentifier>
235
189
  </bibitem>
236
190
  <bibitem id="ref11">
237
- <title>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</title>
191
+ <formattedref><em>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</em>.</formattedref>
238
192
  <docidentifier type='metanorma-ordinal'>[4]</docidentifier>
239
193
  <docidentifier type="IETF">IETF RFC 10</docidentifier>
240
194
  </bibitem>
@@ -243,8 +197,6 @@ RSpec.describe IsoDoc::Iec do
243
197
  <docidentifier type="metanorma">[Citn]</docidentifier>
244
198
  <docidentifier type="IETF">IETF RFC 20</docidentifier>
245
199
  </bibitem>
246
-
247
-
248
200
  </references>
249
201
  </bibliography>
250
202
  </iso-standard>
@@ -318,11 +270,11 @@ RSpec.describe IsoDoc::Iec do
318
270
  <h1 class='Section3'>Bibliography</h1>
319
271
  <p id='ISBN' class='Biblio'>
320
272
  [1]&#160;
321
- <i>Chemicals for analytical laboratory use</i>
273
+ <i>Chemicals for analytical laboratory use</i>. ISBN.
322
274
  </p>
323
275
  <p id='ISSN' class='Biblio'>
324
276
  [2]&#160;
325
- <i>Instruments for analytical laboratory use</i>
277
+ <i>Instruments for analytical laboratory use</i>. ISSN.
326
278
  </p>
327
279
  <div class='Note'>
328
280
  <p>
@@ -355,7 +307,7 @@ RSpec.describe IsoDoc::Iec do
355
307
  </p>
356
308
  <p id='ref11' class='Biblio'>
357
309
  [4]&#160; IETF RFC 10,
358
- <i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i>
310
+ <i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i>.
359
311
  </p>
360
312
  <p id='ref12' class='Biblio'>
361
313
  Citn&#160; IETF RFC 20, CitationWorks. 2019.
@@ -69,69 +69,69 @@ RSpec.describe IsoDoc do
69
69
  INPUT
70
70
 
71
71
  presxml = <<~OUTPUT
72
- <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
73
- <preface>
74
- <foreword obligation="informative" displayorder="1">
75
- <title>Foreword</title>
76
- <p id="A">This is a preamble</p>
77
- </foreword>
78
- <introduction id="B" obligation="informative" displayorder="2"><title depth="1">0<tab/>Introduction</title><clause id="C" inline-header="false" obligation="informative">
79
- <title depth="2">0.1<tab/>Introduction Subsection</title>
80
- </clause>
81
- <p>This is patent boilerplate</p>
82
- </introduction></preface><sections>
83
- <clause id="D" obligation="normative" type="scope" displayorder="3">
84
- <title depth="1">1<tab/>Scope</title>
85
- <p id="E">Text</p>
86
- </clause>
87
-
88
- <clause id="H" obligation="normative" displayorder="5"><title depth="1">3<tab/>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
89
- <title depth="2">3.1<tab/>Normal Terms</title>
90
- <term id="J"><name>3.1.1</name>
91
- <preferred>Term2</preferred>
92
- </term>
93
- </terms>
94
- <definitions id="K"><title>3.2</title>
95
- <dl>
96
- <dt>Symbol</dt>
97
- <dd>Definition</dd>
98
- </dl>
99
- </definitions>
100
- </clause>
101
- <definitions id="L" displayorder="6"><title>4</title>
102
- <dl>
103
- <dt>Symbol</dt>
104
- <dd>Definition</dd>
105
- </dl>
106
- </definitions>
107
- <clause id="M" inline-header="false" obligation="normative" displayorder="7"><title depth="1">5<tab/>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
108
- <title depth="2">5.1<tab/>Introduction</title>
109
- </clause>
110
- <clause id="O" inline-header="false" obligation="normative">
111
- <title depth="2">5.2<tab/>Clause 4.2</title>
112
- </clause></clause>
113
-
114
- </sections><annex id="P" inline-header="false" obligation="normative" displayorder="8">
115
- <title><strong>Annex A</strong><br/>(normative)<br/><br/><strong>Annex</strong></title>
116
- <clause id="Q" inline-header="false" obligation="normative">
117
- <title depth="2">A.1<tab/>Annex A.1</title>
118
- <clause id="Q1" inline-header="false" obligation="normative">
119
- <title depth="3">A.1.1<tab/>Annex A.1a</title>
120
- </clause>
121
- </clause>
122
- <appendix id="Q2" inline-header="false" obligation="normative">
123
- <title depth="2">Appendix 1<tab/>An Appendix</title>
124
- </appendix>
125
- </annex><bibliography><references id="R" obligation="informative" normative="true" displayorder="4">
126
- <title depth="1">2<tab/>Normative References</title>
127
- </references><clause id="S" obligation="informative" displayorder="9">
128
- <title depth="1">Bibliography</title>
129
- <references id="T" obligation="informative" normative="false">
130
- <title depth="2">Bibliography Subsection</title>
131
- </references>
72
+ <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
73
+ <preface>
74
+ <foreword obligation="informative" displayorder="1">
75
+ <title>Foreword</title>
76
+ <p id="A">This is a preamble</p>
77
+ </foreword>
78
+ <introduction id="B" obligation="informative" displayorder="2"><title depth="1">0<tab/>Introduction</title><clause id="C" inline-header="false" obligation="informative">
79
+ <title depth="2">0.1<tab/>Introduction Subsection</title>
80
+ </clause>
81
+ <p>This is patent boilerplate</p>
82
+ </introduction></preface><sections>
83
+ <clause id="D" obligation="normative" type="scope" displayorder="3">
84
+ <title depth="1">1<tab/>Scope</title>
85
+ <p id="E">Text</p>
86
+ </clause>
87
+
88
+ <clause id="H" obligation="normative" displayorder="5"><title depth="1">3<tab/>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
89
+ <title depth="2">3.1<tab/>Normal Terms</title>
90
+ <term id="J"><name>3.1.1</name>
91
+ <preferred>Term2</preferred>
92
+ </term>
93
+ </terms>
94
+ <definitions id="K"><title>3.2</title>
95
+ <dl>
96
+ <dt>Symbol</dt>
97
+ <dd>Definition</dd>
98
+ </dl>
99
+ </definitions>
100
+ </clause>
101
+ <definitions id="L" displayorder="6"><title>4</title>
102
+ <dl>
103
+ <dt>Symbol</dt>
104
+ <dd>Definition</dd>
105
+ </dl>
106
+ </definitions>
107
+ <clause id="M" inline-header="false" obligation="normative" displayorder="7"><title depth="1">5<tab/>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
108
+ <title depth="2">5.1<tab/>Introduction</title>
109
+ </clause>
110
+ <clause id="O" inline-header="false" obligation="normative">
111
+ <title depth="2">5.2<tab/>Clause 4.2</title>
112
+ </clause></clause>
113
+
114
+ </sections><annex id="P" inline-header="false" obligation="normative" displayorder="8">
115
+ <title><strong>Annex A</strong><br/>(normative)<br/><br/><strong>Annex</strong></title>
116
+ <clause id="Q" inline-header="false" obligation="normative">
117
+ <title depth="2">A.1<tab/>Annex A.1</title>
118
+ <clause id="Q1" inline-header="false" obligation="normative">
119
+ <title depth="3">A.1.1<tab/>Annex A.1a</title>
132
120
  </clause>
133
- </bibliography>
134
- </iso-standard>
121
+ </clause>
122
+ <appendix id="Q2" inline-header="false" obligation="normative">
123
+ <title depth="2">Appendix 1<tab/>An Appendix</title>
124
+ </appendix>
125
+ </annex><bibliography><references id="R" obligation="informative" normative="true" displayorder="4">
126
+ <title depth="1">2<tab/>Normative References</title>
127
+ </references><clause id="S" obligation="informative" displayorder="9">
128
+ <title depth="1">Bibliography</title>
129
+ <references id="T" obligation="informative" normative="false">
130
+ <title depth="2">Bibliography Subsection</title>
131
+ </references>
132
+ </clause>
133
+ </bibliography>
134
+ </iso-standard>
135
135
  OUTPUT
136
136
 
137
137
  html = <<~OUTPUT
@@ -305,13 +305,18 @@ RSpec.describe IsoDoc do
305
305
  <div class="colophon"/>
306
306
  </body>
307
307
  OUTPUT
308
- expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
309
- expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
310
- expect(xmlpp(IsoDoc::Iec::WordConvert.new({}).convert("test", presxml, true).sub(/^.*<body /m, "<body ").sub(%r{</body>.*$}m, "</body>"))).to be_equivalent_to xmlpp(word)
308
+ expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({})
309
+ .convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
310
+ expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({})
311
+ .convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
312
+ expect(xmlpp(IsoDoc::Iec::WordConvert.new({})
313
+ .convert("test", presxml, true)
314
+ .sub(/^.*<body /m, "<body ").sub(%r{</body>.*$}m, "</body>")))
315
+ .to be_equivalent_to xmlpp(word)
311
316
  end
312
317
 
313
318
  it "processes subclauses with and without titles" do
314
- expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
319
+ input = <<~INPUT
315
320
  <iso-standard xmlns="http://riboseinc.com/isoxml">
316
321
  <sections>
317
322
  <clause id="D" obligation="normative">
@@ -325,6 +330,7 @@ RSpec.describe IsoDoc do
325
330
  </sections>
326
331
  </iso-standard>
327
332
  INPUT
333
+ output = <<~OUTPUT
328
334
  <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
329
335
  <sections>
330
336
  <clause id='D' obligation='normative' displayorder="1">
@@ -347,10 +353,12 @@ RSpec.describe IsoDoc do
347
353
  </sections>
348
354
  </iso-standard>
349
355
  OUTPUT
356
+ expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({})
357
+ .convert("test", input, true))).to be_equivalent_to xmlpp(output)
350
358
  end
351
359
 
352
360
  it "processes simple terms & definitions" do
353
- expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
361
+ input = <<~INPUT
354
362
  <iso-standard xmlns="http://riboseinc.com/isoxml">
355
363
  <sections>
356
364
  <terms id="H" obligation="normative"><title>1<tab/>Terms, Definitions, Symbols and Abbreviated Terms</title>
@@ -362,6 +370,7 @@ RSpec.describe IsoDoc do
362
370
  </sections>
363
371
  </iso-standard>
364
372
  INPUT
373
+ output = <<~OUTPUT
365
374
  #{HTML_HDR}
366
375
  <div id="">
367
376
  <h1 class="ForewordTitle">FOREWORD</h1>
@@ -376,10 +385,12 @@ RSpec.describe IsoDoc do
376
385
  </body>
377
386
  </html>
378
387
  OUTPUT
388
+ expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", input, true)))
389
+ .to be_equivalent_to xmlpp(output)
379
390
  end
380
391
 
381
392
  it "processes inline section headers" do
382
- expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
393
+ input = <<~INPUT
383
394
  <iso-standard xmlns="http://riboseinc.com/isoxml">
384
395
  <sections>
385
396
  <clause id="M" inline-header="false" obligation="normative"><title>1<tab/>Clause 4</title>
@@ -392,6 +403,7 @@ RSpec.describe IsoDoc do
392
403
  </sections>
393
404
  </iso-standard>
394
405
  INPUT
406
+ output = <<~OUTPUT
395
407
  #{HTML_HDR}
396
408
  <div id="">
397
409
  <h1 class="ForewordTitle">FOREWORD</h1>
@@ -411,10 +423,12 @@ RSpec.describe IsoDoc do
411
423
  </body>
412
424
  </html>
413
425
  OUTPUT
426
+ expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", input, true)))
427
+ .to be_equivalent_to xmlpp(output)
414
428
  end
415
429
 
416
430
  it "adds colophon to published standard (Word)" do
417
- expect(xmlpp(IsoDoc::Iec::WordConvert.new({}).convert("test", <<~"INPUT", true).sub(/^.*<body /m, "<body ").sub(%r{</body>.*$}m, "</body>"))).to be_equivalent_to xmlpp(<<~"OUTPUT")
431
+ input = <<~INPUT
418
432
  <iso-standard xmlns="http://riboseinc.com/isoxml">
419
433
  <bibdata>
420
434
  <status>
@@ -426,30 +440,34 @@ RSpec.describe IsoDoc do
426
440
  </sections>
427
441
  </iso-standard>
428
442
  INPUT
429
- <body lang="EN-US" link="blue" vlink="#954F72">
430
- <div class="WordSection2">
431
- <p>
432
- <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
433
- </p>
434
- #{IEC_TITLE}
435
- <div id="">
436
- <h1 class="ForewordTitle">FOREWORD</h1>
437
- <div class="boilerplate_legal"/>
438
- </div>
439
- <p>&#160;</p>
440
- </div>
441
- <p><br clear="all" class="section"/></p>
442
- <div class="WordSection3">
443
- #{IEC_TITLE1}
444
- </div>
445
- <br clear="all" style="page-break-before:left;mso-break-type:section-break"/>
446
- <div class="colophon"/>
447
- </body>
443
+ output = <<~OUTPUT
444
+ <body lang='EN-US' link='blue' vlink='#954F72'>
445
+ <div class='WordSection1'>
446
+ <p>&#xa0;</p>
447
+ </div>
448
+ <p>
449
+ <br clear='all' class='section'/>
450
+ </p>
451
+ <div class='WordSection2'>
452
+ <p>&#xa0;</p>
453
+ </div>
454
+ <p>
455
+ <br clear='all' class='section'/>
456
+ </p>
457
+ <div class='WordSection3'>
458
+ <p class='zzSTDTitle'/>
459
+ </div>
460
+ <br clear='all' style='page-break-before:left;mso-break-type:section-break'/>
461
+ <div class='colophon'/>
462
+ </body>
448
463
  OUTPUT
464
+ expect(xmlpp(IsoDoc::Iec::WordConvert.new({}).convert("test", input, true)
465
+ .sub(/^.*<body /m, "<body ").sub(%r{</body>.*$}m, "</body>")))
466
+ .to be_equivalent_to xmlpp(output)
449
467
  end
450
468
 
451
469
  it "does not add colophon to draft standard (Word)" do
452
- expect(xmlpp(IsoDoc::Iec::WordConvert.new({}).convert("test", <<~"INPUT", true).sub(/^.*<body /m, "<body ").sub(%r{</body>.*$}m, "</body>"))).to be_equivalent_to xmlpp(<<~"OUTPUT")
470
+ input = <<~INPUT
453
471
  <iso-standard xmlns="http://riboseinc.com/isoxml">
454
472
  <bibdata>
455
473
  <status>
@@ -461,6 +479,7 @@ RSpec.describe IsoDoc do
461
479
  </sections>
462
480
  </iso-standard>
463
481
  INPUT
482
+ output = <<~OUTPUT
464
483
  <body lang="EN-US" link="blue" vlink="#954F72">
465
484
  <div class="WordSection2">
466
485
  <p>
@@ -479,10 +498,15 @@ RSpec.describe IsoDoc do
479
498
  </div>
480
499
  </body>
481
500
  OUTPUT
501
+ expect(xmlpp(IsoDoc::Iec::WordConvert.new({})
502
+ .convert("test", input, true)
503
+ .sub(/^.*<body /m, "<body ")
504
+ .sub(%r{</body>.*$}m, "</body>")))
505
+ .to be_equivalent_to xmlpp(output)
482
506
  end
483
507
 
484
508
  it "adds boilerplate to foreword" do
485
- expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
509
+ input = <<~INPUT
486
510
  <iso-standard xmlns="http://riboseinc.com/isoxml">
487
511
  <bibdata>
488
512
  <ext><doctype>International Standard</doctype></ext>
@@ -495,6 +519,7 @@ RSpec.describe IsoDoc do
495
519
  <sections/>
496
520
  </iso-standard>
497
521
  INPUT
522
+ output = <<~OUTPUT
498
523
  #{HTML_HDR}
499
524
  <div id="">
500
525
  <h1 class="ForewordTitle">FOREWORD</h1>
@@ -507,10 +532,12 @@ RSpec.describe IsoDoc do
507
532
  </body>
508
533
  </html>
509
534
  OUTPUT
535
+ expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({})
536
+ .convert("test", input, true))).to be_equivalent_to xmlpp(output)
510
537
  end
511
538
 
512
539
  it "does not add boilerplate to foreword in amendments" do
513
- expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
540
+ input = <<~INPUT
514
541
  <iso-standard xmlns="http://riboseinc.com/isoxml">
515
542
  <bibdata>
516
543
  <ext><doctype>Amendment</doctype></ext>
@@ -523,6 +550,7 @@ RSpec.describe IsoDoc do
523
550
  <sections/>
524
551
  </iso-standard>
525
552
  INPUT
553
+ output = <<~OUTPUT
526
554
  #{HTML_HDR}
527
555
  <div id="">
528
556
  <h1 class="ForewordTitle">FOREWORD</h1>
@@ -532,5 +560,7 @@ RSpec.describe IsoDoc do
532
560
  </body>
533
561
  </html>
534
562
  OUTPUT
563
+ expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({})
564
+ .convert("test", input, true))).to be_equivalent_to xmlpp(output)
535
565
  end
536
566
  end
@@ -165,8 +165,9 @@ RSpec.describe Metanorma::Iec do
165
165
  </bibitem>
166
166
  </relation>
167
167
  <ext>
168
- <doctype>article</doctype>
168
+ <doctype>standard</doctype>
169
169
  <editorialgroup>
170
+ <agency>IEC</agency>
170
171
  <technical-committee number='1' type='A'>TC</technical-committee>
171
172
  <technical-committee number='11' type='A1'>TC1</technical-committee>
172
173
  <subcommittee number='2' type='B'>SC</subcommittee>
@@ -357,7 +358,7 @@ RSpec.describe Metanorma::Iec do
357
358
  <?xml version="1.0" encoding="UTF-8"?>
358
359
  <iec-standard xmlns="https://www.metanorma.org/ns/iec" type="semantic" version="#{Metanorma::Iec::VERSION}">
359
360
  <bibdata type='standard'>
360
- <docidentifier type='ISO'>ISO/IEC/IETF/2CDTS 1000-1-1 ED 1</docidentifier>
361
+ <docidentifier type='ISO'>IEC/IETF/ISO/2CDTS 1000-1-1 ED 1</docidentifier>
361
362
  <docidentifier type='iso-tc'>2000</docidentifier>
362
363
  <docnumber>1000</docnumber>
363
364
  <contributor>
@@ -438,12 +439,15 @@ RSpec.describe Metanorma::Iec do
438
439
  <horizontal>true</horizontal>
439
440
  <function>emc</function>
440
441
  <editorialgroup>
442
+ <agency>IEC</agency>
443
+ <agency>IETF</agency>
444
+ <agency>ISO</agency>
441
445
  <technical-committee/>
442
446
  <subcommittee/>
443
447
  <workgroup/>
444
448
  </editorialgroup>
445
449
  <structuredidentifier>
446
- <project-number part='1' subpart='1'>ISO/IEC/IETF 1000</project-number>
450
+ <project-number part='1' subpart='1'>IEC/IETF/ISO 1000</project-number>
447
451
  </structuredidentifier>
448
452
  <stagename>Committee draft</stagename>
449
453
  </ext>
@@ -673,8 +677,9 @@ RSpec.describe Metanorma::Iec do
673
677
  </owner>
674
678
  </copyright>
675
679
  <ext>
676
- <doctype>article</doctype>
680
+ <doctype>standard</doctype>
677
681
  <editorialgroup>
682
+ <agency>IEC</agency>
678
683
  <technical-committee/>
679
684
  <subcommittee/>
680
685
  <workgroup/>
@@ -876,8 +881,9 @@ RSpec.describe Metanorma::Iec do
876
881
  </owner>
877
882
  </copyright>
878
883
  <ext>
879
- <doctype>article</doctype>
884
+ <doctype>standard</doctype>
880
885
  <editorialgroup>
886
+ <agency>IEC</agency>
881
887
  <technical-committee/>
882
888
  <subcommittee/>
883
889
  <workgroup/>
@@ -943,8 +949,9 @@ RSpec.describe Metanorma::Iec do
943
949
  </owner>
944
950
  </copyright>
945
951
  <ext>
946
- <doctype>article</doctype>
952
+ <doctype>standard</doctype>
947
953
  <editorialgroup>
954
+ <agency>IEC</agency>
948
955
  <technical-committee/>
949
956
  <subcommittee/>
950
957
  <workgroup/>
@@ -54,6 +54,7 @@ RSpec.describe Metanorma::Iec do
54
54
  <ext>
55
55
  <doctype>article</doctype>
56
56
  <editorialgroup>
57
+ <agency>IEC</agency>
57
58
  <technical-committee/>
58
59
  <subcommittee/>
59
60
  <workgroup/>
@@ -60,6 +60,7 @@ RSpec.describe Metanorma::Iec do
60
60
  <doctype>article</doctype>
61
61
  <subdoctype>vocabulary</subdoctype>
62
62
  <editorialgroup>
63
+ <agency>IEC</agency>
63
64
  <technical-committee/>
64
65
  <subcommittee/>
65
66
  <workgroup/>
@@ -148,6 +149,7 @@ RSpec.describe Metanorma::Iec do
148
149
  <doctype>article</doctype>
149
150
  <subdoctype>vocabulary</subdoctype>
150
151
  <editorialgroup>
152
+ <agency>IEC</agency>
151
153
  <technical-committee/>
152
154
  <subcommittee/>
153
155
  <workgroup/>
@@ -230,6 +232,7 @@ RSpec.describe Metanorma::Iec do
230
232
  <doctype>article</doctype>
231
233
  <subdoctype>vocabulary</subdoctype>
232
234
  <editorialgroup>
235
+ <agency>IEC</agency>
233
236
  <technical-committee/>
234
237
  <subcommittee/>
235
238
  <workgroup/>