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
@@ -52,6 +52,33 @@ RSpec.describe IsoDoc do
52
52
  OUTPUT
53
53
  end
54
54
 
55
+ it "cleans up figures (Word)" do
56
+ expect(IsoDoc::WordConvert.new({}).cleanup(Nokogiri::XML(<<~"INPUT")).to_s).to be_equivalent_to <<~"OUTPUT"
57
+ <html xmlns:epub="http://www.idpf.org/2007/ops">
58
+ <body>
59
+ <div class="figure">
60
+ <p>Warning</p>
61
+ <a href="#tableD-1a" class="TableFootnoteRef">a</a><aside><div id="ftntableD-1a"><a id="tableD-1a" class="TableFootnoteRef">a<span style="mso-tab-count:1">&#160; </span></a>
62
+ <p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p>
63
+ </div></aside>
64
+ </div>
65
+ </body>
66
+ </html>
67
+ INPUT
68
+ <?xml version="1.0"?>
69
+ <html xmlns:epub="http://www.idpf.org/2007/ops">
70
+ <body>
71
+ <div class="figure">
72
+ <p>Warning</p>
73
+ <aside><div id="ftntableD-1a">
74
+
75
+ </div></aside>
76
+ <p><b/></p><table class="dl"><tr><td valign="top" align="left"><a id="tableD-1a" class="TableFootnoteRef">a<span style="mso-tab-count:1">&#xA0; </span></a></td><td valign="top"><p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p></td></tr></table></div>
77
+ </body>
78
+ </html>
79
+ OUTPUT
80
+ end
81
+
55
82
  it "cleans up inline headers" do
56
83
  expect(IsoDoc::Convert.new({}).cleanup(Nokogiri::XML(<<~"INPUT")).to_s).to be_equivalent_to <<~"OUTPUT"
57
84
  <html xmlns:epub="http://www.idpf.org/2007/ops">
@@ -19,41 +19,28 @@ RSpec.describe IsoDoc do
19
19
  </preface>
20
20
  </iso-standard>
21
21
  INPUT
22
- <html xmlns:epub="http://www.idpf.org/2007/ops">
23
- <head>
24
- <title>test</title>
25
- <body lang="EN-US" link="blue" vlink="#954F72">
26
- <div class="WordSection1">
27
- <p>&#160;</p>
28
- </div>
29
- <br/>
30
- <div class="WordSection2">
22
+ #{HTML_HDR}
31
23
  <br/>
32
24
  <div>
33
25
  <h1 class="ForewordTitle">Foreword</h1>
34
- <p>A.<a href="#ftn2" epub:type="footnote"><sup>2</sup></a></p>
35
- <p>B.<a href="#ftn2" epub:type="footnote"><sup>2</sup></a></p>
36
- <p>C.<a href="#ftn1" epub:type="footnote"><sup>1</sup></a></p>
26
+ <p>A.<a rel="footnote" href="#fn:2" epub:type="footnote"><sup>2</sup></a></p>
27
+ <p>B.<a rel="footnote" href="#fn:2" epub:type="footnote"><sup>2</sup></a></p>
28
+ <p>C.<a rel="footnote" href="#fn:1" epub:type="footnote"><sup>1</sup></a></p>
37
29
  </div>
38
- <p>&#160;</p>
39
- </div>
40
- <br/>
41
- <div class="WordSection3">
42
30
  <p class="zzSTDTitle1"/>
43
- <aside id="ftn2" class="footnote">
44
- <p id="_1e228e29-baef-4f38-b048-b05a051747e4">Formerly denoted as 15 % (m/m).</p>
45
- </aside>
46
- <aside id="ftn1" class="footnote">
47
- <p id="_1e228e29-baef-4f38-b048-b05a051747e4">Hello! denoted as 15 % (m/m).</p>
48
- </aside>
31
+ <aside id="fn:2" class="footnote">
32
+ <p id="_1e228e29-baef-4f38-b048-b05a051747e4">Formerly denoted as 15 % (m/m).</p>
33
+ </aside>
34
+ <aside id="fn:1" class="footnote">
35
+ <p id="_1e228e29-baef-4f38-b048-b05a051747e4">Hello! denoted as 15 % (m/m).</p>
36
+ </aside>
49
37
  </div>
50
38
  </body>
51
- </head>
52
39
  </html>
53
40
  OUTPUT
