metanorma-iso 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -93,19 +93,8 @@ RSpec.describe IsoDoc do
93
93
  </div>
94
94
  <div>
95
95
  <h1>2&#160; Normative references</h1>
96
- <p>There are no normative references in this document.</p>
97
- </div>
98
- <div id="H"><h1>3&#160; Terms, definitions, symbols and abbreviated terms</h1><p>For the purposes of this document,
99
- the following terms and definitions apply.</p>
100
- <p>ISO and IEC maintain terminological databases for use in
101
- standardization at the following addresses:</p>
102
-
103
- <ul>
104
- <li> <p>ISO Online browsing platform: available at
105
- <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
106
- <li> <p>IEC Electropedia: available at
107
- <a href="http://www.electropedia.org">http://www.electropedia.org</a>
108
- </p> </li> </ul>
96
+ </div>
97
+ <div id="H"><h1>3&#160; Terms, definitions, symbols and abbreviated terms</h1>
109
98
  <div id="I"><h2>3.1 Normal Terms</h2>
110
99
 
111
100
  <p class="TermNum" id="J">3.1.1</p>
@@ -229,7 +218,7 @@ RSpec.describe IsoDoc do
229
218
  </bibliography>
230
219
  </iso-standard>
231
220
  INPUT
232
- #{HTML_HDR.sub(/"en"/, '"tlh"')}
221
+ #{HTML_HDR.gsub(/"en"/, '"tlh"')}
233
222
  <br/>
234
223
  <div>
235
224
  <h1 class="ForewordTitle">Foreword</h1>
@@ -250,19 +239,8 @@ RSpec.describe IsoDoc do
250
239
  </div>
251
240
  <div>
252
241
  <h1>2&#160; Normative references</h1>
253
- <p>There are no normative references in this document.</p>
254
- </div>
255
- <div id="H"><h1>3&#160; Terms, definitions, symbols and abbreviated terms</h1><p>For the purposes of this document,
256
- the following terms and definitions apply.</p>
257
- <p>ISO and IEC maintain terminological databases for use in
258
- standardization at the following addresses:</p>
259
-
260
- <ul>
261
- <li> <p>ISO Online browsing platform: available at
262
- <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
263
- <li> <p>IEC Electropedia: available at
264
- <a href="http://www.electropedia.org">http://www.electropedia.org</a>
265
- </p> </li> </ul>
242
+ </div>
243
+ <div id="H"><h1>3&#160; Terms, definitions, symbols and abbreviated terms</h1>
266
244
  <div id="I"><h2>3.1 Normal Terms</h2>
267
245
 
268
246
  <p class="TermNum" id="J">3.1.1</p>
@@ -386,7 +364,7 @@ RSpec.describe IsoDoc do
386
364
  </bibliography>
387
365
  </iso-standard>
388
366
  INPUT
389
- #{HTML_HDR.sub(/"en"/, '"fr"')}
367
+ #{HTML_HDR.gsub(/"en"/, '"fr"')}
390
368
  <br/>
391
369
  <div>
392
370
  <h1 class="ForewordTitle">Avant-propos</h1>
@@ -407,18 +385,8 @@ RSpec.describe IsoDoc do
407
385
  </div>
408
386
  <div>
409
387
  <h1>2&#160; R&#233;f&#233;rences normatives</h1>
410
- <p>Le pr&#233;sent document ne contient aucune r&#233;f&#233;rence normative.</p>
411
- </div>
412
- <div id="H"><h1>3&#160; Terms, d&#233;finitions, symboles et termes abr&#233;g&#233;s</h1><p>Pour les besoins du pr&#233;sent document, les termes et d&#233;finitions suivants s'appliquent.</p>
413
- <p>L'ISO et l'IEC tiennent &#224; jour des bases de donn&#233;es terminologiques
414
- destin&#233;es &#224; &#234;tre utilis&#233;es en normalisation, consultables aux adresses
415
- suivantes:</p>
416
- <ul>
417
- <li> <p>ISO Online browsing platform: disponible &#224; l'adresse
418
- <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
419
- <li> <p>IEC Electropedia: disponible &#224; l'adresse
420
- <a href="http://www.electropedia.org">http://www.electropedia.org</a>
421
- </p> </li> </ul>
388
+ </div>
389
+ <div id="H"><h1>3&#160; Terms, d&#233;finitions, symboles et termes abr&#233;g&#233;s</h1>
422
390
  <div id="I"><h2>3.1 Normal Terms</h2>
423
391
 
424
392
  <p class="TermNum" id="J">3.1.1</p>
@@ -553,7 +521,7 @@ RSpec.describe IsoDoc do
553
521
  </bibliography>
554
522
  </iso-standard>
555
523
  INPUT
556
- #{HTML_HDR.sub(/"en"/, '"zh"')}
524
+ #{HTML_HDR.gsub(/"en"/, '"zh"')}
557
525
  <br/>
558
526
  <div>
559
527
  <h1 class="ForewordTitle">&#21069;&#35328;</h1>
