isodoc 2.1.0.1 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/isodoc.gemspec +6 -3
  3. data/lib/isodoc/base_style/blocks.scss +7 -0
  4. data/lib/isodoc/class_utils.rb +1 -1
  5. data/lib/isodoc/function/blocks.rb +1 -1
  6. data/lib/isodoc/function/cleanup.rb +1 -1
  7. data/lib/isodoc/function/inline.rb +4 -2
  8. data/lib/isodoc/function/lists.rb +24 -9
  9. data/lib/isodoc/function/table.rb +1 -1
  10. data/lib/isodoc/function/to_word_html.rb +3 -2
  11. data/lib/isodoc/function/utils.rb +18 -8
  12. data/lib/isodoc/gem_tasks.rb +19 -10
  13. data/lib/isodoc/html_function/html.rb +2 -2
  14. data/lib/isodoc/i18n.rb +19 -0
  15. data/lib/isodoc/metadata.rb +2 -2
  16. data/lib/isodoc/presentation_function/block.rb +3 -3
  17. data/lib/isodoc/presentation_function/image.rb +1 -1
  18. data/lib/isodoc/presentation_function/inline.rb +13 -6
  19. data/lib/isodoc/presentation_function/section.rb +3 -1
  20. data/lib/isodoc/presentation_function/xrefs.rb +22 -6
  21. data/lib/isodoc/presentation_xml_convert.rb +1 -0
  22. data/lib/isodoc/version.rb +1 -1
  23. data/lib/isodoc/word_function/body.rb +9 -6
  24. data/lib/isodoc/word_function/postprocess.rb +1 -1
  25. data/lib/isodoc/word_function/postprocess_cover.rb +5 -5
  26. data/lib/isodoc/xref/xref_gen.rb +4 -4
  27. metadata +5 -66
  28. data/.github/workflows/rake.yml +0 -15
  29. data/.github/workflows/release.yml +0 -24
  30. data/.hound.yml +0 -5
  31. data/.oss-guides.rubocop.yml +0 -1077
  32. data/.rubocop.yml +0 -10
  33. data/Rakefile +0 -8
  34. data/bin/rspec +0 -17
  35. data/spec/assets/header.html +0 -7
  36. data/spec/assets/html.scss +0 -20
  37. data/spec/assets/html_override.css +0 -1
  38. data/spec/assets/htmlcover.html +0 -4
  39. data/spec/assets/htmlintro.html +0 -5
  40. data/spec/assets/i18n.yaml +0 -41
  41. data/spec/assets/iso.xml +0 -8
  42. data/spec/assets/odf.emf +0 -0
  43. data/spec/assets/odf.svg +0 -1
  44. data/spec/assets/odf1.svg +0 -4
  45. data/spec/assets/outputtest/a.xml +0 -66
  46. data/spec/assets/outputtest/iso.international-standard.xsl +0 -3011
  47. data/spec/assets/rice_image1 +0 -0
  48. data/spec/assets/rice_image1.png +0 -0
  49. data/spec/assets/scripts.html +0 -3
  50. data/spec/assets/scripts_override.html +0 -3
  51. data/spec/assets/std.css +0 -2
  52. data/spec/assets/word.css +0 -2
  53. data/spec/assets/word_override.css +0 -1
  54. data/spec/assets/wordcover.html +0 -3
  55. data/spec/assets/wordintro.html +0 -4
  56. data/spec/isodoc/blocks_spec.rb +0 -2934
  57. data/spec/isodoc/cleanup_spec.rb +0 -1056
  58. data/spec/isodoc/footnotes_spec.rb +0 -264
  59. data/spec/isodoc/form_spec.rb +0 -160
  60. data/spec/isodoc/i18n_spec.rb +0 -1201
  61. data/spec/isodoc/inline_spec.rb +0 -2301
  62. data/spec/isodoc/lists_spec.rb +0 -469
  63. data/spec/isodoc/metadata_spec.rb +0 -401
  64. data/spec/isodoc/postproc_spec.rb +0 -2941
  65. data/spec/isodoc/presentation_xml_spec.rb +0 -1476
  66. data/spec/isodoc/ref_spec.rb +0 -955
  67. data/spec/isodoc/section_spec.rb +0 -2123
  68. data/spec/isodoc/table_spec.rb +0 -588
  69. data/spec/isodoc/terms_spec.rb +0 -712
  70. data/spec/isodoc/utils_spec.rb +0 -57
  71. data/spec/isodoc/xref_numbering_spec.rb +0 -378
  72. data/spec/isodoc/xref_spec.rb +0 -1837
  73. data/spec/isodoc/xslfo_convert_spec.rb +0 -103
  74. data/spec/spec_helper.rb +0 -81
