isodoc 0.5.9 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/isodoc.gemspec +1 -0
  3. data/lib/isodoc.rb +2 -0
  4. data/lib/isodoc/convert.rb +17 -1
  5. data/lib/isodoc/footnotes.rb +8 -3
  6. data/lib/isodoc/html.rb +65 -27
  7. data/lib/isodoc/i18n-en.yaml +1 -1
  8. data/lib/isodoc/iso/convert.rb +46 -0
  9. data/lib/isodoc/iso/html/header.html +184 -0
  10. data/lib/isodoc/iso/html/html_iso_intro.html +34 -0
  11. data/lib/isodoc/iso/html/html_iso_titlepage.html +32 -0
  12. data/lib/isodoc/iso/html/htmlstyle.scss +46 -0
  13. data/lib/isodoc/iso/html/isodoc.scss +679 -0
  14. data/lib/isodoc/iso/html/scripts.html +174 -0
  15. data/lib/isodoc/iso/html/style-human.scss +1277 -0
  16. data/lib/isodoc/iso/html/style-iso.scss +1257 -0
  17. data/lib/isodoc/iso/html/word_iso_intro.html +72 -0
  18. data/lib/isodoc/iso/html/word_iso_titlepage.html +58 -0
  19. data/lib/isodoc/iso/html/wordstyle.scss +1135 -0
  20. data/lib/isodoc/iso/wordconvert.rb +34 -0
  21. data/lib/isodoc/iso2wordhtml.rb +17 -23
  22. data/lib/isodoc/section.rb +1 -1
  23. data/lib/isodoc/version.rb +1 -1
  24. data/lib/isodoc/wordconvert/comments.rb +0 -15
  25. data/lib/isodoc/wordconvert/convert.rb +1 -0
  26. data/lib/isodoc/wordconvert/footnotes.rb +0 -12
  27. data/lib/isodoc/wordconvert/postprocess.rb +110 -0
  28. data/lib/isodoc/wordconvert/wordconvertmodule.rb +18 -130
  29. data/lib/isodoc/xref_sect_gen.rb +7 -4
  30. data/spec/assets/scripts.html +3 -1
  31. data/spec/isodoc/blocks_spec.rb +97 -211
  32. data/spec/isodoc/cleanup_spec.rb +27 -0
  33. data/spec/isodoc/footnotes_spec.rb +40 -53
  34. data/spec/isodoc/i18n_spec.rb +4 -56
  35. data/spec/isodoc/inline_spec.rb +7 -98
  36. data/spec/isodoc/iso_spec.rb +89 -0
  37. data/spec/isodoc/lists_spec.rb +5 -57
  38. data/spec/isodoc/postproc_spec.rb +43 -79
  39. data/spec/isodoc/ref_spec.rb +4 -17
  40. data/spec/isodoc/section_spec.rb +11 -24
  41. data/spec/isodoc/table_spec.rb +61 -76
  42. data/spec/isodoc/terms_spec.rb +1 -13
  43. data/spec/isodoc/xref_spec.rb +21 -164
  44. data/spec/spec_helper.rb +21 -1
  45. metadata +31 -2
@@ -69,15 +69,7 @@ RSpec.describe IsoDoc do
69
69
  </bibliography>
70
70
  </iso-standard>
71
71
  INPUT
72
- <html xmlns:epub="http://www.idpf.org/2007/ops">
73
- <head>
74
- <title>test</title>
75
- <body lang="EN-US" link="blue" vlink="#954F72">
76
- <div class="WordSection1">
77
- <p>&#160;</p>
78
- </div>
79
- <br/>
80
- <div class="WordSection2">
72
+ #{HTML_HDR}
81
73
  <br/>
82
74
  <div>
83
75
  <h1 class="ForewordTitle">Foreword</h1>
@@ -91,10 +83,6 @@ RSpec.describe IsoDoc do
91
83
  </div>
92
84
  <p>This is patent boilerplate</p>
93
85
  </div>
94
- <p>&#160;</p>
95
- </div>
96
- <br/>
97
- <div class="WordSection3">
98
86
  <p class="zzSTDTitle1"/>