@@ -576,17 +544,9 @@ RSpec.describe IsoDoc do
576
544
  </div>
577
545
  <div>
578
546
  <h1>2&#160; &#35268;&#33539;&#24615;&#24341;&#29992;&#25991;&#20214;</h1>
579
- <p>&#19979;&#21015;&#25991;&#20214;&#23545;&#20110;&#26412;&#25991;&#20214;&#30340;&#24212;&#29992;&#26159;&#24517;&#19981;&#21487;&#23569;&#30340;&#12290; &#20961;&#26159;&#27880;&#26085;&#26399;&#30340;&#24341;&#29992;&#25991;&#20214;&#65292;&#20165;&#27880;&#26085;&#26399;&#30340;&#29256;&#26412;&#36866;&#29992;&#20110;&#26412;&#25991;&#20214;&#12290; &#20961;&#26159;&#19981;&#27880;&#26085;&#26399;&#30340;&#24341;&#29992;&#25991;&#20214;&#65292;&#20854;&#26368;&#26032;&#29256;&#26412;&#65288;&#21253;&#25324;&#25152;&#26377;&#30340;&#20462;&#25913;&#21333;&#65289;&#36866;&#29992;&#20110;&#26412;&#25991;&#20214;&#12290;</p>
580
547
  <p id="ISO712" class="NormRef">ISO 712, <i> Cereals and cereal products</i></p>
581
548
  </div>
582
- <div id="H"><h1>3&#160; &#26415;&#35821;&#12289;&#23450;&#20041;&#12289;&#31526;&#21495;&#12289;&#20195;&#21495;&#21644;&#32553;&#30053;&#35821;</h1><p>&#19979;&#21015;&#26415;&#35821;&#21644;&#23450;&#20041;&#36866;&#29992;&#20110;&#26412;&#25991;&#20214;&#12290;</p>
583
- <p>ISO&#21644;IEC&#29992;&#20110;&#26631;&#20934;&#21270;&#30340;&#26415;&#35821;&#25968;&#25454;&#24211;&#22320;&#22336;&#22914;&#19979;&#65306;</p>
584
- <ul>
585
- <li> <p>ISO&#22312;&#32447;&#27983;&#35272;&#24179;&#21488;:
586
- &#20301;&#20110;<a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
587
- <li> <p>IEC Electropedia:
588
- &#20301;&#20110;<a href="http://www.electropedia.org">http://www.electropedia.org</a>
589
- </p> </li> </ul>
549
+ <div id="H"><h1>3&#160; &#26415;&#35821;&#12289;&#23450;&#20041;&#12289;&#31526;&#21495;&#12289;&#20195;&#21495;&#21644;&#32553;&#30053;&#35821;</h1>
590
550
  <div id="I"><h2>3.1 Normal Terms</h2>
591
551
 
592
552
  <p class="TermNum" id="J">3.1.1</p>
@@ -185,7 +185,6 @@ RSpec.describe IsoDoc do
185
185
  <p class="zzSTDTitle1"/>
186
186
  <div>
187
187
  <h1>1&#160; Normative references</h1>
188
- <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>
189
188
  <p id="ISO712" class="NormRef">ISO 712, <i> Cereals and cereal products</i></p>
190
189
  </div>
191
190
  </div>
@@ -252,7 +251,6 @@ RSpec.describe IsoDoc do
252
251
  <p class="zzSTDTitle1"/>
253
252
  <div>
254
253
  <h1>1&#160; Normative references</h1>
255
- <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>
256
254
  <p id="ISO712" class="NormRef">ISO 712, <i> Cereals and cereal products</i></p>
257
255
  </div>
258
256
  </div>
@@ -154,7 +154,6 @@ RSpec.describe IsoDoc::Iso do
154
154
  <p class="zzSTDTitle1"/>
155
155
  <div>
156
156
  <h1>1&#160; Normative references</h1>
157
- <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>
158
157
  <p id="ISO20483" class="NormRef">ISO 20483, <i> Cereals and pulses</i></p>
159
158
  </div>
160
159
  </div>
@@ -18,6 +18,7 @@ RSpec.describe IsoDoc::Iso::Metadata do
18
18
  <title type="title-part" language="fr" format="text/plain">Riz</title>
19
19
  <docidentifier type="iso">ISO/PreCD3 17301-1</docidentifier>
20
20
  <docidentifier type="iso-tc">17301</docidentifier>
21
+ <docidentifier type="iso-tc">17302</docidentifier>
21
22
  <date type="published"><on>2011</on></date>
22
23
  <date type="accessed"><on>2012</on></date>
23
24
  <date type="created"><from>2010</from><to>2011</to></date>
@@ -70,7 +71,7 @@ RSpec.describe IsoDoc::Iso::Metadata do
70
71
  </bibdata>
71
72
  </iso-standard>
72
73
  INPUT