54
- end
55
-
56
- it "processes IsoXML footnotes (Word)" do
41
+ end
42
+
43
+ it "processes IsoXML footnotes (Word)" do
57
44
  expect(IsoDoc::WordConvert.new({}).convert_file(<<~"INPUT", "test", true)).to be_equivalent_to <<~"OUTPUT"
58
45
  <iso-standard xmlns="http://riboseinc.com/isoxml">
59
46
  <preface>
@@ -74,6 +61,7 @@ RSpec.describe IsoDoc do
74
61
  <html xmlns:epub="http://www.idpf.org/2007/ops">
75
62
  <head>
76
63
  <title>test</title>
64
+ </head>
77
65
  <body lang="EN-US" link="blue" vlink="#954F72">
78
66
  <div class="WordSection1">
79
67
  <p>&#160;</p>
@@ -100,10 +88,9 @@ RSpec.describe IsoDoc do
100
88
  </aside>
101
89
  </div>
102
90
  </body>
103
- </head>
104
91
  </html>
105
92
  OUTPUT
106
- end
93
+ end
107
94
 
108
95
  it "processes IsoXML reviewer notes" do
109
96
  system "rm -f test.html"
@@ -126,14 +113,18 @@ RSpec.describe IsoDoc do
126
113
  INPUT
127
114
  html = File.read("test.html").sub(/^.*<body/m, "<body").sub(%r{</body>.*$}m, "</body>")
128
115
  expect(html).to be_equivalent_to <<~"OUTPUT"
129
- <body lang="EN-US" link="blue" vlink="#954F72" xml:lang="EN-US">
130
- <div class="WordSection1">
131
- <p>&#xA0;</p>
132
- </div>
133
- <br />
134
- <div class="WordSection2">
135
- <br />
136
- <div>
116
+ <body lang="EN-US" link="blue" vlink="#954F72" xml:lang="EN-US">
117
+ <div class="WordSection1">
118
+ <p>&#xA0;</p>
119
+ </div>
120
+ <br />
121
+ <div class="WordSection2">
122
+ <p>&#xA0;</p>
123
+ </div>
124
+ <br />
125
+ <main class="WordSection3"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
126
+ <br />
127
+ <div>
137
128
  <h1 class="ForewordTitle">Foreword</h1>
138
129
  <span style="MsoCommentReference" target="1" class="commentLink" from="A" to="B">
139
130
  <span lang="EN-GB" style="font-size:9.0pt" xml:lang="EN-GB">
@@ -147,28 +138,24 @@ RSpec.describe IsoDoc do
147
138
  </span>
148
139
  </span>
149
140
  <span style="mso-comment-continuation:3"><span style="mso-comment-continuation:1"><p id="B">B.</p></span></span>
150
-
141
+
151
142
  <span style="MsoCommentReference" target="2" class="commentLink" from="C" to="C">
152
143
  <span lang="EN-GB" style="font-size:9.0pt" xml:lang="EN-GB">
153
144
  <a style="mso-comment-reference:SMC_2;mso-comment-date:20170108T0000"><span style="mso-comment-continuation:3"><p id="C">C.</p></span></a>
154
145
  <span style="mso-special-character:comment" target="2"></span>
155
146
  </span>
156
147
  </span>
157
-
148
+
158
149
  </div>
159
150
  <br />
160
151
  <div class="Section3" id="">
161
152
  <h1 class="IntroTitle">Introduction</h1>
162
-
153
+
163
154
  </div>
164
- <p>&#xA0;</p>
165
- </div>
166
- <br />
167
- <div class="WordSection3">
168
155
  <p class="zzSTDTitle1"></p>
169
156
  <div style="mso-element:comment-list"><div style="mso-element:comment" id="3">
170
157
  <span style="mso-comment-author:&quot;ISO&quot;"></span>
171
-
158
+
172
159
  <p class="MsoCommentText" id="_c54b9549-369f-4f85-b5b2-9db3fd3d4c08"><span style="MsoCommentReference">
173
160
  <span lang="EN-GB" style="font-size:9.0pt" xml:lang="EN-GB">
174
161
  <span style="mso-special-character:comment"></span>
@@ -179,7 +166,7 @@ RSpec.describe IsoDoc do
179
166
  <p class="MsoCommentText" id="_f1a8b9da-ca75-458b-96fa-d4af7328975e">For further information on the Foreword, see <b>ISO/IEC Directives, Part 2, 2016, Clause 12.</b></p></div>
180
167
  <div style="mso-element:comment" id="2">