99
87
  <div id="D">
100
88
  <h1>1.&#160; Scope</h1>
@@ -164,7 +152,6 @@ RSpec.describe IsoDoc do
164
152
  </div>
165
153
  </div>
166
154
  </body>
167
- </head>
168
155
  </html>
169
156
  OUTPUT
170
157
  end
@@ -240,6 +227,7 @@ OUTPUT
240
227
  <html xmlns:epub="http://www.idpf.org/2007/ops">
241
228
  <head>
242
229
  <title>test</title>
230
+ </head>
243
231
  <body lang="EN-US" link="blue" vlink="#954F72">
244
232
  <div class="WordSection1">
245
233
  <p>&#160;</p>
@@ -333,7 +321,6 @@ OUTPUT
333
321
  </div>
334
322
  </div>
335
323
  </body>
336
- </head>
337
324
  </html>
338
325
  OUTPUT
339
326
  end
@@ -353,6 +340,7 @@ OUTPUT
353
340
  <html xmlns:epub="http://www.idpf.org/2007/ops">
354
341
  <head>
355
342
  <title>test</title>
343
+ </head>
356
344
  <body lang="EN-US" link="blue" vlink="#954F72">
357
345
  <div class="WordSection1">
358
346
  <p>&#160;</p>
@@ -380,7 +368,6 @@ OUTPUT
380
368
  </div>
381
369
  </div>
382
370
  </body>
383
- </head>
384
371
  </html>
385
372
  OUTPUT
386
373
  end
@@ -388,7 +375,7 @@ OUTPUT
388
375
  it "processes terms & definitions with external source" do
389
376
  expect(IsoDoc::Convert.new({}).convert_file(<<~"INPUT", "test", true)).to be_equivalent_to <<~"OUTPUT"
390
377
  <iso-standard xmlns="http://riboseinc.com/isoxml">
391
- <termdocsource type="inline" target="ISO712"/>
378
+ <termdocsource type="inline" bibitemid="ISO712"/>
392
379
  <sections>
393
380
  <terms id="H" obligation="normative"><title>Terms, Definitions, Symbols and Abbreviated Terms</title>
394
381
  <term id="J">
@@ -414,6 +401,7 @@ OUTPUT
414
401
  <html xmlns:epub="http://www.idpf.org/2007/ops">
415
402
  <head>
416
403
  <title>test</title>
404
+ </head>
417
405
  <body lang="EN-US" link="blue" vlink="#954F72">
418
406
  <div class="WordSection1">
419
407
  <p>&#160;</p>
@@ -446,7 +434,6 @@ OUTPUT
446
434
  </div>
447
435
  </div>
448
436
  </body>
449
- </head>
450
437
  </html>
451
438
  OUTPUT
452
439
  end
@@ -454,9 +441,9 @@ OUTPUT
454
441
  it "processes empty terms & definitions with external source" do
455
442
  expect(IsoDoc::Convert.new({}).convert_file(<<~"INPUT", "test", true)).to be_equivalent_to <<~"OUTPUT"
456
443
  <iso-standard xmlns="http://riboseinc.com/isoxml">
457
- <termdocsource type="inline" target="ISO712"/>
458
- <termdocsource type="inline" target="ISO712"/>
459
- <termdocsource type="inline" target="ISO712"/>
444
+ <termdocsource type="inline" bibitemid="ISO712"/>
445
+ <termdocsource type="inline" bibitemid="ISO712"/>
446
+ <termdocsource type="inline" bibitemid="ISO712"/>
460
447
  <sections>
461
448
  <terms id="H" obligation="normative"><title>Terms, Definitions, Symbols and Abbreviated Terms</title>
462
449
  </terms>
@@ -479,6 +466,7 @@ OUTPUT
479
466
  <html xmlns:epub="http://www.idpf.org/2007/ops">
480
467
  <head>
481
468
  <title>test</title>
469
+ </head>
482
470
  <body lang="EN-US" link="blue" vlink="#954F72">
483
471
  <div class="WordSection1">
484
472
  <p>&#160;</p>
@@ -509,7 +497,6 @@ OUTPUT
509
497
  </div>