73
- {:accesseddate=>"2012", :activateddate=>"2013", :agency=>"ISO", :authors=>[], :authors_affiliations=>{}, :createddate=>"2010&ndash;2011", :docnumber=>"ISO/PreCD3 17301-1", :docsubtitle=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses&nbsp;&mdash; Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai&nbsp;&mdash; Partie&nbsp;1: Riz", :docsubtitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses", :docsubtitlemain=>"Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai", :docsubtitlepart=>"Riz", :docsubtitlepartlabel=>"Partie&nbsp;1", :doctitle=>"Cereals and pulses&nbsp;&mdash; Specifications and test methods&nbsp;&mdash; Part&nbsp;1: Rice", :doctitleintro=>"Cereals and pulses", :doctitlemain=>"Specifications and test methods", :doctitlepart=>"Rice", :doctitlepartlabel=>"Part&nbsp;1", :doctype=>"International Standard", :docyear=>"2016", :draft=>"0.4", :draftinfo=>" (draft 0.4, 2016-05-01)", :edition=>"2", :editorialgroup=>["TC 34", "SC 4", "WG 3"], :ics=>"XXX", :obsoleteddate=>"2014", :obsoletes=>nil, :obsoletes_part=>nil, :publisheddate=>"2011", :revdate=>"2016-05-01", :sc=>"SC 4", :secretariat=>"GB", :stage=>"30", :stage_int=>30, :stageabbr=>"PreCD3", :tc=>"TC 34", :tc_docnumber=>"17301", :unpublished=>true, :wg=>"WG 3"}
74
+ {:accesseddate=>"2012", :activateddate=>"2013", :agency=>"ISO", :authors=>[], :authors_affiliations=>{}, :createddate=>"2010&ndash;2011", :docnumber=>"ISO/PreCD3 17301-1", :docsubtitle=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses&nbsp;&mdash; Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai&nbsp;&mdash; Partie&nbsp;1: Riz", :docsubtitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses", :docsubtitlemain=>"Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai", :docsubtitlepart=>"Riz", :docsubtitlepartlabel=>"Partie&nbsp;1", :doctitle=>"Cereals and pulses&nbsp;&mdash; Specifications and test methods&nbsp;&mdash; Part&nbsp;1: Rice", :doctitleintro=>"Cereals and pulses", :doctitlemain=>"Specifications and test methods", :doctitlepart=>"Rice", :doctitlepartlabel=>"Part&nbsp;1", :doctype=>"International Standard", :docyear=>"2016", :draft=>"0.4", :draftinfo=>" (draft 0.4, 2016-05-01)", :edition=>"2", :editorialgroup=>["TC 34", "SC 4", "WG 3"], :ics=>"XXX", :obsoleteddate=>"2014", :obsoletes=>nil, :obsoletes_part=>nil, :publisheddate=>"2011", :revdate=>"2016-05-01", :sc=>"SC 4", :secretariat=>"GB", :stage=>"30", :stage_int=>30, :stageabbr=>"PreCD3", :tc=>"TC 34", :tc_docnumber=>["17301", "17302"], :unpublished=>true, :wg=>"WG 3"}
74
75
  OUTPUT
75
76
  end
76
77
 
@@ -146,7 +147,7 @@ OUTPUT
146
147
  </bibdata>
147
148
  </iso-standard>
148
149
  INPUT
149
- {:agency=>"ISO/IEC", :authors=>[], :authors_affiliations=>{}, :docnumber=>"ISO/IEC/CD 17301-1-3", :docsubtitle=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses&nbsp;&mdash; Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai&nbsp;&mdash; Partie&nbsp;1&ndash;3: Riz", :docsubtitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses", :docsubtitlemain=>"Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai", :docsubtitlepart=>"Riz", :docsubtitlepartlabel=>"Partie&nbsp;1&ndash;3", :doctitle=>"Cereals and pulses&nbsp;&mdash; Specifications and test methods&nbsp;&mdash; Part&nbsp;1&ndash;3: Rice", :doctitleintro=>"Cereals and pulses", :doctitlemain=>"Specifications and test methods", :doctitlepart=>"Rice", :doctitlepartlabel=>"Part&nbsp;1&ndash;3", :doctype=>"International Standard", :docyear=>"2016", :draft=>nil, :draftinfo=>"", :edition=>nil, :editorialgroup=>["ABC 34", "DEF 4", "GHI 3"], :ics=>"1.2.3, 1.2.3", :obsoletes=>"IEC 8121", :obsoletes_part=>"3.1", :revdate=>nil, :sc=>"DEF 4", :secretariat=>"XXXX", :stage=>"60", :stage_int=>60, :stageabbr=>"IS", :tc=>"ABC 34", :tc_docnumber=>"17301", :unpublished=>false, :wg=>"GHI 3"}
150
+ {:agency=>"ISO/IEC", :authors=>[], :authors_affiliations=>{}, :docnumber=>"ISO/IEC/CD 17301-1-3", :docsubtitle=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses&nbsp;&mdash; Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai&nbsp;&mdash; Partie&nbsp;1&ndash;3: Riz", :docsubtitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses", :docsubtitlemain=>"Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai", :docsubtitlepart=>"Riz", :docsubtitlepartlabel=>"Partie&nbsp;1&ndash;3", :doctitle=>"Cereals and pulses&nbsp;&mdash; Specifications and test methods&nbsp;&mdash; Part&nbsp;1&ndash;3: Rice", :doctitleintro=>"Cereals and pulses", :doctitlemain=>"Specifications and test methods", :doctitlepart=>"Rice", :doctitlepartlabel=>"Part&nbsp;1&ndash;3", :doctype=>"International Standard", :docyear=>"2016", :draft=>nil, :draftinfo=>"", :edition=>nil, :editorialgroup=>["ABC 34", "DEF 4", "GHI 3"], :ics=>"1.2.3, 1.2.3", :obsoletes=>"IEC 8121", :obsoletes_part=>"3.1", :revdate=>nil, :sc=>"DEF 4", :secretariat=>"XXXX", :stage=>"60", :stage_int=>60, :stageabbr=>"IS", :tc=>"ABC 34", :tc_docnumber=>["17301"], :unpublished=>false, :wg=>"GHI 3"}
150
151
  OUTPUT