@@ -1,2941 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "spec_helper"
4
- require "fileutils"
5
-
6
- options = { wordstylesheet: "spec/assets/word.css",
7
- htmlstylesheet: "spec/assets/html.scss" }
8
-
9
- RSpec.describe IsoDoc do
10
- it "generates file based on string input" do
11
- FileUtils.rm_f "test.doc"
12
- FileUtils.rm_f "test.html"
13
- IsoDoc::HtmlConvert.new(
14
- { wordstylesheet: "spec/assets/word.css",
15
- htmlstylesheet: "spec/assets/html.scss",
16
- filename: "test" },
17
- ).convert("test", <<~"INPUT", false)
18
- <iso-standard xmlns="http://riboseinc.com/isoxml">
19
- <bibdata>
20
- <title language="en">test</title>
21
- </bibdata>
22
- <preface><foreword>
23
- <note>
24
- <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
25
- </note>
26
- </foreword></preface>
27
- </iso-standard>
28
- INPUT
29
- expect(File.exist?("test.html")).to be true
30
- html = File.read("test.html")
31
- expect(html).to match(%r{<title>test</title>})
32
- expect(html).to match(/another empty stylesheet/)
33
- expect(html).to match(%r{cdnjs\.cloudflare\.com/ajax/libs/mathjax/})
34
- expect(html).to match(/delimiters: \[\['\(#\(', '\)#\)'\]\]/)
35
- end
36
-
37
- it "generates file in a remote directory" do
38
- FileUtils.rm_f "spec/assets/test.doc"
39
- FileUtils.rm_f "spec/assets/test.html"
40
- IsoDoc::HtmlConvert.new(
41
- { wordstylesheet: "word.css",
42
- htmlstylesheet: "html.scss",
43
- filename: "test" },
44
- ).convert("spec/assets/test", <<~"INPUT", false)
45
- <iso-standard xmlns="http://riboseinc.com/isoxml">
46
- <bibdata>
47
- <title language="en">test</title>
48
- </bibdata>
49
- <preface><foreword>
50
- <note>
51
- <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
52
- </note>
53
- </foreword></preface>
54
- </iso-standard>
55
- INPUT
56
- expect(File.exist?("spec/assets/test.html")).to be true
57
- html = File.read("spec/assets/test.html")
58
- expect(html).to match(%r{<title>test</title>})
59
- expect(html).to match(/another empty stylesheet/)
60
- end
61
-
62
- it "ignores Liquid markup in the document body" do
63
- FileUtils.rm_f "test.doc"
64
- FileUtils.rm_f "test.html"
65
- input = <<~INPUT
66
- <iso-standard xmlns="http://riboseinc.com/isoxml">
67
- <bibdata>
68
- <title language="en">test</title>
69
- </bibdata>
70
- <preface><foreword>
71
- <note>
72
- <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">{% elif %}These results are based on a study carried out on three different types of kernel.</p>
73
- </note>
74
- </foreword></preface>
75
- </iso-standard>
76
- INPUT
77
- IsoDoc::HtmlConvert.new(wordstylesheet: "spec/assets/word.css")
78
- .convert("test", input, false)
79
- IsoDoc::WordConvert.new({ wordstylesheet: "spec/assets/word.css" })
80
- .convert("test", input, false)
81
- expect(File.exist?("test.html")).to be true
82
- html = File.read("test.html")
83
- expect(html).to match(%r/\{% elif %}/)
84
-
85
- expect(File.exist?("test.doc")).to be true
86
- html = File.read("test.doc")
87
- expect(html).to match(%r/\{% elif %}/)
88
- end
89
-
90
- it "generates HTML output docs with null configuration" do
91
- FileUtils.rm_f "test.doc"
92
- FileUtils.rm_f "test.html"
93
- IsoDoc::HtmlConvert.new({ wordstylesheet: "spec/assets/word.css" })
94
- .convert("test", <<~"INPUT", false)
95
- <iso-standard xmlns="http://riboseinc.com/isoxml">
96
- <preface><foreword>
97
- <note>
98
- <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
99
- </note>
100
- </foreword></preface>
101
- </iso-standard>
102
- INPUT
103
- expect(File.exist?("test.html")).to be true
104
- html = File.read("test.html")
105
- expect(html).not_to match(%r{<title>test</title>})
106
- expect(html).not_to match(/another empty stylesheet/)
107
- expect(html).to match(%r{cdnjs\.cloudflare\.com/ajax/libs/mathjax/})
108
- expect(html).to match(/delimiters: \[\['\(#\(', '\)#\)'\]\]/)
109
- expect(html).not_to match(/html-override/)
110
- end
111
-
112
- it "generates Word output docs with null configuration" do
113
- FileUtils.rm_f "test.doc"
114
- FileUtils.rm_f "test.html"
115
- IsoDoc::WordConvert.new(
116
- { wordstylesheet: "spec/assets/word.css",
117
- htmlstylesheet: "spec/assets/html.scss" },
118
- ).convert("test", <<~"INPUT", false)
119
- <iso-standard xmlns="http://riboseinc.com/isoxml">
120
- <preface><foreword>
121
- <note>
122
- <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
123
- </note>
124
- </foreword></preface>
125
- </iso-standard>
126
- INPUT
127
- expect(File.exist?("test.doc")).to be true
128
- word = File.read("test.doc")
129
- expect(word).to match(/one empty stylesheet/)
130
- expect(word).to match(/div\.table_container/)
131
- expect(word).not_to match(/word-override/)
132
- end
133
-
134
- it "generates HTML output docs with null configuration from file" do
135
- FileUtils.rm_f "spec/assets/iso.doc"
136
- FileUtils.rm_f "spec/assets/iso.html"
137
- IsoDoc::HtmlConvert.new(
138
- { wordstylesheet: "word.css",
139
- htmlstylesheet: "html.scss" },
140
- ).convert("spec/assets/iso.xml", nil, false)
141
- expect(File.exist?("spec/assets/iso.html")).to be true
142
- html = File.read("spec/assets/iso.html")
143
- expect(html).to match(/another empty stylesheet/)
144
- expect(html).to match(%r{https://use.fontawesome.com})
145
- expect(html).to match(%r{libs/jquery})
146
- expect(html).to include "$('#toggle')"
147
- expect(html).not_to match(/CDATA/)
148
- end
149
-
150
- it "generates Headless HTML output docs with null configuration from file" do
151
- FileUtils.rm_f "spec/assets/iso.html"
152
- IsoDoc::HeadlessHtmlConvert.new(
153
- { wordstylesheet: "word.css",
154
- htmlstylesheet: "html.scss" },
155
- ).convert("spec/assets/iso.xml", nil, false)
156
- expect(File.exist?("spec/assets/iso.headless.html")).to be true
157
- html = File.read("spec/assets/iso.headless.html")
158
- expect(html).not_to match(/another empty stylesheet/)
159
- expect(html).not_to match(%r{https://use.fontawesome.com})
160
- expect(html).not_to match(%r{libs/jquery})
161
- expect(html).not_to match(%r{<html})
162
- expect(html).not_to match(%r{<head})
163
- expect(html).not_to match(%r{<body})
164
- expect(html).to match(%r{<div})
165
- end
166
-
167
- it "generates Word output docs with null configuration from file" do
168
- FileUtils.rm_f "spec/assets/iso.doc"
169
- IsoDoc::WordConvert.new(
170
- { wordstylesheet: "word.css",
171
- htmlstylesheet: "html.scss" },
172
- ).convert("spec/assets/iso.xml", nil, false)
173
- expect(File.exist?("spec/assets/iso.doc")).to be true
174
- word = File.read("spec/assets/iso.doc")
175
- expect(word).to match(/one empty stylesheet/)
176
- end
177
-
178
- it "generates HTML output docs with complete configuration" do
179
- FileUtils.rm_f "test.doc"
180
- FileUtils.rm_f "test.html"
181
- IsoDoc::HtmlConvert.new(
182
- { bodyfont: "Zapf",
183
- monospacefont: "Consolas",
184
- headerfont: "Comic Sans",
185
- normalfontsize: "30pt",
186
- monospacefontsize: "29pt",
187
- smallerfontsize: "28pt",
188
- footnotefontsize: "27pt",
189
- htmlstylesheet: "spec/assets/html.scss",
190
- htmlstylesheet_override: "spec/assets/html_override.css",
191
- htmlcoverpage: "spec/assets/htmlcover.html",
192
- htmlintropage: "spec/assets/htmlintro.html",
193
- scripts: "spec/assets/scripts.html",
194
- scripts_override: "spec/assets/scripts_override.html",
195
- i18nyaml: "spec/assets/i18n.yaml",
196
- ulstyle: "l1",
197
- olstyle: "l2" },
198
- ).convert("test", <<~"INPUT", false)
199
- <iso-standard xmlns="http://riboseinc.com/isoxml">
200
- <preface><foreword>
201
- <note>
202
- <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
203
- </note>
204
- </foreword></preface>
205
- </iso-standard>
206
- INPUT
207
- html = File.read("test.html")
208
- expect(html).to match(/another empty stylesheet/)
209
- expect(html).to match(/p \{[^}]*?font-family: Zapf/m)
210
- expect(html).to match(/code \{[^}]*?font-family: Consolas/m)
211
- expect(html).to match(/h1 \{[^}]*?font-family: Comic Sans/m)
212
- expect(html).to match(/p \{[^}]*?font-size: 30pt/m)
213
- expect(html).to match(/code \{[^}]*?font-size: 29pt/m)
214
- expect(html).to match(/p\.note \{[^}]*?font-size: 28pt/m)
215
- expect(html).to match(/aside \{[^}]*?font-size: 27pt/m)
216
- expect(html).to match(/an empty html cover page/)
217
- expect(html).to match(/an empty html intro page/)
218
- expect(html).to match(/This is > a script/)
219
- expect(html).to match(/This is > also a script/)
220
- expect(html).not_to match(/CDATA/)
221
- expect(html).to match(%r{Anta&#x16D;parolo</h1>})
222
- expect(html).to match(%r{html-override})
223
- end
224
-
225
- it "generates HTML output docs with default fonts" do
226
- FileUtils.rm_f "test.doc"
227
- FileUtils.rm_f "test.html"
228
- IsoDoc::HtmlConvert.new(
229
- { htmlstylesheet: "spec/assets/html.scss",
230
- htmlcoverpage: "spec/assets/htmlcover.html",
231
- htmlintropage: "spec/assets/htmlintro.html",
232
- scripts: "spec/assets/scripts.html",
233
- i18nyaml: "spec/assets/i18n.yaml",
234
- ulstyle: "l1",
235
- olstyle: "l2" },
236
- ).convert("test", <<~"INPUT", false)
237
- <iso-standard xmlns="http://riboseinc.com/isoxml">
238
- <preface><foreword>
239
- <note>
240
- <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
241
- </note>
242
- </foreword></preface>
243
- </iso-standard>
244
- INPUT
245
- html = File.read("test.html")
246
- expect(html).to match(/another empty stylesheet/)
247
- expect(html).to match(/p \{[^}]*?font-family: Arial/m)
248
- expect(html).to match(/code \{[^}]*?font-family: Courier New/m)
249
- expect(html).to match(/h1 \{[^}]*?font-family: Arial/m)
250
- expect(html).to match(/p \{[^}]*?font-size: 1em;/m)
251
- expect(html).to match(/code \{[^}]*?font-size: 0.8em/m)
252
- expect(html).to match(/p\.note \{[^}]*?font-size: 0.9em/m)
253
- expect(html).to match(/aside \{[^}]*?font-size: 0.9em/m)
254
- expect(html).to match(/an empty html cover page/)
255
- expect(html).to match(/an empty html intro page/)
256
- expect(html).to match(/This is > a script/)
257
- expect(html).not_to match(/CDATA/)
258
- expect(html).to match(%r{Anta&#x16D;parolo</h1>})
259
- end
260
-
261
- it "generates Word output docs with complete configuration" do
262
- FileUtils.rm_f "test.doc"
263
- FileUtils.rm_f "test.html"
264
- IsoDoc::WordConvert.new(
265
- { bodyfont: "Zapf",
266
- monospacefont: "Consolas",
267
- headerfont: "Comic Sans",
268
- normalfontsize: "30pt",
269
- monospacefontsize: "29pt",
270
- smallerfontsize: "28pt",
271
- footnotefontsize: "27pt",
272
- wordstylesheet: "spec/assets/html.scss",
273
- wordstylesheet_override: "spec/assets/word_override.css",
274
- standardstylesheet: "spec/assets/std.css",
275
- header: "spec/assets/header.html",
276
- wordcoverpage: "spec/assets/wordcover.html",
277
- wordintropage: "spec/assets/wordintro.html",
278
- i18nyaml: "spec/assets/i18n.yaml",
279
- ulstyle: "l1",
280
- olstyle: "l2" },
281
- ).convert("test", <<~"INPUT", false)
282
- <iso-standard xmlns="http://riboseinc.com/isoxml">
283
- <preface><foreword>
284
- <note>
285
- <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
286
- </note>
287
- </foreword></preface>
288
- </iso-standard>
289
- INPUT
290
- word = File.read("test.doc")
291
- expect(word).to match(/another empty stylesheet/)
292
- expect(word).to match(/p \{[^}]*?font-family: Zapf/m)
293
- expect(word).to match(/code \{[^}]*?font-family: Consolas/m)
294
- expect(word).to match(/h1 \{[^}]*?font-family: Comic Sans/m)
295
- expect(word).to match(/p \{[^}]*?font-size: 30pt/m)
296
- expect(word).to match(/code \{[^}]*?font-size: 29pt/m)
297
- expect(word).to match(/p\.note \{[^}]*?font-size: 28pt/m)
298
- expect(word).to match(/aside \{[^}]*?font-size: 27pt/m)
299
- expect(word).to match(/a third empty stylesheet/)
300
- expect(word)
301
- .to match(/Content-Disposition: inline; filename="filelist.xml"/)
302
- expect(word).to match(/an empty word cover page/)
303
- expect(word).to match(/an empty word intro page/)
304
- expect(word).to match(%r{Anta&#x16D;parolo</h1>})
305
- expect(word).to match(%r{word-override})
306
- end
307
-
308
- it "generates Word output docs with default fonts" do
309
- FileUtils.rm_f "test.doc"
310
- FileUtils.rm_f "test.html"
311
- IsoDoc::WordConvert.new(
312
- { wordstylesheet: "spec/assets/html.scss",
313
- standardstylesheet: "spec/assets/std.css",
314
- header: "spec/assets/header.html",
315
- wordcoverpage: "spec/assets/wordcover.html",
316
- wordintropage: "spec/assets/wordintro.html",
317
- i18nyaml: "spec/assets/i18n.yaml",
318
- ulstyle: "l1",
319
- olstyle: "l2" },
320
- ).convert("test", <<~"INPUT", false)
321
- <iso-standard xmlns="http://riboseinc.com/isoxml">
322
- <preface><foreword>
323
- <note>
324
- <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
325
- </note>
326
- </foreword></preface>
327
- </iso-standard>
328
- INPUT
329
- word = File.read("test.doc")
330
- expect(word).to match(/another empty stylesheet/)
331
- expect(word).to match(/p \{[^}]*?font-family: Arial/m)
332
- expect(word).to match(/code \{[^}]*?font-family: Courier New/m)
333
- expect(word).to match(/h1 \{[^}]*?font-family: Arial/m)
334
- expect(word).to match(/p \{[^}]*?font-size: 12pt/m)
335
- expect(word).to match(/code \{[^}]*?font-size: 11pt/m)
336
- expect(word).to match(/p\.note \{[^}]*?font-size: 10pt/m)
337
- expect(word).to match(/aside \{[^}]*?font-size: 9pt/m)
338
- expect(word).to match(/a third empty stylesheet/)
339
- # expect(word).to match(/<title>test<\/title>/)
340
- expect(word)
341
- .to match(/Content-Disposition: inline; filename="filelist.xml"/)
342
- expect(word).to match(/an empty word cover page/)
343
- expect(word).to match(/an empty word intro page/)
344
- expect(word).to match(%r{Anta&#x16D;parolo</h1>})
345
- end
346
-
347
- it "cleans up HTML output preface placeholder paragraphs" do
348
- FileUtils.rm_f "test.doc"
349
- FileUtils.rm_f "test.html"
350
- IsoDoc::HtmlConvert.new(
351
- { bodyfont: "Zapf",
352
- monospacefont: "Consolas",
353
- headerfont: "Comic Sans",
354
- normalfontsize: "30pt",
355
- monospacefontsize: "29pt",
356
- smallerfontsize: "28pt",
357
- footnotefontsize: "27pt",
358
- htmlstylesheet: "spec/assets/html.scss",
359
- htmlstylesheet_override: "spec/assets/html_override.css",
360
- htmlcoverpage: "spec/assets/htmlcover.html",
361
- htmlintropage: "spec/assets/htmlintro.html",
362
- scripts: "spec/assets/scripts.html",
363
- scripts_override: "spec/assets/scripts_override.html",
364
- i18nyaml: "spec/assets/i18n.yaml",
365
- ulstyle: "l1",
366
- olstyle: "l2" },
367
- ).convert("test", <<~"INPUT", false)
368
- <iso-standard xmlns="http://riboseinc.com/isoxml">
369
- <preface><foreword>
370
- <note>
371
- <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
372
- </note>
373
- </foreword></preface>
374
- </iso-standard>
375
- INPUT
376
- html = Nokogiri::XML(File.read("test.html")).at("//body")
377
- html.xpath("//script").each(&:remove)
378
- expect(html.to_xml).to be_equivalent_to <<~OUTPUT
379
- <body lang="en" xml:lang="en">
380
- <div class="title-section">
381
- /* an empty html cover page */
382
- </div>
383
- <br/>
384
- <div class="prefatory-section">
385
- /* an empty html intro page */
386
- <ul id="toc-list"/>
387
- </div>
388
- <br/>
389
- <main class="main-section"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
390
- <br/>
391
- <div>
392
- <h1 class="ForewordTitle">Anta&#x16D;parolo</h1>
393
- <div class="Note">
394
- <p>&#xA0; These results are based on a study carried out on three different types of kernel.</p>
395
- </div>
396
- </div>
397
- <p class="zzSTDTitle1"/>
398
- </main>
399
- </body>
400
- OUTPUT
401
- end
402
-
403
- it "converts definition lists to tables for Word" do
404
- FileUtils.rm_f "test.doc"
405
- FileUtils.rm_f "test.html"
406
- IsoDoc::WordConvert.new(
407
- { wordstylesheet: "spec/assets/word.css",
408
- htmlstylesheet: "spec/assets/html.scss" },
409
- ).convert("test", <<~"INPUT", false)
410
- <iso-standard xmlns="http://riboseinc.com/isoxml">
411
- <preface><foreword>
412
- <dl>
413
- <dt>Term</dt>
414
- <dd>Definition</dd>
415
- <dt>Term 2</dt>
416
- <dd>Definition 2</dd>
417
- </dl>
418
- </foreword></preface>
419
- </iso-standard>
420
- INPUT
421
- word = File.read("test.doc")
422
- .sub(/^.*<div class="WordSection2">/m, '<div class="WordSection2">')
423
- .sub(%r{<p class="MsoNormal">\s*<br clear="all" class="section"/>\s*</p>\s*<div class="WordSection3">.*$}m, "")
424
- expect(xmlpp(word)).to be_equivalent_to xmlpp(<<~"OUTPUT")
425
- <div class="WordSection2">
426
- <p class="MsoNormal"><br clear="all" style="mso-special-character:line-break;page-break-before:always"/></p>
427
- <div>
428
- <h1 class="ForewordTitle">Foreword</h1>
429
- <table class="dl">
430
- <tr>
431
- <td valign="top" align="left">
432
- <p align="left" style="margin-left:0pt;text-align:left;" class="MsoNormal">Term</p>
433
- </td>
434
- <td valign="top">Definition</td>
435
- </tr>
436
- <tr>
437
- <td valign="top" align="left">
438
- <p align="left" style="margin-left:0pt;text-align:left;" class="MsoNormal">Term 2</p>
439
- </td>
440
- <td valign="top">Definition 2</td>
441
- </tr>
442
- </table>
443
- </div>
444
- <p class="MsoNormal">&#xA0;</p>
445
- </div>
446
- OUTPUT
447
- end
448
-
449
- it "populates Word header" do
450
- FileUtils.rm_f "test.doc"
451
- IsoDoc::WordConvert.new(
452
- { wordstylesheet: "spec/assets/word.css",
453
- htmlstylesheet: "spec/assets/html.scss",
454
- header: "spec/assets/header.html" },
455
- ).convert("test", <<~"INPUT", false)
456
- <iso-standard xmlns="http://riboseinc.com/isoxml">
457
- <bibdata type="article">
458
- <docidentifier>
459
- <project-number part="1">1000</project-number>
460
- </docidentifier>
461
- </bibdata>
462
- </iso-standard>
463
- INPUT
464
- word = File.read("test.doc")
465
- .sub(%r{^.*Content-ID: <header.html>}m, "Content-ID: <header.html>")
466
- .sub(/------=_NextPart.*$/m, "")
467
- expect(word).to be_equivalent_to <<~"OUTPUT"
468
- Content-ID: <header.html>
469
- Content-Disposition: inline; filename="header.html"
470
- Content-Transfer-Encoding: base64
471
- Content-Type: text/html charset="utf-8"
472
- Ci8qIGFuIGVtcHR5IGhlYWRlciAqLwoKU1RBUlQgRE9DIElEOiAKICAgICAgICAgICAxMDAwCiAg
473
- ICAgICAgIDogRU5EIERPQyBJRAoKRklMRU5BTUU6IHRlc3QKCg==
474
- OUTPUT
475
- end
476
-
477
- it "populates HTML ToC" do
478
- FileUtils.rm_f "test.doc"
479
- FileUtils.rm_f "test.html"
480
- IsoDoc::HtmlConvert.new({ htmltoclevels: 3 })
481
- .convert("test", <<~"INPUT", false)
482
- <iso-standard xmlns="http://riboseinc.com/isoxml">
483
- <preface><foreword><title>Foreword</title>
484
- <variant-title type="toc">FORVORT</variant-title>
485
- </foreword></preface>
486
- <sections>
487
- <clause><title>First Clause</title>
488
- <clause><title>First Subclause</title>
489
- <variant-title type="toc">SUBCLOZ</variant-title>
490
- </clause>
491
- </clause>
492
- </sections>
493
- </iso-standard>
494
- INPUT
495
- html = Nokogiri::XML(File.read("test.html"))
496
- .at("//div[@id = 'toc']")
497
- expect(xmlpp(html)).to be_equivalent_to xmlpp(<<~OUTPUT)
498
- HAJSHJAS
499
- OUTPUT
500
- end
501
-
502
- it "populates Word ToC" do
503
- FileUtils.rm_f "test.doc"
504
- IsoDoc::WordConvert.new(
505
- { wordstylesheet: "spec/assets/word.css",
506
- htmlstylesheet: "spec/assets/html.scss",
507
- wordintropage: "spec/assets/wordintro.html" },
508
- ).convert("test", <<~"INPUT", false)
509
- <iso-standard xmlns="http://riboseinc.com/isoxml">
510
- <sections>
511
- <clause id="A" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
512
- <title>Introduction<bookmark id="Q"/> to this <image src="spec/assets/rice_image1.png" id="_" mimetype="image/png"/> <fn reference="1">
513
- <p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">Formerly denoted as 15 % (m/m).</p>
514
- </fn></title>
515
- </clause>
516
- <clause id="O" inline-header="false" obligation="normative">
517
- <title>Clause 4.2</title>
518
- <p>A<fn reference="1">
519
- <p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">Formerly denoted as 15 % (m/m).</p>
520
- </fn></p>
521
- <clause id="P" inline-header="false" obligation="normative">
522
- <title>Clause 4.2.1</title>
523
- <variant-title type="toc">SUBCLOZ</variant-title>
524
- </clause>
525
- </clause></clause>
526
- </sections>
527
- </iso-standard>
528
- INPUT
529
- word = File.read("test.doc")
530
- .sub(/^.*<div class="WordSection2">/m, '<div class="WordSection2">')
531
- .sub(%r{<p class="MsoNormal">\s*<br clear="all" class="section"/>\s*</p>\s*<div class="WordSection3">.*$}m, "")
532
- expect(xmlpp(word.gsub(/_Toc\d\d+/, "_Toc")))
533
- .to be_equivalent_to xmlpp(<<~'OUTPUT')
534
- <div class="WordSection2">
535
- /* an empty word intro page */
536
-
537
- <p class="MsoToc1"><span lang="EN-GB" xml:lang="EN-GB"><span style="mso-element:field-begin"></span><span style="mso-spacerun:yes">&#xA0;</span>TOC
538
- \o "1-2" \h \z \u <span style="mso-element:field-separator"></span></span>
539
- <span class="MsoHyperlink"><span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
540
- <a href="#_Toc">Clause 4<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
541
- <span style="mso-tab-count:1 dotted">. </span>
542
- </span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
543
- <span style="mso-element:field-begin"></span></span>
544
- <span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"> PAGEREF _Toc \h </span>
545
- <span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"><span style="mso-element:field-separator"></span></span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">1</span>
546
- <span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"></span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"><span style="mso-element:field-end"></span></span></a></span></span></p>
547
- <p class="MsoToc2">
548
- <span class="MsoHyperlink">
549
- <span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
550
- <a href="#_Toc">Introduction to this<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
551
- <span style="mso-tab-count:1 dotted">. </span>
552
- </span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
553
- <span style="mso-element:field-begin"></span></span>
554
- <span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"> PAGEREF _Toc \h </span>
555
- <span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"><span style="mso-element:field-separator"></span></span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">1</span>
556
- <span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"></span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"><span style="mso-element:field-end"></span></span></a></span>
557
- </span>
558
- </p>
559
- <p class="MsoToc2">
560
- <span class="MsoHyperlink">
561
- <span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
562
- <a href="#_Toc">Clause 4.2<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
563
- <span style="mso-tab-count:1 dotted">. </span>
564
- </span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
565
- <span style="mso-element:field-begin"></span></span>
566
- <span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"> PAGEREF _Toc \h </span>
567
- <span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"><span style="mso-element:field-separator"></span></span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">1</span>
568
- <span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"></span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"><span style="mso-element:field-end"></span></span></a></span>
569
- </span>
570
- </p>
571
- <p class="MsoToc1">
572
- <span lang="EN-GB" xml:lang="EN-GB">
573
- <span style="mso-element:field-end"></span>
574
- </span>
575
- <span lang="EN-GB" xml:lang="EN-GB">
576
- <p class="MsoNormal">&#xA0;</p>
577
- </span>
578
- </p>
579
- <p class="MsoNormal">&#xA0;</p>
580
- </div>
581
- OUTPUT
582
- end
583
-
584
- it "populates Word ToC with custom levels" do
585
- FileUtils.rm_f "test.doc"
586
- IsoDoc::WordConvert.new(
587
- { wordstylesheet: "spec/assets/word.css",
588
- htmlstylesheet: "spec/assets/html.scss",
589
- wordintropage: "spec/assets/wordintro.html",
590
- doctoclevels: 3 },
591
- ).convert("test", <<~"INPUT", false)
592
- <iso-standard xmlns="http://riboseinc.com/isoxml">
593
- <sections>
594
- <clause id="A" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
595
- <title>Introduction<bookmark id="Q"/> to this<fn reference="1">
596
- <p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">Formerly denoted as 15 % (m/m).</p>
597
- </fn></title>
598
- </clause>
599
- <clause id="O" inline-header="false" obligation="normative">
600
- <title>Clause 4.2</title>
601
- <p>A<fn reference="1">
602
- <p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">Formerly denoted as 15 % (m/m).</p>
603
- </fn></p>
604
- <clause id="P" inline-header="false" obligation="normative">
605
- <title>Clause 4.2.1</title>
606
- </clause>
607
- </clause></clause>
608
- </sections>
609
- </iso-standard>
610
- INPUT
611
- word = File.read("test.doc")
612
- .sub(/^.*<div class="WordSection2">/m, '<div class="WordSection2">')
613
- .sub(%r{<p class="MsoNormal">\s*<br clear="all" class="section"/>\s*</p>\s*<div class="WordSection3">.*$}m, "")
614
- expect(xmlpp(word.gsub(/_Toc\d\d+/, "_Toc")))
615
- .to be_equivalent_to xmlpp(<<~'OUTPUT')
616
- <div class="WordSection2">
617
- /* an empty word intro page */
618
-
619
- <p class="MsoToc1"><span lang="EN-GB" xml:lang="EN-GB"><span style="mso-element:field-begin"></span><span style="mso-spacerun:yes">&#xA0;</span>TOC
620
- \o "1-3" \h \z \u <span style="mso-element:field-separator"></span></span>
621
- <span class="MsoHyperlink"><span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
622
- <a href="#_Toc">Clause 4<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
623
- <span style="mso-tab-count:1 dotted">. </span>
624
- </span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
625
- <span style="mso-element:field-begin"></span></span>
626
- <span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"> PAGEREF _Toc \h </span>
627
- <span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"><span style="mso-element:field-separator"></span></span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">1</span>
628
- <span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"></span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"><span style="mso-element:field-end"></span></span></a></span></span></p>
629
- <p class="MsoToc2">
630
- <span class="MsoHyperlink">
631
- <span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
632
- <a href="#_Toc">Introduction to this<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
633
- <span style="mso-tab-count:1 dotted">. </span>
634
- </span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
635
- <span style="mso-element:field-begin"></span></span>
636
- <span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"> PAGEREF _Toc \h </span>
637
- <span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"><span style="mso-element:field-separator"></span></span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">1</span>
638
- <span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"></span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"><span style="mso-element:field-end"></span></span></a></span>
639
- </span>
640
- </p>
641
- <p class="MsoToc2">
642
- <span class="MsoHyperlink">
643
- <span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
644
- <a href="#_Toc">Clause 4.2<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
645
- <span style="mso-tab-count:1 dotted">. </span>
646
- </span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
647
- <span style="mso-element:field-begin"></span></span>
648
- <span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"> PAGEREF _Toc \h </span>
649
- <span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"><span style="mso-element:field-separator"></span></span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">1</span>
650
- <span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"></span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"><span style="mso-element:field-end"></span></span></a></span>
651
- </span>
652
- </p>
653
- <p class="MsoToc3">
654
- <span class="MsoHyperlink">
655
- <span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
656
- <a href="#_Toc">Clause 4.2.1<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
657
- <span style="mso-tab-count:1 dotted">. </span>
658
- </span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
659
- <span style="mso-element:field-begin"></span></span>
660
- <span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"> PAGEREF _Toc \h </span>
661
- <span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"><span style="mso-element:field-separator"></span></span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">1</span>
662
- <span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"></span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"><span style="mso-element:field-end"></span></span></a></span>
663
- </span>
664
- </p>
665
- <p class="MsoToc1">
666
- <span lang="EN-GB" xml:lang="EN-GB">
667
- <span style="mso-element:field-end"></span>
668
- </span>
669
- <span lang="EN-GB" xml:lang="EN-GB">
670
- <p class="MsoNormal">&#xA0;</p>
671
- </span>
672
- </p>
673
- <p class="MsoNormal">&#xA0;</p>
674
- </div>
675
- OUTPUT
676
- end
677
-
678
- it "populates Word ToC with figures, tables, recommendations" do
679
- FileUtils.rm_f "test.doc"
680
- input = <<~INPUT
681
- <iso-standard xmlns="http://riboseinc.com/isoxml">
682
- <sections>
683
- <clause id="A" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
684
- <title>Introduction<bookmark id="Q"/> to this<fn reference="1">
685
- <p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">Formerly denoted as 15 % (m/m).</p>
686
- </fn></title>
687
- </clause>
688
- <clause id="O" inline-header="false" obligation="normative">
689
- <title>Clause 4.2</title>
690
- <recommendation id="AC" type="abstracttest">
691
- <name>Recommendation Verification 1</name>
692
- <label>/ogc/recommendation/wfs/3</label>
693
- </recommendation>
694
- <recommendation id="AA">
695
- <label>/ogc/recommendation/wfs/2</label>
696
- </recommendation>
697
- <recommendation id="AB" type="abstracttest">
698
- <name>Recommendation Verification 2</name>
699
- <label>/ogc/recommendation/wfs/3</label>
700
- </recommendation>
701
- <figure id="BA"><name>First figure</name></figure>
702
- <table id="CA"><name>First table</name></table>
703
- <p>A<fn reference="1">
704
- <p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">Formerly denoted as 15 % (m/m).</p>
705
- </fn></p>
706
- <clause id="P" inline-header="false" obligation="normative">
707
- <title>Clause 4.2.1</title>
708
- </clause>
709
- </clause></clause>
710
- </sections>
711
- </iso-standard>
712
- INPUT
713
- IsoDoc::WordConvert.new(
714
- { wordstylesheet: "spec/assets/word.css",
715
- htmlstylesheet: "spec/assets/html.scss",
716
- wordintropage: "spec/assets/wordintro.html",
717
- doctoclevels: 3 },
718
- ).convert("test", input, false)
719
- word = File.read("test.doc")
720
- .sub(/^.*<div class="WordSection2">/m, '<div class="WordSection2">')
721
- .sub(%r{<p class="MsoNormal">\s*<br clear="all" class="section"/>\s*</p>\s*<div class="WordSection3">.*$}m, "")
722
- expect(xmlpp(word.gsub(/_Toc\d\d+/, "_Toc")))
723
- .to be_equivalent_to xmlpp(<<~'OUTPUT')
724
- <div class='WordSection2'>
725
- /* an empty word intro page */
726
- <p class='MsoToc1'>
727
- <span lang='EN-GB' xml:lang='EN-GB'>
728
- <span style='mso-element:field-begin'/>
729
- <span style='mso-spacerun:yes'>&#xA0;</span>
730
- TOC \o "1-3" \h \z \u
731
- <span style='mso-element:field-separator'/>
732
- </span>
733
- <span class='MsoHyperlink'>
734
- <span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
735
- <a href='#_Toc'>
736
- Clause 4
737
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
738
- <span style='mso-tab-count:1 dotted'>. </span>
739
- </span>
740
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
741
- <span style='mso-element:field-begin'/>
742
- </span>
743
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
744
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
745
- <span style='mso-element:field-separator'/>
746
- </span>
747
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
748
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
749
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
750
- <span style='mso-element:field-end'/>
751
- </span>
752
- </a>
753
- </span>
754
- </span>
755
- </p>
756
- <p class='MsoToc2'>
757
- <span class='MsoHyperlink'>
758
- <span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
759
- <a href='#_Toc'>
760
- Introduction to this
761
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
762
- <span style='mso-tab-count:1 dotted'>. </span>
763
- </span>
764
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
765
- <span style='mso-element:field-begin'/>
766
- </span>
767
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
768
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
769
- <span style='mso-element:field-separator'/>
770
- </span>
771
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
772
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
773
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
774
- <span style='mso-element:field-end'/>
775
- </span>
776
- </a>
777
- </span>
778
- </span>
779
- </p>
780
- <p class='MsoToc2'>
781
- <span class='MsoHyperlink'>
782
- <span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
783
- <a href='#_Toc'>
784
- Clause 4.2
785
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
786
- <span style='mso-tab-count:1 dotted'>. </span>
787
- </span>
788
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
789
- <span style='mso-element:field-begin'/>
790
- </span>
791
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
792
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
793
- <span style='mso-element:field-separator'/>
794
- </span>
795
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
796
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
797
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
798
- <span style='mso-element:field-end'/>
799
- </span>
800
- </a>
801
- </span>
802
- </span>
803
- </p>
804
- <p class='MsoToc3'>
805
- <span class='MsoHyperlink'>
806
- <span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
807
- <a href='#_Toc'>
808
- Clause 4.2.1
809
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
810
- <span style='mso-tab-count:1 dotted'>. </span>
811
- </span>
812
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
813
- <span style='mso-element:field-begin'/>
814
- </span>
815
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
816
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
817
- <span style='mso-element:field-separator'/>
818
- </span>
819
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
820
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
821
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
822
- <span style='mso-element:field-end'/>
823
- </span>
824
- </a>
825
- </span>
826
- </span>
827
- </p>
828
- <p class='MsoToc1'>
829
- <span lang='EN-GB' xml:lang='EN-GB'>
830
- <span style='mso-element:field-end'/>
831
- </span>
832
- <span lang='EN-GB' xml:lang='EN-GB'>
833
- <p class='MsoNormal'>&#xA0;</p>
834
- </span>
835
- </p>
836
- <p class='MsoNormal'>&#xA0;</p>
837
- </div>
838
- OUTPUT
839
-
840
- toc_input = input.sub(%r{<iso-standard xmlns="http://riboseinc.com/isoxml">},
841
- <<~MISC,
842
- <iso-standard xmlns="http://riboseinc.com/isoxml">
843
- <misc-container>
844
- <toc type="table"><title>List of tables</title></toc>
845
- <toc type="figure"><title>List of figures</title></toc>
846
- <toc type="recommendation"><title>List of recommendations</title></toc>
847
- </misc-container>
848
- MISC
849
- )
850
- IsoDoc::WordConvert.new(
851
- { wordstylesheet: "spec/assets/word.css",
852
- htmlstylesheet: "spec/assets/html.scss",
853
- wordintropage: "spec/assets/wordintro.html",
854
- doctoclevels: 3 },
855
- ).convert("test", toc_input, false)
856
- word = File.read("test.doc")
857
- .sub(/^.*<div class="WordSection2">/m, '<div class="WordSection2">')
858
- .sub(%r{<p class="MsoNormal">\s*<br clear="all" class="section"/>\s*</p>\s*<div class="WordSection3">.*$}m, "")
859
- expect(xmlpp(word.gsub(/_Toc\d\d+/, "_Toc")))
860
- .to be_equivalent_to xmlpp(<<~'OUTPUT')
861
- <div class='WordSection2'>
862
- /* an empty word intro page */
863
- <p class='MsoToc1'>
864
- <span lang='EN-GB' xml:lang='EN-GB'>
865
- <span style='mso-element:field-begin'/>
866
- <span style='mso-spacerun:yes'>&#xA0;</span>
867
- TOC \o "1-3" \h \z \u
868
- <span style='mso-element:field-separator'/>
869
- </span>
870
- <span class='MsoHyperlink'>
871
- <span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
872
- <a href='#_Toc'>
873
- Clause 4
874
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
875
- <span style='mso-tab-count:1 dotted'>. </span>
876
- </span>
877
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
878
- <span style='mso-element:field-begin'/>
879
- </span>
880
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
881
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
882
- <span style='mso-element:field-separator'/>
883
- </span>
884
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
885
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
886
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
887
- <span style='mso-element:field-end'/>
888
- </span>
889
- </a>
890
- </span>
891
- </span>
892
- </p>
893
- <p class='MsoToc2'>
894
- <span class='MsoHyperlink'>
895
- <span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
896
- <a href='#_Toc'>
897
- Introduction to this
898
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
899
- <span style='mso-tab-count:1 dotted'>. </span>
900
- </span>
901
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
902
- <span style='mso-element:field-begin'/>
903
- </span>
904
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
905
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
906
- <span style='mso-element:field-separator'/>
907
- </span>
908
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
909
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
910
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
911
- <span style='mso-element:field-end'/>
912
- </span>
913
- </a>
914
- </span>
915
- </span>
916
- </p>
917
- <p class='MsoToc2'>
918
- <span class='MsoHyperlink'>
919
- <span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
920
- <a href='#_Toc'>
921
- Clause 4.2
922
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
923
- <span style='mso-tab-count:1 dotted'>. </span>
924
- </span>
925
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
926
- <span style='mso-element:field-begin'/>
927
- </span>
928
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
929
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
930
- <span style='mso-element:field-separator'/>
931
- </span>
932
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
933
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
934
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
935
- <span style='mso-element:field-end'/>
936
- </span>
937
- </a>
938
- </span>
939
- </span>
940
- </p>
941
- <p class='MsoToc3'>
942
- <span class='MsoHyperlink'>
943
- <span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
944
- <a href='#_Toc'>
945
- Clause 4.2.1
946
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
947
- <span style='mso-tab-count:1 dotted'>. </span>
948
- </span>
949
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
950
- <span style='mso-element:field-begin'/>
951
- </span>
952
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
953
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
954
- <span style='mso-element:field-separator'/>
955
- </span>
956
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
957
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
958
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
959
- <span style='mso-element:field-end'/>
960
- </span>
961
- </a>
962
- </span>
963
- </span>
964
- </p>
965
- <p class='MsoToc1'>
966
- <span lang='EN-GB' xml:lang='EN-GB'>
967
- <span style='mso-element:field-end'/>
968
- </span>
969
- <span lang='EN-GB' xml:lang='EN-GB'>
970
- <p class='MsoNormal'>&#xA0;</p>
971
- </span>
972
- </p>
973
- <p class='TOCTitle'>List of tables</p>
974
- <p class='MsoToc1'>
975
- <span lang='EN-GB' xml:lang='EN-GB'>
976
- <span style='mso-element:field-begin'/>
977
- <span style='mso-spacerun:yes'>&#xA0;</span>
978
- TOC \h \z \t "TableTitle,tabletitle"
979
- <span style='mso-element:field-separator'/>
980
- </span>
981
- <span class='MsoHyperlink'>
982
- <span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
983
- <a href='#_Toc'>
984
- First table
985
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
986
- <span style='mso-tab-count:1 dotted'>. </span>
987
- </span>
988
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
989
- <span style='mso-element:field-begin'/>
990
- </span>
991
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
992
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
993
- <span style='mso-element:field-separator'/>
994
- </span>
995
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
996
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
997
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
998
- <span style='mso-element:field-end'/>
999
- </span>
1000
- </a>
1001
- </span>
1002
- </span>
1003
- </p>
1004
- <p class='MsoToc1'>
1005
- <span lang='EN-GB' xml:lang='EN-GB'>
1006
- <span style='mso-element:field-end'/>
1007
- </span>
1008
- <span lang='EN-GB' xml:lang='EN-GB'>
1009
- <p class='MsoNormal'>&#xA0;</p>
1010
- </span>
1011
- </p>
1012
- <p class='TOCTitle'>List of figures</p>
1013
- <p class='MsoToc1'>
1014
- <span lang='EN-GB' xml:lang='EN-GB'>
1015
- <span style='mso-element:field-begin'/>
1016
- <span style='mso-spacerun:yes'>&#xA0;</span>
1017
- TOC \h \z \t "FigureTitle,figuretitle"
1018
- <span style='mso-element:field-separator'/>
1019
- </span>
1020
- <span class='MsoHyperlink'>
1021
- <span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
1022
- <a href='#_Toc'>
1023
- First figure
1024
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
1025
- <span style='mso-tab-count:1 dotted'>. </span>
1026
- </span>
1027
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
1028
- <span style='mso-element:field-begin'/>
1029
- </span>
1030
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
1031
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
1032
- <span style='mso-element:field-separator'/>
1033
- </span>
1034
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
1035
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
1036
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
1037
- <span style='mso-element:field-end'/>
1038
- </span>
1039
- </a>
1040
- </span>
1041
- </span>
1042
- </p>
1043
- <p class='MsoToc1'>
1044
- <span lang='EN-GB' xml:lang='EN-GB'>
1045
- <span style='mso-element:field-end'/>
1046
- </span>
1047
- <span lang='EN-GB' xml:lang='EN-GB'>
1048
- <p class='MsoNormal'>&#xA0;</p>
1049
- </span>
1050
- </p>
1051
- <p class='TOCTitle'>List of recommendations</p>
1052
- <p class='MsoToc1'>
1053
- <span lang='EN-GB' xml:lang='EN-GB'>
1054
- <span style='mso-element:field-begin'/>
1055
- <span style='mso-spacerun:yes'>&#xA0;</span>
1056
- TOC \h \z \t
1057
- "RecommendationTitle,RecommendationTestTitle,recommendationtitle,recommendationtesttitle"
1058
- <span style='mso-element:field-separator'/>
1059
- </span>
1060
- <span class='MsoHyperlink'>
1061
- <span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
1062
- <a href='#_Toc'>
1063
- : /ogc/recommendation/wfs/2
1064
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
1065
- <span style='mso-tab-count:1 dotted'>. </span>
1066
- </span>
1067
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
1068
- <span style='mso-element:field-begin'/>
1069
- </span>
1070
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
1071
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
1072
- <span style='mso-element:field-separator'/>
1073
- </span>
1074
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
1075
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
1076
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
1077
- <span style='mso-element:field-end'/>
1078
- </span>
1079
- </a>
1080
- </span>
1081
- </span>
1082
- </p>
1083
- <p class='MsoToc1'>
1084
- <span class='MsoHyperlink'>
1085
- <span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
1086
- <a href='#_Toc'>
1087
- Recommendation Verification 1: /ogc/recommendation/wfs/3
1088
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
1089
- <span style='mso-tab-count:1 dotted'>. </span>
1090
- </span>
1091
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
1092
- <span style='mso-element:field-begin'/>
1093
- </span>
1094
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
1095
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
1096
- <span style='mso-element:field-separator'/>
1097
- </span>
1098
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
1099
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
1100
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
1101
- <span style='mso-element:field-end'/>
1102
- </span>
1103
- </a>
1104
- </span>
1105
- </span>
1106
- </p>
1107
- <p class='MsoToc1'>
1108
- <span class='MsoHyperlink'>
1109
- <span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
1110
- <a href='#_Toc'>
1111
- Recommendation Verification 2: /ogc/recommendation/wfs/3
1112
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
1113
- <span style='mso-tab-count:1 dotted'>. </span>
1114
- </span>
1115
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
1116
- <span style='mso-element:field-begin'/>
1117
- </span>
1118
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
1119
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
1120
- <span style='mso-element:field-separator'/>
1121
- </span>
1122
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
1123
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
1124
- <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
1125
- <span style='mso-element:field-end'/>
1126
- </span>
1127
- </a>
1128
- </span>
1129
- </span>
1130
- </p>
1131
- <p class='MsoToc1'>
1132
- <span lang='EN-GB' xml:lang='EN-GB'>
1133
- <span style='mso-element:field-end'/>
1134
- </span>
1135
- <span lang='EN-GB' xml:lang='EN-GB'>
1136
- <p class='MsoNormal'>&#xA0;</p>
1137
- </span>
1138
- </p>
1139
- <p class='MsoNormal'>&#xA0;</p>
1140
- </div>
1141
- OUTPUT
1142
- end
1143
-
1144
- it "generates HTML output with custom ToC levels function" do
1145
- FileUtils.rm_f "test.doc"
1146
- FileUtils.rm_f "test.html"
1147
- IsoDoc::HtmlConvert.new({ htmltoclevels: 3 })
1148
- .convert("test", <<~"INPUT", false)
1149
- <iso-standard xmlns="http://riboseinc.com/isoxml">
1150
- <preface><foreword>
1151
- <note>
1152
- <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
1153
- </note>
1154
- </foreword></preface>
1155
- </iso-standard>
1156
- INPUT
1157
- html = File.read("test.html")
1158
- toclevel = <<~"TOCLEVEL"
1159
- function toclevel() { return "h1:not(:empty):not(.TermNum):not(.noTOC),h2:not(:empty):not(.TermNum):not(.noTOC),h3:not(:empty):not(.TermNum):not(.noTOC)";}
1160
- TOCLEVEL
1161
- expect(html).to include toclevel
1162
- end
1163
-
1164
- it "reorders footnote numbers in HTML" do
1165
- FileUtils.rm_f "test.html"
1166
- IsoDoc::HtmlConvert.new(
1167
- { wordstylesheet: "spec/assets/word.css",
1168
- htmlstylesheet: "spec/assets/html.scss",
1169
- wordintropage: "spec/assets/wordintro.html" },
1170
- ).convert("test", <<~"INPUT", false)
1171
- <iso-standard xmlns="http://riboseinc.com/isoxml">
1172
- <sections>
1173
- <clause id="A" inline-header="false" obligation="normative"><title>Clause 4</title><fn reference="3">
1174
- <p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">This is a footnote.</p>
1175
- </fn><clause id="N" inline-header="false" obligation="normative">
1176
- <title>Introduction to this<fn reference="2">
1177
- Formerly denoted as 15 % (m/m).
1178
- </fn></title>
1179
- </clause>
1180
- <clause id="O" inline-header="false" obligation="normative">
1181
- <title>Clause 4.2</title>
1182
- <p>A<fn reference="1">
1183
- <p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">Formerly denoted as 15 % (m/m).</p>
1184
- </fn></p>
1185
- </clause></clause>
1186
- </sections>
1187
- </iso-standard>
1188
- INPUT
1189
- html = File.read("test.html")
1190
- .sub(/^.*<main class="main-section">/m,
1191
- '<main xmlns:epub="epub" class="main-section">')
1192
- .sub(%r{</main>.*$}m, "</main>")
1193
- expect(xmlpp(html)).to be_equivalent_to xmlpp(<<~"OUTPUT")
1194
- <main xmlns:epub="epub" class="main-section"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
1195
- <p class="zzSTDTitle1"></p>
1196
- <div id="A">
1197
- <h1>Clause 4</h1>
1198
- <a class='FootnoteRef' href='#fn:3' id='fnref:1'>
1199
- <sup>1</sup>
1200
- </a>
1201
- <div id="N">
1202
- <h2>Introduction to this<a class='FootnoteRef' href='#fn:2' id='fnref:2'><sup>2</sup></a></h2>
1203
- </div>
1204
- <div id="O">
1205
- <h2>Clause 4.2</h2>
1206
- <p>A<a class='FootnoteRef' href='#fn:2'><sup>2</sup></a></p>
1207
- </div>
1208
- </div>
1209
- <aside id="fn:3" class="footnote">
1210
- <p id="_ff27c067-2785-4551-96cf-0a73530ff1e6"><a class='FootnoteRef' href='#fn:3'>
1211
- <sup>1</sup>
1212
- </a>This is a footnote.</p>
1213
- <a href="#fnref:1">&#x21A9;</a></aside>
1214
- <aside id="fn:2" class="footnote">
1215
- <a class='FootnoteRef' href='#fn:2'><sup>2</sup></a>Formerly denoted as 15 % (m/m).
1216
- <a href="#fnref:2">&#x21A9;</a></aside>
1217
- </main>
1218
- OUTPUT
1219
- end
1220
-
1221
- it "moves images in HTML #1" do
1222
- FileUtils.rm_f "test.html"
1223
- FileUtils.rm_rf Dir.glob "test_*_htmlimages"
1224
- IsoDoc::HtmlConvert.new(
1225
- { wordstylesheet: "spec/assets/word.css",
1226
- htmlstylesheet: "spec/assets/html.scss" },
1227
- ).convert("test", <<~"INPUT", false)
1228
- <iso-standard xmlns="http://riboseinc.com/isoxml">
1229
- <preface><foreword>
1230
- <figure id="_">
1231
- <name>Split-it-right sample divider</name>
1232
- <image src="#{File.expand_path(File.join(File.dirname(__FILE__), '..', 'assets/rice_image1.png'))}" id="_" mimetype="image/png"/>
1233
- <image src="spec/assets/rice_image1.png" id="_" mimetype="image/png"/>
1234
- <image src="spec/assets/rice_image1.png" id="_" width="20000" height="300000" mimetype="image/png"/>
1235
- <image src="spec/assets/rice_image1.png" id="_" width="99" height="auto" mimetype="image/png"/>
1236
- <image src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB9AAAAfQCAAAAAC/U5ulAAAjo0lEQVR4nOzVMQ0AMAzAsPInvYHoMS2yEeTLHADge/M6AADYM3QACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIuAAAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQOgAMCB0ABgQOgAMCB0ABgIAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQOgAMCB0ABgQOgAMCB0ABgIAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPA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iMS4wIj8+Cjw/eG1sLXN0eWxlc2hlZXQgdHlwZT0idGV4dC94c2wiIGhyZWY9Ii4uLy4uLy4uL3hzbC9yZXNfZG9jL2ltZ2ZpbGUueHNsIj8+CjwhRE9DVFlQRSBpbWdmaWxlLmNvbnRlbnQgU1lTVEVNICIuLi8uLi8uLi9kdGQvdGV4dC5lbnQiPgo8aW1nZmlsZS5jb250ZW50IG1vZHVsZT0iZnVuZGFtZW50YWxzX29mX3Byb2R1Y3RfZGVzY3JpcHRpb25fYW5kX3N1cHBvcnQiIGZpbGU9ImFjdGlvbl9zY2hlbWFleHBnMS54bWwiPgo8aW1nIHNyYz0iYWN0aW9uX3NjaGVtYWV4cGcxLmdpZiI+CjxpbWcuYXJlYSBzaGFwZT0icmVjdCIgY29vcmRzPSIyMTAsMTg2LDM0MywyMjciIGhyZWY9Ii4uLy4uL3Jlc291cmNlcy9iYXNpY19hdHRyaWJ1dGVfc2NoZW1hL2Jhc2ljX2F0dHJpYnV0ZV9zY2hlbWEueG1sIiAvPgo8aW1nLmFyZWEgc2hhcGU9InJlY3QiIGNvb3Jkcz0iMTAsMTAsOTYsNTEiIGhyZWY9Ii4uLy4uL3Jlc291cmNlcy9hY3Rpb25fc2NoZW1hL2FjdGlvbl9zY2hlbWEueG1sIiAvPgo8aW1nLmFyZWEgc2hhcGU9InJlY3QiIGNvb3Jkcz0iMjEwLDI2NCwzNTgsMzA1IiBocmVmPSIuLi8uLi9yZXNvdXJjZXMvc3VwcG9ydF9yZXNvdXJjZV9zY2hlbWEvc3VwcG9ydF9yZXNvdXJjZV9zY2hlbWEueG1sIiAvPgo8L2ltZz4KPC9pbWdmaWxlLmNvbnRlbnQ+Cg==" height="20" width="auto" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f2" mimetype="application/xml"/>
1238
- </figure>
1239
- </foreword></preface>
1240
- </iso-standard>
1241
- INPUT
1242
- html = File.read("test.html")
1243
- .sub(/^.*<main class="main-section">/m, '<main class="main-section">')
1244
- .sub(%r{</main>.*$}m, "</main>")
1245
- expect(`ls test_*_htmlimages`).to match(/\.png$/)
1246
- expect(xmlpp(html.gsub(/\/[0-9a-f-]+\.png/, "/_.png"))
1247
- .gsub(/test_[^_]+_htmlimages/, "test_htmlimages"))
1248
- .to be_equivalent_to xmlpp(<<~"OUTPUT")
1249
- <main class="main-section"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
1250
- <br />
1251
- <div>
1252
- <h1 class="ForewordTitle">Foreword</h1>
1253
- <div id="_" class="figure">
1254
- <img src="test_htmlimages/_.png" height="776" width="922" />
1255
- <img src="test_htmlimages/_.png" height="776" width="922" />
1256
- <img src="test_htmlimages/_.png" height="800" width="53" />
1257
- <img src="test_htmlimages/_.png" height="83" width="99" />
1258
- <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB9AAAAfQCAAAAAC/U5ulAAAjo0lEQVR4nOzVMQ0AMAzAsPInvYHoMS2yEeTLHADge/M6AADYM3QACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIuAAAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQOgAMCB0ABgQOgAMCB0ABgIAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQOgAMCB0ABgQOgAMCB0ABgIAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQO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eWxlc2hlZXQgdHlwZT0idGV4dC94c2wiIGhyZWY9Ii4uLy4uLy4uL3hzbC9yZXNfZG9jL2ltZ2ZpbGUueHNsIj8+CjwhRE9DVFlQRSBpbWdmaWxlLmNvbnRlbnQgU1lTVEVNICIuLi8uLi8uLi9kdGQvdGV4dC5lbnQiPgo8aW1nZmlsZS5jb250ZW50IG1vZHVsZT0iZnVuZGFtZW50YWxzX29mX3Byb2R1Y3RfZGVzY3JpcHRpb25fYW5kX3N1cHBvcnQiIGZpbGU9ImFjdGlvbl9zY2hlbWFleHBnMS54bWwiPgo8aW1nIHNyYz0iYWN0aW9uX3NjaGVtYWV4cGcxLmdpZiI+CjxpbWcuYXJlYSBzaGFwZT0icmVjdCIgY29vcmRzPSIyMTAsMTg2LDM0MywyMjciIGhyZWY9Ii4uLy4uL3Jlc291cmNlcy9iYXNpY19hdHRyaWJ1dGVfc2NoZW1hL2Jhc2ljX2F0dHJpYnV0ZV9zY2hlbWEueG1sIiAvPgo8aW1nLmFyZWEgc2hhcGU9InJlY3QiIGNvb3Jkcz0iMTAsMTAsOTYsNTEiIGhyZWY9Ii4uLy4uL3Jlc291cmNlcy9hY3Rpb25fc2NoZW1hL2FjdGlvbl9zY2hlbWEueG1sIiAvPgo8aW1nLmFyZWEgc2hhcGU9InJlY3QiIGNvb3Jkcz0iMjEwLDI2NCwzNTgsMzA1IiBocmVmPSIuLi8uLi9yZXNvdXJjZXMvc3VwcG9ydF9yZXNvdXJjZV9zY2hlbWEvc3VwcG9ydF9yZXNvdXJjZV9zY2hlbWEueG1sIiAvPgo8L2ltZz4KPC9pbWdmaWxlLmNvbnRlbnQ+Cg==' height='' width=''/>
1260
- <p class="FigureTitle" style="text-align:center;">Split-it-right sample divider</p></div>
1261
- </div>
1262
- <p class="zzSTDTitle1"></p>
1263
- </main>
1264
- OUTPUT
1265
- end
1266
-
1267
- it "moves images in HTML #2" do
1268
- FileUtils.rm_f "test.html"
1269
- FileUtils.rm_rf "test_htmlimages"
1270
- IsoDoc::HtmlConvert.new(
1271
- { baseassetpath: "spec/assets",
1272
- wordstylesheet: "word.css",
1273
- htmlstylesheet: "html.scss" },
1274
- ).convert("test", <<~"INPUT", false)
1275
- <iso-standard xmlns="http://riboseinc.com/isoxml">
1276
- <preface><foreword>
1277
- <figure id="_">
1278
- <name>Split-it-right sample divider</name>
1279
- <image src="rice_image1.png" id="_" mimetype="image/png"/>
1280
- </figure>
1281
- </foreword></preface>
1282
- </iso-standard>
1283
- INPUT
1284
- html = File.read("test.html")
1285
- .sub(/^.*<main class="main-section">/m, '<main class="main-section">')
1286
- .sub(%r{</main>.*$}m, "</main>")
1287
- expect(`ls test_*_htmlimages`).to match(/\.png$/)
1288
- expect(xmlpp(html.gsub(/\/[0-9a-f-]+\.png/, "/_.png"))
1289
- .gsub(/test_[^_]+_htmlimages/, "test_htmlimages"))
1290
- .to be_equivalent_to xmlpp(<<~"OUTPUT")
1291
- <main class='main-section'>
1292
- <button onclick='topFunction()' id='myBtn' title='Go to top'>Top</button>
1293
- <br/>
1294
- <div>
1295
- <h1 class='ForewordTitle'>Foreword</h1>
1296
- <div id='_' class='figure'>
1297
- <img src='test_htmlimages/_.png' height='776' width='922'/>
1298
- <p class='FigureTitle' style='text-align:center;'>Split-it-right sample divider</p>
1299
- </div>
1300
- </div>
1301
- <p class='zzSTDTitle1'/>
1302
- </main>
1303
- OUTPUT
1304
- end
1305
-
1306
- describe "mathvariant to plain" do
1307
- context "when `mathvariant` attr equal to `script`" do
1308
- it "converts mathvariant text chars into associated plain chars" do
1309
- FileUtils.rm_f "test.html"
1310
- input = <<~INPUT
1311
- <?xml version="1.0" encoding="UTF-8"?>
1312
- <iso-standard xmlns="https://www.metanorma.org/ns/iso" type="semantic" version="1.5.14">
1313
- <sections>
1314
- <clause id="_clause" inline-header="false" obligation="normative">
1315
- <title>Clause</title>
1316
- <p id="_20514f5a-9f86-454e-b6ce-927f65ba6441">
1317
- <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML">
1318
- <mi>x</mi>
1319
- <mo>=</mo>
1320
- <mstyle mathvariant="script">
1321
- <mi>l</mi>
1322
- </mstyle>
1323
- <mo>+</mo>
1324
- <mn>1</mn>
1325
- </math></stem>
1326
- </p>
1327
- </clause>
1328
- </sections>
1329
- </iso-standard>
1330
- INPUT
1331
- output = <<~OUTPUT
1332
- <main class="main-section"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
1333
- <p class="zzSTDTitle1"></p>
1334
- <div id="_clause">
1335
- <h1>Clause</h1>
1336
- <p id="_20514f5a-9f86-454e-b6ce-927f65ba6441">
1337
- <span class="stem"><math xmlns="http://www.w3.org/1998/Math/MathML">
1338
- <mi>x</mi>
1339
- <mo>=</mo>
1340
- <mstyle mathvariant="script">
1341
- <mi>&#x1D4C1;</mi>
1342
- </mstyle>
1343
- <mo>+</mo>
1344
- <mn>1</mn>
1345
- </math></span>
1346
- </p>
1347
- </div>
1348
- </main>
1349
- OUTPUT
1350
- IsoDoc::HtmlConvert.new({}).convert("test", input, false)
1351
- html = File.read("test.html")
1352
- .sub(/^.*<main class="main-section">/m, '<main class="main-section">')
1353
- .sub(%r{</main>.*$}m, "</main>")
1354
- expect(html).to(be_equivalent_to(output))
1355
- end
1356
- end
1357
-
1358
- context "when complex `mathvariant` combinations" do
1359
- it "converts mathvariant text chars into associated plain chars" do
1360
- FileUtils.rm_f "test.html"
1361
- input = <<~INPUT
1362
- <?xml version="1.0" encoding="UTF-8"?>
1363
- <iso-standard xmlns="https://www.metanorma.org/ns/iso" type="semantic" version="1.5.14">
1364
- <sections>
1365
- <clause id="_clause" inline-header="false" obligation="normative">
1366
- <title>Clause</title>
1367
- <p id="_20514f5a-9f86-454e-b6ce-927f65ba6441">
1368
- <stem type="MathML">
1369
- <math xmlns="http://www.w3.org/1998/Math/MathML">
1370
- <mstyle mathvariant="sans-serif">
1371
- <mfrac>
1372
- <mrow>
1373
- <mrow>
1374
- <mi>n</mi>
1375
- <mfenced open="(" close=")">
1376
- <mrow>
1377
- <mstyle mathvariant="bold">
1378
- <mrow>
1379
- <mi>n</mi>
1380
- <mo>+</mo>
1381
- <mn>1</mn>
1382
- <mo>+</mo>
1383
- <mstyle mathvariant="italic">
1384
- <mi>x</mi>
1385
- </mstyle>
1386
- </mrow>
1387
- </mstyle>
1388
- </mrow>
1389
- </mfenced>
1390
- </mrow>
1391
- </mrow>
1392
- <mrow>
1393
- <mstyle mathvariant="bold">
1394
- <mrow>
1395
- <mi>y</mi>
1396
- <mo>+</mo>
1397
- <mstyle mathvariant="fraktur">
1398
- <mi>z</mi>
1399
- </mstyle>
1400
- </mrow>
1401
- </mstyle>
1402
- </mrow>
1403
- </mfrac>
1404
- </mstyle>
1405
- </math>
1406
- </stem>
1407
- </p>
1408
- </clause>
1409
- </sections>
1410
- </iso-standard>
1411
- INPUT
1412
- output = <<~OUTPUT
1413
- <main class="main-section"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
1414
- <p class="zzSTDTitle1"></p>
1415
- <div id="_clause">
1416
- <h1>Clause</h1>
1417
- <p id="_20514f5a-9f86-454e-b6ce-927f65ba6441">
1418
- <span class="stem"><math xmlns="http://www.w3.org/1998/Math/MathML">
1419
- <mstyle mathvariant="sans-serif">
1420
- <mfrac>
1421
- <mrow>
1422
- <mrow>
1423
- <mi>&#x1D5C7;</mi>
1424
- <mfenced open="(" close=")">
1425
- <mrow>
1426
- <mstyle mathvariant="bold">
1427
- <mrow>
1428
- <mi>&#x1D5FB;</mi>
1429
- <mo>+</mo>
1430
- <mn>&#x1D7ED;</mn>
1431
- <mo>+</mo>
1432
- <mstyle mathvariant="italic">
1433
- <mi>&#x1D66D;</mi>
1434
- </mstyle>
1435
- </mrow>
1436
- </mstyle>
1437
- </mrow>
1438
- </mfenced>
1439
- </mrow>
1440
- </mrow>
1441
- <mrow>
1442
- <mstyle mathvariant="bold">
1443
- <mrow>
1444
- <mi>&#x1D606;</mi>
1445
- <mo>+</mo>
1446
- <mstyle mathvariant="fraktur">
1447
- <mi>&#x1D59F;</mi>
1448
- </mstyle>
1449
- </mrow>
1450
- </mstyle>
1451
- </mrow>
1452
- </mfrac>
1453
- </mstyle>
1454
- </math></span>
1455
- </p>
1456
- </div>
1457
- </main>
1458
- OUTPUT
1459
- IsoDoc::HtmlConvert.new({}).convert("test", input, false)
1460
- html = File.read("test.html")
1461
- .sub(/^.*<main class="main-section">/m, '<main class="main-section">')
1462
- .sub(%r{</main>.*$}m, "</main>")
1463
- expect(html).to(be_equivalent_to(output))
1464
- end
1465
- end
1466
- end
1467
-
1468
- it "moves images in HTML with no file suffix" do
1469
- FileUtils.rm_f "test.html"
1470
- FileUtils.rm_rf Dir.glob "test_*_htmlimages"
1471
- IsoDoc::HtmlConvert.new(
1472
- { wordstylesheet: "spec/assets/word.css",
1473
- htmlstylesheet: "spec/assets/html.scss" },
1474
- ).convert("test", <<~"INPUT", false)
1475
- <iso-standard xmlns="http://riboseinc.com/isoxml">
1476
- <preface><foreword>
1477
- <figure id="_">
1478
- <name>Split-it-right sample divider</name>
1479
- <image src="spec/assets/rice_image1" id="_" mimetype="image/png"/>
1480
- <image src="spec/assets/rice_image1" id="_" mimetype="image/*"/>
1481
- <image src="data:image/*;base64,iVBORw0KGgoAAAANSUhEUgAAB9AAAAfQCAAAAAC/U5ulAAAjo0lEQVR4nOzVMQ0AMAzAsPInvYHoMS2yEeTLHADge/M6AADYM3QACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIuAAAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQOgAMCB0ABgQOgAMCB0ABgIAAP//7N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QOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQOgAMCB0ABgQOgAMBAAA//8DAE/7hyLdS2yEAAAAAElFTkSuQmCC" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f3" mimetype="image/png"/>
1482
- </figure>
1483
- </foreword></preface>
1484
- </iso-standard>
1485
- INPUT
1486
- html = File.read("test.html")
1487
- .sub(/^.*<main class="main-section">/m, '<main class="main-section">')
1488
- .sub(%r{</main>.*$}m, "</main>")
1489
- expect(`ls test_*_htmlimages`).to match(/\.png$/)
1490
- expect(xmlpp(html.gsub(/\/[0-9a-f-]+\.png/, "/_.png"))
1491
- .gsub(/test_[^_]+_htmlimages/, "test_htmlimages"))
1492
- .to be_equivalent_to xmlpp(<<~"OUTPUT")
1493
- <main class='main-section'>
1494
- <button onclick='topFunction()' id='myBtn' title='Go to top'>Top</button>
1495
- <br/>
1496
- <div>
1497
- <h1 class='ForewordTitle'>Foreword</h1>
1498
- <div id='_' class='figure'>
1499
- <img src='test_htmlimages/_.png' height='776' width='922'/>
1500
- <img src='test_htmlimages/_.png' height='776' width='922'/>
1501
- <img src='data:image/*;base64,iVBORw0KGgoAAAANSUhEUgAAB9AAAAfQCAAAAAC/U5ulAAAjo0lEQVR4nOzVMQ0AMAzAsPInvYHoMS2yEeTLHADge/M6AADYM3QACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIuAAAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQO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R0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQOgAMCB0ABgQOgAMBAAA//8DAE/7hyLdS2yEAAAAAElFTkSuQmCC' height='800' width='800'/>
1502
- <p class='FigureTitle' style='text-align:center;'>Split-it-right sample divider</p>
1503
- </div>
1504
- </div>
1505
- <p class='zzSTDTitle1'/>
1506
- </main>
1507
- OUTPUT
1508
- end
1509
-
1510
- it "moves images in HTML, using relative file location" do
1511
- FileUtils.rm_f "spec/test.html"
1512
- FileUtils.rm_rf "spec/test_htmlimages"
1513
- IsoDoc::HtmlConvert
1514
- .new(wordstylesheet: "assets/word.css",
1515
- htmlstylesheet: "assets/html.scss")
1516
- .convert("spec/test", <<~"INPUT", false)
1517
- <iso-standard xmlns="http://riboseinc.com/isoxml">
1518
- <preface><foreword>
1519
- <figure id="_">
1520
- <name>Split-it-right sample divider</name>
1521
- <image src="#{File.expand_path(File.join(File.dirname(__FILE__), '..', 'assets/rice_image1.png'))}" id="_" mimetype="image/png"/>
1522
- <image src="assets/rice_image1.png" id="_" mimetype="image/png"/>
1523
- <image src="assets/rice_image1.png" id="_" width="20000" height="300000" mimetype="image/png"/>
1524
- <image src="assets/rice_image1.png" id="_" width="99" height="auto" mimetype="image/png"/>
1525
- </figure>
1526
- </foreword></preface>
1527
- </iso-standard>
1528
- INPUT
1529
- html = File.read("spec/test.html")
1530
- .sub(/^.*<main class="main-section">/m, '<main class="main-section">')
1531
- .sub(%r{</main>.*$}m, "</main>")
1532
- expect(`ls test_*_htmlimages`).to match(/\.png$/)
1533
- expect(xmlpp(html.gsub(/\/[0-9a-f-]+\.png/, "/_.png"))
1534
- .gsub(/test_[^_]+_htmlimages/, "test_htmlimages"))
1535
- .to be_equivalent_to xmlpp(<<~"OUTPUT")
1536
- <main class="main-section"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
1537
- <br />
1538
- <div>
1539
- <h1 class="ForewordTitle">Foreword</h1>
1540
- <div id="_" class="figure">
1541
- <img src="test_htmlimages/_.png" height="776" width="922" />
1542
- <img src="test_htmlimages/_.png" height="776" width="922" />
1543
- <img src="test_htmlimages/_.png" height="800" width="53" />
1544
- <img src="test_htmlimages/_.png" height="83" width="99" />
1545
- <p class="FigureTitle" style="text-align:center;">Split-it-right sample divider</p></div>
1546
- </div>
1547
- <p class="zzSTDTitle1"></p>
1548
- </main>
1549
- OUTPUT
1550
- end
1551
-
1552
- it "encodes images in HTML as data URIs" do
1553
- FileUtils.rm_f "test.html"
1554
- FileUtils.rm_rf Dir.glob "test_*_htmlimages"
1555
- IsoDoc::HtmlConvert
1556
- .new(htmlstylesheet: "spec/assets/html.scss", datauriimage: true)
1557
- .convert("test", <<~"INPUT", false)
1558
- <iso-standard xmlns="http://riboseinc.com/isoxml">
1559
- <preface><foreword>
1560
- <figure id="_">
1561
- <name>Split-it-right sample divider</name>
1562
- <image src="#{File.expand_path(File.join(File.dirname(__FILE__), '..', 'assets/rice_image1.png'))}" id="_" mimetype="image/png"/>
1563
- <image src="spec/assets/rice_image1.png" id="_" mimetype="image/png"/>
1564
- </figure>
1565
- </foreword></preface>
1566
- </iso-standard>
1567
- INPUT
1568
- html = File.read("test.html")
1569
- .sub(/^.*<main class="main-section">/m, '<main class="main-section">')
1570
- .sub(%r{</main>.*$}m, "</main>")
1571
- expect(xmlpp(html
1572
- .gsub(%r{src="data:image/png;base64,[^"]+"}, %{src="data:image/png;base64,_"})))
1573
- .to be_equivalent_to xmlpp(<<~"OUTPUT")
1574
- <main class="main-section"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
1575
- <br />
1576
- <div>
1577
- <h1 class="ForewordTitle">Foreword</h1>
1578
- <div id="_" class="figure">
1579
- <img src="data:image/png;base64,_" height="776" width="922" />
1580
- <img src="data:image/png;base64,_" height="776" width="922" />
1581
- <p class="FigureTitle" style="text-align:center;">Split-it-right sample divider</p></div>
1582
- </div>
1583
- <p class="zzSTDTitle1"></p>
1584
- </main>
1585
- OUTPUT
1586
- end
1587
-
1588
- it "encodes images in HTML as data URIs, using relative file location" do
1589
- FileUtils.rm_f "spec/test.html"
1590
- FileUtils.rm_rf Dir.glob "test_*_htmlimages"
1591
- IsoDoc::HtmlConvert
1592
- .new({ htmlstylesheet: "assets/html.scss", datauriimage: true })
1593
- .convert("spec/test", <<~"INPUT", false)
1594
- <iso-standard xmlns="http://riboseinc.com/isoxml">
1595
- <preface><foreword>
1596
- <figure id="_">
1597
- <name>Split-it-right sample divider</name>
1598
- <image src="#{File.expand_path(File.join(File.dirname(__FILE__), '..', 'assets/rice_image1.png'))}" id="_" mimetype="image/png"/>
1599
- <image src="assets/rice_image1.png" id="_" mimetype="image/png"/>
1600
- </figure>
1601
- </foreword></preface>
1602
- </iso-standard>
1603
- INPUT
1604
- html = File.read("spec/test.html")
1605
- .sub(/^.*<main class="main-section">/m, '<main class="main-section">')
1606
- .sub(%r{</main>.*$}m, "</main>")
1607
- expect(xmlpp(html
1608
- .gsub(%r{src="data:image/png;base64,[^"]+"}, %{src="data:image/png;base64,_"})))
1609
- .to be_equivalent_to xmlpp(<<~"OUTPUT")
1610
- <main class="main-section"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
1611
- <br />
1612
- <div>
1613
- <h1 class="ForewordTitle">Foreword</h1>
1614
- <div id="_" class="figure">
1615
- <img src="data:image/png;base64,_" height="776" width="922" />
1616
- <img src="data:image/png;base64,_" height="776" width="922" />
1617
- <p class="FigureTitle" style="text-align:center;">Split-it-right sample divider</p></div>
1618
- </div>
1619
- <p class="zzSTDTitle1"></p>
1620
- </main>
1621
- OUTPUT
1622
- end
1623
-
1624
- it "processes IsoXML terms for HTML" do
1625
- FileUtils.rm_f "test.html"
1626
- FileUtils.rm_f "test.doc"
1627
- IsoDoc::HtmlConvert.new(options)
1628
- .convert("test", <<~"INPUT", false)
1629
- <iso-standard xmlns="http://riboseinc.com/isoxml">
1630
- <sections>
1631
- <terms id="_terms_and_definitions" obligation="normative"><title>Terms and Definitions</title>
1632
- <term id="paddy1"><name>1.1.</name><preferred>paddy</preferred>
1633
- <domain>rice</domain>
1634
- <definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></definition>
1635
- <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f892">
1636
- <p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
1637
- <ul>
1638
- <li>A</li>
1639
- </ul>
1640
- </termexample>
1641
- <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f894">
1642
- <ul>
1643
- <li>A</li>
1644
- </ul>
1645
- </termexample>
1646
- <termsource status="modified">
1647
- <origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality></origin>
1648
- <modification>
1649
- <p id="_e73a417d-ad39-417d-a4c8-20e4e2529489">The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here</p>
1650
- </modification>
1651
- </termsource></term>
1652
- <term id="paddy"><name>1.2.</name><preferred>paddy</preferred><admitted>paddy rice</admitted>
1653
- <admitted>rough rice</admitted>
1654
- <deprecates>cargo rice</deprecates>
1655
- <definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></definition>
1656
- <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f893">
1657
- <ul>
1658
- <li>A</li>
1659
- </ul>
1660
- </termexample>
1661
- <termnote id="_671a1994-4783-40d0-bc81-987d06ffb74e">
1662
- <p id="_19830f33-e46c-42cc-94ca-a5ef101132d5">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
1663
- </termnote>
1664
- <termnote id="_671a1994-4783-40d0-bc81-987d06ffb74f">
1665
- <ul><li>A</li></ul>
1666
- <p id="_19830f33-e46c-42cc-94ca-a5ef101132d5">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
1667
- </termnote>
1668
- <termsource status="identical">
1669
- <origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality></origin>
1670
- </termsource></term>
1671
- </terms>
1672
- </sections>
1673
- </iso-standard>
1674
- INPUT
1675
- expect(File.exist?("test.html")).to be true
1676
- html = File.read("test.html")
1677
- expect(html).to match(%r{<h2 class="TermNum" id="paddy1">1\.1\.</h2>})
1678
- expect(html).to match(%r{<h2 class="TermNum" id="paddy">1\.2\.</h2>})
1679
- end
1680
-
1681
- it "creates continuation styles for multiparagraph list items in Word" do
1682
- FileUtils.rm_f "test.doc"
1683
- FileUtils.rm_f "test.html"
1684
- IsoDoc::WordConvert.new(options)
1685
- .convert("test", <<~"INPUT", false)
1686
- <iso-standard xmlns="http://riboseinc.com/isoxml">
1687
- <preface><foreword>
1688
- <ul>
1689
- <li><p>A</p>
1690
- <p>B</p></li>
1691
- <li><ol><li><p>C</p>
1692
- <p>D</p>
1693
- <sourcecode>E</sourcecode></li>
1694
- </ol></li>
1695
- </ul>
1696
- <ol>
1697
- <li><p>A1</p>
1698
- <p>B1</p></li>
1699
- <li><ul><li><p>C1</p>
1700
- <formula id="_5fc1ef0f-75d2-4b54-802c-b1bad4a53b62">
1701
- <stem type="AsciiMath">D1</stem>
1702
- </formula>
1703
- <dl id="_f8fb7ed7-7874-44a8-933f-06e0e86fb264">
1704
- <dt>
1705
- <em>n</em>
1706
- </dt>
1707
- <dd>
1708
- <p id="_a27281a4-b20e-4d0b-a780-bab9e851b03e">is the number of coating layers</p>
1709
- </dd>
1710
- </dl>
1711
- </ul></li>
1712
- </ol>
1713
- </foreword></preface>
1714
- </iso-standard>
1715
- INPUT
1716
- word = File.read("test.doc")
1717
- .sub(/^.*<div class="WordSection2">/m, '<div class="WordSection2" xmlns:m="m">')
1718
- .sub(%r{<p class="MsoNormal">\s*<br clear="all" class="section"/>\s*</p>\s*<div class="WordSection3">.*$}m, "")
1719
- expect(xmlpp(word)).to be_equivalent_to xmlpp(<<~"OUTPUT")
1720
- <div class='WordSection2' xmlns:m='m'>
1721
- <p class='MsoNormal'>
1722
- <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
1723
- </p>
1724
- <div>
1725
- <h1 class='ForewordTitle'>Foreword</h1>
1726
- <p class='MsoListParagraphCxSpFirst'>
1727
- A
1728
- <div class='ListContLevel1'>
1729
- <p class='MsoNormal'>B</p>
1730
- </div>
1731
- </p>
1732
- <p class='MsoListParagraphCxSpLast'>
1733
- <p class='MsoListParagraphCxSpFirst'>
1734
- C
1735
- <div class='ListContLevel2'>
1736
- <p class='MsoNormal'>D</p>
1737
- </div>
1738
- <div class='ListContLevel2'>
1739
- <p class='Sourcecode'>E</p>
1740
- </div>
1741
- </p>
1742
- </p>
1743
- <p class='MsoListParagraphCxSpFirst'>
1744
- A1
1745
- <div class='ListContLevel1'>
1746
- <p class='MsoNormal'>B1</p>
1747
- </div>
1748
- </p>
1749
- <p class='MsoListParagraphCxSpLast'>
1750
- C1
1751
- <div class='ListContLevel2'>
1752
- <div>
1753
- <a name='_5fc1ef0f-75d2-4b54-802c-b1bad4a53b62' id='_5fc1ef0f-75d2-4b54-802c-b1bad4a53b62'/>
1754
- <div class='formula'>
1755
- <p class='MsoNormal'>
1756
- <span class='stem'>
1757
- <m:oMath>
1758
- <m:r>
1759
- <m:t>D1</m:t>
1760
- </m:r>
1761
- </m:oMath>
1762
- </span>
1763
- <span style='mso-tab-count:1'>&#xA0; </span>
1764
- </p>
1765
- </div>
1766
- </div>
1767
- </div>
1768
- <div class='ListContLevel2'>
1769
- <table class='dl'>
1770
- <tr>
1771
- <td valign='top' align='left'>
1772
- <p align='left' style='margin-left:0pt;text-align:left;' class='MsoNormal'>
1773
- <i>n</i>
1774
- </p>
1775
- </td>
1776
- <td valign='top'>
1777
- <p class='MsoNormal'>
1778
- <a name='_a27281a4-b20e-4d0b-a780-bab9e851b03e' id='_a27281a4-b20e-4d0b-a780-bab9e851b03e'/>
1779
- is the number of coating layers
1780
- </p>
1781
- </td>
1782
- </tr>
1783
- </table>
1784
- </div>
1785
- </p>
1786
- </div>
1787
- <p class='MsoNormal'>&#xA0;</p>
1788
- </div>
1789
- OUTPUT
1790
- end
1791
-
1792
- it "does not lose HTML escapes in postprocessing" do
1793
- FileUtils.rm_f "test.doc"
1794
- FileUtils.rm_f "test.html"
1795
- input = <<~INPUT
1796
- <iso-standard xmlns="http://riboseinc.com/isoxml">
1797
- <preface><foreword>
1798
- <sourcecode id="samplecode">
1799
- <name>XML code</name>
1800
- &lt;xml&gt; &amp;
1801
- </sourcecode>
1802
- </foreword></preface>
1803
- </iso-standard>
1804
- INPUT
1805
- IsoDoc::HtmlConvert.new(options).convert("test", input, false)
1806
- html = File.read("test.html")
1807
- .sub(/^.*<main class="main-section">/m, '<main class="main-section">')
1808
- .sub(%r{</main>.*$}m, "</main>")
1809
- expect(xmlpp(html)).to be_equivalent_to xmlpp(<<~"OUTPUT")
1810
- <main class="main-section"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
1811
- <br />
1812
- <div>
1813
- <h1 class="ForewordTitle">Foreword</h1>
1814
- <pre id="samplecode" class="prettyprint "><br />&#xA0;&#xA0;&#xA0; <br />&#xA0; &lt;xml&gt; &amp;<br />
1815
- </pre>
1816
- <p class="SourceTitle" style="text-align:center;">XML code</p>
1817
- </div>
1818
- <p class="zzSTDTitle1"></p>
1819
- </main>
1820
- OUTPUT
1821
-
1822
- FileUtils.rm_f "test.doc"
1823
- FileUtils.rm_f "test.html"
1824
- IsoDoc::WordConvert.new(options).convert("test", input, false)
1825
- word = File.read("test.doc")
1826
- .sub(/^.*<div class="WordSection2">/m, '<div class="WordSection2">')
1827
- .sub(%r{<p class="MsoNormal">\s*<br clear="all" class="section"/>\s*</p>\s*<div class="WordSection3">.*$}m, "")
1828
- expect(xmlpp(word)).to be_equivalent_to xmlpp(<<~"OUTPUT")
1829
- <div class="WordSection2">
1830
- <p class="MsoNormal">
1831
- <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
1832
- </p>
1833
- <div>
1834
- <h1 class="ForewordTitle">Foreword</h1>
1835
- <p class="Sourcecode" style="page-break-after:avoid;"><a name="samplecode" id="samplecode"></a><br/>&#xA0;&#xA0;&#xA0; <br/>&#xA0; &lt;xml&gt; &amp;<br/></p><p class="SourceTitle" style="text-align:center;">XML code</p>
1836
- </div>
1837
- <p class="MsoNormal">&#xA0;</p>
1838
- </div>
1839
- OUTPUT
1840
- end
1841
-
1842
- it "propagates example style to paragraphs in postprocessing (Word)" do
1843
- FileUtils.rm_f "test.doc"
1844
- FileUtils.rm_f "test.html"
1845
- IsoDoc::WordConvert.new(options).convert("test", <<~"INPUT", false)
1846
- <iso-standard xmlns="http://riboseinc.com/isoxml">
1847
- <preface><foreword>
1848
- <example id="samplecode">
1849
- <p>ABC</p>
1850
- </example>
1851
- </foreword></preface>
1852
- </iso-standard>
1853
- INPUT
1854
- word = File.read("test.doc")
1855
- .sub(/^.*<div class="WordSection2">/m, '<div class="WordSection2">')
1856
- .sub(%r{<p class="MsoNormal">\s*<br clear="all" class="section"/>\s*</p>\s*<div class="WordSection3">.*$}m, "")
1857
- expect(xmlpp(word)).to be_equivalent_to xmlpp(<<~"OUTPUT")
1858
- <div class="WordSection2">
1859
- <p class="MsoNormal">
1860
- <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
1861
- </p>
1862
- <div>
1863
- <h1 class="ForewordTitle">Foreword</h1>
1864
- <div class="example"><a name="samplecode" id="samplecode"></a>
1865
- <p class="example">ABC</p>
1866
- </div>
1867
- </div>
1868
- <p class="MsoNormal">&#xA0;</p>
1869
- </div>
1870
- OUTPUT
1871
- end
1872
-
1873
- it "deals with image captions (Word)" do
1874
- FileUtils.rm_f "test.doc"
1875
- FileUtils.rm_f "test.html"
1876
- IsoDoc::WordConvert.new(options)
1877
- .convert("test", <<~"INPUT", false)
1878
- <iso-standard xmlns="http://riboseinc.com/isoxml">
1879
- <preface><foreword>
1880
- <figure id="fig1">
1881
- <name>Typical arrangement of the far-field scan set-up</name>
1882
- <image src="spec/assets/rice_image1.png" id="_" mimetype="image/png"/>
1883
- </figure>
1884
- </foreword></preface>
1885
- </iso-standard>
1886
- INPUT
1887
- word = File.read("test.doc")
1888
- .sub(/^.*<div class="WordSection2">/m, '<div class="WordSection2">')
1889
- .sub(%r{<p class="MsoNormal">\s*<br clear="all" class="section"/>\s*</p>\s*<div class="WordSection3">.*$}m, "")
1890
- .sub(/src="[^"]+"/, 'src="_"')
1891
- expect(xmlpp(word)).to be_equivalent_to xmlpp(<<~"OUTPUT")
1892
- <div class="WordSection2">
1893
- <p class="MsoNormal">
1894
- <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
1895
- </p>
1896
- <div>
1897
- <h1 class="ForewordTitle">Foreword</h1>
1898
- <div class="figure"><a name="fig1" id="fig1"></a>
1899
- <p style="page-break-after:avoid;" class="figure"><img src="_" width="400" height="337"/></p>
1900
- <p class="FigureTitle" style="text-align:center;">Typical arrangement of the far-field scan set-up</p></div>
1901
- </div>
1902
- <p class="MsoNormal">&#xA0;</p>
1903
- </div>
1904
- OUTPUT
1905
- end
1906
-
1907
- it "deals with empty table titles (Word)" do
1908
- FileUtils.rm_f "test.doc"
1909
- FileUtils.rm_f "test.html"
1910
- IsoDoc::WordConvert.new(options)
1911
- .convert("test", <<~"INPUT", false)
1912
- <iso-standard xmlns="http://riboseinc.com/isoxml">
1913
- <preface><foreword>
1914
- <table id="_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7" unnumbered="true"><thead><tr>
1915
- <td rowspan="2">
1916
- <p id="_c47d9b39-adb2-431d-9320-78cb148fdb56">Output wavelength <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mo>(</mo><mi>μ</mi><mi>m</mi><mo>)</mo></mrow></math></stem></p>
1917
- </td>
1918
- <th colspan="3" align="left">Predictive wavelengths</th>
1919
- </tr>
1920
- </thead>
1921
- </table>
1922
- </preface>
1923
- </iso-standard>
1924
- INPUT
1925
- word = File.read("test.doc")
1926
- .sub(/^.*<div class="WordSection2">/m, '<div class="WordSection2" xmlns:m="m">')
1927
- .sub(%r{<p class="MsoNormal">\s*<br clear="all" class="section"/>\s*</p>\s*<div class="WordSection3">.*$}m, "")
1928
- .sub(/src="[^"]+"/, 'src="_"')
1929
- expect(xmlpp(word)).to be_equivalent_to xmlpp(<<~"OUTPUT")
1930
- <div class="WordSection2" xmlns:m="m">
1931
- <p class="MsoNormal">
1932
- <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
1933
- </p>
1934
- <div>
1935
- <h1 class="ForewordTitle">Foreword</h1>
1936
- <div align="center" class="table_container">
1937
- <table class="MsoISOTable" style="mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;"><a name="_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7" id="_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7"></a>
1938
- <thead>
1939
- <tr>
1940
- <td rowspan="2" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;">
1941
- <p class="MsoNormal"><a name="_c47d9b39-adb2-431d-9320-78cb148fdb56" id="_c47d9b39-adb2-431d-9320-78cb148fdb56"></a>Output wavelength <span class="stem">
1942
- <m:oMath>
1943
- <span style='font-style:normal;'>
1944
- <m:r>
1945
- <m:rPr>
1946
- <m:sty m:val='p'/>
1947
- </m:rPr>
1948
- <m:t>(</m:t>
1949
- </m:r>
1950
- </span>
1951
- <m:r>
1952
- <m:t>&#x3BC;m)</m:t>
1953
- </m:r>
1954
- </m:oMath>
1955
- </span></p>
1956
- </td>
1957
- <th colspan="3" align="left" style="font-weight:bold;border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">Predictive wavelengths</th>
1958
- </tr>
1959
- </thead>
1960
- </table>
1961
- </div>
1962
- </div>
1963
- <p class="MsoNormal">&#xA0;</p>
1964
- </div>
1965
- OUTPUT
1966
- end
1967
-
1968
- it "propagates alignment of table cells (Word)" do
1969
- FileUtils.rm_f "test.doc"
1970
- FileUtils.rm_f "test.html"
1971
- IsoDoc::WordConvert.new(options)
1972
- .convert("test", <<~"INPUT", false)
1973
- <iso-standard xmlns="http://riboseinc.com/isoxml">
1974
- <preface><foreword>
1975
- <table id="_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7" unnumbered="true"><thead><tr>
1976
- <td rowspan="2" align="left">
1977
- <p id="_c47d9b39-adb2-431d-9320-78cb148fdb56">Output wavelength</p>
1978
- <p id="_c47d9b39-adb2-431d-9320-78cb148fdb57">Output wavelength</p>
1979
- </td>
1980
- <th colspan="3" align="right"><p id="_c47d9b39-adb2-431d-9320-78cb148fdb58">Predictive wavelengths</p></th>
1981
- </tr>
1982
- </thead>
1983
- </table>
1984
- </preface>
1985
- </iso-standard>
1986
- INPUT
1987
- word = File.read("test.doc")
1988
- .sub(/^.*<div class="WordSection2">/m, '<div class="WordSection2" xmlns:m="m">')
1989
- .sub(%r{<p class="MsoNormal">\s*<br clear="all" class="section"/>\s*</p>\s*<div class="WordSection3">.*$}m, "")
1990
- .sub(/src="[^"]+"/, 'src="_"')
1991
- expect(xmlpp(word)).to be_equivalent_to xmlpp(<<~"OUTPUT")
1992
- <div class='WordSection2' xmlns:m='m'>
1993
- <p class='MsoNormal'>
1994
- <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
1995
- </p>
1996
- <div>
1997
- <h1 class='ForewordTitle'>Foreword</h1>
1998
- <div align='center' class="table_container">
1999
- <table class='MsoISOTable' style='mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
2000
- <a name='_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7' id='_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7'/>
2001
- <thead>
2002
- <tr>
2003
- <td rowspan='2' align='left' style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>
2004
- <p style='text-align: left' class='MsoNormal'>
2005
- <a name='_c47d9b39-adb2-431d-9320-78cb148fdb56' id='_c47d9b39-adb2-431d-9320-78cb148fdb56'/>
2006
- Output wavelength
2007
- </p>
2008
- <p style='text-align: left' class='MsoNormal'>
2009
- <a name='_c47d9b39-adb2-431d-9320-78cb148fdb57' id='_c47d9b39-adb2-431d-9320-78cb148fdb57'/>
2010
- Output wavelength
2011
- </p>
2012
- </td>
2013
- <th colspan='3' align='right' style='font-weight:bold;border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>
2014
- <p style='text-align: right' class='MsoNormal'>
2015
- <a name='_c47d9b39-adb2-431d-9320-78cb148fdb58' id='_c47d9b39-adb2-431d-9320-78cb148fdb58'/>
2016
- Predictive wavelengths
2017
- </p>
2018
- </th>
2019
- </tr>
2020
- </thead>
2021
- </table>
2022
- </div>
2023
- </div>
2024
- <p class='MsoNormal'>&#xA0;</p>
2025
- </div>
2026
- OUTPUT
2027
- end
2028
-
2029
- it "cleans up boilerplate" do
2030
- input = <<~INPUT
2031
- <html>
2032
- <head/>
2033
- <body>
2034
- <div class="main-section">
2035
- <div id="boilerplate-copyright"> <h1>Copyright</h1> </div>
2036
- <div id="boilerplate-license"> <h1>License</h1> </div>
2037
- <div id="boilerplate-legal"> <h1>Legal</h1> </div>
2038
- <div id="boilerplate-feedback"> <h1>Feedback</h1> </div>
2039
- <hr/>
2040
- <div id="boilerplate-feedback-destination"/>
2041
- <div id="boilerplate-legal-destination"/>
2042
- <div id="boilerplate-license-destination"/>
2043
- <div id="boilerplate-copyright-destination"/>
2044
- </div>
2045
- </body>
2046
- </html>
2047
- INPUT
2048
- html = <<~OUTPUT
2049
- <main class='main-section'>
2050
- <button onclick='topFunction()' id='myBtn' title='Go to top'>Top</button>
2051
- <hr/>
2052
- <div id='boilerplate-feedback'>
2053
- <h1 class='IntroTitle'>Feedback</h1>
2054
- </div>
2055
- <div id='boilerplate-legal'>
2056
- <h1 class='IntroTitle'>Legal</h1>
2057
- </div>
2058
- <div id='boilerplate-license'>
2059
- <h1 class='IntroTitle'>License</h1>
2060
- </div>
2061
- <div id='boilerplate-copyright'>
2062
- <h1 class='IntroTitle'>Copyright</h1>
2063
- </div>
2064
- </main>
2065
- OUTPUT
2066
- doc = <<~OUTPUT
2067
- <html>
2068
- <head/>
2069
- <body>
2070
- <div class='main-section'>
2071
- <hr/>
2072
- <div id='boilerplate-feedback'>
2073
- <p class='TitlePageSubhead'>Feedback</p>
2074
- </div>
2075
- <div id='boilerplate-legal'>
2076
- <p class='TitlePageSubhead'>Legal</p>
2077
- </div>
2078
- <div id='boilerplate-license'>
2079
- <p class='TitlePageSubhead'>License</p>
2080
- </div>
2081
- <div id='boilerplate-copyright'>
2082
- <p class='TitlePageSubhead'>Copyright</p>
2083
- </div>
2084
- </div>
2085
- </body>
2086
- </html>
2087
- OUTPUT
2088
- expect(xmlpp(IsoDoc::HtmlConvert
2089
- .new(wordstylesheet: "spec/assets/word.css",
2090
- htmlstylesheet: "spec/assets/html.scss", filename: "test")
2091
- .html_preface(Nokogiri::XML(input)).to_xml)
2092
- .sub(/^.*<main/m, "<main").sub(%r{</main>.*$}m, "</main>"))
2093
- .to be_equivalent_to xmlpp(html)
2094
- expect(xmlpp(IsoDoc::WordConvert
2095
- .new(wordstylesheet: "spec/assets/word.css",
2096
- htmlstylesheet: "spec/assets/html.scss", filename: "test")
2097
- .word_cleanup(Nokogiri::XML(input)).to_xml)
2098
- .sub(/^.*<main/m, "<main").sub(%r{</main>.*$}m, "</main>"))
2099
- .to be_equivalent_to xmlpp(doc)
2100
- end
2101
-
2102
- it "cleans up coverpage note" do
2103
- input = <<~INPUT
2104
- <html>
2105
- <head/>
2106
- <body>
2107
- <div class="main-section">
2108
- <div id='FB' class='Note' coverpage='true'>
2109
- <p><span class='note_label'>NOTE</span>&#160; XYZ</p>
2110
- </div>
2111
- <div id='FC' class='Admonition' coverpage='true'>
2112
- <p class='AdmonitionTitle' style='text-align:center;'>WARNING</p>
2113
- <p>XYZ</p>
2114
- </div>
2115
- <hr/>
2116
- <div id="coverpage-note-destination"/>
2117
- </div>
2118
- </body>
2119
- </html>
2120
- INPUT
2121
- html = <<~OUTPUT
2122
- <main class='main-section'>
2123
- <button onclick='topFunction()' id='myBtn' title='Go to top'>Top</button>
2124
- <hr/>
2125
- <div id='coverpage-note-destination'>
2126
- <div id='FB' class='Note'>
2127
- <p>
2128
- <span class='note_label'>NOTE</span>
2129
- &#xA0; XYZ
2130
- </p>
2131
- </div>
2132
- <div id='FC' class='Admonition'>
2133
- <p class='AdmonitionTitle' style='text-align:center;'>WARNING</p>
2134
- <p>XYZ</p>
2135
- </div>
2136
- </div>
2137
- </main>
2138
- OUTPUT
2139
- doc = <<~OUTPUT
2140
- <html>
2141
- <head/>
2142
- <body>
2143
- <div class='main-section'>
2144
- <hr/>
2145
- <div id='coverpage-note-destination'>
2146
- <div id='FB' class='Note'>
2147
- <p>
2148
- <span class='note_label'>NOTE</span>
2149
- &#xA0; XYZ
2150
- </p>
2151
- </div>
2152
- <div id='FC' class='Admonition'>
2153
- <p class='AdmonitionTitle' style='text-align:center;'>WARNING</p>
2154
- <p>XYZ</p>
2155
- </div>
2156
- </div>
2157
- </div>
2158
- </body>
2159
- </html>
2160
- OUTPUT
2161
- expect(xmlpp(IsoDoc::HtmlConvert
2162
- .new(wordstylesheet: "spec/assets/word.css",
2163
- htmlstylesheet: "spec/assets/html.scss", filename: "test")
2164
- .html_preface(Nokogiri::XML(input)).to_xml)
2165
- .sub(/^.*<main/m, "<main").sub(%r{</main>.*$}m, "</main>"))
2166
- .to be_equivalent_to xmlpp(html)
2167
- expect(xmlpp(IsoDoc::WordConvert
2168
- .new(wordstylesheet: "spec/assets/word.css",
2169
- htmlstylesheet: "spec/assets/html.scss", filename: "test")
2170
- .word_cleanup(Nokogiri::XML(input)).to_xml)
2171
- .sub(/^.*<main/m, "<main").sub(%r{</main>.*$}m, "</main>"))
2172
- .to be_equivalent_to xmlpp(doc)
2173
- end
2174
-
2175
- it "removes coverpage note destination if unused" do
2176
- input = <<~INPUT
2177
- <html>
2178
- <head/>
2179
- <body>
2180
- <div class="main-section">
2181
- <div id='FB' class='Note'>
2182
- <p><span class='note_label'>NOTE</span>&#160; XYZ</p>
2183
- </div>
2184
- <div id='FC' class='Admonition'>
2185
- <p class='AdmonitionTitle' style='text-align:center;'>WARNING</p>
2186
- <p>XYZ</p>
2187
- </div>
2188
- <hr/>
2189
- <div id="coverpage-note-destination"/>
2190
- </div>
2191
- </body>
2192
- </html>
2193
- INPUT
2194
- html = <<~OUTPUT
2195
- <main class='main-section'>
2196
- <button onclick='topFunction()' id='myBtn' title='Go to top'>Top</button>
2197
- <div id='FB' class='Note'>
2198
- <p>
2199
- <span class='note_label'>NOTE</span>
2200
- &#xA0; XYZ
2201
- </p>
2202
- </div>
2203
- <div id='FC' class='Admonition'>
2204
- <p class='AdmonitionTitle' style='text-align:center;'>WARNING</p>
2205
- <p>XYZ</p>
2206
- </div>
2207
- <hr/>
2208
- </main>
2209
- OUTPUT
2210
- doc = <<~OUTPUT
2211
- <html>
2212
- <head/>
2213
- <body>
2214
- <div class='main-section'>
2215
- <div id='FB' class='Note'>
2216
- <p>
2217
- <span class='note_label'>NOTE</span>
2218
- &#xA0; XYZ
2219
- </p>
2220
- </div>
2221
- <div id='FC' class='Admonition'>
2222
- <p class='AdmonitionTitle' style='text-align:center;'>WARNING</p>
2223
- <p>XYZ</p>
2224
- </div>
2225
- <hr/>
2226
- </div>
2227
- </body>
2228
- </html>
2229
- OUTPUT
2230
- expect(xmlpp(IsoDoc::HtmlConvert
2231
- .new(wordstylesheet: "spec/assets/word.css",
2232
- htmlstylesheet: "spec/assets/html.scss", filename: "test")
2233
- .html_preface(Nokogiri::XML(input)).to_xml)
2234
- .sub(/^.*<main/m, "<main").sub(%r{</main>.*$}m, "</main>"))
2235
- .to be_equivalent_to xmlpp(html)
2236
- expect(xmlpp(IsoDoc::WordConvert
2237
- .new(wordstylesheet: "spec/assets/word.css",
2238
- htmlstylesheet: "spec/assets/html.scss", filename: "test")
2239
- .word_cleanup(Nokogiri::XML(input)).to_xml)
2240
- .sub(/^.*<main/m, "<main").sub(%r{</main>.*$}m, "</main>"))
2241
- .to be_equivalent_to xmlpp(doc)
2242
- end
2243
-
2244
- it "deals with landscape and portrait pagebreaks (Word)" do
2245
- FileUtils.rm_f "test.doc"
2246
- IsoDoc::WordConvert.new(
2247
- { wordstylesheet: "spec/assets/word.css",
2248
- htmlstylesheet: "spec/assets/html.scss", filename: "test" },
2249
- ).convert("test", <<~"INPUT", false)
2250
- <standard-document xmlns="http://riboseinc.com/isoxml">
2251
- <bibdata type="standard">
2252
- <title language="en" format="text/plain">Document title</title>
2253
- <version>
2254
- <draft>1.2</draft>
2255
- </version>
2256
- <language>en</language>
2257
- <script>Latn</script>
2258
- <status><stage>published</stage></status>
2259
- <ext>
2260
- <doctype>article</doctype>
2261
- </ext>
2262
- </bibdata>
2263
- <preface>
2264
- <introduction><title>Preface 1</title>
2265
- <p align="center">This is a <pagebreak orientation="landscape"/> paragraph</p>
2266
- <table>
2267
- <tbody>
2268
- <tr><td>A</td><td>B</td></tr>
2269
- </tbody>
2270
- </table>
2271
- <clause><title>Preface 1.1</title>
2272
- <p>On my side</p>
2273
- <pagebreak orientation="portrait"/>
2274
- <p>Upright again</p>
2275
- </clause>
2276
- <clause><title>Preface 1.3</title>
2277
- <p>And still upright</p>
2278
- </clause>
2279
- </introduction>
2280
- </preface>
2281
- <sections><clause><title>Foreword</title>
2282
- <note>
2283
- <p id="_">For further information on the Foreword, see <strong>ISO/IEC Directives, Part 2, 2016, Clause 12.</strong></p>
2284
- <pagebreak orientation="landscape"/>
2285
- <table id="_c09a7e60-b0c7-4418-9bfc-2ef0bc09a249">
2286
- <thead>
2287
- <tr>
2288
- <th align="left">A</th>
2289
- <th align="left">B</th>
2290
- </tr>
2291
- </thead>
2292
- <tbody>
2293
- <tr>
2294
- <td align="left">C</td>
2295
- <td align="left">D</td>
2296
- </tr>
2297
- </tbody>
2298
- <note id="_8fff1596-290e-4314-b03c-7a8aab97eebe">
2299
- <p id="_32c22439-387a-48cf-a006-5ab3b934ba73">B</p>
2300
- </note></table>
2301
- <pagebreak orientation="portrait"/>
2302
- <p>And up</p>
2303
- </note>
2304
- <pagebreak orientation="portrait"/>
2305
- </clause></sections>
2306
- <annex id="_level_1" inline-header="false" obligation="normative">
2307
- <title>Annex 1</title>
2308
- </annex>
2309
- </standard-document>
2310
- INPUT
2311
- expect(File.exist?("test.doc")).to be true
2312
- html = File.read("test.doc", encoding: "UTF-8")
2313
- expect(html).to include "div.WordSection2_0 {page:WordSection2P;}"
2314
- expect(html).to include "div.WordSection2_1 {page:WordSection2L;}"
2315
- expect(html).to include "div.WordSection3_0 {page:WordSection3P;}"
2316
- expect(html).to include "div.WordSection3_1 {page:WordSection3P;}"
2317
- expect(html).to include "div.WordSection3_2 {page:WordSection3L;}"
2318
-
2319
- expect(xmlpp(html.sub(/^.*<body /m, "<body ")
2320
- .sub(%r{</body>.*$}m, "</body>"))).to be_equivalent_to xmlpp(<<~"OUTPUT")
2321
- <body lang='EN-US' xml:lang='EN-US' link='blue' vlink='#954F72'>
2322
- <div class='WordSection1'>
2323
- <p class='MsoNormal'>&#xA0;</p>
2324
- </div>
2325
- <p class='MsoNormal'>
2326
- <br clear='all' class='section'/>
2327
- </p>
2328
- <div class='WordSection2'>
2329
- <p class='MsoNormal'>
2330
- <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
2331
- </p>
2332
- <div class='Section3' id=''>
2333
- <h1 class='IntroTitle'>Preface 1</h1>
2334
- <p align='center' style='text-align:center;' class='MsoNormal'>
2335
- This is a
2336
- <p class='MsoNormal'>
2337
- <br clear='all' class='section'/>
2338
- </p>
2339
- paragraph
2340
- </p>
2341
- </div>
2342
- </div>
2343
- <div class='WordSection2_1'>
2344
- <div align='center' class='table_container'>
2345
- <table class='MsoISOTable' style='mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
2346
- <tbody>
2347
- <tr>
2348
- <td style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>A</td>
2349
- <td style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>B</td>
2350
- </tr>
2351
- </tbody>
2352
- </table>
2353
- </div>
2354
- <div>
2355
- <h2>Preface 1.1</h2>
2356
- <p class='MsoNormal'>On my side</p>
2357
- <p class='MsoNormal'>
2358
- <br clear='all' class='section'/>
2359
- </p>
2360
- </div>
2361
- </div>
2362
- <div class='WordSection2_0'>
2363
- <p class='MsoNormal'>Upright again</p>
2364
- <div>
2365
- <h2>Preface 1.3</h2>
2366
- <p class='MsoNormal'>And still upright</p>
2367
- </div>
2368
- <p class='MsoNormal'>&#xA0;</p>
2369
- </div>
2370
- <p class='MsoNormal'>
2371
- <br clear='all' class='section'/>
2372
- </p>
2373
- <div class='WordSection3'>
2374
- <p class='zzSTDTitle1'>Document title</p>
2375
- <div>
2376
- <h1>Foreword</h1>
2377
- <div class='Note'>
2378
- <p class='Note'>
2379
- <span class='note_label'/>
2380
- <span style='mso-tab-count:1'>&#xA0; </span>
2381
- For further information on the Foreword, see
2382
- <b>ISO/IEC Directives, Part 2, 2016, Clause 12.</b>
2383
- </p>
2384
- <p class='Note'>
2385
- <br clear='all' class='section'/>
2386
- </p>
2387
- </div>
2388
- </div>
2389
- </div>
2390
- <div class='WordSection3_2'>
2391
- <div align='center' class='table_container'>
2392
- <table class='MsoISOTable' style='mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
2393
- <a name='_c09a7e60-b0c7-4418-9bfc-2ef0bc09a249' id='_c09a7e60-b0c7-4418-9bfc-2ef0bc09a249'/>
2394
- <thead>
2395
- <tr>
2396
- <th align='left' style='font-weight:bold;border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>A</th>
2397
- <th align='left' style='font-weight:bold;border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>B</th>
2398
- </tr>
2399
- </thead>
2400
- <tbody>
2401
- <tr>
2402
- <td align='left' style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>C</td>
2403
- <td align='left' style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>D</td>
2404
- </tr>
2405
- </tbody>
2406
- <tfoot>
2407
- <tr>
2408
- <td colspan='2' style='border-top:0pt;mso-border-top-alt:0pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>
2409
- <div class='Note'>
2410
- <a name='_8fff1596-290e-4314-b03c-7a8aab97eebe' id='_8fff1596-290e-4314-b03c-7a8aab97eebe'/>
2411
- <p class='Note'>
2412
- <span class='note_label'/>
2413
- <span style='mso-tab-count:1'>&#xA0; </span>
2414
- B
2415
- </p>
2416
- </div>
2417
- </td>
2418
- </tr>
2419
- </tfoot>
2420
- </table>
2421
- </div>
2422
- <p class='Note'>
2423
- <br clear='all' class='section'/>
2424
- </p>
2425
- </div>
2426
- <div class='WordSection3_1'>
2427
- <p class='Note'>And up</p>
2428
- <p class='MsoNormal'>
2429
- <br clear='all' class='section'/>
2430
- </p>
2431
- </div>
2432
- <div class='WordSection3_0'>
2433
- <div class='Section3'>
2434
- <a name='_level_1' id='_level_1'/>
2435
- <h1 class='Annex'>Annex 1</h1>
2436
- </div>
2437
- </div>
2438
- <div style='mso-element:footnote-list'/>
2439
- </body>
2440
- OUTPUT
2441
- end
2442
-
2443
- it "expands out nested tables in Word" do
2444
- input = <<~INPUT
2445
- <html>
2446
- <head/>
2447
- <body>
2448
- <div class="main-section">
2449
- <table id="_7830dff8-419e-4b9e-85cf-a063689f44ca" class="recommend" style="border-collapse:collapse;border-spacing:0;"><thead><tr style="background:#A5A5A5;"><th style="vertical-align:top;" class="recommend" colspan="2"><p class="RecommendationTitle">Requirement 1:</p></th></tr></thead><tbody><tr><td style="vertical-align:top;" class="recommend" colspan="2"><p>requirement label</p></td></tr>
2450
- <table id="_a0f8c202-fd34-460c-bd5e-b2f4cc29210d" class="recommend" style="border-collapse:collapse;border-spacing:0;"><thead><tr style="background:#A5A5A5;"><th style="vertical-align:top;" class="recommend" colspan="2"><p class="RecommendationTitle">Requirement 1-1:</p></th></tr></thead><tbody><tr style="background:#C9C9C9;"><td style="vertical-align:top;" class="recommend" colspan="2">
2451
- <p id="_2e2c247b-ce4c-48c5-96dd-f3e090a5b4a7">Description text</p>
2452
- </td></tr></tbody></table>
2453
- </tbody></table>
2454
- </div>
2455
- <div id="_second_sample"><h2>1.2.<span style="mso-tab-count:1">&#xA0; </span>Second sample</h2>
2456
- <table id="_9846c486-14e5-4b1c-bb2f-55cc254dd309" class="recommend" style="border-collapse:collapse;border-spacing:0;"><thead><tr style="background:#A5A5A5;"><th style="vertical-align:top;" class="recommend" colspan="2"><p class="RecommendationTitle">Requirement 2:</p></th></tr></thead><tbody><tr><td style="vertical-align:top;" class="recommend" colspan="2"><p>requirement label</p></td></tr><table id="_62de974c-7128-44d6-ba86-99f818f1d467" class="recommend" style="border-collapse:collapse;border-spacing:0;"><thead><tr style="background:#A5A5A5;"><th style="vertical-align:top;" class="recommend" colspan="2"><p class="RecommendationTitle">Requirement 2-1:</p></th></tr></thead><tbody><tr style="background:#C9C9C9;"><td style="vertical-align:top;" class="recommend" colspan="2">
2457
- <p id="_30b90b08-bd71-4497-bbcc-8c61fbb9f772">Description text</p>
2458
- </td></tr></tbody></table>
2459
- <table id="_fede5681-71f6-47bb-bc65-7bd0b11acd01" class="recommend" style="border-collapse:collapse;border-spacing:0;"><thead><tr style="background:#A5A5A5;"><th style="vertical-align:top;" class="recommend" colspan="2"><p class="RecommendationTitle">Requirement 2-2:</p></th></tr></thead><tbody><tr><td style="vertical-align:top;" class="recommend" colspan="2">
2460
- <p id="_8daa3d74-90fd-4a57-9169-de457a68cfda">Description text</p>
2461
- </td></tr></tbody></table></tbody></table>
2462
- </div>
2463
- </body>
2464
- </html>
2465
- INPUT
2466
- output = <<~OUTPUT
2467
- <html>
2468
- <head/>
2469
- <body>
2470
- <div class='main-section'>
2471
- <table id='_7830dff8-419e-4b9e-85cf-a063689f44ca' class='recommend' style='border-collapse:collapse;border-spacing:0;'>
2472
- <thead>
2473
- <tr style='background:#A5A5A5;'>
2474
- <th style='vertical-align:top;' class='recommend' colspan='2'>
2475
- <p class='RecommendationTitle'>Requirement 1:</p>
2476
- </th>
2477
- </tr>
2478
- </thead>
2479
- <tbody>
2480
- <tr>
2481
- <td style='vertical-align:top;' class='recommend' colspan='2'>
2482
- <p>requirement label</p>
2483
- </td>
2484
- </tr>
2485
- </tbody>
2486
- </table>
2487
- <table id='_a0f8c202-fd34-460c-bd5e-b2f4cc29210d' class='recommend' style='border-collapse:collapse;border-spacing:0;'>
2488
- <thead>
2489
- <tr style='background:#A5A5A5;'>
2490
- <th style='vertical-align:top;' class='recommend' colspan='2'>
2491
- <p class='RecommendationTitle'>Requirement 1-1:</p>
2492
- </th>
2493
- </tr>
2494
- </thead>
2495
- <tbody>
2496
- <tr style='background:#C9C9C9;'>
2497
- <td style='vertical-align:top;' class='recommend' colspan='2'>
2498
- <p id='_2e2c247b-ce4c-48c5-96dd-f3e090a5b4a7'>Description text</p>
2499
- </td>
2500
- </tr>
2501
- </tbody>
2502
- </table>
2503
- </div>
2504
- <div id='_second_sample'>
2505
- <h2>
2506
- 1.2.
2507
- <span style='mso-tab-count:1'>&#xA0; </span>
2508
- Second sample
2509
- </h2>
2510
- <table id='_9846c486-14e5-4b1c-bb2f-55cc254dd309' class='recommend' style='border-collapse:collapse;border-spacing:0;'>
2511
- <thead>
2512
- <tr style='background:#A5A5A5;'>
2513
- <th style='vertical-align:top;' class='recommend' colspan='2'>
2514
- <p class='RecommendationTitle'>Requirement 2:</p>
2515
- </th>
2516
- </tr>
2517
- </thead>
2518
- <tbody>
2519
- <tr>
2520
- <td style='vertical-align:top;' class='recommend' colspan='2'>
2521
- <p>requirement label</p>
2522
- </td>
2523
- </tr>
2524
- </tbody>
2525
- </table>
2526
- <table id='_62de974c-7128-44d6-ba86-99f818f1d467' class='recommend' style='border-collapse:collapse;border-spacing:0;'>
2527
- <thead>
2528
- <tr style='background:#A5A5A5;'>
2529
- <th style='vertical-align:top;' class='recommend' colspan='2'>
2530
- <p class='RecommendationTitle'>Requirement 2-1:</p>
2531
- </th>
2532
- </tr>
2533
- </thead>
2534
- <tbody>
2535
- <tr style='background:#C9C9C9;'>
2536
- <td style='vertical-align:top;' class='recommend' colspan='2'>
2537
- <p id='_30b90b08-bd71-4497-bbcc-8c61fbb9f772'>Description text</p>
2538
- </td>
2539
- </tr>
2540
- </tbody>
2541
- </table>
2542
- <table id='_fede5681-71f6-47bb-bc65-7bd0b11acd01' class='recommend' style='border-collapse:collapse;border-spacing:0;'>
2543
- <thead>
2544
- <tr style='background:#A5A5A5;'>
2545
- <th style='vertical-align:top;' class='recommend' colspan='2'>
2546
- <p class='RecommendationTitle'>Requirement 2-2:</p>
2547
- </th>
2548
- </tr>
2549
- </thead>
2550
- <tbody>
2551
- <tr>
2552
- <td style='vertical-align:top;' class='recommend' colspan='2'>
2553
- <p id='_8daa3d74-90fd-4a57-9169-de457a68cfda'>Description text</p>
2554
- </td>
2555
- </tr>
2556
- </tbody>
2557
- </table>
2558
- </div>
2559
- </body>
2560
- </html>
2561
- OUTPUT
2562
- expect(xmlpp(IsoDoc::WordConvert
2563
- .new(wordstylesheet: "spec/assets/word.css",
2564
- htmlstylesheet: "spec/assets/html.scss", filename: "test")
2565
- .word_cleanup(Nokogiri::XML(input)).to_xml)
2566
- .sub(/^.*<main/m, "<main").sub(%r{</main>.*$}m, "</main>"))
2567
- .to be_equivalent_to xmlpp(output)
2568
- end
2569
-
2570
- it "allocate widths to tables (Word)" do
2571
- input = <<~INPUT
2572
- <html xmlns:epub="http://www.idpf.org/2007/ops" lang="en">
2573
- <head><style/></head>
2574
- <body lang='EN-US' link='blue' vlink='#954F72'>
2575
- <div class='WordSection1'>
2576
- <p>&#160;</p>
2577
- </div>
2578
- <p>
2579
- <br clear='all' class='section'/>
2580
- </p>
2581
- <div class='WordSection2'>
2582
- <p>
2583
- <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
2584
- </p>
2585
- <div>
2586
- <h1 class='ForewordTitle'>Foreword</h1>
2587
- <p class='TableTitle' style='text-align:center;'>
2588
- Table 1&#160;&#8212; Repeatability and reproducibility of
2589
- <i>husked</i>
2590
- rice yield
2591
- <span style='mso-bookmark:_Ref'>
2592
- <a class='FootnoteRef' href='#ftn1' epub:type='footnote'>
2593
- <sup>1</sup>
2594
- </a>
2595
- </span>
2596
- </p>
2597
- <div align='center' class='table_container'>
2598
- <table id='tableD-1' class='MsoISOTable' style='mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;page-break-after: avoid;page-break-inside: avoid;' title='tool tip' summary='long desc' width='70%'>
2599
- <colgroup>
2600
- <col width='30%'/>
2601
- <col width='20%'/>
2602
- <col width='20%'/>
2603
- <col width='20%'/>
2604
- <col width='10%'/>
2605
- </colgroup>
2606
- <thead>
2607
- <tr>
2608
- <td rowspan='2' align='left' style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>Description</td>
2609
- <td colspan='4' align='center' style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>Rice sample</td>
2610
- </tr>
2611
- <tr>
2612
- <td align='left' valign="top" style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>Arborio</td>
2613
- <td align='center' valign="middle" style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>
2614
- Drago
2615
- <a href='#tableD-1a' class='TableFootnoteRef'>a</a>
2616
- <aside>
2617
- <div id='ftntableD-1a'>
2618
- <span>
2619
- <span id='tableD-1a' class='TableFootnoteRef'>a</span>
2620
- <span style='mso-tab-count:1'>&#160; </span>
2621
- </span>
2622
- <p id='_0fe65e9a-5531-408e-8295-eeff35f41a55'>Parboiled rice.</p>
2623
- </div>
2624
- </aside>
2625
- </td>
2626
- <td align='center' valign="bottom" style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>
2627
- Balilla
2628
- <a href='#tableD-1a' class='TableFootnoteRef'>a</a>
2629
- </td>
2630
- <td align='center' style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>Thaibonnet</td>
2631
- </tr>
2632
- </thead>
2633
- <tbody>
2634
- <tr>
2635
- <th align='left' style='font-weight:bold;border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>Number of laboratories retained after eliminating outliers</th>
2636
- <td align='center' style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>13</td>
2637
- <td align='center' style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>11</td>
2638
- <td align='center' style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>13</td>
2639
- <td align='center' style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>13</td>
2640
- </tr>
2641
- <tr>
2642
- <td align='left' style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>Mean value, g/100 g</td>
2643
- <td align='center' style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>81,2</td>
2644
- <td align='center' style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>82,0</td>
2645
- <td align='center' style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>81,8</td>
2646
- <td align='center' style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>77,7</td>
2647
- </tr>
2648
- </tbody>
2649
- <tfoot>
2650
- <tr>
2651
- <td align='left' style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>
2652
- Reproducibility limit,
2653
- <span class='stem'>(#(R)#)</span>
2654
- (= 2,83
2655
- <span class='stem'>(#(s_R)#)</span>
2656
- )
2657
- </td>
2658
- <td align='center' style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>2,89</td>
2659
- <td align='center' style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>0,57</td>
2660
- <td align='center' style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>2,26</td>
2661
- <td align='center' style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>6,06</td>
2662
- </tr>
2663
- </tfoot>
2664
- <table class='dl'>
2665
- <tr>
2666
- <td valign='top' align='left'>
2667
- <p align='left' style='margin-left:0pt;text-align:left;'>Drago</p>
2668
- </td>
2669
- <td valign='top'>A type of rice</td>
2670
- </tr>
2671
- </table>
2672
- <div class='Note'>
2673
- <p class='Note'>
2674
- <span class='note_label'>NOTE</span>
2675
- <span style='mso-tab-count:1'>&#160; </span>
2676
- This is a table about rice
2677
- </p>
2678
- </div>
2679
- </table>
2680
- </div>
2681
- <div align='center' class='table_container'>
2682
- <table id='tableD-2' class='MsoISOTable' style='mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
2683
- <tbody>
2684
- <tr>
2685
- <td style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>A</td>
2686
- </tr>
2687
- </tbody>
2688
- </table>
2689
- </div>
2690
- </div>
2691
- <p>&#160;</p>
2692
- </div>
2693
- <p>
2694
- <br clear='all' class='section'/>
2695
- </p>
2696
- <div class='WordSection3'>
2697
- <p class='zzSTDTitle1'/>
2698
- <aside id='ftn1'>
2699
- <p>X</p>
2700
- </aside>
2701
- </div>
2702
- </body>
2703
- </html>
2704
- INPUT
2705
- output = <<~OUTPUT
2706
- <html xmlns:epub='http://www.idpf.org/2007/ops' lang='en'>
2707
- <head>
2708
- <style/>
2709
- </head>
2710
- <body lang='EN-US' link='blue' vlink='#954F72'>
2711
- <div class='WordSection1'>
2712
- <p>&#xA0;</p>
2713
- </div>
2714
- <p>
2715
- <br clear='all' class='section'/>
2716
- </p>
2717
- <div class='WordSection2'>
2718
- <p>
2719
- <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
2720
- </p>
2721
- <div>
2722
- <h1 class='ForewordTitle'>Foreword</h1>
2723
- <p class='TableTitle' style='text-align:center;'>
2724
- Table 1&#xA0;&#x2014; Repeatability and reproducibility of
2725
- <i>husked</i>
2726
- rice yield
2727
- <span style='mso-bookmark:_Ref'>
2728
- <a class='FootnoteRef' href='#ftn1' epub:type='footnote'>
2729
- <sup>1</sup>
2730
- </a>
2731
- </span>
2732
- </p>
2733
- <div align='center' class='table_container'>
2734
- <table id='tableD-1' class='MsoISOTable' style='mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;page-break-after: avoid;page-break-inside: avoid;' title='tool tip' summary='long desc' width='70%'>
2735
- <colgroup>
2736
- <col width='30%'/>
2737
- <col width='20%'/>
2738
- <col width='20%'/>
2739
- <col width='20%'/>
2740
- <col width='10%'/>
2741
- </colgroup>
2742
- <thead>
2743
- <tr>
2744
- <td rowspan='2' align='left' style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;' width='30.0%'>Description</td>
2745
- <td colspan='4' align='center' style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;' width='70.0%'>Rice sample</td>
2746
- </tr>
2747
- <tr>
2748
- <td align='left' valign='top' style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;' width='20.0%'>Arborio</td>
2749
- <td align='center' valign='middle' style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;' width='20.0%'>
2750
- Drago
2751
- <a href='#tableD-1a' class='TableFootnoteRef'>a</a>
2752
- <aside>
2753
- <div id='ftntableD-1a'>
2754
- <span>
2755
- <span id='tableD-1a' class='TableFootnoteRef'>a</span>
2756
- <span style='mso-tab-count:1'>&#xA0; </span>
2757
- </span>
2758
- <p id='_0fe65e9a-5531-408e-8295-eeff35f41a55'>Parboiled rice.</p>
2759
- </div>
2760
- </aside>
2761
- </td>
2762
- <td align='center' valign='bottom' style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;' width='20.0%'>
2763
- Balilla
2764
- <a href='#tableD-1a' class='TableFootnoteRef'>a</a>
2765
- </td>
2766
- <td align='center' style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;' width='10.0%'>Thaibonnet</td>
2767
- </tr>
2768
- </thead>
2769
- <tbody>
2770
- <tr>
2771
- <th align='left' style='font-weight:bold;border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;' width='30.0%'>Number of laboratories retained after eliminating outliers</th>
2772
- <td align='center' style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;' width='20.0%'>13</td>
2773
- <td align='center' style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;' width='20.0%'>11</td>
2774
- <td align='center' style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;' width='20.0%'>13</td>
2775
- <td align='center' style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;' width='10.0%'>13</td>
2776
- </tr>
2777
- <tr>
2778
- <td align='left' style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;' width='30.0%'>Mean value, g/100 g</td>
2779
- <td align='center' style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;' width='20.0%'>81,2</td>
2780
- <td align='center' style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;' width='20.0%'>82,0</td>
2781
- <td align='center' style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;' width='20.0%'>81,8</td>
2782
- <td align='center' style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;' width='10.0%'>77,7</td>
2783
- </tr>
2784
- </tbody>
2785
- <tfoot>
2786
- <tr>
2787
- <td align='left' style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;' width='30.0%'>
2788
- Reproducibility limit,
2789
- <span class='stem'>(#(R)#)</span>
2790
- (= 2,83
2791
- <span class='stem'>(#(s_R)#)</span>
2792
- )
2793
- </td>
2794
- <td align='center' style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;' width='20.0%'>2,89</td>
2795
- <td align='center' style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;' width='20.0%'>0,57</td>
2796
- <td align='center' style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;' width='20.0%'>2,26</td>
2797
- <td align='center' style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;' width='10.0%'>6,06</td>
2798
- </tr>
2799
- </tfoot>
2800
- <div class='Note'>
2801
- <p class='Note'>
2802
- <span class='note_label'>NOTE</span>
2803
- <span style='mso-tab-count:1'>&#xA0; </span>
2804
- This is a table about rice
2805
- </p>
2806
- </div>
2807
- </table>
2808
- <table class='dl'>
2809
- <tr>
2810
- <td valign='top' align='left'>
2811
- <p align='left' style='margin-left:0pt;text-align:left;'>Drago</p>
2812
- </td>
2813
- <td valign='top'>A type of rice</td>
2814
- </tr>
2815
- </table>
2816
- </div>
2817
- <div align='center' class='table_container'>
2818
- <table id='tableD-2' class='MsoISOTable' style='mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
2819
- <tbody>
2820
- <tr>
2821
- <td style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>A</td>
2822
- </tr>
2823
- </tbody>
2824
- </table>
2825
- </div>
2826
- </div>
2827
- <p>&#xA0;</p>
2828
- </div>
2829
- <p>
2830
- <br clear='all' class='section'/>
2831
- </p>
2832
- <div class='WordSection3'>
2833
- <p class='zzSTDTitle1'/>
2834
- <aside id='ftn1'>
2835
- <p>X</p>
2836
- </aside>
2837
- </div>
2838
- </body>
2839
- </html>
2840
- OUTPUT
2841
- expect(xmlpp(IsoDoc::WordConvert
2842
- .new(wordstylesheet: "spec/assets/word.css",
2843
- htmlstylesheet: "spec/assets/html.scss", filename: "test")
2844
- .word_cleanup(Nokogiri::XML(input)).to_xml)
2845
- .sub(/^.*<main/m, "<main").sub(%r{</main>.*$}m, "</main>"))
2846
- .to be_equivalent_to xmlpp(output)
2847
- end
2848
-
2849
- it "generates bare HTML file" do
2850
- FileUtils.rm_f "test.html"
2851
- IsoDoc::HtmlConvert.new(
2852
- { bare: true,
2853
- htmlstylesheet: "spec/assets/html.scss",
2854
- filename: "test" },
2855
- ).convert("test", <<~"INPUT", false)
2856
- <iso-standard xmlns="http://riboseinc.com/isoxml">
2857
- <bibdata>
2858
- <title language="en">test</title>
2859
- </bibdata>
2860
- <boilerplate>
2861
- <feedback-statement>
2862
- <clause><title>I am boilerplate</title></clause>
2863
- </feedback-statement>
2864
- </boilerplate>
2865
- <preface><foreword>
2866
- <note>
2867
- <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
2868
- </note>
2869
- </foreword></preface>
2870
- </iso-standard>
2871
- INPUT
2872
- output = <<~OUTPUT
2873
- <body lang='en' xml:lang='en'>
2874
- <main class='main-section'>
2875
- <br/>
2876
- <div>
2877
- <h1 class='ForewordTitle'>Foreword</h1>
2878
- <div class='Note'>
2879
- <p>
2880
- &#xA0; These results are based on a study carried out on three
2881
- different types of kernel.
2882
- </p>
2883
- </div>
2884
- </div>
2885
- <p class='zzSTDTitle1'>test</p>
2886
- </main>
2887
- <script/>
2888
- </body>
2889
- OUTPUT
2890
- expect(File.exist?("test.html")).to be true
2891
- html = File.read("test.html")
2892
- .sub(%r{^.*<body}m, "<body")
2893
- .sub(%r{</body>.*$}m, "</body>")
2894
- .gsub(%r{<script.+?</script>}m, "<script/>")
2895
- .sub(%r{(<script/>\s+)+}m, "<script/>")
2896
- expect(xmlpp(html)).to be_equivalent_to xmlpp(output)
2897
- end
2898
-
2899
- it "cleans up lists (HTML)" do
2900
- input = <<~INPUT
2901
- <html xmlns:epub="http://www.idpf.org/2007/ops">
2902
- <head/>
2903
- <body>
2904
- <div class="main-section">
2905
- <ul>
2906
- <div>N1</div>
2907
- <li>A</li>
2908
- <li>B</li>
2909
- <div>N2</div>
2910
- <li>C</li>
2911
- <div>N3</div>
2912
- </div>
2913
- </body>
2914
- </html>
2915
- INPUT
2916
- output = <<~OUTPUT
2917
- <main class='main-section'>
2918
- <button onclick='topFunction()' id='myBtn' title='Go to top'>Top</button>
2919
- <ul>
2920
- <li>
2921
- A
2922
- <div>N1</div>
2923
- </li>
2924
- <li>
2925
- B
2926
- <div>N2</div>
2927
- </li>
2928
- <li>
2929
- C
2930
- <div>N3</div>
2931
- </li>
2932
- </ul>
2933
- </main>
2934
- OUTPUT
2935
- expect(xmlpp(IsoDoc::HtmlConvert
2936
- .new(htmlstylesheet: "spec/assets/html.scss", filename: "test")
2937
- .html_cleanup(Nokogiri::XML(input)).to_xml)
2938
- .sub(/^.*<main/m, "<main").sub(%r{</main>.*$}m, "</main>"))
2939
- .to be_equivalent_to xmlpp(output)
2940
- end
2941
- end