510
498
  </div>
511
499
  </body>
512
- </head>
513
500
  </html>
514
501
  OUTPUT
515
502
  end
@@ -527,6 +514,7 @@ OUTPUT
527
514
  <html xmlns:epub="http://www.idpf.org/2007/ops">
528
515
  <head>
529
516
  <title>test</title>
517
+ </head>
530
518
  <body lang="EN-US" link="blue" vlink="#954F72">
531
519
  <div class="WordSection1">
532
520
  <p>&#160;</p>
@@ -551,7 +539,6 @@ OUTPUT
551
539
  </div>
552
540
  </div>
553
541
  </body>
554
- </head>
555
542
  </html>
556
543
  OUTPUT
557
544
  end
@@ -573,6 +560,7 @@ OUTPUT
573
560
  <html xmlns:epub="http://www.idpf.org/2007/ops">
574
561
  <head>
575
562
  <title>test</title>
563
+ </head>
576
564
  <body lang="EN-US" link="blue" vlink="#954F72">
577
565
  <div class="WordSection1">
578
566
  <p>&#160;</p>
@@ -595,7 +583,6 @@ OUTPUT
595
583
  </div>
596
584
  </div>
597
585
  </body>
598
- </head>
599
586
  </html>
600
587
  OUTPUT
601
588
  end
@@ -59,81 +59,66 @@ RSpec.describe IsoDoc do
59
59
  </preface>
60
60
  </iso-standard>
61
61
  INPUT