181
168
  <span style="mso-comment-author:&quot;ISO&quot;"></span>
182
-
169
+
183
170
  <p class="MsoCommentText" id="_c54b9549-369f-4f85-b5b2-9db3fd3d4c08"><span style="MsoCommentReference">
184
171
  <span lang="EN-GB" style="font-size:9.0pt" xml:lang="EN-GB">
185
172
  <span style="mso-special-character:comment"></span>
@@ -198,8 +185,8 @@ RSpec.describe IsoDoc do
198
185
  </body>
199
186
  </html>
200
187
  OUTPUT
201
- end
202
-
188
+ end
189
+
203
190
  it "processes IsoXML reviewer notes (Word)" do
204
191
  system "rm -f test.doc"
205
192
  IsoDoc::WordConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css"}).convert_file(<<~"INPUT", "test", false)
@@ -242,19 +229,19 @@ RSpec.describe IsoDoc do
242
229
  </span>
243
230
  </span>
244
231
  <span style="mso-comment-continuation:3"><span style="mso-comment-continuation:1"><p class="MsoNormal"><a name="B" id="B"></a>B.</p></span></span>
245
-
232
+
246
233
  <span style="MsoCommentReference" target="2" class="commentLink" from="C" to="C">
247
234
  <span lang="EN-GB" style="font-size:9.0pt" xml:lang="EN-GB">
248
235
  <a style="mso-comment-reference:SMC_2;mso-comment-date:20170108T0000"><span style="mso-comment-continuation:3"><p class="MsoNormal"><a name="C" id="C"></a>C.</p></span></a>
249
236
  <span style="mso-special-character:comment" target="2"></span>
250
237
  </span>
251
238
  </span>
252
-
239
+
253
240
  </div>
254
241
  <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
255
242
  <div class="Section3" id="">
256
243
  <h1 class="IntroTitle">Introduction</h1>
257
-
244
+
258
245
  </div>
259
246
  <p class="MsoNormal">&#xA0;</p>
260
247
  </div>
@@ -263,7 +250,7 @@ RSpec.describe IsoDoc do
263
250
  <p class="zzSTDTitle1"></p>
264
251
  <div style="mso-element:comment-list"><div style="mso-element:comment"><a name="3" id="3"></a>
265
252
  <span style="mso-comment-author:&quot;ISO&quot;"></span>
266
-
253
+
267
254
  <p class="MsoCommentText"><a name="_c54b9549-369f-4f85-b5b2-9db3fd3d4c08" id="_c54b9549-369f-4f85-b5b2-9db3fd3d4c08"></a><span style="MsoCommentReference">
268
255
  <span lang="EN-GB" style="font-size:9.0pt" xml:lang="EN-GB">
269
256
  <span style="mso-special-character:comment"></span>
@@ -274,7 +261,7 @@ RSpec.describe IsoDoc do
274
261
  <p class="MsoCommentText"><a name="_f1a8b9da-ca75-458b-96fa-d4af7328975e" id="_f1a8b9da-ca75-458b-96fa-d4af7328975e"></a>For further information on the Foreword, see <b>ISO/IEC Directives, Part 2, 2016, Clause 12.</b></p></div>
275
262
  <div style="mso-element:comment"><a name="2" id="2"></a>
276
263
  <span style="mso-comment-author:&quot;ISO&quot;"></span>
277
-
264
+
278
265
  <p class="MsoCommentText"><a name="_c54b9549-369f-4f85-b5b2-9db3fd3d4c08" id="_c54b9549-369f-4f85-b5b2-9db3fd3d4c08"></a><span style="MsoCommentReference">
279
266
  <span lang="EN-GB" style="font-size:9.0pt" xml:lang="EN-GB">
280
267
  <span style="mso-special-character:comment"></span>
@@ -284,7 +271,7 @@ RSpec.describe IsoDoc do
284
271
  </div>
285
272
  <div style="mso-element:footnote-list"/></body>
286
273
  OUTPUT
287
- end
274
+ end
288
275
 
289
276
 
290
277
  end
@@ -72,15 +72,7 @@ RSpec.describe IsoDoc do
72
72
  </bibliography>
73
73
  </iso-standard>
74
74
  INPUT