151
152
  end
152
153
 
@@ -155,16 +155,7 @@ RSpec.describe IsoDoc do
155
155
  expect(word).to be_equivalent_to <<~"OUTPUT"
156
156
  <div class="WordSection3">
157
157
  <p class="zzSTDTitle1"></p>
158
- <div><a name="_terms_and_definitions" id="_terms_and_definitions"></a><h1>1<span style="mso-tab-count:1">&#xA0; </span>Terms and definitions</h1><p class="MsoNormal">For the purposes of this document,
159
- the following terms and definitions apply.</p>
160
- <p class="MsoNormal">ISO and IEC maintain terminological databases for use in
161
- standardization at the following addresses:</p>
162
-
163
- <p style="mso-list:l3 level1 lfo1;" class="MsoListParagraphCxSpFirst"> ISO Online browsing platform: available at
164
- <a href="http://www.iso.org/obp">http://www.iso.org/obp</a> </p>
165
- <p style="mso-list:l3 level1 lfo1;" class="MsoListParagraphCxSpLast"> IEC Electropedia: available at
166
- <a href="http://www.electropedia.org">http://www.electropedia.org</a>
167
- </p>
158
+ <div><a name="_terms_and_definitions" id="_terms_and_definitions"></a><h1>1<span style="mso-tab-count:1">&#xA0; </span>Terms and definitions</h1>
168
159
  <p class="TermNum"><a name="paddy1" id="paddy1"></a>1.1</p><p class="Terms" style="text-align:left;">paddy</p>
169
160
  <p class="MsoNormal"><a name="_eb29b35e-123e-4d1c-b50b-2714d41e747f" id="_eb29b35e-123e-4d1c-b50b-2714d41e747f"></a>rice retaining its husk after threshing</p>
170
161
  <p class="MsoNormal">[SOURCE: <a href="#ISO7301">ISO 7301:2011, 3.1</a>, modified &mdash; The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here]</p></div>
@@ -310,12 +301,12 @@ RSpec.describe IsoDoc do
310
301
  </div>
311
302
  </div>
312
303
  <aside id="fn:3" class="footnote">
313
- <p id="_ff27c067-2785-4551-96cf-0a73530ff1e6"><a rel="footnote" href="#fn:3" epub:type="footnote" id="fnref:1">
304
+ <p id="_ff27c067-2785-4551-96cf-0a73530ff1e6"><a rel="footnote" href="#fn:3" epub:type="footnote">
314
305
  <sup>1</sup>
315
306
  </a>This is a footnote.</p>
316
307
  <a href="#fnref:1">&#x21A9;</a></aside>
317
308
  <aside id="fn:2" class="footnote">
318
- <p id="_ff27c067-2785-4551-96cf-0a73530ff1e6"><a rel="footnote" href="#fn:2" epub:type="footnote" id="fnref:2"><sup>2</sup></a>Formerly denoted as 15 % (m/m).</p>
309
+ <p id="_ff27c067-2785-4551-96cf-0a73530ff1e6"><a rel="footnote" href="#fn:2" epub:type="footnote"><sup>2</sup></a>Formerly denoted as 15 % (m/m).</p>
319
310
  <a href="#fnref:2">&#x21A9;</a></aside>
320
311
 
321
312
  </main>
@@ -90,19 +90,8 @@ RSpec.describe IsoDoc do
90
90
  </div>
91
91
  <div>
92
92
  <h1>2&#160; Normative references</h1>
93
- <p>There are no normative references in this document.</p>
94
93
  </div>
95
- <div id="H"><h1>3&#160; Terms, definitions, symbols and abbreviated terms</h1><p>For the purposes of this document,
96
- the following terms and definitions apply.</p>
97
- <p>ISO and IEC maintain terminological databases for use in
98
- standardization at the following addresses:</p>
99
-
100
- <ul>
101
- <li> <p>ISO Online browsing platform: available at
102
- <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
103
- <li> <p>IEC Electropedia: available at
104
- <a href="http://www.electropedia.org">http://www.electropedia.org</a>
105
- </p> </li> </ul>
94
+ <div id="H"><h1>3&#160; Terms, definitions, symbols and abbreviated terms</h1>
106
95
  <div id="I">