62
- <html xmlns:epub="http://www.idpf.org/2007/ops">
63
- <head>
64
- <title>test</title>
65
- <body lang="EN-US" link="blue" vlink="#954F72">
66
- <div class="WordSection1">
67
- <p>&#160;</p>
68
- </div>
69
- <br/>
70
- <div class="WordSection2">
71
- <br/>
72
- <div>
73
- <h1 class="ForewordTitle">Foreword</h1>
74
- <p class="TableTitle" align="center">
75
- Table 1&#160;&#8212; Repeatability and reproducibility of husked rice yield
76
- </p>
77
- <table id="tableD-1" class="MsoISOTable" border="1" cellspacing="0" cellpadding="0">
78
- <thead>
79
- <tr>
80
- <td rowspan="2" align="left" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">Description</td>
81
- <td colspan="4" align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;">Rice sample</td>
82
- </tr>
83
- <tr>
84
- <td align="left" style="border-top:none;border-bottom:solid windowtext 1.5pt;">Arborio</td>
85
- <td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">Drago<a href="#tableD-1a" class="TableFootnoteRef">a</a><aside class="footnote"><div id="ftntableD-1a"><a id="tableD-1a" class="TableFootnoteRef">a&#160; </a>
86
- <p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p>
87
- </div></aside></td>
88
- <td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">Balilla<a href="#tableD-1a" class="TableFootnoteRef">a</a></td>
89
- <td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">Thaibonnet</td>
90
- </tr>
91
- </thead>
92
- <tbody>
93
- <tr>
94
- <td align="left" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;">Number of laboratories retained after eliminating outliers</td>
95
- <td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;">13</td>
96
- <td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;">11</td>
97
- <td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;">13</td>
98
- <td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;">13</td>
99
- </tr>
100
- <tr>
101
- <td align="left" style="border-top:none;border-bottom:solid windowtext 1.5pt;">Mean value, g/100 g</td>
102
- <td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">81,2</td>
103
- <td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">82,0</td>
104
- <td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">81,8</td>
105
- <td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">77,7</td>
106
- </tr>
107
- </tbody>
108
- <tfoot>
109
- <tr>
110
- <td align="left" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">Reproducibility limit, <span class="stem">(#(R)#)</span> (= 2,83 <span class="stem">(#(s_R)#)</span>)</td>
111
- <td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">2,89</td>
112
- <td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">0,57</td>
113
- <td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">2,26</td>
114
- <td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">6,06</td>
115
- </tr>
116
- </tfoot>
117
- <dl>
118
- <dt>
119
- <p>Drago</p>
120
- </dt>
121
- <dd>A type of rice</dd>
122
- </dl>
123
- <div id="" class="Note">
124
- <p class="Note"><span class="note_label">NOTE</span>&#160; This is a table about rice</p>
125
- </div>
126
- </table>
127
- </div>
128
- <p>&#160;</p>
129
- </div>
130
- <br/>
131
- <div class="WordSection3">
132
- <p class="zzSTDTitle1"/>
133
- </div>
134
- </body>
135
- </head>
136
- </html>
62
+ #{HTML_HDR}
63
+ <br/>
64
+ <div>
65
+ <h1 class="ForewordTitle">Foreword</h1>
66
+ <p class="TableTitle" align="center">Table 1&#160;&#8212; Repeatability and reproducibility of husked rice yield</p>
67
+ <table id="tableD-1" class="MsoISOTable" border="1" cellspacing="0" cellpadding="0">
68
+ <thead>
69
+ <tr>
70
+ <td rowspan="2" align="left" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">Description</td>
71
+ <td colspan="4" align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;">Rice sample</td>
72
+ </tr>
73
+ <tr>
74
+ <td align="left" style="border-top:none;border-bottom:solid windowtext 1.5pt;">Arborio</td>
75
+ <td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">Drago<a href="#tableD-1a" class="TableFootnoteRef">a</a><aside class="footnote"><div id="fn:tableD-1a"><a id="tableD-1a" class="TableFootnoteRef">a&#160; </a>
76
+ <p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p>
77
+ </div></aside></td>
78
+ <td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">Balilla<a href="#tableD-1a" class="TableFootnoteRef">a</a></td>
79
+ <td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">Thaibonnet</td>
80
+ </tr>
81
+ </thead>
82
+ <tbody>
83
+ <tr>
84
+ <td align="left" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;">Number of laboratories retained after eliminating outliers</td>
85
+ <td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;">13</td>
86
+ <td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;">11</td>
87
+ <td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;">13</td>
88
+ <td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;">13</td>
89
+ </tr>
90
+ <tr>
91
+ <td align="left" style="border-top:none;border-bottom:solid windowtext 1.5pt;">Mean value, g/100 g</td>
92
+ <td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">81,2</td>
93
+ <td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">82,0</td>
94
+ <td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">81,8</td>
95
+ <td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">77,7</td>
96
+ </tr>
97
+ </tbody>
98
+ <tfoot>
99
+ <tr>
100
+ <td align="left" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">Reproducibility limit, <span class="stem">(#(R)#)</span> (= 2,83 <span class="stem">(#(s_R)#)</span>)</td>
101
+ <td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">2,89</td>
102
+ <td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">0,57</td>
103
+ <td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">2,26</td>
104
+ <td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">6,06</td>
105
+ </tr>
106
+ </tfoot>
107
+ <dl>
108
+ <dt>
109
+ <p>Drago</p>
110
+ </dt>
111
+ <dd>A type of rice</dd>
112
+ </dl>
113
+ <div id="" class="Note">
114
+ <p class="Note"><span class="note_label">NOTE</span>&#160; This is a table about rice</p>
115
+ </div>
116
+ </table>
117
+ </div>
118
+ <p class="zzSTDTitle1"/>
119
+ </div>
120
+ </body>
121
+ </html>
137
122
  OUTPUT
138
123
  end
139
124
 
@@ -198,6 +183,7 @@ RSpec.describe IsoDoc do
198
183
  <html xmlns:epub="http://www.idpf.org/2007/ops">
199
184
  <head>
200
185
  <title>test</title>
186
+ </head>
201
187
  <body lang="EN-US" link="blue" vlink="#954F72">
202
188
  <div class="WordSection1">
203
189
  <p>&#160;</p>
@@ -268,7 +254,6 @@ RSpec.describe IsoDoc do
268
254
  <p class="zzSTDTitle1"/>
269
255
  </div>
270
256
  </body>
271
- </head>
272
257
  </html>
273
258
  OUTPUT
274
259
  end
@@ -52,19 +52,7 @@ RSpec.describe IsoDoc do
52
52
  </sections>
53
53
  </iso-standard>