75
- <html xmlns:epub="http://www.idpf.org/2007/ops">
76
- <head>
77
- <title>test</title>
78
- <body lang="EN-US" link="blue" vlink="#954F72">
79
- <div class="WordSection1">
80
- <p>&#160;</p>
81
- </div>
82
- <br/>
83
- <div class="WordSection2">
75
+ #{HTML_HDR}
84
76
  <br/>
85
77
  <div>
86
78
  <h1 class="ForewordTitle">Foreword</h1>
@@ -94,10 +86,6 @@ RSpec.describe IsoDoc do
94
86
  </div>
95
87
  <p>This is patent boilerplate</p>
96
88
  </div>
97
- <p>&#160;</p>
98
- </div>
99
- <br/>
100
- <div class="WordSection3">
101
89
  <p class="zzSTDTitle1"/>
102
90
  <div id="D">
103
91
  <h1>1.&#160; Scope</h1>
@@ -166,7 +154,6 @@ RSpec.describe IsoDoc do
166
154
  </div>
167
155
  </div>
168
156
  </body>
169
- </head>
170
157
  </html>
171
158
  OUTPUT
172
159
  end
@@ -242,15 +229,7 @@ RSpec.describe IsoDoc do
242
229
  </bibliography>
243
230
  </iso-standard>
244
231
  INPUT
245
- <html xmlns:epub="http://www.idpf.org/2007/ops">
246
- <head>
247
- <title>test</title>
248
- <body lang="EN-US" link="blue" vlink="#954F72">
249
- <div class="WordSection1">
250
- <p>&#160;</p>
251
- </div>
252
- <br/>
253
- <div class="WordSection2">
232
+ #{HTML_HDR}
254
233
  <br/>
255
234
  <div>
256
235
  <h1 class="ForewordTitle">Foreword</h1>
@@ -264,10 +243,6 @@ RSpec.describe IsoDoc do
264
243
  </div>
265
244
  <p>This is patent boilerplate</p>
266
245
  </div>
267
- <p>&#160;</p>
268
- </div>
269
- <br/>
270
- <div class="WordSection3">
271
246
  <p class="zzSTDTitle1"/>
272
247
  <div id="D">
273
248
  <h1>1.&#160; Scope</h1>
@@ -336,7 +311,6 @@ RSpec.describe IsoDoc do
336
311
  </div>
337
312
  </div>
338
313
  </body>
339
- </head>
340
314
  </html>
341
315
  OUTPUT
342
316
  end
@@ -412,15 +386,7 @@ RSpec.describe IsoDoc do
412
386
  </bibliography>
413
387
  </iso-standard>
414
388
  INPUT
415
- <html xmlns:epub="http://www.idpf.org/2007/ops">
416
- <head>
417
- <title>test</title>
418
- <body lang="EN-US" link="blue" vlink="#954F72">
419
- <div class="WordSection1">
420
- <p>&#160;</p>
421
- </div>
422
- <br/>
423
- <div class="WordSection2">
389
+ #{HTML_HDR}
424
390
  <br/>
425
391
  <div>
426
392
  <h1 class="ForewordTitle">Avant-propos</h1>
@@ -434,10 +400,6 @@ RSpec.describe IsoDoc do
434
400
  </div>
435
401
  <p>This is patent boilerplate</p>
436
402
  </div>
437
- <p>&#160;</p>
438
- </div>
439
- <br/>
440
- <div class="WordSection3">
441
403
  <p class="zzSTDTitle1"/>
442
404
  <div id="D">
443
405
  <h1>1.&#160; Domaine d'application</h1>
@@ -505,7 +467,6 @@ RSpec.describe IsoDoc do
505
467
  </div>
506
468
  </div>
507
469
  </body>
508
- </head>
509
470
  </html>
510
471
  OUTPUT
511
472
  end
@@ -592,15 +553,7 @@ RSpec.describe IsoDoc do
592
553
  </bibliography>
593
554
  </iso-standard>
594
555
  INPUT
595
- <html xmlns:epub="http://www.idpf.org/2007/ops">
596
- <head>
597
- <title>test</title>
598
- <body lang="EN-US" link="blue" vlink="#954F72">
599
- <div class="WordSection1">
600
- <p>&#160;</p>
601
- </div>
602
- <br/>
603
- <div class="WordSection2">
556
+ #{HTML_HDR}
604
557
  <br/>
605
558
  <div>
606
559
  <h1 class="ForewordTitle">&#21069;&#35328;</h1>
@@ -614,10 +567,6 @@ RSpec.describe IsoDoc do
614
567
  </div>
615
568
  <p>This is patent boilerplate</p>