107
96
  <h2>3.1 Normal Terms</h2>
108
97
  <p class="TermNum" id="J">3.1.1</p>
@@ -254,19 +243,8 @@ OUTPUT
254
243
  </div>
255
244
  <div>
256
245
  <h1>2<span style="mso-tab-count:1">&#160; </span>Normative references</h1>
257
- <p>There are no normative references in this document.</p>
258
246
  </div>
259
- <div id="H"><h1>3<span style="mso-tab-count:1">&#160; </span>Terms, definitions, symbols and abbreviated terms</h1><p>For the purposes of this document,
260
- the following terms and definitions apply.</p>
261
- <p>ISO and IEC maintain terminological databases for use in
262
- standardization at the following addresses:</p>
263
-
264
- <ul>
265
- <li> <p>ISO Online browsing platform: available at
266
- <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
267
- <li> <p>IEC Electropedia: available at
268
- <a href="http://www.electropedia.org">http://www.electropedia.org</a>
269
- </p> </li> </ul>
247
+ <div id="H"><h1>3<span style="mso-tab-count:1">&#160; </span>Terms, definitions, symbols and abbreviated terms</h1>
270
248
  <div id="I">
271
249
  <h2>3.1 Normal Terms</h2>
272
250
  <p class="TermNum" id="J">3.1.1</p>
@@ -337,17 +315,7 @@ OUTPUT
337
315
  INPUT
338
316
  #{HTML_HDR}
339
317
  <p class="zzSTDTitle1"/>
340
- <div id="H"><h1>1&#160; Terms and definitions</h1><p>For the purposes of this document,
341
- the following terms and definitions apply.</p>
342
- <p>ISO and IEC maintain terminological databases for use in
343
- standardization at the following addresses:</p>
344
-
345
- <ul>
346
- <li> <p>ISO Online browsing platform: available at
347
- <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
348
- <li> <p>IEC Electropedia: available at
349
- <a href="http://www.electropedia.org">http://www.electropedia.org</a>
350
- </p> </li> </ul>
318
+ <div id="H"><h1>1&#160; Terms and definitions</h1>
351
319
  <p class="TermNum" id="J">1.1</p>
352
320
  <p class="Terms" style="text-align:left;">Term2</p>
353
321
  </div>
@@ -357,137 +325,6 @@ OUTPUT
357
325
  OUTPUT
358
326
  end
359
327
 