54
54
  INPUT
55
- <html xmlns:epub="http://www.idpf.org/2007/ops">
56
- <head>
57
- <title>test</title>
58
- <body lang="EN-US" link="blue" vlink="#954F72">
59
- <div class="WordSection1">
60
- <p>&#160;</p>
61
- </div>
62
- <br/>
63
- <div class="WordSection2">
64
- <p>&#160;</p>
65
- </div>
66
- <br/>
67
- <div class="WordSection3">
55
+ #{HTML_HDR}
68
56
  <p class="zzSTDTitle1"/>
69
57
  <div id="_terms_and_definitions"><h1>1.&#160; Terms and Definitions</h1><p>For the purposes of this document,
70
58
  the following terms and definitions apply.</p>
@@ -55,16 +55,8 @@ RSpec.describe IsoDoc do
55
55
  </annex>
56
56
  </iso-standard>
57
57
  INPUT
58
- <html xmlns:epub="http://www.idpf.org/2007/ops">
59
- <head>
60
- <title>test</title>
61
- <body lang="EN-US" link="blue" vlink="#954F72">
62
- <div class="WordSection1">
63
- <p>&#160;</p>
64
- </div>
65
- <br/>
66
- <div class="WordSection2">
67
- <br/>
58
+ #{HTML_HDR}
59
+ <br/>
68
60
  <div>
69
61
  <h1 class="ForewordTitle">Foreword</h1>
70
62
  <p>
@@ -76,10 +68,6 @@ RSpec.describe IsoDoc do
76
68
  <a href="#Anote2">A.2, Note 2</a>
77
69
  </p>
78
70
  </div>
79
- <p>&#160;</p>
80
- </div>
81
- <br/>
82
- <div class="WordSection3">
83
71
  <p class="zzSTDTitle1"/>
84
72
  <div id="scope">
85
73
  <h1>1.&#160; Scope</h1>
@@ -122,7 +110,6 @@ RSpec.describe IsoDoc do
122
110
  </div>
123
111
  </div>
124
112
  </body>
125
- </head>
126
113
  </html>
127
114
  OUTPUT
128
115
  end
@@ -185,16 +172,8 @@ RSpec.describe IsoDoc do
185
172
  </annex>
186
173
  </iso-standard>
187
174
  INPUT
188
- <html xmlns:epub="http://www.idpf.org/2007/ops">
189
- <head>
190
- <title>test</title>
191
- <body lang="EN-US" link="blue" vlink="#954F72">
192
- <div class="WordSection1">
193
- <p>&#160;</p>
194
- </div>
195
- <br/>
196
- <div class="WordSection2">
197
- <br/>
175
+ #{HTML_HDR}
176
+ <br/>
198
177
  <div id="fwd">
199
178
  <h1 class="ForewordTitle">Foreword</h1>
200
179
  <p>
@@ -206,10 +185,6 @@ RSpec.describe IsoDoc do
206
185
  <a href="#Anote2">Figure A.3</a>
207
186
  </p>
208
187
  </div>
209
- <p>&#160;</p>
210
- </div>
211
- <br/>
212
- <div class="WordSection3">
213
188
  <p class="zzSTDTitle1"/>
214
189
  <div id="scope">
215
190
  <h1>1.&#160; Scope</h1>
@@ -267,7 +242,6 @@ RSpec.describe IsoDoc do
267
242
  </div>
268
243
  </div>
269
244
  </body>
270
- </head>
271
245
  </html>
272
246
  OUTPUT
273
247
  end
@@ -325,16 +299,8 @@ RSpec.describe IsoDoc do
325
299
  </annex>
326
300
  </iso-standard>
327
301
  INPUT
328
- <html xmlns:epub="http://www.idpf.org/2007/ops">
329
- <head>
330
- <title>test</title>
331
- <body lang="EN-US" link="blue" vlink="#954F72">
332
- <div class="WordSection1">
333
- <p>&#160;</p>
334
- </div>
335
- <br/>
336
- <div class="WordSection2">
337
- <br/>
302
+ #{HTML_HDR}
303
+ <br/>
338
304
  <div id="fwd">