616
569
  </div>
617
- <p>&#160;</p>
618
- </div>
619
- <br/>
620
- <div class="WordSection3">
621
570
  <p class="zzSTDTitle1"/>
622
571
  <div id="D">
623
572
  <h1>1.&#160; &#33539;&#22260;</h1>
@@ -686,7 +635,6 @@ RSpec.describe IsoDoc do
686
635
  </div>
687
636
  </div>
688
637
  </body>
689
- </head>
690
638
  </html>
691
639
  OUTPUT
692
640
  end
@@ -14,15 +14,7 @@ RSpec.describe IsoDoc do
14
14
  <sections>
15
15
  </iso-standard>
16
16
  INPUT
17
- <html xmlns:epub="http://www.idpf.org/2007/ops">
18
- <head>
19
- <title>test</title>
20
- <body lang="EN-US" link="blue" vlink="#954F72">
21
- <div class="WordSection1">
22
- <p>&#160;</p>
23
- </div>
24
- <br/>
25
- <div class="WordSection2">
17
+ #{HTML_HDR}
26
18
  <br/>
27
19
  <div>
28
20
  <h1 class="ForewordTitle">Foreword</h1>
@@ -32,14 +24,9 @@ RSpec.describe IsoDoc do
32
24
  <a id="H"/> <br/>
33
25
  </p>
34
26
  </div>
35
- <p>&#160;</p>
36
- </div>
37
- <br/>
38
- <div class="WordSection3">
39
27
  <p class="zzSTDTitle1"/>
40
28
  </div>
41
29
  </body>
42
- </head>
43
30
  </html>
44
31
  OUTPUT
45
32
  end
@@ -56,15 +43,7 @@ RSpec.describe IsoDoc do
56
43
  <sections>
57
44
  </iso-standard>
58
45
  INPUT
59
- <html xmlns:epub="http://www.idpf.org/2007/ops">
60
- <head>
61
- <title>test</title>
62
- <body lang="EN-US" link="blue" vlink="#954F72">
63
- <div class="WordSection1">
64
- <p>&#160;</p>
65
- </div>
66
- <br/>
67
- <div class="WordSection2">
46
+ #{HTML_HDR}
68
47
  <br/>
69
48
  <div>
70
49
  <h1 class="ForewordTitle">Foreword</h1>
@@ -73,14 +52,9 @@ RSpec.describe IsoDoc do
73
52
  <a href="http://example.com">example</a>
74
53
  </p>
75
54
  </div>
76
- <p>&#160;</p>
77
- </div>
78
- <br/>
79
- <div class="WordSection3">
80
55
  <p class="zzSTDTitle1"/>
81
56
  </div>
82
57
  </body>
83
- </head>
84
58
  </html>
85
59
  OUTPUT
86
60
  end
@@ -96,15 +70,7 @@ RSpec.describe IsoDoc do
96
70
  <sections>
97
71
  </iso-standard>
98
72
  INPUT
99
- <html xmlns:epub="http://www.idpf.org/2007/ops">
100
- <head>
101
- <title>test</title>
102
- <body lang="EN-US" link="blue" vlink="#954F72">
103
- <div class="WordSection1">
104
- <p>&#160;</p>
105
- </div>
106
- <br/>
107
- <div class="WordSection2">
73
+ #{HTML_HDR}
108
74
  <br/>
109
75
  <div>
110
76
  <h1 class="ForewordTitle">Foreword</h1>
@@ -112,14 +78,9 @@ RSpec.describe IsoDoc do
112
78
  <para><b role="strong">&lt;barry fred="http://example.com"&gt;example&lt;/barry&gt;</b></para>
113
79
  </p>
114
80
  </div>
115
- <p>&#160;</p>
116
- </div>
117
- <br/>
118
- <div class="WordSection3">
119
81
  <p class="zzSTDTitle1"/>
120
82
  </div>
121
83
  </body>
122
- </head>
123
84
  </html>
124
85
  OUTPUT
125
86
  end
@@ -137,15 +98,7 @@ RSpec.describe IsoDoc do
137
98
  <sections>
138
99
  </iso-standard>
139
100
  INPUT
140
- <html xmlns:epub="http://www.idpf.org/2007/ops">
141
- <head>
142
- <title>test</title>
143
- <body lang="EN-US" link="blue" vlink="#954F72">
144
- <div class="WordSection1">
145
- <p>&#160;</p>
146
- </div>
147
- <br/>
148
- <div class="WordSection2">
101
+ #{HTML_HDR}
149
102
  <br/>