360
- it "processes terms & definitions with external source" do
361
- expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
362
- <iso-standard xmlns="http://riboseinc.com/isoxml">
363
- <termdocsource type="inline" bibitemid="ISO712"/>
364
- <sections>
365
- <terms id="H" obligation="normative"><title>Terms, Definitions, Symbols and Abbreviated Terms</title>
366
- <term id="J">
367
- <preferred>Term2</preferred>
368
- </term>
369
- </terms>
370
- </sections>
371
- <bibliography>
372
- <references id="_normative_references" obligation="informative"><title>Normative References</title>
373
- <bibitem id="ISO712" type="standard">
374
- <title format="text/plain">Cereals and cereal products?~@~I?~@~T?~@~IDetermination of moisture content?~@~I?~@~T?~@~IReference method</title>
375
- <docidentifier>ISO 712</docidentifier>
376
- <contributor>
377
- <role type="publisher"/>
378
- <organization>
379
- <name>International Organization for Standardization</name>
380
- </organization>
381
- </contributor>
382
- </bibitem></references>
383
- </bibliography>
384
- </iso-standard>
385
- INPUT
386
- #{HTML_HDR}
387
- <p class="zzSTDTitle1"/>
388
- <div>
389
- <h1>1&#160; Normative references</h1>
390
- <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>
391
- <p id="ISO712" class="NormRef">ISO 712, <i> Cereals and cereal products?~@~I?~@~T?~@~IDetermination of moisture content?~@~I?~@~T?~@~IReference method</i></p>
392
- </div>
393
- <div id="H"><h1>2&#160; Terms and definitions</h1><p>For the purposes of this document, the terms and definitions
394
- given in <a href="#ISO712">ISO 712</a> and the following apply.</p>
395
- <p>ISO and IEC maintain terminological databases for use in
396
- standardization at the following addresses:</p>
397
-
398
- <ul>
399
- <li> <p>ISO Online browsing platform: available at
400
- <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
401
- <li> <p>IEC Electropedia: available at
402
- <a href="http://www.electropedia.org">http://www.electropedia.org</a>
403
- </p> </li> </ul>
404
- <p class="TermNum" id="J">2.1</p>
405
- <p class="Terms" style="text-align:left;">Term2</p>
406
- </div>
407
- </div>
408
- </body>
409
- </html>
410
- OUTPUT
411
- end
412
-
413
- it "processes empty terms & definitions with external source" do
414
- expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
415
- <iso-standard xmlns="http://riboseinc.com/isoxml">
416
- <termdocsource type="inline" bibitemid="ISO712"/>
417
- <termdocsource type="inline" bibitemid="ISO712"/>
418
- <termdocsource type="inline" bibitemid="ISO712"/>
419
- <sections>
420
- <terms id="H" obligation="normative"><title>Terms, Definitions, Symbols and Abbreviated Terms</title>
421
- </terms>
422
- </sections>
423
- <bibliography>
424
- <references id="_normative_references" obligation="informative"><title>Normative References</title>
425
- <bibitem id="ISO712" type="standard">
426
- <title format="text/plain">Cereals and cereal products?~@~I?~@~T?~@~IDetermination of moisture content?~@~I?~@~T?~@~IReference method</title>
427
- <docidentifier>ISO 712</docidentifier>
428
- <contributor>
429
- <role type="publisher"/>
430
- <organization>
431
- <abbreviation>ISO</abbreviation>
432
- </organization>
433
- </contributor>
434
- </bibitem></references>
435
- </bibliography>
436
- </iso-standard>
437
- INPUT
438
- #{HTML_HDR}
439
- <p class="zzSTDTitle1"/>
440
- <div>
441
- <h1>1&#160; Normative references</h1>
442
- <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>
443
- <p id="ISO712" class="NormRef">ISO 712, <i> Cereals and cereal products?~@~I?~@~T?~@~IDetermination of moisture content?~@~I?~@~T?~@~IReference method</i></p>
444
- </div>
445
- <div id="H"><h1>2&#160; Terms and definitions</h1><p>For the purposes of this document,
446
- the terms and definitions given in <a href="#ISO712">ISO 712</a>, <a href="#ISO712">ISO 712</a> and <a href="#ISO712">ISO 712</a> apply.</p>
447
- <p>ISO and IEC maintain terminological databases for use in
448
- standardization at the following addresses:</p>
449
-
450
- <ul>
451
- <li> <p>ISO Online browsing platform: available at
452
- <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
453
- <li> <p>IEC Electropedia: available at
454
- <a href="http://www.electropedia.org">http://www.electropedia.org</a>
455
- </p> </li> </ul>
456
- </div>
457
- </div>
458
- </body>
459
- </html>
460
- OUTPUT
461
- end
462
-
463
- it "processes empty terms & definitions" do
464
- expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
465
- <iso-standard xmlns="http://riboseinc.com/isoxml">
466
- <sections>
467
- <terms id="H" obligation="normative"><title>Terms, Definitions, Symbols and Abbreviated Terms</title>
468
- </terms>
469
- </sections>
470
- </iso-standard>
471
- INPUT
472
- #{HTML_HDR}
473
- <p class="zzSTDTitle1"/>
474
- <div id="H"><h1>1&#160; Terms and definitions</h1><p>No terms and definitions are listed in this document.</p>
475
- <p>ISO and IEC maintain terminological databases for use in
476
- standardization at the following addresses:</p>
477
-
478
- <ul>
479
- <li> <p>ISO Online browsing platform: available at
480
- <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
481
- <li> <p>IEC Electropedia: available at
482
- <a href="http://www.electropedia.org">http://www.electropedia.org</a>
483
- </p> </li> </ul>
484
- </div>
485
- </div>
486
- </body>
487
- </html>
488
- OUTPUT
489
- end
490
-
491
328
  it "processes inline section headers" do
492
329
  expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
493
330
  <iso-standard xmlns="http://riboseinc.com/isoxml">
@@ -54,17 +54,7 @@ RSpec.describe IsoDoc do
54
54
  INPUT
55
55
  #{HTML_HDR}
56
56
  <p class="zzSTDTitle1"/>
57
- <div id="_terms_and_definitions"><h1>1&#160; Terms and definitions</h1><p>For the purposes of this document,
58
- the following terms and definitions apply.</p>
59
- <p>ISO and IEC maintain terminological databases for use in
60
- standardization at the following addresses:</p>
61
-
62
- <ul>
63
- <li> <p>ISO Online browsing platform: available at
64
- <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
65
- <li> <p>IEC Electropedia: available at
66
- <a href="http://www.electropedia.org">http://www.electropedia.org</a>
67
- </p> </li> </ul>
57
+ <div id="_terms_and_definitions"><h1>1&#160; Terms and definitions</h1>
68
58
  <p class="TermNum" id="paddy1">1.1</p><p class="Terms" style="text-align:left;">paddy</p>
69
59
 
70
60
  <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">&lt;rice&gt; rice retaining its husk after threshing</p>
@@ -151,17 +141,7 @@ OUTPUT
151
141
  </sections>
152
142
  </iso-standard>
153
143
  INPUT