339
305
  <h1 class="ForewordTitle">Foreword</h1>
340
306
  <p>
@@ -346,10 +312,6 @@ RSpec.describe IsoDoc do
346
312
  <a href="#Anote2">Figure A.1-2</a>
347
313
  </p>
348
314
  </div>
349
- <p>&#160;</p>
350
- </div>
351
- <br/>
352
- <div class="WordSection3">
353
315
  <p class="zzSTDTitle1"/>
354
316
  <div id="scope">
355
317
  <h1>1.&#160; Scope</h1>
@@ -400,7 +362,6 @@ RSpec.describe IsoDoc do
400
362
  </div>
401
363
  </div>
402
364
  </body>
403
- </head>
404
365
  </html>
405
366
  OUTPUT
406
367
  end
@@ -457,16 +418,8 @@ RSpec.describe IsoDoc do
457
418
  </annex>
458
419
  </iso-standard>
459
420
  INPUT
460
- <html xmlns:epub="http://www.idpf.org/2007/ops">
461
- <head>
462
- <title>test</title>
463
- <body lang="EN-US" link="blue" vlink="#954F72">
464
- <div class="WordSection1">
465
- <p>&#160;</p>
466
- </div>
467
- <br/>
468
- <div class="WordSection2">
469
- <br/>
421
+ #{HTML_HDR}
422
+ <br/>
470
423
  <div>
471
424
  <h1 class="ForewordTitle">Foreword</h1>
472
425
  <p>
@@ -478,10 +431,6 @@ RSpec.describe IsoDoc do
478
431
  <a href="#Anote2">A.2, Example 2</a>
479
432
  </p>
480
433
  </div>
481
- <p>&#160;</p>
482
- </div>
483
- <br/>
484
- <div class="WordSection3">
485
434
  <p class="zzSTDTitle1"/>
486
435
  <div id="scope">
487
436
  <h1>1.&#160; Scope</h1>
@@ -538,7 +487,6 @@ RSpec.describe IsoDoc do
538
487
  </div>
539
488
  </div>
540
489
  </body>
541
- </head>
542
490
  </html>
543
491
  OUTPUT
544
492
  end
@@ -609,16 +557,8 @@ RSpec.describe IsoDoc do
609
557
  </preface>
610
558
  </iso-standard>
611
559
  INPUT
612
- <html xmlns:epub="http://www.idpf.org/2007/ops">
613
- <head>
614
- <title>test</title>
615
- <body lang="EN-US" link="blue" vlink="#954F72">
616
- <div class="WordSection1">
617
- <p>&#160;</p>
618
- </div>
619
- <br/>
620
- <div class="WordSection2">
621
- <br/>
560
+ #{HTML_HDR}
561
+ <br/>
622
562
  <div>
623
563
  <h1 class="ForewordTitle">Foreword</h1>
624
564
  <p>
@@ -630,10 +570,6 @@ RSpec.describe IsoDoc do
630
570
  <a href="#Anote2">A.2, Formula (A.3)</a>
631
571
  </p>
632
572
  </div>
633
- <p>&#160;</p>
634
- </div>
635
- <br/>
636
- <div class="WordSection3">
637
573
  <p class="zzSTDTitle1"/>
638
574
  <div id="scope">
639
575
  <h1>1.&#160; Scope</h1>
@@ -673,7 +609,6 @@ RSpec.describe IsoDoc do
673
609
  </div>
674
610
  </div>
675
611
  </body>
676
- </head>
677
612
  </html>
678
613
  OUTPUT
679
614
  end
@@ -772,16 +707,8 @@ RSpec.describe IsoDoc do
772
707
  </annex>
773
708
  </iso-standard>
774
709
  INPUT
775
- <html xmlns:epub="http://www.idpf.org/2007/ops">
776
- <head>
777
- <title>test</title>
778
- <body lang="EN-US" link="blue" vlink="#954F72">
779
- <div class="WordSection1">
780
- <p>&#160;</p>
781
- </div>
782
- <br/>
783
- <div class="WordSection2">
784
- <br/>
710
+ #{HTML_HDR}
711
+ <br/>
785
712
  <div>