150
103
  <div>
151
104
  <h1 class="ForewordTitle">Foreword</h1>
@@ -157,14 +110,9 @@ RSpec.describe IsoDoc do
157
110
  <span class="stem">Latex?</span>
158
111
  </p>
159
112
  </div>
160
- <p>&#160;</p>
161
- </div>
162
- <br/>
163
- <div class="WordSection3">
164
113
  <p class="zzSTDTitle1"/>
165
114
  </div>
166
115
  </body>
167
- </head>
168
116
  </html>
169
117
  OUTPUT
170
118
  end
@@ -181,15 +129,7 @@ RSpec.describe IsoDoc do
181
129
  <sections>
182
130
  </iso-standard>
183
131
  INPUT
184
- <html xmlns:epub="http://www.idpf.org/2007/ops">
185
- <head>
186
- <title>test</title>
187
- <body lang="EN-US" link="blue" vlink="#954F72">
188
- <div class="WordSection1">
189
- <p>&#160;</p>
190
- </div>
191
- <br/>
192
- <div class="WordSection2">
132
+ #{HTML_HDR}
193
133
  <br/>
194
134
  <div>
195
135
  <h1 class="ForewordTitle">Foreword</h1>
@@ -198,14 +138,9 @@ RSpec.describe IsoDoc do
198
138
  (#((Hello))#)
199
139
  </p>
200
140
  </div>
201
- <p>&#160;</p>
202
- </div>
203
- <br/>
204
- <div class="WordSection3">
205
141
  <p class="zzSTDTitle1"/>
206
142
  </div>
207
143
  </body>
208
- </head>
209
144
  </html>
210
145
  OUTPUT
211
146
  end
@@ -234,15 +169,7 @@ RSpec.describe IsoDoc do
234
169
  </bibliography>
235
170
  </iso-standard>
236
171
  INPUT
237
- <html xmlns:epub="http://www.idpf.org/2007/ops">
238
- <head>
239
- <title>test</title>
240
- <body lang="EN-US" link="blue" vlink="#954F72">
241
- <div class="WordSection1">
242
- <p>&#160;</p>
243
- </div>
244
- <br/>
245
- <div class="WordSection2">
172
+ #{HTML_HDR}
246
173
  <br/>
247
174
  <div>
248
175
  <h1 class="ForewordTitle">Foreword</h1>
@@ -251,10 +178,6 @@ RSpec.describe IsoDoc do
251
178
  <a href="#ISO712">A</a>
252
179
  </p>
253
180
  </div>
254
- <p>&#160;</p>
255
- </div>
256
- <br/>
257
- <div class="WordSection3">
258
181
  <p class="zzSTDTitle1"/>
259
182
  <div>
260
183
  <h1>1.&#160; Normative References</h1>
@@ -263,7 +186,6 @@ RSpec.describe IsoDoc do
263
186
  </div>
264
187
  </div>
265
188
  </body>
266
- </head>
267
189
  </html>
268
190
  OUTPUT
269
191
  end
@@ -301,15 +223,7 @@ RSpec.describe IsoDoc do
301
223
  </bibliography>
302
224
  </iso-standard>
303
225
  INPUT
304
- <html xmlns:epub="http://www.idpf.org/2007/ops">
305
- <head>
306
- <title>test</title>
307
- <body lang="EN-US" link="blue" vlink="#954F72">
308
- <div class="WordSection1">
309
- <p>&#160;</p>
310
- </div>
311
- <br/>
312
- <div class="WordSection2">
226
+ #{HTML_HDR}
313
227
  <br/>
314
228
  <div>
315
229
  <h1 class="ForewordTitle">Foreword</h1>
@@ -327,10 +241,6 @@ RSpec.describe IsoDoc do
327
241
  <a href="#ISO712">A</a>
328
242
  </p>
329
243
  </div>
330
- <p>&#160;</p>
331
- </div>
332
- <br/>
333
- <div class="WordSection3">
334
244
  <p class="zzSTDTitle1"/>
335
245
  <div>
336
246
  <h1>1.&#160; Normative References</h1>
@@ -339,7 +249,6 @@ RSpec.describe IsoDoc do
339
249
  </div>
340
250
  </div>
341
251
  </body>
342
- </head>
343
252
  </html>
344
253
  OUTPUT
345
254
  end