154
- <div id="_terms_and_definitions"><h1>1<span style="mso-tab-count:1">&#160; </span>Terms and definitions</h1><p>For the purposes of this document,
155
- the following terms and definitions apply.</p>
156
- <p>ISO and IEC maintain terminological databases for use in
157
- standardization at the following addresses:</p>
158
-
159
- <ul>
160
- <li> <p>ISO Online browsing platform: available at
161
- <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
162
- <li> <p>IEC Electropedia: available at
163
- <a href="http://www.electropedia.org">http://www.electropedia.org</a>
164
- </p> </li> </ul>
144
+ <div id="_terms_and_definitions"><h1>1<span style="mso-tab-count:1">&#160; </span>Terms and definitions</h1>
165
145
  <p class="TermNum" id="paddy1">1.1</p><p class="Terms" style="text-align:left;">paddy</p>
166
146
 
167
147
  <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">&lt;rice&gt; rice retaining its husk after threshing</p>
@@ -78,16 +78,7 @@ RSpec.describe IsoDoc do
78
78
  <a href="#N">Note</a>
79
79
  </p>
80
80
  </div>
81
- <div id="terms"><h1>2&#160; Terms and definitions</h1><p>No terms and definitions are listed in this document.</p>
82
- <p>ISO and IEC maintain terminological databases for use in
83
- standardization at the following addresses:</p>
84
-
85
- <ul>
86
- <li> <p>ISO Online browsing platform: available at
87
- <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
88
- <li> <p>IEC Electropedia: available at
89
- <a href="http://www.electropedia.org">http://www.electropedia.org</a>
90
- </p> </li> </ul>
81
+ <div id="terms"><h1>2&#160; Terms and definitions</h1>
91
82
  </div>
92
83
  <div id="widgets">
93
84
  <h1>3&#160; Widgets</h1>
@@ -196,16 +187,7 @@ RSpec.describe IsoDoc do
196
187
  <a href="#N">Figure 1</a>
197
188
  </p>
198
189
  </div>
199
- <div id="terms"><h1>2&#160; Terms and definitions</h1><p>No terms and definitions are listed in this document.</p>
200
- <p>ISO and IEC maintain terminological databases for use in
201
- standardization at the following addresses:</p>
202
-
203
- <ul>
204
- <li> <p>ISO Online browsing platform: available at
205
- <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
206
- <li> <p>IEC Electropedia: available at
207
- <a href="http://www.electropedia.org">http://www.electropedia.org</a>
208
- </p> </li> </ul>
190
+ <div id="terms"><h1>2&#160; Terms and definitions</h1>
209
191
  </div>
210
192
  <div id="widgets">
211
193
  <h1>3&#160; Widgets</h1>
@@ -316,16 +298,7 @@ RSpec.describe IsoDoc do
316
298
  <div id="scope">
317
299
  <h1>1&#160; Scope</h1>
318
300
  </div>
319
- <div id="terms"><h1>2&#160; Terms and definitions</h1><p>No terms and definitions are listed in this document.</p>
320
- <p>ISO and IEC maintain terminological databases for use in
321
- standardization at the following addresses:</p>
322
-
323
- <ul>
324
- <li> <p>ISO Online browsing platform: available at
325
- <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
326
- <li> <p>IEC Electropedia: available at
327
- <a href="http://www.electropedia.org">http://www.electropedia.org</a>
328
- </p> </li> </ul>
301
+ <div id="terms"><h1>2&#160; Terms and definitions</h1>
329
302
  </div>
330
303
  <div id="widgets">
331
304
  <h1>3&#160; Widgets</h1>
@@ -441,15 +414,7 @@ RSpec.describe IsoDoc do
441
414
  <a href="#N">Example</a>
442
415
  </p>
443
416
  </div>
444
- <div id="terms"><h1>2&#160; Terms and definitions</h1><p>No terms and definitions are listed in this document.</p>
445
- <p>ISO and IEC maintain terminological databases for use in
446
- standardization at the following addresses:</p>
447
- <ul>
448
- <li> <p>ISO Online browsing platform: available at
449
- <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
450
- <li> <p>IEC Electropedia: available at
451
- <a href="http://www.electropedia.org">http://www.electropedia.org</a>
452
- </p> </li> </ul>
417
+ <div id="terms"><h1>2&#160; Terms and definitions</h1>
453
418
  </div>
454
419
  <div id="widgets">
455
420
  <h1>3&#160; Widgets</h1>
@@ -563,16 +528,7 @@ standardization at the following addresses:</p>
563
528
  <a href="#N">Formula (1)</a>
564
529
  </p>
565
530
  </div>
566
- <div id="terms"><h1>2&#160; Terms and definitions</h1><p>No terms and definitions are listed in this document.</p>
567
- <p>ISO and IEC maintain terminological databases for use in
568
- standardization at the following addresses:</p>
569
-
570
- <ul>
571
- <li> <p>ISO Online browsing platform: available at
572
- <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
573
- <li> <p>IEC Electropedia: available at
574
- <a href="http://www.electropedia.org">http://www.electropedia.org</a>
575
- </p> </li> </ul>
531
+ <div id="terms"><h1>2&#160; Terms and definitions</h1>
576
532
  </div>
577
533
  <div id="widgets">