786
713
  <h1 class="ForewordTitle">Foreword</h1>
787
714
  <p>
@@ -793,10 +720,6 @@ RSpec.describe IsoDoc do
793
720
  <a href="#Anote2">Table A.3</a>
794
721
  </p>
795
722
  </div>
796
- <p>&#160;</p>
797
- </div>
798
- <br/>
799
- <div class="WordSection3">
800
723
  <p class="zzSTDTitle1"/>
801
724
  <div id="scope">
802
725
  <h1>1.&#160; Scope</h1>
@@ -847,7 +770,6 @@ RSpec.describe IsoDoc do
847
770
  </div>
848
771
  </div>
849
772
  </body>
850
- </head>
851
773
  </html>
852
774
  OUTPUT
853
775
  end
@@ -883,16 +805,8 @@ RSpec.describe IsoDoc do
883
805
 
884
806
  </iso-standard>
885
807
  INPUT
886
- <html xmlns:epub="http://www.idpf.org/2007/ops">
887
- <head>
888
- <title>test</title>
889
- <body lang="EN-US" link="blue" vlink="#954F72">
890
- <div class="WordSection1">
891
- <p>&#160;</p>
892
- </div>
893
- <br/>
894
- <div class="WordSection2">
895
- <br/>
808
+ #{HTML_HDR}
809
+ <br/>
896
810
  <div>
897
811
  <h1 class="ForewordTitle">Foreword</h1>
898
812
  <p>
@@ -901,10 +815,6 @@ RSpec.describe IsoDoc do
901
815
  <a href="#note3">2.2, Note 2</a>
902
816
  </p>
903
817
  </div>
904
- <p>&#160;</p>
905
- </div>
906
- <br/>
907
- <div class="WordSection3">
908
818
  <p class="zzSTDTitle1"/>
909
819
  <div id="scope">
910
820
  <h1>1.&#160; Scope</h1>
@@ -926,7 +836,6 @@ RSpec.describe IsoDoc do
926
836
  <div class="Note"><p class="Note">Note 2 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div></div>
927
837
  </div>
928
838
  </body>
929
- </head>
930
839
  </html>
931
840
  OUTPUT
932
841
  end
@@ -1015,15 +924,7 @@ RSpec.describe IsoDoc do
1015
924
  </bibliography>
1016
925
  </iso-standard>
1017
926
  INPUT
1018
- <html xmlns:epub="http://www.idpf.org/2007/ops">
1019
- <head>
1020
- <title>test</title>
1021
- <body lang="EN-US" link="blue" vlink="#954F72">
1022
- <div class="WordSection1">
1023
- <p>&#160;</p>
1024
- </div>
1025
- <br/>
1026
- <div class="WordSection2">
927
+ #{HTML_HDR}
1027
928
  <br/>
1028
929
  <div>
1029
930
  <h1 class="ForewordTitle">Foreword</h1>
@@ -1053,10 +954,6 @@ RSpec.describe IsoDoc do
1053
954
  </div>
1054
955
  <p>This is patent boilerplate</p>
1055
956
  </div>
1056
- <p>&#160;</p>
1057
- </div>
1058
- <br/>
1059
- <div class="WordSection3">
1060
957
  <p class="zzSTDTitle1"/>
1061
958
  <div id="D">
1062
959
  <h1>1.&#160; Scope</h1>
@@ -1125,7 +1022,6 @@ RSpec.describe IsoDoc do
1125
1022
  </div>
1126
1023
  </div>
1127
1024
  </body>
1128
- </head>
1129
1025
  </html>
1130
1026
  OUTPUT
1131
1027
  end
@@ -1180,16 +1076,8 @@ RSpec.describe IsoDoc do
1180
1076
  </annex>
1181
1077
  </iso-standard>
1182
1078
  INPUT
1183
- <html xmlns:epub="http://www.idpf.org/2007/ops">
1184
- <head>
1185
- <title>test</title>
1186
- <body lang="EN-US" link="blue" vlink="#954F72">
1187
- <div class="WordSection1">
1188
- <p>&#160;</p>
1189
- </div>
1190
- <br/>
1191
- <div class="WordSection2">
1192
- <br/>
1079
+ #{HTML_HDR}
1080
+ <br/>
1193
1081
  <div>