578
534
  <h1>3&#160; Widgets</h1>
@@ -724,16 +680,7 @@ standardization at the following addresses:</p>
724
680
  <a href="#N">Table 1</a>
725
681
  </p>
726
682
  </div>
727
- <div id="terms"><h1>2&#160; Terms and definitions</h1><p>No terms and definitions are listed in this document.</p>
728
- <p>ISO and IEC maintain terminological databases for use in
729
- standardization at the following addresses:</p>
730
-
731
- <ul>
732
- <li> <p>ISO Online browsing platform: available at
733
- <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
734
- <li> <p>IEC Electropedia: available at
735
- <a href="http://www.electropedia.org">http://www.electropedia.org</a>
736
- </p> </li> </ul>
683
+ <div id="terms"><h1>2&#160; Terms and definitions</h1>
737
684
  </div>
738
685
  <div id="widgets">
739
686
  <h1>3&#160; Widgets</h1>
@@ -804,17 +751,7 @@ standardization at the following addresses:</p>
804
751
  <div id="scope">
805
752
  <h1>1&#160; Scope</h1>
806
753
  </div>
807
- <div id="terms"><h1>2&#160; Terms and definitions</h1><p>For the purposes of this document,
808
- the following terms and definitions apply.</p>
809
- <p>ISO and IEC maintain terminological databases for use in
810
- standardization at the following addresses:</p>
811
-
812
- <ul>
813
- <li> <p>ISO Online browsing platform: available at
814
- <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
815
- <li> <p>IEC Electropedia: available at
816
- <a href="http://www.electropedia.org">http://www.electropedia.org</a>
817
- </p> </li> </ul>
754
+ <div id="terms"><h1>2&#160; Terms and definitions</h1>
818
755
  <p class="TermNum" id="_waxy_rice">2.1</p><p class="Terms" style="text-align:left;">waxy rice</p>
819
756
  <div class="Note"><p>Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div><p class="TermNum" id="_nonwaxy_rice">2.2</p><p class="Terms" style="text-align:left;">nonwaxy rice</p>
820
757
  <div class="Note"><p>Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div>
@@ -946,19 +883,8 @@ standardization at the following addresses:</p>
946
883
  </div>
947
884
  <div>
948
885
  <h1>2&#160; Normative references</h1>
949
- <p>There are no normative references in this document.</p>
950
886
  </div>
951
- <div id="H"><h1>3&#160; Terms, definitions, symbols and abbreviated terms</h1><p>For the purposes of this document,
952
- the following terms and definitions apply.</p>
953
- <p>ISO and IEC maintain terminological databases for use in
954
- standardization at the following addresses:</p>
955
-
956
- <ul>
957
- <li> <p>ISO Online browsing platform: available at
958
- <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
959
- <li> <p>IEC Electropedia: available at
960
- <a href="http://www.electropedia.org">http://www.electropedia.org</a>
961
- </p> </li> </ul>
887
+ <div id="H"><h1>3&#160; Terms, definitions, symbols and abbreviated terms</h1>
962
888
  <div id="I">
963
889
  <h2>3.1 Normal Terms</h2>
964
890
  <p class="TermNum" id="J">3.1.1</p>
@@ -1081,16 +1007,7 @@ standardization at the following addresses:</p>
1081
1007
  <li><p>A</p></li>
1082
1008
  </ol>
1083
1009
  </div>
1084
- <div id="terms"><h1>2&#160; Terms and definitions</h1><p>No terms and definitions are listed in this document.</p>
1085
- <p>ISO and IEC maintain terminological databases for use in
1086
- standardization at the following addresses:</p>
1087
-
1088
- <ul>
1089
- <li> <p>ISO Online browsing platform: available at
1090
- <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
1091
- <li> <p>IEC Electropedia: available at
1092
- <a href="http://www.electropedia.org">http://www.electropedia.org</a>
1093
- </p> </li> </ul>
1010
+ <div id="terms"><h1>2&#160; Terms and definitions</h1>
1094
1011
  </div>
1095
1012
  <div id="widgets">
1096
1013
  <h1>3&#160; Widgets</h1>
@@ -1196,16 +1113,7 @@ standardization at the following addresses:</p>
1196
1113
  <li id="N"><p>A</p></li>
1197
1114
  </ol>
1198
1115
  </div>
1199
- <div id="terms"><h1>2&#160; Terms and definitions</h1><p>No terms and definitions are listed in this document.</p>
1200
- <p>ISO and IEC maintain terminological databases for use in
1201
- standardization at the following addresses:</p>
1202
-
1203
- <ul>
1204
- <li> <p>ISO Online browsing platform: available at
1205
- <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
1206
- <li> <p>IEC Electropedia: available at
1207
- <a href="http://www.electropedia.org">http://www.electropedia.org</a>
1208
- </p> </li> </ul>
1116
+ <div id="terms"><h1>2&#160; Terms and definitions</h1>
1209
1117
  </div>
1210
1118
  <div id="widgets">
1211
1119
  <h1>3&#160; Widgets</h1>