1194
1082
  <h1 class="ForewordTitle">Foreword</h1>
1195
1083
  <p>
@@ -1201,10 +1089,6 @@ RSpec.describe IsoDoc do
1201
1089
  <a href="#Anote2">A.2, List 2</a>
1202
1090
  </p>
1203
1091
  </div>
1204
- <p>&#160;</p>
1205
- </div>
1206
- <br/>
1207
- <div class="WordSection3">
1208
1092
  <p class="zzSTDTitle1"/>
1209
1093
  <div id="scope">
1210
1094
  <h1>1.&#160; Scope</h1>
@@ -1252,7 +1136,6 @@ RSpec.describe IsoDoc do
1252
1136
  </div>
1253
1137
  </div>
1254
1138
  </body>
1255
- </head>
1256
1139
  </html>
1257
1140
  OUTPUT
1258
1141
  end
@@ -1307,16 +1190,8 @@ RSpec.describe IsoDoc do
1307
1190
  </annex>
1308
1191
  </iso-standard>
1309
1192
  INPUT
1310
- <html xmlns:epub="http://www.idpf.org/2007/ops">
1311
- <head>
1312
- <title>test</title>
1313
- <body lang="EN-US" link="blue" vlink="#954F72">
1314
- <div class="WordSection1">
1315
- <p>&#160;</p>
1316
- </div>
1317
- <br/>
1318
- <div class="WordSection2">
1319
- <br/>
1193
+ #{HTML_HDR}
1194
+ <br/>
1320
1195
  <div>
1321
1196
  <h1 class="ForewordTitle">Foreword</h1>
1322
1197
  <p>
@@ -1328,10 +1203,6 @@ RSpec.describe IsoDoc do
1328
1203
  <a href="#Anote2">A.2, List 2 a)</a>
1329
1204
  </p>
1330
1205
  </div>
1331
- <p>&#160;</p>
1332
- </div>
1333
- <br/>
1334
- <div class="WordSection3">
1335
1206
  <p class="zzSTDTitle1"/>
1336
1207
  <div id="scope">
1337
1208
  <h1>1.&#160; Scope</h1>
@@ -1379,7 +1250,6 @@ RSpec.describe IsoDoc do
1379
1250
  </div>
1380
1251
  </div>
1381
1252
  </body>
1382
- </head>
1383
1253
  </html>
1384
1254
  OUTPUT
1385
1255
  end
@@ -1423,16 +1293,8 @@ RSpec.describe IsoDoc do
1423
1293
  </sections>
1424
1294
  </iso-standard>
1425
1295
  INPUT
1426
- <html xmlns:epub="http://www.idpf.org/2007/ops">
1427
- <head>
1428
- <title>test</title>
1429
- <body lang="EN-US" link="blue" vlink="#954F72">
1430
- <div class="WordSection1">
1431
- <p>&#160;</p>
1432
- </div>
1433
- <br/>
1434
- <div class="WordSection2">
1435
- <br/>
1296
+ #{HTML_HDR}
1297
+ <br/>
1436
1298
  <div>
1437
1299
  <h1 class="ForewordTitle">Foreword</h1>
1438
1300
  <p>
@@ -1444,10 +1306,6 @@ RSpec.describe IsoDoc do
1444
1306
  <a href="#Anote2">Clause 1, a.1.i.A.I.a)</a>
1445
1307
  </p>
1446
1308
  </div>
1447
- <p>&#160;</p>
1448
- </div>
1449
- <br/>
1450
- <div class="WordSection3">
1451
1309
  <p class="zzSTDTitle1"/>
1452
1310
  <div id="scope">
1453
1311
  <h1>1.&#160; Scope</h1>
@@ -1472,7 +1330,6 @@ RSpec.describe IsoDoc do
1472
1330
  </div>
1473
1331
  </div>
1474
1332
  </body>
1475
- </head>
1476
1333
  </html>
1477
1334
  OUTPUT
1478
1335
  end