isodoc 2.1.1 → 2.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/isodoc.gemspec +4 -1
- data/lib/isodoc/base_style/blocks.scss +7 -0
- data/lib/isodoc/class_utils.rb +16 -0
- data/lib/isodoc/function/inline.rb +2 -0
- data/lib/isodoc/function/lists.rb +24 -9
- data/lib/isodoc/function/to_word_html.rb +1 -0
- data/lib/isodoc/function/utils.rb +21 -7
- data/lib/isodoc/gem_tasks.rb +19 -10
- data/lib/isodoc/i18n.rb +19 -0
- data/lib/isodoc/metadata.rb +2 -2
- data/lib/isodoc/presentation_function/block.rb +7 -3
- data/lib/isodoc/presentation_function/image.rb +1 -1
- data/lib/isodoc/presentation_function/inline.rb +11 -12
- data/lib/isodoc/presentation_function/section.rb +1 -1
- data/lib/isodoc/presentation_function/xrefs.rb +23 -9
- data/lib/isodoc/presentation_xml_convert.rb +1 -0
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/word_function/body.rb +6 -3
- data/lib/isodoc/word_function/inline.rb +7 -2
- data/lib/isodoc/xref/xref_gen.rb +6 -6
- data/lib/isodoc/xref.rb +1 -1
- data/lib/isodoc-yaml/i18n-ar.yaml +1 -0
- data/lib/isodoc-yaml/i18n-de.yaml +1 -0
- data/lib/isodoc-yaml/i18n-en.yaml +1 -0
- data/lib/isodoc-yaml/i18n-es.yaml +1 -0
- data/lib/isodoc-yaml/i18n-fr.yaml +1 -0
- data/lib/isodoc-yaml/i18n-ru.yaml +1 -0
- data/lib/isodoc-yaml/i18n-zh-Hans.yaml +1 -0
- metadata +3 -50
- data/.github/workflows/rake.yml +0 -15
- data/.github/workflows/release.yml +0 -24
- data/.hound.yml +0 -5
- data/.oss-guides.rubocop.yml +0 -1077
- data/.rubocop.yml +0 -10
- data/Rakefile +0 -8
- data/bin/rspec +0 -17
- data/spec/assets/header.html +0 -7
- data/spec/assets/html.scss +0 -20
- data/spec/assets/html_override.css +0 -1
- data/spec/assets/htmlcover.html +0 -4
- data/spec/assets/htmlintro.html +0 -5
- data/spec/assets/i18n.yaml +0 -41
- data/spec/assets/iso.xml +0 -8
- data/spec/assets/odf.emf +0 -0
- data/spec/assets/odf.svg +0 -1
- data/spec/assets/odf1.svg +0 -4
- data/spec/assets/outputtest/a.xml +0 -66
- data/spec/assets/outputtest/iso.international-standard.xsl +0 -3011
- data/spec/assets/rice_image1 +0 -0
- data/spec/assets/rice_image1.png +0 -0
- data/spec/assets/scripts.html +0 -3
- data/spec/assets/scripts_override.html +0 -3
- data/spec/assets/std.css +0 -2
- data/spec/assets/word.css +0 -2
- data/spec/assets/word_override.css +0 -1
- data/spec/assets/wordcover.html +0 -3
- data/spec/assets/wordintro.html +0 -4
- data/spec/isodoc/blocks_spec.rb +0 -2934
- data/spec/isodoc/cleanup_spec.rb +0 -1056
- data/spec/isodoc/footnotes_spec.rb +0 -264
- data/spec/isodoc/form_spec.rb +0 -160
- data/spec/isodoc/i18n_spec.rb +0 -1201
- data/spec/isodoc/inline_spec.rb +0 -2301
- data/spec/isodoc/lists_spec.rb +0 -469
- data/spec/isodoc/metadata_spec.rb +0 -401
- data/spec/isodoc/postproc_spec.rb +0 -2938
- data/spec/isodoc/presentation_xml_spec.rb +0 -1476
- data/spec/isodoc/ref_spec.rb +0 -955
- data/spec/isodoc/section_spec.rb +0 -2123
- data/spec/isodoc/table_spec.rb +0 -588
- data/spec/isodoc/terms_spec.rb +0 -712
- data/spec/isodoc/utils_spec.rb +0 -57
- data/spec/isodoc/xref_numbering_spec.rb +0 -378
- data/spec/isodoc/xref_spec.rb +0 -1837
- data/spec/isodoc/xslfo_convert_spec.rb +0 -103
- data/spec/spec_helper.rb +0 -88
@@ -1,2938 +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ŭ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ŭ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ŭ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ŭ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ŭparolo</h1>
|
393
|
-
<div class="Note">
|
394
|
-
<p>  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"> </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
|
-
.gsub(/<o:p> <\/o:p>/, "")))
|
534
|
-
.to be_equivalent_to xmlpp(<<~'OUTPUT')
|
535
|
-
<div class="WordSection2">
|
536
|
-
/* an empty word intro page */
|
537
|
-
|
538
|
-
<p class="MsoToc1"><span lang="EN-GB" xml:lang="EN-GB"><span style="mso-element:field-begin"></span><span style="mso-spacerun:yes"> </span>TOC
|
539
|
-
\o "1-2" \h \z \u <span style="mso-element:field-separator"></span></span>
|
540
|
-
<span class="MsoHyperlink"><span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
541
|
-
<a href="#_Toc">Clause 4<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
|
542
|
-
<span style="mso-tab-count:1 dotted">. </span>
|
543
|
-
</span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
|
544
|
-
<span style="mso-element:field-begin"></span></span>
|
545
|
-
<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"> PAGEREF _Toc \h </span>
|
546
|
-
<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>
|
547
|
-
<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>
|
548
|
-
<p class="MsoToc2">
|
549
|
-
<span class="MsoHyperlink">
|
550
|
-
<span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
551
|
-
<a href="#_Toc">Introduction to this<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
|
552
|
-
<span style="mso-tab-count:1 dotted">. </span>
|
553
|
-
</span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
|
554
|
-
<span style="mso-element:field-begin"></span></span>
|
555
|
-
<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"> PAGEREF _Toc \h </span>
|
556
|
-
<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>
|
557
|
-
<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>
|
558
|
-
</span>
|
559
|
-
</p>
|
560
|
-
<p class="MsoToc2">
|
561
|
-
<span class="MsoHyperlink">
|
562
|
-
<span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
563
|
-
<a href="#_Toc">Clause 4.2<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
|
564
|
-
<span style="mso-tab-count:1 dotted">. </span>
|
565
|
-
</span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
|
566
|
-
<span style="mso-element:field-begin"></span></span>
|
567
|
-
<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"> PAGEREF _Toc \h </span>
|
568
|
-
<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>
|
569
|
-
<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>
|
570
|
-
</span>
|
571
|
-
</p>
|
572
|
-
<p class="MsoToc1">
|
573
|
-
<span lang="EN-GB" xml:lang="EN-GB">
|
574
|
-
<span style="mso-element:field-end"></span>
|
575
|
-
</span>
|
576
|
-
<span lang="EN-GB" xml:lang="EN-GB">
|
577
|
-
</span>
|
578
|
-
</p>
|
579
|
-
<p class="MsoNormal"> </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
|
-
.gsub(/<o:p> <\/o:p>/, "")))
|
616
|
-
.to be_equivalent_to xmlpp(<<~'OUTPUT')
|
617
|
-
<div class="WordSection2">
|
618
|
-
/* an empty word intro page */
|
619
|
-
|
620
|
-
<p class="MsoToc1"><span lang="EN-GB" xml:lang="EN-GB"><span style="mso-element:field-begin"></span><span style="mso-spacerun:yes"> </span>TOC
|
621
|
-
\o "1-3" \h \z \u <span style="mso-element:field-separator"></span></span>
|
622
|
-
<span class="MsoHyperlink"><span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
623
|
-
<a href="#_Toc">Clause 4<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
|
624
|
-
<span style="mso-tab-count:1 dotted">. </span>
|
625
|
-
</span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
|
626
|
-
<span style="mso-element:field-begin"></span></span>
|
627
|
-
<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"> PAGEREF _Toc \h </span>
|
628
|
-
<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>
|
629
|
-
<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>
|
630
|
-
<p class="MsoToc2">
|
631
|
-
<span class="MsoHyperlink">
|
632
|
-
<span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
633
|
-
<a href="#_Toc">Introduction to this<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
|
634
|
-
<span style="mso-tab-count:1 dotted">. </span>
|
635
|
-
</span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
|
636
|
-
<span style="mso-element:field-begin"></span></span>
|
637
|
-
<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"> PAGEREF _Toc \h </span>
|
638
|
-
<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>
|
639
|
-
<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>
|
640
|
-
</span>
|
641
|
-
</p>
|
642
|
-
<p class="MsoToc2">
|
643
|
-
<span class="MsoHyperlink">
|
644
|
-
<span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
645
|
-
<a href="#_Toc">Clause 4.2<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
|
646
|
-
<span style="mso-tab-count:1 dotted">. </span>
|
647
|
-
</span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
|
648
|
-
<span style="mso-element:field-begin"></span></span>
|
649
|
-
<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"> PAGEREF _Toc \h </span>
|
650
|
-
<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>
|
651
|
-
<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>
|
652
|
-
</span>
|
653
|
-
</p>
|
654
|
-
<p class="MsoToc3">
|
655
|
-
<span class="MsoHyperlink">
|
656
|
-
<span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
657
|
-
<a href="#_Toc">Clause 4.2.1<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
|
658
|
-
<span style="mso-tab-count:1 dotted">. </span>
|
659
|
-
</span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
|
660
|
-
<span style="mso-element:field-begin"></span></span>
|
661
|
-
<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"> PAGEREF _Toc \h </span>
|
662
|
-
<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>
|
663
|
-
<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>
|
664
|
-
</span>
|
665
|
-
</p>
|
666
|
-
<p class="MsoToc1">
|
667
|
-
<span lang="EN-GB" xml:lang="EN-GB">
|
668
|
-
<span style="mso-element:field-end"></span>
|
669
|
-
</span>
|
670
|
-
<span lang="EN-GB" xml:lang="EN-GB">
|
671
|
-
</span>
|
672
|
-
</p>
|
673
|
-
<p class="MsoNormal"> </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
|
-
.gsub(/<o:p> <\/o:p>/, "")))
|
724
|
-
.to be_equivalent_to xmlpp(<<~'OUTPUT')
|
725
|
-
<div class='WordSection2'>
|
726
|
-
/* an empty word intro page */
|
727
|
-
<p class='MsoToc1'>
|
728
|
-
<span lang='EN-GB' xml:lang='EN-GB'>
|
729
|
-
<span style='mso-element:field-begin'/>
|
730
|
-
<span style='mso-spacerun:yes'> </span>
|
731
|
-
TOC \o "1-3" \h \z \u
|
732
|
-
<span style='mso-element:field-separator'/>
|
733
|
-
</span>
|
734
|
-
<span class='MsoHyperlink'>
|
735
|
-
<span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
|
736
|
-
<a href='#_Toc'>
|
737
|
-
Clause 4
|
738
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
739
|
-
<span style='mso-tab-count:1 dotted'>. </span>
|
740
|
-
</span>
|
741
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
742
|
-
<span style='mso-element:field-begin'/>
|
743
|
-
</span>
|
744
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
|
745
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
746
|
-
<span style='mso-element:field-separator'/>
|
747
|
-
</span>
|
748
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
|
749
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
|
750
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
751
|
-
<span style='mso-element:field-end'/>
|
752
|
-
</span>
|
753
|
-
</a>
|
754
|
-
</span>
|
755
|
-
</span>
|
756
|
-
</p>
|
757
|
-
<p class='MsoToc2'>
|
758
|
-
<span class='MsoHyperlink'>
|
759
|
-
<span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
|
760
|
-
<a href='#_Toc'>
|
761
|
-
Introduction to this
|
762
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
763
|
-
<span style='mso-tab-count:1 dotted'>. </span>
|
764
|
-
</span>
|
765
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
766
|
-
<span style='mso-element:field-begin'/>
|
767
|
-
</span>
|
768
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
|
769
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
770
|
-
<span style='mso-element:field-separator'/>
|
771
|
-
</span>
|
772
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
|
773
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
|
774
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
775
|
-
<span style='mso-element:field-end'/>
|
776
|
-
</span>
|
777
|
-
</a>
|
778
|
-
</span>
|
779
|
-
</span>
|
780
|
-
</p>
|
781
|
-
<p class='MsoToc2'>
|
782
|
-
<span class='MsoHyperlink'>
|
783
|
-
<span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
|
784
|
-
<a href='#_Toc'>
|
785
|
-
Clause 4.2
|
786
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
787
|
-
<span style='mso-tab-count:1 dotted'>. </span>
|
788
|
-
</span>
|
789
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
790
|
-
<span style='mso-element:field-begin'/>
|
791
|
-
</span>
|
792
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
|
793
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
794
|
-
<span style='mso-element:field-separator'/>
|
795
|
-
</span>
|
796
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
|
797
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
|
798
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
799
|
-
<span style='mso-element:field-end'/>
|
800
|
-
</span>
|
801
|
-
</a>
|
802
|
-
</span>
|
803
|
-
</span>
|
804
|
-
</p>
|
805
|
-
<p class='MsoToc3'>
|
806
|
-
<span class='MsoHyperlink'>
|
807
|
-
<span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
|
808
|
-
<a href='#_Toc'>
|
809
|
-
Clause 4.2.1
|
810
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
811
|
-
<span style='mso-tab-count:1 dotted'>. </span>
|
812
|
-
</span>
|
813
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
814
|
-
<span style='mso-element:field-begin'/>
|
815
|
-
</span>
|
816
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
|
817
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
818
|
-
<span style='mso-element:field-separator'/>
|
819
|
-
</span>
|
820
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
|
821
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
|
822
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
823
|
-
<span style='mso-element:field-end'/>
|
824
|
-
</span>
|
825
|
-
</a>
|
826
|
-
</span>
|
827
|
-
</span>
|
828
|
-
</p>
|
829
|
-
<p class='MsoToc1'>
|
830
|
-
<span lang='EN-GB' xml:lang='EN-GB'>
|
831
|
-
<span style='mso-element:field-end'/>
|
832
|
-
</span>
|
833
|
-
<span lang='EN-GB' xml:lang='EN-GB'>
|
834
|
-
</span>
|
835
|
-
</p>
|
836
|
-
<p class='MsoNormal'> </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
|
-
.gsub(/<o:p> <\/o:p>/, "")))
|
861
|
-
.to be_equivalent_to xmlpp(<<~'OUTPUT')
|
862
|
-
<div class='WordSection2'>
|
863
|
-
/* an empty word intro page */
|
864
|
-
<p class='MsoToc1'>
|
865
|
-
<span lang='EN-GB' xml:lang='EN-GB'>
|
866
|
-
<span style='mso-element:field-begin'/>
|
867
|
-
<span style='mso-spacerun:yes'> </span>
|
868
|
-
TOC \o "1-3" \h \z \u
|
869
|
-
<span style='mso-element:field-separator'/>
|
870
|
-
</span>
|
871
|
-
<span class='MsoHyperlink'>
|
872
|
-
<span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
|
873
|
-
<a href='#_Toc'>
|
874
|
-
Clause 4
|
875
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
876
|
-
<span style='mso-tab-count:1 dotted'>. </span>
|
877
|
-
</span>
|
878
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
879
|
-
<span style='mso-element:field-begin'/>
|
880
|
-
</span>
|
881
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
|
882
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
883
|
-
<span style='mso-element:field-separator'/>
|
884
|
-
</span>
|
885
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
|
886
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
|
887
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
888
|
-
<span style='mso-element:field-end'/>
|
889
|
-
</span>
|
890
|
-
</a>
|
891
|
-
</span>
|
892
|
-
</span>
|
893
|
-
</p>
|
894
|
-
<p class='MsoToc2'>
|
895
|
-
<span class='MsoHyperlink'>
|
896
|
-
<span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
|
897
|
-
<a href='#_Toc'>
|
898
|
-
Introduction to this
|
899
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
900
|
-
<span style='mso-tab-count:1 dotted'>. </span>
|
901
|
-
</span>
|
902
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
903
|
-
<span style='mso-element:field-begin'/>
|
904
|
-
</span>
|
905
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
|
906
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
907
|
-
<span style='mso-element:field-separator'/>
|
908
|
-
</span>
|
909
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
|
910
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
|
911
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
912
|
-
<span style='mso-element:field-end'/>
|
913
|
-
</span>
|
914
|
-
</a>
|
915
|
-
</span>
|
916
|
-
</span>
|
917
|
-
</p>
|
918
|
-
<p class='MsoToc2'>
|
919
|
-
<span class='MsoHyperlink'>
|
920
|
-
<span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
|
921
|
-
<a href='#_Toc'>
|
922
|
-
Clause 4.2
|
923
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
924
|
-
<span style='mso-tab-count:1 dotted'>. </span>
|
925
|
-
</span>
|
926
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
927
|
-
<span style='mso-element:field-begin'/>
|
928
|
-
</span>
|
929
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
|
930
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
931
|
-
<span style='mso-element:field-separator'/>
|
932
|
-
</span>
|
933
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
|
934
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
|
935
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
936
|
-
<span style='mso-element:field-end'/>
|
937
|
-
</span>
|
938
|
-
</a>
|
939
|
-
</span>
|
940
|
-
</span>
|
941
|
-
</p>
|
942
|
-
<p class='MsoToc3'>
|
943
|
-
<span class='MsoHyperlink'>
|
944
|
-
<span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
|
945
|
-
<a href='#_Toc'>
|
946
|
-
Clause 4.2.1
|
947
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
948
|
-
<span style='mso-tab-count:1 dotted'>. </span>
|
949
|
-
</span>
|
950
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
951
|
-
<span style='mso-element:field-begin'/>
|
952
|
-
</span>
|
953
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
|
954
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
955
|
-
<span style='mso-element:field-separator'/>
|
956
|
-
</span>
|
957
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
|
958
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
|
959
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
960
|
-
<span style='mso-element:field-end'/>
|
961
|
-
</span>
|
962
|
-
</a>
|
963
|
-
</span>
|
964
|
-
</span>
|
965
|
-
</p>
|
966
|
-
<p class='MsoToc1'>
|
967
|
-
<span lang='EN-GB' xml:lang='EN-GB'>
|
968
|
-
<span style='mso-element:field-end'/>
|
969
|
-
</span>
|
970
|
-
<span lang='EN-GB' xml:lang='EN-GB'>
|
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'> </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
|
-
</span>
|
1010
|
-
</p>
|
1011
|
-
<p class='TOCTitle'>List of figures</p>
|
1012
|
-
<p class='MsoToc1'>
|
1013
|
-
<span lang='EN-GB' xml:lang='EN-GB'>
|
1014
|
-
<span style='mso-element:field-begin'/>
|
1015
|
-
<span style='mso-spacerun:yes'> </span>
|
1016
|
-
TOC \h \z \t "FigureTitle,figuretitle"
|
1017
|
-
<span style='mso-element:field-separator'/>
|
1018
|
-
</span>
|
1019
|
-
<span class='MsoHyperlink'>
|
1020
|
-
<span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
|
1021
|
-
<a href='#_Toc'>
|
1022
|
-
First figure
|
1023
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
1024
|
-
<span style='mso-tab-count:1 dotted'>. </span>
|
1025
|
-
</span>
|
1026
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
1027
|
-
<span style='mso-element:field-begin'/>
|
1028
|
-
</span>
|
1029
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
|
1030
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
1031
|
-
<span style='mso-element:field-separator'/>
|
1032
|
-
</span>
|
1033
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
|
1034
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
|
1035
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
1036
|
-
<span style='mso-element:field-end'/>
|
1037
|
-
</span>
|
1038
|
-
</a>
|
1039
|
-
</span>
|
1040
|
-
</span>
|
1041
|
-
</p>
|
1042
|
-
<p class='MsoToc1'>
|
1043
|
-
<span lang='EN-GB' xml:lang='EN-GB'>
|
1044
|
-
<span style='mso-element:field-end'/>
|
1045
|
-
</span>
|
1046
|
-
<span lang='EN-GB' xml:lang='EN-GB'>
|
1047
|
-
</span>
|
1048
|
-
</p>
|
1049
|
-
<p class='TOCTitle'>List of recommendations</p>
|
1050
|
-
<p class='MsoToc1'>
|
1051
|
-
<span lang='EN-GB' xml:lang='EN-GB'>
|
1052
|
-
<span style='mso-element:field-begin'/>
|
1053
|
-
<span style='mso-spacerun:yes'> </span>
|
1054
|
-
TOC \h \z \t
|
1055
|
-
"RecommendationTitle,RecommendationTestTitle,recommendationtitle,recommendationtesttitle"
|
1056
|
-
<span style='mso-element:field-separator'/>
|
1057
|
-
</span>
|
1058
|
-
<span class='MsoHyperlink'>
|
1059
|
-
<span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
|
1060
|
-
<a href='#_Toc'>
|
1061
|
-
: /ogc/recommendation/wfs/2
|
1062
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
1063
|
-
<span style='mso-tab-count:1 dotted'>. </span>
|
1064
|
-
</span>
|
1065
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
1066
|
-
<span style='mso-element:field-begin'/>
|
1067
|
-
</span>
|
1068
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
|
1069
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
1070
|
-
<span style='mso-element:field-separator'/>
|
1071
|
-
</span>
|
1072
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
|
1073
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
|
1074
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
1075
|
-
<span style='mso-element:field-end'/>
|
1076
|
-
</span>
|
1077
|
-
</a>
|
1078
|
-
</span>
|
1079
|
-
</span>
|
1080
|
-
</p>
|
1081
|
-
<p class='MsoToc1'>
|
1082
|
-
<span class='MsoHyperlink'>
|
1083
|
-
<span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
|
1084
|
-
<a href='#_Toc'>
|
1085
|
-
Recommendation Verification 1: /ogc/recommendation/wfs/3
|
1086
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
1087
|
-
<span style='mso-tab-count:1 dotted'>. </span>
|
1088
|
-
</span>
|
1089
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
1090
|
-
<span style='mso-element:field-begin'/>
|
1091
|
-
</span>
|
1092
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
|
1093
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
1094
|
-
<span style='mso-element:field-separator'/>
|
1095
|
-
</span>
|
1096
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
|
1097
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
|
1098
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
1099
|
-
<span style='mso-element:field-end'/>
|
1100
|
-
</span>
|
1101
|
-
</a>
|
1102
|
-
</span>
|
1103
|
-
</span>
|
1104
|
-
</p>
|
1105
|
-
<p class='MsoToc1'>
|
1106
|
-
<span class='MsoHyperlink'>
|
1107
|
-
<span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
|
1108
|
-
<a href='#_Toc'>
|
1109
|
-
Recommendation Verification 2: /ogc/recommendation/wfs/3
|
1110
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
1111
|
-
<span style='mso-tab-count:1 dotted'>. </span>
|
1112
|
-
</span>
|
1113
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
1114
|
-
<span style='mso-element:field-begin'/>
|
1115
|
-
</span>
|
1116
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
|
1117
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
1118
|
-
<span style='mso-element:field-separator'/>
|
1119
|
-
</span>
|
1120
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
|
1121
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
|
1122
|
-
<span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
|
1123
|
-
<span style='mso-element:field-end'/>
|
1124
|
-
</span>
|
1125
|
-
</a>
|
1126
|
-
</span>
|
1127
|
-
</span>
|
1128
|
-
</p>
|
1129
|
-
<p class='MsoToc1'>
|
1130
|
-
<span lang='EN-GB' xml:lang='EN-GB'>
|
1131
|
-
<span style='mso-element:field-end'/>
|
1132
|
-
</span>
|
1133
|
-
<span lang='EN-GB' xml:lang='EN-GB'>
|
1134
|
-
</span>
|
1135
|
-
</p>
|
1136
|
-
<p class='MsoNormal'> </p>
|
1137
|
-
</div>
|
1138
|
-
OUTPUT
|
1139
|
-
end
|
1140
|
-
|
1141
|
-
it "generates HTML output with custom ToC levels function" do
|
1142
|
-
FileUtils.rm_f "test.doc"
|
1143
|
-
FileUtils.rm_f "test.html"
|
1144
|
-
IsoDoc::HtmlConvert.new({ htmltoclevels: 3 })
|
1145
|
-
.convert("test", <<~"INPUT", false)
|
1146
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1147
|
-
<preface><foreword>
|
1148
|
-
<note>
|
1149
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
1150
|
-
</note>
|
1151
|
-
</foreword></preface>
|
1152
|
-
</iso-standard>
|
1153
|
-
INPUT
|
1154
|
-
html = File.read("test.html")
|
1155
|
-
toclevel = <<~"TOCLEVEL"
|
1156
|
-
function toclevel() { return "h1:not(:empty):not(.TermNum):not(.noTOC),h2:not(:empty):not(.TermNum):not(.noTOC),h3:not(:empty):not(.TermNum):not(.noTOC)";}
|
1157
|
-
TOCLEVEL
|
1158
|
-
expect(html).to include toclevel
|
1159
|
-
end
|
1160
|
-
|
1161
|
-
it "reorders footnote numbers in HTML" do
|
1162
|
-
FileUtils.rm_f "test.html"
|
1163
|
-
IsoDoc::HtmlConvert.new(
|
1164
|
-
{ wordstylesheet: "spec/assets/word.css",
|
1165
|
-
htmlstylesheet: "spec/assets/html.scss",
|
1166
|
-
wordintropage: "spec/assets/wordintro.html" },
|
1167
|
-
).convert("test", <<~"INPUT", false)
|
1168
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1169
|
-
<sections>
|
1170
|
-
<clause id="A" inline-header="false" obligation="normative"><title>Clause 4</title><fn reference="3">
|
1171
|
-
<p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">This is a footnote.</p>
|
1172
|
-
</fn><clause id="N" inline-header="false" obligation="normative">
|
1173
|
-
<title>Introduction to this<fn reference="2">
|
1174
|
-
Formerly denoted as 15 % (m/m).
|
1175
|
-
</fn></title>
|
1176
|
-
</clause>
|
1177
|
-
<clause id="O" inline-header="false" obligation="normative">
|
1178
|
-
<title>Clause 4.2</title>
|
1179
|
-
<p>A<fn reference="1">
|
1180
|
-
<p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">Formerly denoted as 15 % (m/m).</p>
|
1181
|
-
</fn></p>
|
1182
|
-
</clause></clause>
|
1183
|
-
</sections>
|
1184
|
-
</iso-standard>
|
1185
|
-
INPUT
|
1186
|
-
html = File.read("test.html")
|
1187
|
-
.sub(/^.*<main class="main-section">/m,
|
1188
|
-
'<main xmlns:epub="epub" class="main-section">')
|
1189
|
-
.sub(%r{</main>.*$}m, "</main>")
|
1190
|
-
expect(xmlpp(html)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1191
|
-
<main xmlns:epub="epub" class="main-section"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
|
1192
|
-
<p class="zzSTDTitle1"></p>
|
1193
|
-
<div id="A">
|
1194
|
-
<h1>Clause 4</h1>
|
1195
|
-
<a class='FootnoteRef' href='#fn:3' id='fnref:1'>
|
1196
|
-
<sup>1</sup>
|
1197
|
-
</a>
|
1198
|
-
<div id="N">
|
1199
|
-
<h2>Introduction to this<a class='FootnoteRef' href='#fn:2' id='fnref:2'><sup>2</sup></a></h2>
|
1200
|
-
</div>
|
1201
|
-
<div id="O">
|
1202
|
-
<h2>Clause 4.2</h2>
|
1203
|
-
<p>A<a class='FootnoteRef' href='#fn:2'><sup>2</sup></a></p>
|
1204
|
-
</div>
|
1205
|
-
</div>
|
1206
|
-
<aside id="fn:3" class="footnote">
|
1207
|
-
<p id="_ff27c067-2785-4551-96cf-0a73530ff1e6"><a class='FootnoteRef' href='#fn:3'>
|
1208
|
-
<sup>1</sup>
|
1209
|
-
</a>This is a footnote.</p>
|
1210
|
-
<a href="#fnref:1">↩</a></aside>
|
1211
|
-
<aside id="fn:2" class="footnote">
|
1212
|
-
<a class='FootnoteRef' href='#fn:2'><sup>2</sup></a>Formerly denoted as 15 % (m/m).
|
1213
|
-
<a href="#fnref:2">↩</a></aside>
|
1214
|
-
</main>
|
1215
|
-
OUTPUT
|
1216
|
-
end
|
1217
|
-
|
1218
|
-
it "moves images in HTML #1" do
|
1219
|
-
FileUtils.rm_f "test.html"
|
1220
|
-
FileUtils.rm_rf Dir.glob "test_*_htmlimages"
|
1221
|
-
IsoDoc::HtmlConvert.new(
|
1222
|
-
{ wordstylesheet: "spec/assets/word.css",
|
1223
|
-
htmlstylesheet: "spec/assets/html.scss" },
|
1224
|
-
).convert("test", <<~"INPUT", false)
|
1225
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1226
|
-
<preface><foreword>
|
1227
|
-
<figure id="_">
|
1228
|
-
<name>Split-it-right sample divider</name>
|
1229
|
-
<image src="#{File.expand_path(File.join(File.dirname(__FILE__), '..', 'assets/rice_image1.png'))}" id="_" mimetype="image/png"/>
|
1230
|
-
<image src="spec/assets/rice_image1.png" id="_" mimetype="image/png"/>
|
1231
|
-
<image src="spec/assets/rice_image1.png" id="_" width="20000" height="300000" mimetype="image/png"/>
|
1232
|
-
<image src="spec/assets/rice_image1.png" id="_" width="99" height="auto" mimetype="image/png"/>
|
1233
|
-
<image src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB9AAAAfQCAAAAAC/U5ulAAAjo0lEQVR4nOzVMQ0AMAzAsPInvYHoMS2yEeTLHADge/M6AADYM3QACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIuAAAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQOgAMCB0ABgQOgAMCB0ABgIAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQOgAMCB0ABgQOgAMCB0ABgIAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQOgAMCB0ABgQOgAMCB0ABgIAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQ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ZW50YWxzX29mX3Byb2R1Y3RfZGVzY3JpcHRpb25fYW5kX3N1cHBvcnQiIGZpbGU9ImFjdGlvbl9zY2hlbWFleHBnMS54bWwiPgo8aW1nIHNyYz0iYWN0aW9uX3NjaGVtYWV4cGcxLmdpZiI+CjxpbWcuYXJlYSBzaGFwZT0icmVjdCIgY29vcmRzPSIyMTAsMTg2LDM0MywyMjciIGhyZWY9Ii4uLy4uL3Jlc291cmNlcy9iYXNpY19hdHRyaWJ1dGVfc2NoZW1hL2Jhc2ljX2F0dHJpYnV0ZV9zY2hlbWEueG1sIiAvPgo8aW1nLmFyZWEgc2hhcGU9InJlY3QiIGNvb3Jkcz0iMTAsMTAsOTYsNTEiIGhyZWY9Ii4uLy4uL3Jlc291cmNlcy9hY3Rpb25fc2NoZW1hL2FjdGlvbl9zY2hlbWEueG1sIiAvPgo8aW1nLmFyZWEgc2hhcGU9InJlY3QiIGNvb3Jkcz0iMjEwLDI2NCwzNTgsMzA1IiBocmVmPSIuLi8uLi9yZXNvdXJjZXMvc3VwcG9ydF9yZXNvdXJjZV9zY2hlbWEvc3VwcG9ydF9yZXNvdXJjZV9zY2hlbWEueG1sIiAvPgo8L2ltZz4KPC9pbWdmaWxlLmNvbnRlbnQ+Cg==" height="20" width="auto" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f2" mimetype="application/xml"/>
|
1235
|
-
</figure>
|
1236
|
-
</foreword></preface>
|
1237
|
-
</iso-standard>
|
1238
|
-
INPUT
|
1239
|
-
html = File.read("test.html")
|
1240
|
-
.sub(/^.*<main class="main-section">/m, '<main class="main-section">')
|
1241
|
-
.sub(%r{</main>.*$}m, "</main>")
|
1242
|
-
expect(`ls test_*_htmlimages`).to match(/\.png$/)
|
1243
|
-
expect(xmlpp(html.gsub(/\/[0-9a-f-]+\.png/, "/_.png"))
|
1244
|
-
.gsub(/test_[^_]+_htmlimages/, "test_htmlimages"))
|
1245
|
-
.to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1246
|
-
<main class="main-section"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
|
1247
|
-
<br />
|
1248
|
-
<div>
|
1249
|
-
<h1 class="ForewordTitle">Foreword</h1>
|
1250
|
-
<div id="_" class="figure">
|
1251
|
-
<img src="test_htmlimages/_.png" height="776" width="922" />
|
1252
|
-
<img src="test_htmlimages/_.png" height="776" width="922" />
|
1253
|
-
<img src="test_htmlimages/_.png" height="800" width="53" />
|
1254
|
-
<img src="test_htmlimages/_.png" height="83" width="99" />
|
1255
|
-
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB9AAAAfQCAAAAAC/U5ulAAAjo0lEQVR4nOzVMQ0AMAzAsPInvYHoMS2yEeTLHADge/M6AADYM3QACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIuAAAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQOgAMCB0ABgQOgAMCB0ABgIAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQOgAMCB0ABgQOgAMCB0ABgIAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQOgAMCB0ABgQOgAMCB0ABgIAAP//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nRlbnQgU1lTVEVNICIuLi8uLi8uLi9kdGQvdGV4dC5lbnQiPgo8aW1nZmlsZS5jb250ZW50IG1vZHVsZT0iZnVuZGFtZW50YWxzX29mX3Byb2R1Y3RfZGVzY3JpcHRpb25fYW5kX3N1cHBvcnQiIGZpbGU9ImFjdGlvbl9zY2hlbWFleHBnMS54bWwiPgo8aW1nIHNyYz0iYWN0aW9uX3NjaGVtYWV4cGcxLmdpZiI+CjxpbWcuYXJlYSBzaGFwZT0icmVjdCIgY29vcmRzPSIyMTAsMTg2LDM0MywyMjciIGhyZWY9Ii4uLy4uL3Jlc291cmNlcy9iYXNpY19hdHRyaWJ1dGVfc2NoZW1hL2Jhc2ljX2F0dHJpYnV0ZV9zY2hlbWEueG1sIiAvPgo8aW1nLmFyZWEgc2hhcGU9InJlY3QiIGNvb3Jkcz0iMTAsMTAsOTYsNTEiIGhyZWY9Ii4uLy4uL3Jlc291cmNlcy9hY3Rpb25fc2NoZW1hL2FjdGlvbl9zY2hlbWEueG1sIiAvPgo8aW1nLmFyZWEgc2hhcGU9InJlY3QiIGNvb3Jkcz0iMjEwLDI2NCwzNTgsMzA1IiBocmVmPSIuLi8uLi9yZXNvdXJjZXMvc3VwcG9ydF9yZXNvdXJjZV9zY2hlbWEvc3VwcG9ydF9yZXNvdXJjZV9zY2hlbWEueG1sIiAvPgo8L2ltZz4KPC9pbWdmaWxlLmNvbnRlbnQ+Cg==' height='' width=''/>
|
1257
|
-
<p class="FigureTitle" style="text-align:center;">Split-it-right sample divider</p></div>
|
1258
|
-
</div>
|
1259
|
-
<p class="zzSTDTitle1"></p>
|
1260
|
-
</main>
|
1261
|
-
OUTPUT
|
1262
|
-
end
|
1263
|
-
|
1264
|
-
it "moves images in HTML #2" do
|
1265
|
-
FileUtils.rm_f "test.html"
|
1266
|
-
FileUtils.rm_rf "test_htmlimages"
|
1267
|
-
IsoDoc::HtmlConvert.new(
|
1268
|
-
{ baseassetpath: "spec/assets",
|
1269
|
-
wordstylesheet: "word.css",
|
1270
|
-
htmlstylesheet: "html.scss" },
|
1271
|
-
).convert("test", <<~"INPUT", false)
|
1272
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1273
|
-
<preface><foreword>
|
1274
|
-
<figure id="_">
|
1275
|
-
<name>Split-it-right sample divider</name>
|
1276
|
-
<image src="rice_image1.png" id="_" mimetype="image/png"/>
|
1277
|
-
</figure>
|
1278
|
-
</foreword></preface>
|
1279
|
-
</iso-standard>
|
1280
|
-
INPUT
|
1281
|
-
html = File.read("test.html")
|
1282
|
-
.sub(/^.*<main class="main-section">/m, '<main class="main-section">')
|
1283
|
-
.sub(%r{</main>.*$}m, "</main>")
|
1284
|
-
expect(`ls test_*_htmlimages`).to match(/\.png$/)
|
1285
|
-
expect(xmlpp(html.gsub(/\/[0-9a-f-]+\.png/, "/_.png"))
|
1286
|
-
.gsub(/test_[^_]+_htmlimages/, "test_htmlimages"))
|
1287
|
-
.to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1288
|
-
<main class='main-section'>
|
1289
|
-
<button onclick='topFunction()' id='myBtn' title='Go to top'>Top</button>
|
1290
|
-
<br/>
|
1291
|
-
<div>
|
1292
|
-
<h1 class='ForewordTitle'>Foreword</h1>
|
1293
|
-
<div id='_' class='figure'>
|
1294
|
-
<img src='test_htmlimages/_.png' height='776' width='922'/>
|
1295
|
-
<p class='FigureTitle' style='text-align:center;'>Split-it-right sample divider</p>
|
1296
|
-
</div>
|
1297
|
-
</div>
|
1298
|
-
<p class='zzSTDTitle1'/>
|
1299
|
-
</main>
|
1300
|
-
OUTPUT
|
1301
|
-
end
|
1302
|
-
|
1303
|
-
describe "mathvariant to plain" do
|
1304
|
-
context "when `mathvariant` attr equal to `script`" do
|
1305
|
-
it "converts mathvariant text chars into associated plain chars" do
|
1306
|
-
FileUtils.rm_f "test.html"
|
1307
|
-
input = <<~INPUT
|
1308
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
1309
|
-
<iso-standard xmlns="https://www.metanorma.org/ns/iso" type="semantic" version="1.5.14">
|
1310
|
-
<sections>
|
1311
|
-
<clause id="_clause" inline-header="false" obligation="normative">
|
1312
|
-
<title>Clause</title>
|
1313
|
-
<p id="_20514f5a-9f86-454e-b6ce-927f65ba6441">
|
1314
|
-
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML">
|
1315
|
-
<mi>x</mi>
|
1316
|
-
<mo>=</mo>
|
1317
|
-
<mstyle mathvariant="script">
|
1318
|
-
<mi>l</mi>
|
1319
|
-
</mstyle>
|
1320
|
-
<mo>+</mo>
|
1321
|
-
<mn>1</mn>
|
1322
|
-
</math></stem>
|
1323
|
-
</p>
|
1324
|
-
</clause>
|
1325
|
-
</sections>
|
1326
|
-
</iso-standard>
|
1327
|
-
INPUT
|
1328
|
-
output = <<~OUTPUT
|
1329
|
-
<main class="main-section"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
|
1330
|
-
<p class="zzSTDTitle1"></p>
|
1331
|
-
<div id="_clause">
|
1332
|
-
<h1>Clause</h1>
|
1333
|
-
<p id="_20514f5a-9f86-454e-b6ce-927f65ba6441">
|
1334
|
-
<span class="stem"><math xmlns="http://www.w3.org/1998/Math/MathML">
|
1335
|
-
<mi>x</mi>
|
1336
|
-
<mo>=</mo>
|
1337
|
-
<mstyle mathvariant="script">
|
1338
|
-
<mi>𝓁</mi>
|
1339
|
-
</mstyle>
|
1340
|
-
<mo>+</mo>
|
1341
|
-
<mn>1</mn>
|
1342
|
-
</math></span>
|
1343
|
-
</p>
|
1344
|
-
</div>
|
1345
|
-
</main>
|
1346
|
-
OUTPUT
|
1347
|
-
IsoDoc::HtmlConvert.new({}).convert("test", input, false)
|
1348
|
-
html = File.read("test.html")
|
1349
|
-
.sub(/^.*<main class="main-section">/m, '<main class="main-section">')
|
1350
|
-
.sub(%r{</main>.*$}m, "</main>")
|
1351
|
-
expect(html).to(be_equivalent_to(output))
|
1352
|
-
end
|
1353
|
-
end
|
1354
|
-
|
1355
|
-
context "when complex `mathvariant` combinations" do
|
1356
|
-
it "converts mathvariant text chars into associated plain chars" do
|
1357
|
-
FileUtils.rm_f "test.html"
|
1358
|
-
input = <<~INPUT
|
1359
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
1360
|
-
<iso-standard xmlns="https://www.metanorma.org/ns/iso" type="semantic" version="1.5.14">
|
1361
|
-
<sections>
|
1362
|
-
<clause id="_clause" inline-header="false" obligation="normative">
|
1363
|
-
<title>Clause</title>
|
1364
|
-
<p id="_20514f5a-9f86-454e-b6ce-927f65ba6441">
|
1365
|
-
<stem type="MathML">
|
1366
|
-
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
1367
|
-
<mstyle mathvariant="sans-serif">
|
1368
|
-
<mfrac>
|
1369
|
-
<mrow>
|
1370
|
-
<mrow>
|
1371
|
-
<mi>n</mi>
|
1372
|
-
<mfenced open="(" close=")">
|
1373
|
-
<mrow>
|
1374
|
-
<mstyle mathvariant="bold">
|
1375
|
-
<mrow>
|
1376
|
-
<mi>n</mi>
|
1377
|
-
<mo>+</mo>
|
1378
|
-
<mn>1</mn>
|
1379
|
-
<mo>+</mo>
|
1380
|
-
<mstyle mathvariant="italic">
|
1381
|
-
<mi>x</mi>
|
1382
|
-
</mstyle>
|
1383
|
-
</mrow>
|
1384
|
-
</mstyle>
|
1385
|
-
</mrow>
|
1386
|
-
</mfenced>
|
1387
|
-
</mrow>
|
1388
|
-
</mrow>
|
1389
|
-
<mrow>
|
1390
|
-
<mstyle mathvariant="bold">
|
1391
|
-
<mrow>
|
1392
|
-
<mi>y</mi>
|
1393
|
-
<mo>+</mo>
|
1394
|
-
<mstyle mathvariant="fraktur">
|
1395
|
-
<mi>z</mi>
|
1396
|
-
</mstyle>
|
1397
|
-
</mrow>
|
1398
|
-
</mstyle>
|
1399
|
-
</mrow>
|
1400
|
-
</mfrac>
|
1401
|
-
</mstyle>
|
1402
|
-
</math>
|
1403
|
-
</stem>
|
1404
|
-
</p>
|
1405
|
-
</clause>
|
1406
|
-
</sections>
|
1407
|
-
</iso-standard>
|
1408
|
-
INPUT
|
1409
|
-
output = <<~OUTPUT
|
1410
|
-
<main class="main-section"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
|
1411
|
-
<p class="zzSTDTitle1"></p>
|
1412
|
-
<div id="_clause">
|
1413
|
-
<h1>Clause</h1>
|
1414
|
-
<p id="_20514f5a-9f86-454e-b6ce-927f65ba6441">
|
1415
|
-
<span class="stem"><math xmlns="http://www.w3.org/1998/Math/MathML">
|
1416
|
-
<mstyle mathvariant="sans-serif">
|
1417
|
-
<mfrac>
|
1418
|
-
<mrow>
|
1419
|
-
<mrow>
|
1420
|
-
<mi>𝗇</mi>
|
1421
|
-
<mfenced open="(" close=")">
|
1422
|
-
<mrow>
|
1423
|
-
<mstyle mathvariant="bold">
|
1424
|
-
<mrow>
|
1425
|
-
<mi>𝗻</mi>
|
1426
|
-
<mo>+</mo>
|
1427
|
-
<mn>𝟭</mn>
|
1428
|
-
<mo>+</mo>
|
1429
|
-
<mstyle mathvariant="italic">
|
1430
|
-
<mi>𝙭</mi>
|
1431
|
-
</mstyle>
|
1432
|
-
</mrow>
|
1433
|
-
</mstyle>
|
1434
|
-
</mrow>
|
1435
|
-
</mfenced>
|
1436
|
-
</mrow>
|
1437
|
-
</mrow>
|
1438
|
-
<mrow>
|
1439
|
-
<mstyle mathvariant="bold">
|
1440
|
-
<mrow>
|
1441
|
-
<mi>𝘆</mi>
|
1442
|
-
<mo>+</mo>
|
1443
|
-
<mstyle mathvariant="fraktur">
|
1444
|
-
<mi>𝖟</mi>
|
1445
|
-
</mstyle>
|
1446
|
-
</mrow>
|
1447
|
-
</mstyle>
|
1448
|
-
</mrow>
|
1449
|
-
</mfrac>
|
1450
|
-
</mstyle>
|
1451
|
-
</math></span>
|
1452
|
-
</p>
|
1453
|
-
</div>
|
1454
|
-
</main>
|
1455
|
-
OUTPUT
|
1456
|
-
IsoDoc::HtmlConvert.new({}).convert("test", input, false)
|
1457
|
-
html = File.read("test.html")
|
1458
|
-
.sub(/^.*<main class="main-section">/m, '<main class="main-section">')
|
1459
|
-
.sub(%r{</main>.*$}m, "</main>")
|
1460
|
-
expect(html).to(be_equivalent_to(output))
|
1461
|
-
end
|
1462
|
-
end
|
1463
|
-
end
|
1464
|
-
|
1465
|
-
it "moves images in HTML with no file suffix" do
|
1466
|
-
FileUtils.rm_f "test.html"
|
1467
|
-
FileUtils.rm_rf Dir.glob "test_*_htmlimages"
|
1468
|
-
IsoDoc::HtmlConvert.new(
|
1469
|
-
{ wordstylesheet: "spec/assets/word.css",
|
1470
|
-
htmlstylesheet: "spec/assets/html.scss" },
|
1471
|
-
).convert("test", <<~"INPUT", false)
|
1472
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1473
|
-
<preface><foreword>
|
1474
|
-
<figure id="_">
|
1475
|
-
<name>Split-it-right sample divider</name>
|
1476
|
-
<image src="spec/assets/rice_image1" id="_" mimetype="image/png"/>
|
1477
|
-
<image src="spec/assets/rice_image1" id="_" mimetype="image/*"/>
|
1478
|
-
<image src="data:image/*;base64,iVBORw0KGgoAAAANSUhEUgAAB9AAAAfQCAAAAAC/U5ulAAAjo0lEQVR4nOzVMQ0AMAzAsPInvYHoMS2yEeTLHADge/M6AADYM3QACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIuAAAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQOgAMCB0ABgQOgAMCB0ABgIAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADA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BA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQOgAMCB0ABgQOgAMBAAA//8DAE/7hyLdS2yEAAAAAElFTkSuQmCC" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f3" mimetype="image/png"/>
|
1479
|
-
</figure>
|
1480
|
-
</foreword></preface>
|
1481
|
-
</iso-standard>
|
1482
|
-
INPUT
|
1483
|
-
html = File.read("test.html")
|
1484
|
-
.sub(/^.*<main class="main-section">/m, '<main class="main-section">')
|
1485
|
-
.sub(%r{</main>.*$}m, "</main>")
|
1486
|
-
expect(`ls test_*_htmlimages`).to match(/\.png$/)
|
1487
|
-
expect(xmlpp(html.gsub(/\/[0-9a-f-]+\.png/, "/_.png"))
|
1488
|
-
.gsub(/test_[^_]+_htmlimages/, "test_htmlimages"))
|
1489
|
-
.to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1490
|
-
<main class='main-section'>
|
1491
|
-
<button onclick='topFunction()' id='myBtn' title='Go to top'>Top</button>
|
1492
|
-
<br/>
|
1493
|
-
<div>
|
1494
|
-
<h1 class='ForewordTitle'>Foreword</h1>
|
1495
|
-
<div id='_' class='figure'>
|
1496
|
-
<img src='test_htmlimages/_.png' height='776' width='922'/>
|
1497
|
-
<img src='test_htmlimages/_.png' height='776' width='922'/>
|
1498
|
-
<img src='data:image/*;base64,iVBORw0KGgoAAAANSUhEUgAAB9AAAAfQCAAAAAC/U5ulAAAjo0lEQVR4nOzVMQ0AMAzAsPInvYHoMS2yEeTLHADge/M6AADYM3QACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIuAAAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQA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OgAMCB0ABgIAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQOgAMCB0ABgQOgAMBAAA//8DAE/7hyLdS2yEAAAAAElFTkSuQmCC' height='800' width='800'/>
|
1499
|
-
<p class='FigureTitle' style='text-align:center;'>Split-it-right sample divider</p>
|
1500
|
-
</div>
|
1501
|
-
</div>
|
1502
|
-
<p class='zzSTDTitle1'/>
|
1503
|
-
</main>
|
1504
|
-
OUTPUT
|
1505
|
-
end
|
1506
|
-
|
1507
|
-
it "moves images in HTML, using relative file location" do
|
1508
|
-
FileUtils.rm_f "spec/test.html"
|
1509
|
-
FileUtils.rm_rf "spec/test_htmlimages"
|
1510
|
-
IsoDoc::HtmlConvert
|
1511
|
-
.new(wordstylesheet: "assets/word.css",
|
1512
|
-
htmlstylesheet: "assets/html.scss")
|
1513
|
-
.convert("spec/test", <<~"INPUT", false)
|
1514
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1515
|
-
<preface><foreword>
|
1516
|
-
<figure id="_">
|
1517
|
-
<name>Split-it-right sample divider</name>
|
1518
|
-
<image src="#{File.expand_path(File.join(File.dirname(__FILE__), '..', 'assets/rice_image1.png'))}" id="_" mimetype="image/png"/>
|
1519
|
-
<image src="assets/rice_image1.png" id="_" mimetype="image/png"/>
|
1520
|
-
<image src="assets/rice_image1.png" id="_" width="20000" height="300000" mimetype="image/png"/>
|
1521
|
-
<image src="assets/rice_image1.png" id="_" width="99" height="auto" mimetype="image/png"/>
|
1522
|
-
</figure>
|
1523
|
-
</foreword></preface>
|
1524
|
-
</iso-standard>
|
1525
|
-
INPUT
|
1526
|
-
html = File.read("spec/test.html")
|
1527
|
-
.sub(/^.*<main class="main-section">/m, '<main class="main-section">')
|
1528
|
-
.sub(%r{</main>.*$}m, "</main>")
|
1529
|
-
expect(`ls test_*_htmlimages`).to match(/\.png$/)
|
1530
|
-
expect(xmlpp(html.gsub(/\/[0-9a-f-]+\.png/, "/_.png"))
|
1531
|
-
.gsub(/test_[^_]+_htmlimages/, "test_htmlimages"))
|
1532
|
-
.to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1533
|
-
<main class="main-section"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
|
1534
|
-
<br />
|
1535
|
-
<div>
|
1536
|
-
<h1 class="ForewordTitle">Foreword</h1>
|
1537
|
-
<div id="_" class="figure">
|
1538
|
-
<img src="test_htmlimages/_.png" height="776" width="922" />
|
1539
|
-
<img src="test_htmlimages/_.png" height="776" width="922" />
|
1540
|
-
<img src="test_htmlimages/_.png" height="800" width="53" />
|
1541
|
-
<img src="test_htmlimages/_.png" height="83" width="99" />
|
1542
|
-
<p class="FigureTitle" style="text-align:center;">Split-it-right sample divider</p></div>
|
1543
|
-
</div>
|
1544
|
-
<p class="zzSTDTitle1"></p>
|
1545
|
-
</main>
|
1546
|
-
OUTPUT
|
1547
|
-
end
|
1548
|
-
|
1549
|
-
it "encodes images in HTML as data URIs" do
|
1550
|
-
FileUtils.rm_f "test.html"
|
1551
|
-
FileUtils.rm_rf Dir.glob "test_*_htmlimages"
|
1552
|
-
IsoDoc::HtmlConvert
|
1553
|
-
.new(htmlstylesheet: "spec/assets/html.scss", datauriimage: true)
|
1554
|
-
.convert("test", <<~"INPUT", false)
|
1555
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1556
|
-
<preface><foreword>
|
1557
|
-
<figure id="_">
|
1558
|
-
<name>Split-it-right sample divider</name>
|
1559
|
-
<image src="#{File.expand_path(File.join(File.dirname(__FILE__), '..', 'assets/rice_image1.png'))}" id="_" mimetype="image/png"/>
|
1560
|
-
<image src="spec/assets/rice_image1.png" id="_" mimetype="image/png"/>
|
1561
|
-
</figure>
|
1562
|
-
</foreword></preface>
|
1563
|
-
</iso-standard>
|
1564
|
-
INPUT
|
1565
|
-
html = File.read("test.html")
|
1566
|
-
.sub(/^.*<main class="main-section">/m, '<main class="main-section">')
|
1567
|
-
.sub(%r{</main>.*$}m, "</main>")
|
1568
|
-
expect(xmlpp(html
|
1569
|
-
.gsub(%r{src="data:image/png;base64,[^"]+"}, %{src="data:image/png;base64,_"})))
|
1570
|
-
.to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1571
|
-
<main class="main-section"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
|
1572
|
-
<br />
|
1573
|
-
<div>
|
1574
|
-
<h1 class="ForewordTitle">Foreword</h1>
|
1575
|
-
<div id="_" class="figure">
|
1576
|
-
<img src="data:image/png;base64,_" height="776" width="922" />
|
1577
|
-
<img src="data:image/png;base64,_" height="776" width="922" />
|
1578
|
-
<p class="FigureTitle" style="text-align:center;">Split-it-right sample divider</p></div>
|
1579
|
-
</div>
|
1580
|
-
<p class="zzSTDTitle1"></p>
|
1581
|
-
</main>
|
1582
|
-
OUTPUT
|
1583
|
-
end
|
1584
|
-
|
1585
|
-
it "encodes images in HTML as data URIs, using relative file location" do
|
1586
|
-
FileUtils.rm_f "spec/test.html"
|
1587
|
-
FileUtils.rm_rf Dir.glob "test_*_htmlimages"
|
1588
|
-
IsoDoc::HtmlConvert
|
1589
|
-
.new({ htmlstylesheet: "assets/html.scss", datauriimage: true })
|
1590
|
-
.convert("spec/test", <<~"INPUT", false)
|
1591
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1592
|
-
<preface><foreword>
|
1593
|
-
<figure id="_">
|
1594
|
-
<name>Split-it-right sample divider</name>
|
1595
|
-
<image src="#{File.expand_path(File.join(File.dirname(__FILE__), '..', 'assets/rice_image1.png'))}" id="_" mimetype="image/png"/>
|
1596
|
-
<image src="assets/rice_image1.png" id="_" mimetype="image/png"/>
|
1597
|
-
</figure>
|
1598
|
-
</foreword></preface>
|
1599
|
-
</iso-standard>
|
1600
|
-
INPUT
|
1601
|
-
html = File.read("spec/test.html")
|
1602
|
-
.sub(/^.*<main class="main-section">/m, '<main class="main-section">')
|
1603
|
-
.sub(%r{</main>.*$}m, "</main>")
|
1604
|
-
expect(xmlpp(html
|
1605
|
-
.gsub(%r{src="data:image/png;base64,[^"]+"}, %{src="data:image/png;base64,_"})))
|
1606
|
-
.to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1607
|
-
<main class="main-section"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
|
1608
|
-
<br />
|
1609
|
-
<div>
|
1610
|
-
<h1 class="ForewordTitle">Foreword</h1>
|
1611
|
-
<div id="_" class="figure">
|
1612
|
-
<img src="data:image/png;base64,_" height="776" width="922" />
|
1613
|
-
<img src="data:image/png;base64,_" height="776" width="922" />
|
1614
|
-
<p class="FigureTitle" style="text-align:center;">Split-it-right sample divider</p></div>
|
1615
|
-
</div>
|
1616
|
-
<p class="zzSTDTitle1"></p>
|
1617
|
-
</main>
|
1618
|
-
OUTPUT
|
1619
|
-
end
|
1620
|
-
|
1621
|
-
it "processes IsoXML terms for HTML" do
|
1622
|
-
FileUtils.rm_f "test.html"
|
1623
|
-
FileUtils.rm_f "test.doc"
|
1624
|
-
IsoDoc::HtmlConvert.new(options)
|
1625
|
-
.convert("test", <<~"INPUT", false)
|
1626
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1627
|
-
<sections>
|
1628
|
-
<terms id="_terms_and_definitions" obligation="normative"><title>Terms and Definitions</title>
|
1629
|
-
<term id="paddy1"><name>1.1.</name><preferred>paddy</preferred>
|
1630
|
-
<domain>rice</domain>
|
1631
|
-
<definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></definition>
|
1632
|
-
<termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f892">
|
1633
|
-
<p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
|
1634
|
-
<ul>
|
1635
|
-
<li>A</li>
|
1636
|
-
</ul>
|
1637
|
-
</termexample>
|
1638
|
-
<termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f894">
|
1639
|
-
<ul>
|
1640
|
-
<li>A</li>
|
1641
|
-
</ul>
|
1642
|
-
</termexample>
|
1643
|
-
<termsource status="modified">
|
1644
|
-
<origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality></origin>
|
1645
|
-
<modification>
|
1646
|
-
<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>
|
1647
|
-
</modification>
|
1648
|
-
</termsource></term>
|
1649
|
-
<term id="paddy"><name>1.2.</name><preferred>paddy</preferred><admitted>paddy rice</admitted>
|
1650
|
-
<admitted>rough rice</admitted>
|
1651
|
-
<deprecates>cargo rice</deprecates>
|
1652
|
-
<definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></definition>
|
1653
|
-
<termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f893">
|
1654
|
-
<ul>
|
1655
|
-
<li>A</li>
|
1656
|
-
</ul>
|
1657
|
-
</termexample>
|
1658
|
-
<termnote id="_671a1994-4783-40d0-bc81-987d06ffb74e">
|
1659
|
-
<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>
|
1660
|
-
</termnote>
|
1661
|
-
<termnote id="_671a1994-4783-40d0-bc81-987d06ffb74f">
|
1662
|
-
<ul><li>A</li></ul>
|
1663
|
-
<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>
|
1664
|
-
</termnote>
|
1665
|
-
<termsource status="identical">
|
1666
|
-
<origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality></origin>
|
1667
|
-
</termsource></term>
|
1668
|
-
</terms>
|
1669
|
-
</sections>
|
1670
|
-
</iso-standard>
|
1671
|
-
INPUT
|
1672
|
-
expect(File.exist?("test.html")).to be true
|
1673
|
-
html = File.read("test.html")
|
1674
|
-
expect(html).to match(%r{<h2 class="TermNum" id="paddy1">1\.1\.</h2>})
|
1675
|
-
expect(html).to match(%r{<h2 class="TermNum" id="paddy">1\.2\.</h2>})
|
1676
|
-
end
|
1677
|
-
|
1678
|
-
it "creates continuation styles for multiparagraph list items in Word" do
|
1679
|
-
FileUtils.rm_f "test.doc"
|
1680
|
-
FileUtils.rm_f "test.html"
|
1681
|
-
IsoDoc::WordConvert.new(options)
|
1682
|
-
.convert("test", <<~"INPUT", false)
|
1683
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1684
|
-
<preface><foreword>
|
1685
|
-
<ul>
|
1686
|
-
<li><p>A</p>
|
1687
|
-
<p>B</p></li>
|
1688
|
-
<li><ol><li><p>C</p>
|
1689
|
-
<p>D</p>
|
1690
|
-
<sourcecode>E</sourcecode></li>
|
1691
|
-
</ol></li>
|
1692
|
-
</ul>
|
1693
|
-
<ol>
|
1694
|
-
<li><p>A1</p>
|
1695
|
-
<p>B1</p></li>
|
1696
|
-
<li><ul><li><p>C1</p>
|
1697
|
-
<formula id="_5fc1ef0f-75d2-4b54-802c-b1bad4a53b62">
|
1698
|
-
<stem type="AsciiMath">D1</stem>
|
1699
|
-
</formula>
|
1700
|
-
<dl id="_f8fb7ed7-7874-44a8-933f-06e0e86fb264">
|
1701
|
-
<dt>
|
1702
|
-
<em>n</em>
|
1703
|
-
</dt>
|
1704
|
-
<dd>
|
1705
|
-
<p id="_a27281a4-b20e-4d0b-a780-bab9e851b03e">is the number of coating layers</p>
|
1706
|
-
</dd>
|
1707
|
-
</dl>
|
1708
|
-
</ul></li>
|
1709
|
-
</ol>
|
1710
|
-
</foreword></preface>
|
1711
|
-
</iso-standard>
|
1712
|
-
INPUT
|
1713
|
-
word = File.read("test.doc")
|
1714
|
-
.sub(/^.*<div class="WordSection2">/m, '<div class="WordSection2" xmlns:m="m">')
|
1715
|
-
.sub(%r{<p class="MsoNormal">\s*<br clear="all" class="section"/>\s*</p>\s*<div class="WordSection3">.*$}m, "")
|
1716
|
-
expect(xmlpp(word)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1717
|
-
<div class='WordSection2' xmlns:m='m'>
|
1718
|
-
<p class='MsoNormal'>
|
1719
|
-
<br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
|
1720
|
-
</p>
|
1721
|
-
<div>
|
1722
|
-
<h1 class='ForewordTitle'>Foreword</h1>
|
1723
|
-
<p class='MsoListParagraphCxSpFirst'>
|
1724
|
-
A
|
1725
|
-
<div class='ListContLevel1'>
|
1726
|
-
<p class='MsoNormal'>B</p>
|
1727
|
-
</div>
|
1728
|
-
</p>
|
1729
|
-
<p class='MsoListParagraphCxSpLast'>
|
1730
|
-
<p class='MsoListParagraphCxSpFirst'>
|
1731
|
-
C
|
1732
|
-
<div class='ListContLevel2'>
|
1733
|
-
<p class='MsoNormal'>D</p>
|
1734
|
-
</div>
|
1735
|
-
<div class='ListContLevel2'>
|
1736
|
-
<p class='Sourcecode'>E</p>
|
1737
|
-
</div>
|
1738
|
-
</p>
|
1739
|
-
</p>
|
1740
|
-
<p class='MsoListParagraphCxSpFirst'>
|
1741
|
-
A1
|
1742
|
-
<div class='ListContLevel1'>
|
1743
|
-
<p class='MsoNormal'>B1</p>
|
1744
|
-
</div>
|
1745
|
-
</p>
|
1746
|
-
<p class='MsoListParagraphCxSpLast'>
|
1747
|
-
C1
|
1748
|
-
<div class='ListContLevel2'>
|
1749
|
-
<div>
|
1750
|
-
<a name='_5fc1ef0f-75d2-4b54-802c-b1bad4a53b62' id='_5fc1ef0f-75d2-4b54-802c-b1bad4a53b62'/>
|
1751
|
-
<div class='formula'>
|
1752
|
-
<p class='MsoNormal'>
|
1753
|
-
<span class='stem'>
|
1754
|
-
<m:oMath>
|
1755
|
-
<m:r>
|
1756
|
-
<m:t>D1</m:t>
|
1757
|
-
</m:r>
|
1758
|
-
</m:oMath>
|
1759
|
-
</span>
|
1760
|
-
<span style='mso-tab-count:1'>  </span>
|
1761
|
-
</p>
|
1762
|
-
</div>
|
1763
|
-
</div>
|
1764
|
-
</div>
|
1765
|
-
<div class='ListContLevel2'>
|
1766
|
-
<table class='dl'>
|
1767
|
-
<tr>
|
1768
|
-
<td valign='top' align='left'>
|
1769
|
-
<p align='left' style='margin-left:0pt;text-align:left;' class='MsoNormal'>
|
1770
|
-
<i>n</i>
|
1771
|
-
</p>
|
1772
|
-
</td>
|
1773
|
-
<td valign='top'>
|
1774
|
-
<p class='MsoNormal'>
|
1775
|
-
<a name='_a27281a4-b20e-4d0b-a780-bab9e851b03e' id='_a27281a4-b20e-4d0b-a780-bab9e851b03e'/>
|
1776
|
-
is the number of coating layers
|
1777
|
-
</p>
|
1778
|
-
</td>
|
1779
|
-
</tr>
|
1780
|
-
</table>
|
1781
|
-
</div>
|
1782
|
-
</p>
|
1783
|
-
</div>
|
1784
|
-
<p class='MsoNormal'> </p>
|
1785
|
-
</div>
|
1786
|
-
OUTPUT
|
1787
|
-
end
|
1788
|
-
|
1789
|
-
it "does not lose HTML escapes in postprocessing" do
|
1790
|
-
FileUtils.rm_f "test.doc"
|
1791
|
-
FileUtils.rm_f "test.html"
|
1792
|
-
input = <<~INPUT
|
1793
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1794
|
-
<preface><foreword>
|
1795
|
-
<sourcecode id="samplecode">
|
1796
|
-
<name>XML code</name>
|
1797
|
-
<xml> &
|
1798
|
-
</sourcecode>
|
1799
|
-
</foreword></preface>
|
1800
|
-
</iso-standard>
|
1801
|
-
INPUT
|
1802
|
-
IsoDoc::HtmlConvert.new(options).convert("test", input, false)
|
1803
|
-
html = File.read("test.html")
|
1804
|
-
.sub(/^.*<main class="main-section">/m, '<main class="main-section">')
|
1805
|
-
.sub(%r{</main>.*$}m, "</main>")
|
1806
|
-
expect(xmlpp(html)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1807
|
-
<main class="main-section"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
|
1808
|
-
<br />
|
1809
|
-
<div>
|
1810
|
-
<h1 class="ForewordTitle">Foreword</h1>
|
1811
|
-
<pre id="samplecode" class="prettyprint "><br />    <br />  <xml> &<br />
|
1812
|
-
</pre>
|
1813
|
-
<p class="SourceTitle" style="text-align:center;">XML code</p>
|
1814
|
-
</div>
|
1815
|
-
<p class="zzSTDTitle1"></p>
|
1816
|
-
</main>
|
1817
|
-
OUTPUT
|
1818
|
-
|
1819
|
-
FileUtils.rm_f "test.doc"
|
1820
|
-
FileUtils.rm_f "test.html"
|
1821
|
-
IsoDoc::WordConvert.new(options).convert("test", input, false)
|
1822
|
-
word = File.read("test.doc")
|
1823
|
-
.sub(/^.*<div class="WordSection2">/m, '<div class="WordSection2">')
|
1824
|
-
.sub(%r{<p class="MsoNormal">\s*<br clear="all" class="section"/>\s*</p>\s*<div class="WordSection3">.*$}m, "")
|
1825
|
-
expect(xmlpp(word)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1826
|
-
<div class="WordSection2">
|
1827
|
-
<p class="MsoNormal">
|
1828
|
-
<br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
|
1829
|
-
</p>
|
1830
|
-
<div>
|
1831
|
-
<h1 class="ForewordTitle">Foreword</h1>
|
1832
|
-
<p class="Sourcecode" style="page-break-after:avoid;"><a name="samplecode" id="samplecode"></a><br/>    <br/>  <xml> &<br/></p><p class="SourceTitle" style="text-align:center;">XML code</p>
|
1833
|
-
</div>
|
1834
|
-
<p class="MsoNormal"> </p>
|
1835
|
-
</div>
|
1836
|
-
OUTPUT
|
1837
|
-
end
|
1838
|
-
|
1839
|
-
it "propagates example style to paragraphs in postprocessing (Word)" do
|
1840
|
-
FileUtils.rm_f "test.doc"
|
1841
|
-
FileUtils.rm_f "test.html"
|
1842
|
-
IsoDoc::WordConvert.new(options).convert("test", <<~"INPUT", false)
|
1843
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1844
|
-
<preface><foreword>
|
1845
|
-
<example id="samplecode">
|
1846
|
-
<p>ABC</p>
|
1847
|
-
</example>
|
1848
|
-
</foreword></preface>
|
1849
|
-
</iso-standard>
|
1850
|
-
INPUT
|
1851
|
-
word = File.read("test.doc")
|
1852
|
-
.sub(/^.*<div class="WordSection2">/m, '<div class="WordSection2">')
|
1853
|
-
.sub(%r{<p class="MsoNormal">\s*<br clear="all" class="section"/>\s*</p>\s*<div class="WordSection3">.*$}m, "")
|
1854
|
-
expect(xmlpp(word)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1855
|
-
<div class="WordSection2">
|
1856
|
-
<p class="MsoNormal">
|
1857
|
-
<br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
|
1858
|
-
</p>
|
1859
|
-
<div>
|
1860
|
-
<h1 class="ForewordTitle">Foreword</h1>
|
1861
|
-
<div class="example"><a name="samplecode" id="samplecode"></a>
|
1862
|
-
<p class="example">ABC</p>
|
1863
|
-
</div>
|
1864
|
-
</div>
|
1865
|
-
<p class="MsoNormal"> </p>
|
1866
|
-
</div>
|
1867
|
-
OUTPUT
|
1868
|
-
end
|
1869
|
-
|
1870
|
-
it "deals with image captions (Word)" do
|
1871
|
-
FileUtils.rm_f "test.doc"
|
1872
|
-
FileUtils.rm_f "test.html"
|
1873
|
-
IsoDoc::WordConvert.new(options)
|
1874
|
-
.convert("test", <<~"INPUT", false)
|
1875
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1876
|
-
<preface><foreword>
|
1877
|
-
<figure id="fig1">
|
1878
|
-
<name>Typical arrangement of the far-field scan set-up</name>
|
1879
|
-
<image src="spec/assets/rice_image1.png" id="_" mimetype="image/png"/>
|
1880
|
-
</figure>
|
1881
|
-
</foreword></preface>
|
1882
|
-
</iso-standard>
|
1883
|
-
INPUT
|
1884
|
-
word = File.read("test.doc")
|
1885
|
-
.sub(/^.*<div class="WordSection2">/m, '<div class="WordSection2">')
|
1886
|
-
.sub(%r{<p class="MsoNormal">\s*<br clear="all" class="section"/>\s*</p>\s*<div class="WordSection3">.*$}m, "")
|
1887
|
-
.sub(/src="[^"]+"/, 'src="_"')
|
1888
|
-
expect(xmlpp(word)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1889
|
-
<div class="WordSection2">
|
1890
|
-
<p class="MsoNormal">
|
1891
|
-
<br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
|
1892
|
-
</p>
|
1893
|
-
<div>
|
1894
|
-
<h1 class="ForewordTitle">Foreword</h1>
|
1895
|
-
<div class="figure"><a name="fig1" id="fig1"></a>
|
1896
|
-
<p style="page-break-after:avoid;" class="figure"><img src="_" width="400" height="337"/></p>
|
1897
|
-
<p class="FigureTitle" style="text-align:center;">Typical arrangement of the far-field scan set-up</p></div>
|
1898
|
-
</div>
|
1899
|
-
<p class="MsoNormal"> </p>
|
1900
|
-
</div>
|
1901
|
-
OUTPUT
|
1902
|
-
end
|
1903
|
-
|
1904
|
-
it "deals with empty table titles (Word)" do
|
1905
|
-
FileUtils.rm_f "test.doc"
|
1906
|
-
FileUtils.rm_f "test.html"
|
1907
|
-
IsoDoc::WordConvert.new(options)
|
1908
|
-
.convert("test", <<~"INPUT", false)
|
1909
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1910
|
-
<preface><foreword>
|
1911
|
-
<table id="_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7" unnumbered="true"><thead><tr>
|
1912
|
-
<td rowspan="2">
|
1913
|
-
<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>
|
1914
|
-
</td>
|
1915
|
-
<th colspan="3" align="left">Predictive wavelengths</th>
|
1916
|
-
</tr>
|
1917
|
-
</thead>
|
1918
|
-
</table>
|
1919
|
-
</preface>
|
1920
|
-
</iso-standard>
|
1921
|
-
INPUT
|
1922
|
-
word = File.read("test.doc")
|
1923
|
-
.sub(/^.*<div class="WordSection2">/m, '<div class="WordSection2" xmlns:m="m">')
|
1924
|
-
.sub(%r{<p class="MsoNormal">\s*<br clear="all" class="section"/>\s*</p>\s*<div class="WordSection3">.*$}m, "")
|
1925
|
-
.sub(/src="[^"]+"/, 'src="_"')
|
1926
|
-
expect(xmlpp(word)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1927
|
-
<div class="WordSection2" xmlns:m="m">
|
1928
|
-
<p class="MsoNormal">
|
1929
|
-
<br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
|
1930
|
-
</p>
|
1931
|
-
<div>
|
1932
|
-
<h1 class="ForewordTitle">Foreword</h1>
|
1933
|
-
<div align="center" class="table_container">
|
1934
|
-
<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>
|
1935
|
-
<thead>
|
1936
|
-
<tr>
|
1937
|
-
<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;">
|
1938
|
-
<p class="MsoNormal"><a name="_c47d9b39-adb2-431d-9320-78cb148fdb56" id="_c47d9b39-adb2-431d-9320-78cb148fdb56"></a>Output wavelength <span class="stem">
|
1939
|
-
<m:oMath>
|
1940
|
-
<span style='font-style:normal;'>
|
1941
|
-
<m:r>
|
1942
|
-
<m:rPr>
|
1943
|
-
<m:sty m:val='p'/>
|
1944
|
-
</m:rPr>
|
1945
|
-
<m:t>(</m:t>
|
1946
|
-
</m:r>
|
1947
|
-
</span>
|
1948
|
-
<m:r>
|
1949
|
-
<m:t>μm)</m:t>
|
1950
|
-
</m:r>
|
1951
|
-
</m:oMath>
|
1952
|
-
</span></p>
|
1953
|
-
</td>
|
1954
|
-
<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>
|
1955
|
-
</tr>
|
1956
|
-
</thead>
|
1957
|
-
</table>
|
1958
|
-
</div>
|
1959
|
-
</div>
|
1960
|
-
<p class="MsoNormal"> </p>
|
1961
|
-
</div>
|
1962
|
-
OUTPUT
|
1963
|
-
end
|
1964
|
-
|
1965
|
-
it "propagates alignment of table cells (Word)" do
|
1966
|
-
FileUtils.rm_f "test.doc"
|
1967
|
-
FileUtils.rm_f "test.html"
|
1968
|
-
IsoDoc::WordConvert.new(options)
|
1969
|
-
.convert("test", <<~"INPUT", false)
|
1970
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1971
|
-
<preface><foreword>
|
1972
|
-
<table id="_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7" unnumbered="true"><thead><tr>
|
1973
|
-
<td rowspan="2" align="left">
|
1974
|
-
<p id="_c47d9b39-adb2-431d-9320-78cb148fdb56">Output wavelength</p>
|
1975
|
-
<p id="_c47d9b39-adb2-431d-9320-78cb148fdb57">Output wavelength</p>
|
1976
|
-
</td>
|
1977
|
-
<th colspan="3" align="right"><p id="_c47d9b39-adb2-431d-9320-78cb148fdb58">Predictive wavelengths</p></th>
|
1978
|
-
</tr>
|
1979
|
-
</thead>
|
1980
|
-
</table>
|
1981
|
-
</preface>
|
1982
|
-
</iso-standard>
|
1983
|
-
INPUT
|
1984
|
-
word = File.read("test.doc")
|
1985
|
-
.sub(/^.*<div class="WordSection2">/m, '<div class="WordSection2" xmlns:m="m">')
|
1986
|
-
.sub(%r{<p class="MsoNormal">\s*<br clear="all" class="section"/>\s*</p>\s*<div class="WordSection3">.*$}m, "")
|
1987
|
-
.sub(/src="[^"]+"/, 'src="_"')
|
1988
|
-
expect(xmlpp(word)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1989
|
-
<div class='WordSection2' xmlns:m='m'>
|
1990
|
-
<p class='MsoNormal'>
|
1991
|
-
<br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
|
1992
|
-
</p>
|
1993
|
-
<div>
|
1994
|
-
<h1 class='ForewordTitle'>Foreword</h1>
|
1995
|
-
<div align='center' class="table_container">
|
1996
|
-
<table class='MsoISOTable' style='mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
|
1997
|
-
<a name='_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7' id='_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7'/>
|
1998
|
-
<thead>
|
1999
|
-
<tr>
|
2000
|
-
<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;'>
|
2001
|
-
<p style='text-align: left' class='MsoNormal'>
|
2002
|
-
<a name='_c47d9b39-adb2-431d-9320-78cb148fdb56' id='_c47d9b39-adb2-431d-9320-78cb148fdb56'/>
|
2003
|
-
Output wavelength
|
2004
|
-
</p>
|
2005
|
-
<p style='text-align: left' class='MsoNormal'>
|
2006
|
-
<a name='_c47d9b39-adb2-431d-9320-78cb148fdb57' id='_c47d9b39-adb2-431d-9320-78cb148fdb57'/>
|
2007
|
-
Output wavelength
|
2008
|
-
</p>
|
2009
|
-
</td>
|
2010
|
-
<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;'>
|
2011
|
-
<p style='text-align: right' class='MsoNormal'>
|
2012
|
-
<a name='_c47d9b39-adb2-431d-9320-78cb148fdb58' id='_c47d9b39-adb2-431d-9320-78cb148fdb58'/>
|
2013
|
-
Predictive wavelengths
|
2014
|
-
</p>
|
2015
|
-
</th>
|
2016
|
-
</tr>
|
2017
|
-
</thead>
|
2018
|
-
</table>
|
2019
|
-
</div>
|
2020
|
-
</div>
|
2021
|
-
<p class='MsoNormal'> </p>
|
2022
|
-
</div>
|
2023
|
-
OUTPUT
|
2024
|
-
end
|
2025
|
-
|
2026
|
-
it "cleans up boilerplate" do
|
2027
|
-
input = <<~INPUT
|
2028
|
-
<html>
|
2029
|
-
<head/>
|
2030
|
-
<body>
|
2031
|
-
<div class="main-section">
|
2032
|
-
<div id="boilerplate-copyright"> <h1>Copyright</h1> </div>
|
2033
|
-
<div id="boilerplate-license"> <h1>License</h1> </div>
|
2034
|
-
<div id="boilerplate-legal"> <h1>Legal</h1> </div>
|
2035
|
-
<div id="boilerplate-feedback"> <h1>Feedback</h1> </div>
|
2036
|
-
<hr/>
|
2037
|
-
<div id="boilerplate-feedback-destination"/>
|
2038
|
-
<div id="boilerplate-legal-destination"/>
|
2039
|
-
<div id="boilerplate-license-destination"/>
|
2040
|
-
<div id="boilerplate-copyright-destination"/>
|
2041
|
-
</div>
|
2042
|
-
</body>
|
2043
|
-
</html>
|
2044
|
-
INPUT
|
2045
|
-
html = <<~OUTPUT
|
2046
|
-
<main class='main-section'>
|
2047
|
-
<button onclick='topFunction()' id='myBtn' title='Go to top'>Top</button>
|
2048
|
-
<hr/>
|
2049
|
-
<div id='boilerplate-feedback'>
|
2050
|
-
<h1 class='IntroTitle'>Feedback</h1>
|
2051
|
-
</div>
|
2052
|
-
<div id='boilerplate-legal'>
|
2053
|
-
<h1 class='IntroTitle'>Legal</h1>
|
2054
|
-
</div>
|
2055
|
-
<div id='boilerplate-license'>
|
2056
|
-
<h1 class='IntroTitle'>License</h1>
|
2057
|
-
</div>
|
2058
|
-
<div id='boilerplate-copyright'>
|
2059
|
-
<h1 class='IntroTitle'>Copyright</h1>
|
2060
|
-
</div>
|
2061
|
-
</main>
|
2062
|
-
OUTPUT
|
2063
|
-
doc = <<~OUTPUT
|
2064
|
-
<html>
|
2065
|
-
<head/>
|
2066
|
-
<body>
|
2067
|
-
<div class='main-section'>
|
2068
|
-
<hr/>
|
2069
|
-
<div id='boilerplate-feedback'>
|
2070
|
-
<p class='TitlePageSubhead'>Feedback</p>
|
2071
|
-
</div>
|
2072
|
-
<div id='boilerplate-legal'>
|
2073
|
-
<p class='TitlePageSubhead'>Legal</p>
|
2074
|
-
</div>
|
2075
|
-
<div id='boilerplate-license'>
|
2076
|
-
<p class='TitlePageSubhead'>License</p>
|
2077
|
-
</div>
|
2078
|
-
<div id='boilerplate-copyright'>
|
2079
|
-
<p class='TitlePageSubhead'>Copyright</p>
|
2080
|
-
</div>
|
2081
|
-
</div>
|
2082
|
-
</body>
|
2083
|
-
</html>
|
2084
|
-
OUTPUT
|
2085
|
-
expect(xmlpp(IsoDoc::HtmlConvert
|
2086
|
-
.new(wordstylesheet: "spec/assets/word.css",
|
2087
|
-
htmlstylesheet: "spec/assets/html.scss", filename: "test")
|
2088
|
-
.html_preface(Nokogiri::XML(input)).to_xml)
|
2089
|
-
.sub(/^.*<main/m, "<main").sub(%r{</main>.*$}m, "</main>"))
|
2090
|
-
.to be_equivalent_to xmlpp(html)
|
2091
|
-
expect(xmlpp(IsoDoc::WordConvert
|
2092
|
-
.new(wordstylesheet: "spec/assets/word.css",
|
2093
|
-
htmlstylesheet: "spec/assets/html.scss", filename: "test")
|
2094
|
-
.word_cleanup(Nokogiri::XML(input)).to_xml)
|
2095
|
-
.sub(/^.*<main/m, "<main").sub(%r{</main>.*$}m, "</main>"))
|
2096
|
-
.to be_equivalent_to xmlpp(doc)
|
2097
|
-
end
|
2098
|
-
|
2099
|
-
it "cleans up coverpage note" do
|
2100
|
-
input = <<~INPUT
|
2101
|
-
<html>
|
2102
|
-
<head/>
|
2103
|
-
<body>
|
2104
|
-
<div class="main-section">
|
2105
|
-
<div id='FB' class='Note' coverpage='true'>
|
2106
|
-
<p><span class='note_label'>NOTE</span>  XYZ</p>
|
2107
|
-
</div>
|
2108
|
-
<div id='FC' class='Admonition' coverpage='true'>
|
2109
|
-
<p class='AdmonitionTitle' style='text-align:center;'>WARNING</p>
|
2110
|
-
<p>XYZ</p>
|
2111
|
-
</div>
|
2112
|
-
<hr/>
|
2113
|
-
<div id="coverpage-note-destination"/>
|
2114
|
-
</div>
|
2115
|
-
</body>
|
2116
|
-
</html>
|
2117
|
-
INPUT
|
2118
|
-
html = <<~OUTPUT
|
2119
|
-
<main class='main-section'>
|
2120
|
-
<button onclick='topFunction()' id='myBtn' title='Go to top'>Top</button>
|
2121
|
-
<hr/>
|
2122
|
-
<div id='coverpage-note-destination'>
|
2123
|
-
<div id='FB' class='Note'>
|
2124
|
-
<p>
|
2125
|
-
<span class='note_label'>NOTE</span>
|
2126
|
-
  XYZ
|
2127
|
-
</p>
|
2128
|
-
</div>
|
2129
|
-
<div id='FC' class='Admonition'>
|
2130
|
-
<p class='AdmonitionTitle' style='text-align:center;'>WARNING</p>
|
2131
|
-
<p>XYZ</p>
|
2132
|
-
</div>
|
2133
|
-
</div>
|
2134
|
-
</main>
|
2135
|
-
OUTPUT
|
2136
|
-
doc = <<~OUTPUT
|
2137
|
-
<html>
|
2138
|
-
<head/>
|
2139
|
-
<body>
|
2140
|
-
<div class='main-section'>
|
2141
|
-
<hr/>
|
2142
|
-
<div id='coverpage-note-destination'>
|
2143
|
-
<div id='FB' class='Note'>
|
2144
|
-
<p>
|
2145
|
-
<span class='note_label'>NOTE</span>
|
2146
|
-
  XYZ
|
2147
|
-
</p>
|
2148
|
-
</div>
|
2149
|
-
<div id='FC' class='Admonition'>
|
2150
|
-
<p class='AdmonitionTitle' style='text-align:center;'>WARNING</p>
|
2151
|
-
<p>XYZ</p>
|
2152
|
-
</div>
|
2153
|
-
</div>
|
2154
|
-
</div>
|
2155
|
-
</body>
|
2156
|
-
</html>
|
2157
|
-
OUTPUT
|
2158
|
-
expect(xmlpp(IsoDoc::HtmlConvert
|
2159
|
-
.new(wordstylesheet: "spec/assets/word.css",
|
2160
|
-
htmlstylesheet: "spec/assets/html.scss", filename: "test")
|
2161
|
-
.html_preface(Nokogiri::XML(input)).to_xml)
|
2162
|
-
.sub(/^.*<main/m, "<main").sub(%r{</main>.*$}m, "</main>"))
|
2163
|
-
.to be_equivalent_to xmlpp(html)
|
2164
|
-
expect(xmlpp(IsoDoc::WordConvert
|
2165
|
-
.new(wordstylesheet: "spec/assets/word.css",
|
2166
|
-
htmlstylesheet: "spec/assets/html.scss", filename: "test")
|
2167
|
-
.word_cleanup(Nokogiri::XML(input)).to_xml)
|
2168
|
-
.sub(/^.*<main/m, "<main").sub(%r{</main>.*$}m, "</main>"))
|
2169
|
-
.to be_equivalent_to xmlpp(doc)
|
2170
|
-
end
|
2171
|
-
|
2172
|
-
it "removes coverpage note destination if unused" do
|
2173
|
-
input = <<~INPUT
|
2174
|
-
<html>
|
2175
|
-
<head/>
|
2176
|
-
<body>
|
2177
|
-
<div class="main-section">
|
2178
|
-
<div id='FB' class='Note'>
|
2179
|
-
<p><span class='note_label'>NOTE</span>  XYZ</p>
|
2180
|
-
</div>
|
2181
|
-
<div id='FC' class='Admonition'>
|
2182
|
-
<p class='AdmonitionTitle' style='text-align:center;'>WARNING</p>
|
2183
|
-
<p>XYZ</p>
|
2184
|
-
</div>
|
2185
|
-
<hr/>
|
2186
|
-
<div id="coverpage-note-destination"/>
|
2187
|
-
</div>
|
2188
|
-
</body>
|
2189
|
-
</html>
|
2190
|
-
INPUT
|
2191
|
-
html = <<~OUTPUT
|
2192
|
-
<main class='main-section'>
|
2193
|
-
<button onclick='topFunction()' id='myBtn' title='Go to top'>Top</button>
|
2194
|
-
<div id='FB' class='Note'>
|
2195
|
-
<p>
|
2196
|
-
<span class='note_label'>NOTE</span>
|
2197
|
-
  XYZ
|
2198
|
-
</p>
|
2199
|
-
</div>
|
2200
|
-
<div id='FC' class='Admonition'>
|
2201
|
-
<p class='AdmonitionTitle' style='text-align:center;'>WARNING</p>
|
2202
|
-
<p>XYZ</p>
|
2203
|
-
</div>
|
2204
|
-
<hr/>
|
2205
|
-
</main>
|
2206
|
-
OUTPUT
|
2207
|
-
doc = <<~OUTPUT
|
2208
|
-
<html>
|
2209
|
-
<head/>
|
2210
|
-
<body>
|
2211
|
-
<div class='main-section'>
|
2212
|
-
<div id='FB' class='Note'>
|
2213
|
-
<p>
|
2214
|
-
<span class='note_label'>NOTE</span>
|
2215
|
-
  XYZ
|
2216
|
-
</p>
|
2217
|
-
</div>
|
2218
|
-
<div id='FC' class='Admonition'>
|
2219
|
-
<p class='AdmonitionTitle' style='text-align:center;'>WARNING</p>
|
2220
|
-
<p>XYZ</p>
|
2221
|
-
</div>
|
2222
|
-
<hr/>
|
2223
|
-
</div>
|
2224
|
-
</body>
|
2225
|
-
</html>
|
2226
|
-
OUTPUT
|
2227
|
-
expect(xmlpp(IsoDoc::HtmlConvert
|
2228
|
-
.new(wordstylesheet: "spec/assets/word.css",
|
2229
|
-
htmlstylesheet: "spec/assets/html.scss", filename: "test")
|
2230
|
-
.html_preface(Nokogiri::XML(input)).to_xml)
|
2231
|
-
.sub(/^.*<main/m, "<main").sub(%r{</main>.*$}m, "</main>"))
|
2232
|
-
.to be_equivalent_to xmlpp(html)
|
2233
|
-
expect(xmlpp(IsoDoc::WordConvert
|
2234
|
-
.new(wordstylesheet: "spec/assets/word.css",
|
2235
|
-
htmlstylesheet: "spec/assets/html.scss", filename: "test")
|
2236
|
-
.word_cleanup(Nokogiri::XML(input)).to_xml)
|
2237
|
-
.sub(/^.*<main/m, "<main").sub(%r{</main>.*$}m, "</main>"))
|
2238
|
-
.to be_equivalent_to xmlpp(doc)
|
2239
|
-
end
|
2240
|
-
|
2241
|
-
it "deals with landscape and portrait pagebreaks (Word)" do
|
2242
|
-
FileUtils.rm_f "test.doc"
|
2243
|
-
IsoDoc::WordConvert.new(
|
2244
|
-
{ wordstylesheet: "spec/assets/word.css",
|
2245
|
-
htmlstylesheet: "spec/assets/html.scss", filename: "test" },
|
2246
|
-
).convert("test", <<~"INPUT", false)
|
2247
|
-
<standard-document xmlns="http://riboseinc.com/isoxml">
|
2248
|
-
<bibdata type="standard">
|
2249
|
-
<title language="en" format="text/plain">Document title</title>
|
2250
|
-
<version>
|
2251
|
-
<draft>1.2</draft>
|
2252
|
-
</version>
|
2253
|
-
<language>en</language>
|
2254
|
-
<script>Latn</script>
|
2255
|
-
<status><stage>published</stage></status>
|
2256
|
-
<ext>
|
2257
|
-
<doctype>article</doctype>
|
2258
|
-
</ext>
|
2259
|
-
</bibdata>
|
2260
|
-
<preface>
|
2261
|
-
<introduction><title>Preface 1</title>
|
2262
|
-
<p align="center">This is a <pagebreak orientation="landscape"/> paragraph</p>
|
2263
|
-
<table>
|
2264
|
-
<tbody>
|
2265
|
-
<tr><td>A</td><td>B</td></tr>
|
2266
|
-
</tbody>
|
2267
|
-
</table>
|
2268
|
-
<clause><title>Preface 1.1</title>
|
2269
|
-
<p>On my side</p>
|
2270
|
-
<pagebreak orientation="portrait"/>
|
2271
|
-
<p>Upright again</p>
|
2272
|
-
</clause>
|
2273
|
-
<clause><title>Preface 1.3</title>
|
2274
|
-
<p>And still upright</p>
|
2275
|
-
</clause>
|
2276
|
-
</introduction>
|
2277
|
-
</preface>
|
2278
|
-
<sections><clause><title>Foreword</title>
|
2279
|
-
<note>
|
2280
|
-
<p id="_">For further information on the Foreword, see <strong>ISO/IEC Directives, Part 2, 2016, Clause 12.</strong></p>
|
2281
|
-
<pagebreak orientation="landscape"/>
|
2282
|
-
<table id="_c09a7e60-b0c7-4418-9bfc-2ef0bc09a249">
|
2283
|
-
<thead>
|
2284
|
-
<tr>
|
2285
|
-
<th align="left">A</th>
|
2286
|
-
<th align="left">B</th>
|
2287
|
-
</tr>
|
2288
|
-
</thead>
|
2289
|
-
<tbody>
|
2290
|
-
<tr>
|
2291
|
-
<td align="left">C</td>
|
2292
|
-
<td align="left">D</td>
|
2293
|
-
</tr>
|
2294
|
-
</tbody>
|
2295
|
-
<note id="_8fff1596-290e-4314-b03c-7a8aab97eebe">
|
2296
|
-
<p id="_32c22439-387a-48cf-a006-5ab3b934ba73">B</p>
|
2297
|
-
</note></table>
|
2298
|
-
<pagebreak orientation="portrait"/>
|
2299
|
-
<p>And up</p>
|
2300
|
-
</note>
|
2301
|
-
<pagebreak orientation="portrait"/>
|
2302
|
-
</clause></sections>
|
2303
|
-
<annex id="_level_1" inline-header="false" obligation="normative">
|
2304
|
-
<title>Annex 1</title>
|
2305
|
-
</annex>
|
2306
|
-
</standard-document>
|
2307
|
-
INPUT
|
2308
|
-
expect(File.exist?("test.doc")).to be true
|
2309
|
-
html = File.read("test.doc", encoding: "UTF-8")
|
2310
|
-
expect(html).to include "div.WordSection2_0 {page:WordSection2P;}"
|
2311
|
-
expect(html).to include "div.WordSection2_1 {page:WordSection2L;}"
|
2312
|
-
expect(html).to include "div.WordSection3_0 {page:WordSection3P;}"
|
2313
|
-
expect(html).to include "div.WordSection3_1 {page:WordSection3P;}"
|
2314
|
-
expect(html).to include "div.WordSection3_2 {page:WordSection3L;}"
|
2315
|
-
|
2316
|
-
expect(xmlpp(html.sub(/^.*<body /m, "<body ")
|
2317
|
-
.sub(%r{</body>.*$}m, "</body>"))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
2318
|
-
<body lang='EN-US' xml:lang='EN-US' link='blue' vlink='#954F72'>
|
2319
|
-
<div class='WordSection1'>
|
2320
|
-
<p class='MsoNormal'> </p>
|
2321
|
-
</div>
|
2322
|
-
<p class='MsoNormal'>
|
2323
|
-
<br clear='all' class='section'/>
|
2324
|
-
</p>
|
2325
|
-
<div class='WordSection2'>
|
2326
|
-
<p class='MsoNormal'>
|
2327
|
-
<br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
|
2328
|
-
</p>
|
2329
|
-
<div class='Section3' id=''>
|
2330
|
-
<h1 class='IntroTitle'>Preface 1</h1>
|
2331
|
-
<p align='center' style='text-align:center;' class='MsoNormal'>
|
2332
|
-
This is a
|
2333
|
-
<p class='MsoNormal'>
|
2334
|
-
<br clear='all' class='section'/>
|
2335
|
-
</p>
|
2336
|
-
paragraph
|
2337
|
-
</p>
|
2338
|
-
</div>
|
2339
|
-
</div>
|
2340
|
-
<div class='WordSection2_1'>
|
2341
|
-
<div align='center' class='table_container'>
|
2342
|
-
<table class='MsoISOTable' style='mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
|
2343
|
-
<tbody>
|
2344
|
-
<tr>
|
2345
|
-
<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>
|
2346
|
-
<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>
|
2347
|
-
</tr>
|
2348
|
-
</tbody>
|
2349
|
-
</table>
|
2350
|
-
</div>
|
2351
|
-
<div>
|
2352
|
-
<h2>Preface 1.1</h2>
|
2353
|
-
<p class='MsoNormal'>On my side</p>
|
2354
|
-
<p class='MsoNormal'>
|
2355
|
-
<br clear='all' class='section'/>
|
2356
|
-
</p>
|
2357
|
-
</div>
|
2358
|
-
</div>
|
2359
|
-
<div class='WordSection2_0'>
|
2360
|
-
<p class='MsoNormal'>Upright again</p>
|
2361
|
-
<div>
|
2362
|
-
<h2>Preface 1.3</h2>
|
2363
|
-
<p class='MsoNormal'>And still upright</p>
|
2364
|
-
</div>
|
2365
|
-
<p class='MsoNormal'> </p>
|
2366
|
-
</div>
|
2367
|
-
<p class='MsoNormal'>
|
2368
|
-
<br clear='all' class='section'/>
|
2369
|
-
</p>
|
2370
|
-
<div class='WordSection3'>
|
2371
|
-
<p class='zzSTDTitle1'>Document title</p>
|
2372
|
-
<div>
|
2373
|
-
<h1>Foreword</h1>
|
2374
|
-
<div class='Note'>
|
2375
|
-
<p class='Note'>
|
2376
|
-
<span class='note_label'/>
|
2377
|
-
<span style='mso-tab-count:1'>  </span>
|
2378
|
-
For further information on the Foreword, see
|
2379
|
-
<b>ISO/IEC Directives, Part 2, 2016, Clause 12.</b>
|
2380
|
-
</p>
|
2381
|
-
<p class='Note'>
|
2382
|
-
<br clear='all' class='section'/>
|
2383
|
-
</p>
|
2384
|
-
</div>
|
2385
|
-
</div>
|
2386
|
-
</div>
|
2387
|
-
<div class='WordSection3_2'>
|
2388
|
-
<div align='center' class='table_container'>
|
2389
|
-
<table class='MsoISOTable' style='mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
|
2390
|
-
<a name='_c09a7e60-b0c7-4418-9bfc-2ef0bc09a249' id='_c09a7e60-b0c7-4418-9bfc-2ef0bc09a249'/>
|
2391
|
-
<thead>
|
2392
|
-
<tr>
|
2393
|
-
<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>
|
2394
|
-
<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>
|
2395
|
-
</tr>
|
2396
|
-
</thead>
|
2397
|
-
<tbody>
|
2398
|
-
<tr>
|
2399
|
-
<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>
|
2400
|
-
<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>
|
2401
|
-
</tr>
|
2402
|
-
</tbody>
|
2403
|
-
<tfoot>
|
2404
|
-
<tr>
|
2405
|
-
<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;'>
|
2406
|
-
<div class='Note'>
|
2407
|
-
<a name='_8fff1596-290e-4314-b03c-7a8aab97eebe' id='_8fff1596-290e-4314-b03c-7a8aab97eebe'/>
|
2408
|
-
<p class='Note'>
|
2409
|
-
<span class='note_label'/>
|
2410
|
-
<span style='mso-tab-count:1'>  </span>
|
2411
|
-
B
|
2412
|
-
</p>
|
2413
|
-
</div>
|
2414
|
-
</td>
|
2415
|
-
</tr>
|
2416
|
-
</tfoot>
|
2417
|
-
</table>
|
2418
|
-
</div>
|
2419
|
-
<p class='Note'>
|
2420
|
-
<br clear='all' class='section'/>
|
2421
|
-
</p>
|
2422
|
-
</div>
|
2423
|
-
<div class='WordSection3_1'>
|
2424
|
-
<p class='Note'>And up</p>
|
2425
|
-
<p class='MsoNormal'>
|
2426
|
-
<br clear='all' class='section'/>
|
2427
|
-
</p>
|
2428
|
-
</div>
|
2429
|
-
<div class='WordSection3_0'>
|
2430
|
-
<div class='Section3'>
|
2431
|
-
<a name='_level_1' id='_level_1'/>
|
2432
|
-
<h1 class='Annex'>Annex 1</h1>
|
2433
|
-
</div>
|
2434
|
-
</div>
|
2435
|
-
<div style='mso-element:footnote-list'/>
|
2436
|
-
</body>
|
2437
|
-
OUTPUT
|
2438
|
-
end
|
2439
|
-
|
2440
|
-
it "expands out nested tables in Word" do
|
2441
|
-
input = <<~INPUT
|
2442
|
-
<html>
|
2443
|
-
<head/>
|
2444
|
-
<body>
|
2445
|
-
<div class="main-section">
|
2446
|
-
<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>
|
2447
|
-
<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">
|
2448
|
-
<p id="_2e2c247b-ce4c-48c5-96dd-f3e090a5b4a7">Description text</p>
|
2449
|
-
</td></tr></tbody></table>
|
2450
|
-
</tbody></table>
|
2451
|
-
</div>
|
2452
|
-
<div id="_second_sample"><h2>1.2.<span style="mso-tab-count:1">  </span>Second sample</h2>
|
2453
|
-
<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">
|
2454
|
-
<p id="_30b90b08-bd71-4497-bbcc-8c61fbb9f772">Description text</p>
|
2455
|
-
</td></tr></tbody></table>
|
2456
|
-
<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">
|
2457
|
-
<p id="_8daa3d74-90fd-4a57-9169-de457a68cfda">Description text</p>
|
2458
|
-
</td></tr></tbody></table></tbody></table>
|
2459
|
-
</div>
|
2460
|
-
</body>
|
2461
|
-
</html>
|
2462
|
-
INPUT
|
2463
|
-
output = <<~OUTPUT
|
2464
|
-
<html>
|
2465
|
-
<head/>
|
2466
|
-
<body>
|
2467
|
-
<div class='main-section'>
|
2468
|
-
<table id='_7830dff8-419e-4b9e-85cf-a063689f44ca' class='recommend' style='border-collapse:collapse;border-spacing:0;'>
|
2469
|
-
<thead>
|
2470
|
-
<tr style='background:#A5A5A5;'>
|
2471
|
-
<th style='vertical-align:top;' class='recommend' colspan='2'>
|
2472
|
-
<p class='RecommendationTitle'>Requirement 1:</p>
|
2473
|
-
</th>
|
2474
|
-
</tr>
|
2475
|
-
</thead>
|
2476
|
-
<tbody>
|
2477
|
-
<tr>
|
2478
|
-
<td style='vertical-align:top;' class='recommend' colspan='2'>
|
2479
|
-
<p>requirement label</p>
|
2480
|
-
</td>
|
2481
|
-
</tr>
|
2482
|
-
</tbody>
|
2483
|
-
</table>
|
2484
|
-
<table id='_a0f8c202-fd34-460c-bd5e-b2f4cc29210d' class='recommend' style='border-collapse:collapse;border-spacing:0;'>
|
2485
|
-
<thead>
|
2486
|
-
<tr style='background:#A5A5A5;'>
|
2487
|
-
<th style='vertical-align:top;' class='recommend' colspan='2'>
|
2488
|
-
<p class='RecommendationTitle'>Requirement 1-1:</p>
|
2489
|
-
</th>
|
2490
|
-
</tr>
|
2491
|
-
</thead>
|
2492
|
-
<tbody>
|
2493
|
-
<tr style='background:#C9C9C9;'>
|
2494
|
-
<td style='vertical-align:top;' class='recommend' colspan='2'>
|
2495
|
-
<p id='_2e2c247b-ce4c-48c5-96dd-f3e090a5b4a7'>Description text</p>
|
2496
|
-
</td>
|
2497
|
-
</tr>
|
2498
|
-
</tbody>
|
2499
|
-
</table>
|
2500
|
-
</div>
|
2501
|
-
<div id='_second_sample'>
|
2502
|
-
<h2>
|
2503
|
-
1.2.
|
2504
|
-
<span style='mso-tab-count:1'>  </span>
|
2505
|
-
Second sample
|
2506
|
-
</h2>
|
2507
|
-
<table id='_9846c486-14e5-4b1c-bb2f-55cc254dd309' class='recommend' style='border-collapse:collapse;border-spacing:0;'>
|
2508
|
-
<thead>
|
2509
|
-
<tr style='background:#A5A5A5;'>
|
2510
|
-
<th style='vertical-align:top;' class='recommend' colspan='2'>
|
2511
|
-
<p class='RecommendationTitle'>Requirement 2:</p>
|
2512
|
-
</th>
|
2513
|
-
</tr>
|
2514
|
-
</thead>
|
2515
|
-
<tbody>
|
2516
|
-
<tr>
|
2517
|
-
<td style='vertical-align:top;' class='recommend' colspan='2'>
|
2518
|
-
<p>requirement label</p>
|
2519
|
-
</td>
|
2520
|
-
</tr>
|
2521
|
-
</tbody>
|
2522
|
-
</table>
|
2523
|
-
<table id='_62de974c-7128-44d6-ba86-99f818f1d467' class='recommend' style='border-collapse:collapse;border-spacing:0;'>
|
2524
|
-
<thead>
|
2525
|
-
<tr style='background:#A5A5A5;'>
|
2526
|
-
<th style='vertical-align:top;' class='recommend' colspan='2'>
|
2527
|
-
<p class='RecommendationTitle'>Requirement 2-1:</p>
|
2528
|
-
</th>
|
2529
|
-
</tr>
|
2530
|
-
</thead>
|
2531
|
-
<tbody>
|
2532
|
-
<tr style='background:#C9C9C9;'>
|
2533
|
-
<td style='vertical-align:top;' class='recommend' colspan='2'>
|
2534
|
-
<p id='_30b90b08-bd71-4497-bbcc-8c61fbb9f772'>Description text</p>
|
2535
|
-
</td>
|
2536
|
-
</tr>
|
2537
|
-
</tbody>
|
2538
|
-
</table>
|
2539
|
-
<table id='_fede5681-71f6-47bb-bc65-7bd0b11acd01' class='recommend' style='border-collapse:collapse;border-spacing:0;'>
|
2540
|
-
<thead>
|
2541
|
-
<tr style='background:#A5A5A5;'>
|
2542
|
-
<th style='vertical-align:top;' class='recommend' colspan='2'>
|
2543
|
-
<p class='RecommendationTitle'>Requirement 2-2:</p>
|
2544
|
-
</th>
|
2545
|
-
</tr>
|
2546
|
-
</thead>
|
2547
|
-
<tbody>
|
2548
|
-
<tr>
|
2549
|
-
<td style='vertical-align:top;' class='recommend' colspan='2'>
|
2550
|
-
<p id='_8daa3d74-90fd-4a57-9169-de457a68cfda'>Description text</p>
|
2551
|
-
</td>
|
2552
|
-
</tr>
|
2553
|
-
</tbody>
|
2554
|
-
</table>
|
2555
|
-
</div>
|
2556
|
-
</body>
|
2557
|
-
</html>
|
2558
|
-
OUTPUT
|
2559
|
-
expect(xmlpp(IsoDoc::WordConvert
|
2560
|
-
.new(wordstylesheet: "spec/assets/word.css",
|
2561
|
-
htmlstylesheet: "spec/assets/html.scss", filename: "test")
|
2562
|
-
.word_cleanup(Nokogiri::XML(input)).to_xml)
|
2563
|
-
.sub(/^.*<main/m, "<main").sub(%r{</main>.*$}m, "</main>"))
|
2564
|
-
.to be_equivalent_to xmlpp(output)
|
2565
|
-
end
|
2566
|
-
|
2567
|
-
it "allocate widths to tables (Word)" do
|
2568
|
-
input = <<~INPUT
|
2569
|
-
<html xmlns:epub="http://www.idpf.org/2007/ops" lang="en">
|
2570
|
-
<head><style/></head>
|
2571
|
-
<body lang='EN-US' link='blue' vlink='#954F72'>
|
2572
|
-
<div class='WordSection1'>
|
2573
|
-
<p> </p>
|
2574
|
-
</div>
|
2575
|
-
<p>
|
2576
|
-
<br clear='all' class='section'/>
|
2577
|
-
</p>
|
2578
|
-
<div class='WordSection2'>
|
2579
|
-
<p>
|
2580
|
-
<br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
|
2581
|
-
</p>
|
2582
|
-
<div>
|
2583
|
-
<h1 class='ForewordTitle'>Foreword</h1>
|
2584
|
-
<p class='TableTitle' style='text-align:center;'>
|
2585
|
-
Table 1 — Repeatability and reproducibility of
|
2586
|
-
<i>husked</i>
|
2587
|
-
rice yield
|
2588
|
-
<span style='mso-bookmark:_Ref'>
|
2589
|
-
<a class='FootnoteRef' href='#ftn1' epub:type='footnote'>
|
2590
|
-
<sup>1</sup>
|
2591
|
-
</a>
|
2592
|
-
</span>
|
2593
|
-
</p>
|
2594
|
-
<div align='center' class='table_container'>
|
2595
|
-
<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%'>
|
2596
|
-
<colgroup>
|
2597
|
-
<col width='30%'/>
|
2598
|
-
<col width='20%'/>
|
2599
|
-
<col width='20%'/>
|
2600
|
-
<col width='20%'/>
|
2601
|
-
<col width='10%'/>
|
2602
|
-
</colgroup>
|
2603
|
-
<thead>
|
2604
|
-
<tr>
|
2605
|
-
<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>
|
2606
|
-
<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>
|
2607
|
-
</tr>
|
2608
|
-
<tr>
|
2609
|
-
<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>
|
2610
|
-
<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;'>
|
2611
|
-
Drago
|
2612
|
-
<a href='#tableD-1a' class='TableFootnoteRef'>a</a>
|
2613
|
-
<aside>
|
2614
|
-
<div id='ftntableD-1a'>
|
2615
|
-
<span>
|
2616
|
-
<span id='tableD-1a' class='TableFootnoteRef'>a</span>
|
2617
|
-
<span style='mso-tab-count:1'>  </span>
|
2618
|
-
</span>
|
2619
|
-
<p id='_0fe65e9a-5531-408e-8295-eeff35f41a55'>Parboiled rice.</p>
|
2620
|
-
</div>
|
2621
|
-
</aside>
|
2622
|
-
</td>
|
2623
|
-
<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;'>
|
2624
|
-
Balilla
|
2625
|
-
<a href='#tableD-1a' class='TableFootnoteRef'>a</a>
|
2626
|
-
</td>
|
2627
|
-
<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>
|
2628
|
-
</tr>
|
2629
|
-
</thead>
|
2630
|
-
<tbody>
|
2631
|
-
<tr>
|
2632
|
-
<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>
|
2633
|
-
<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>
|
2634
|
-
<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>
|
2635
|
-
<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>
|
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
|
-
</tr>
|
2638
|
-
<tr>
|
2639
|
-
<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>
|
2640
|
-
<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>
|
2641
|
-
<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>
|
2642
|
-
<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>
|
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;'>77,7</td>
|
2644
|
-
</tr>
|
2645
|
-
</tbody>
|
2646
|
-
<tfoot>
|
2647
|
-
<tr>
|
2648
|
-
<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;'>
|
2649
|
-
Reproducibility limit,
|
2650
|
-
<span class='stem'>(#(R)#)</span>
|
2651
|
-
(= 2,83
|
2652
|
-
<span class='stem'>(#(s_R)#)</span>
|
2653
|
-
)
|
2654
|
-
</td>
|
2655
|
-
<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>
|
2656
|
-
<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>
|
2657
|
-
<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>
|
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;'>6,06</td>
|
2659
|
-
</tr>
|
2660
|
-
</tfoot>
|
2661
|
-
<table class='dl'>
|
2662
|
-
<tr>
|
2663
|
-
<td valign='top' align='left'>
|
2664
|
-
<p align='left' style='margin-left:0pt;text-align:left;'>Drago</p>
|
2665
|
-
</td>
|
2666
|
-
<td valign='top'>A type of rice</td>
|
2667
|
-
</tr>
|
2668
|
-
</table>
|
2669
|
-
<div class='Note'>
|
2670
|
-
<p class='Note'>
|
2671
|
-
<span class='note_label'>NOTE</span>
|
2672
|
-
<span style='mso-tab-count:1'>  </span>
|
2673
|
-
This is a table about rice
|
2674
|
-
</p>
|
2675
|
-
</div>
|
2676
|
-
</table>
|
2677
|
-
</div>
|
2678
|
-
<div align='center' class='table_container'>
|
2679
|
-
<table id='tableD-2' class='MsoISOTable' style='mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
|
2680
|
-
<tbody>
|
2681
|
-
<tr>
|
2682
|
-
<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>
|
2683
|
-
</tr>
|
2684
|
-
</tbody>
|
2685
|
-
</table>
|
2686
|
-
</div>
|
2687
|
-
</div>
|
2688
|
-
<p> </p>
|
2689
|
-
</div>
|
2690
|
-
<p>
|
2691
|
-
<br clear='all' class='section'/>
|
2692
|
-
</p>
|
2693
|
-
<div class='WordSection3'>
|
2694
|
-
<p class='zzSTDTitle1'/>
|
2695
|
-
<aside id='ftn1'>
|
2696
|
-
<p>X</p>
|
2697
|
-
</aside>
|
2698
|
-
</div>
|
2699
|
-
</body>
|
2700
|
-
</html>
|
2701
|
-
INPUT
|
2702
|
-
output = <<~OUTPUT
|
2703
|
-
<html xmlns:epub='http://www.idpf.org/2007/ops' lang='en'>
|
2704
|
-
<head>
|
2705
|
-
<style/>
|
2706
|
-
</head>
|
2707
|
-
<body lang='EN-US' link='blue' vlink='#954F72'>
|
2708
|
-
<div class='WordSection1'>
|
2709
|
-
<p> </p>
|
2710
|
-
</div>
|
2711
|
-
<p>
|
2712
|
-
<br clear='all' class='section'/>
|
2713
|
-
</p>
|
2714
|
-
<div class='WordSection2'>
|
2715
|
-
<p>
|
2716
|
-
<br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
|
2717
|
-
</p>
|
2718
|
-
<div>
|
2719
|
-
<h1 class='ForewordTitle'>Foreword</h1>
|
2720
|
-
<p class='TableTitle' style='text-align:center;'>
|
2721
|
-
Table 1 — Repeatability and reproducibility of
|
2722
|
-
<i>husked</i>
|
2723
|
-
rice yield
|
2724
|
-
<span style='mso-bookmark:_Ref'>
|
2725
|
-
<a class='FootnoteRef' href='#ftn1' epub:type='footnote'>
|
2726
|
-
<sup>1</sup>
|
2727
|
-
</a>
|
2728
|
-
</span>
|
2729
|
-
</p>
|
2730
|
-
<div align='center' class='table_container'>
|
2731
|
-
<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%'>
|
2732
|
-
<colgroup>
|
2733
|
-
<col width='30%'/>
|
2734
|
-
<col width='20%'/>
|
2735
|
-
<col width='20%'/>
|
2736
|
-
<col width='20%'/>
|
2737
|
-
<col width='10%'/>
|
2738
|
-
</colgroup>
|
2739
|
-
<thead>
|
2740
|
-
<tr>
|
2741
|
-
<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>
|
2742
|
-
<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>
|
2743
|
-
</tr>
|
2744
|
-
<tr>
|
2745
|
-
<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>
|
2746
|
-
<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%'>
|
2747
|
-
Drago
|
2748
|
-
<a href='#tableD-1a' class='TableFootnoteRef'>a</a>
|
2749
|
-
<aside>
|
2750
|
-
<div id='ftntableD-1a'>
|
2751
|
-
<span>
|
2752
|
-
<span id='tableD-1a' class='TableFootnoteRef'>a</span>
|
2753
|
-
<span style='mso-tab-count:1'>  </span>
|
2754
|
-
</span>
|
2755
|
-
<p id='_0fe65e9a-5531-408e-8295-eeff35f41a55'>Parboiled rice.</p>
|
2756
|
-
</div>
|
2757
|
-
</aside>
|
2758
|
-
</td>
|
2759
|
-
<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%'>
|
2760
|
-
Balilla
|
2761
|
-
<a href='#tableD-1a' class='TableFootnoteRef'>a</a>
|
2762
|
-
</td>
|
2763
|
-
<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>
|
2764
|
-
</tr>
|
2765
|
-
</thead>
|
2766
|
-
<tbody>
|
2767
|
-
<tr>
|
2768
|
-
<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>
|
2769
|
-
<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>
|
2770
|
-
<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>
|
2771
|
-
<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>
|
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='10.0%'>13</td>
|
2773
|
-
</tr>
|
2774
|
-
<tr>
|
2775
|
-
<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>
|
2776
|
-
<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>
|
2777
|
-
<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>
|
2778
|
-
<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>
|
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='10.0%'>77,7</td>
|
2780
|
-
</tr>
|
2781
|
-
</tbody>
|
2782
|
-
<tfoot>
|
2783
|
-
<tr>
|
2784
|
-
<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%'>
|
2785
|
-
Reproducibility limit,
|
2786
|
-
<span class='stem'>(#(R)#)</span>
|
2787
|
-
(= 2,83
|
2788
|
-
<span class='stem'>(#(s_R)#)</span>
|
2789
|
-
)
|
2790
|
-
</td>
|
2791
|
-
<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>
|
2792
|
-
<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>
|
2793
|
-
<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>
|
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='10.0%'>6,06</td>
|
2795
|
-
</tr>
|
2796
|
-
</tfoot>
|
2797
|
-
<div class='Note'>
|
2798
|
-
<p class='Note'>
|
2799
|
-
<span class='note_label'>NOTE</span>
|
2800
|
-
<span style='mso-tab-count:1'>  </span>
|
2801
|
-
This is a table about rice
|
2802
|
-
</p>
|
2803
|
-
</div>
|
2804
|
-
</table>
|
2805
|
-
<table class='dl'>
|
2806
|
-
<tr>
|
2807
|
-
<td valign='top' align='left'>
|
2808
|
-
<p align='left' style='margin-left:0pt;text-align:left;'>Drago</p>
|
2809
|
-
</td>
|
2810
|
-
<td valign='top'>A type of rice</td>
|
2811
|
-
</tr>
|
2812
|
-
</table>
|
2813
|
-
</div>
|
2814
|
-
<div align='center' class='table_container'>
|
2815
|
-
<table id='tableD-2' class='MsoISOTable' style='mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
|
2816
|
-
<tbody>
|
2817
|
-
<tr>
|
2818
|
-
<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>
|
2819
|
-
</tr>
|
2820
|
-
</tbody>
|
2821
|
-
</table>
|
2822
|
-
</div>
|
2823
|
-
</div>
|
2824
|
-
<p> </p>
|
2825
|
-
</div>
|
2826
|
-
<p>
|
2827
|
-
<br clear='all' class='section'/>
|
2828
|
-
</p>
|
2829
|
-
<div class='WordSection3'>
|
2830
|
-
<p class='zzSTDTitle1'/>
|
2831
|
-
<aside id='ftn1'>
|
2832
|
-
<p>X</p>
|
2833
|
-
</aside>
|
2834
|
-
</div>
|
2835
|
-
</body>
|
2836
|
-
</html>
|
2837
|
-
OUTPUT
|
2838
|
-
expect(xmlpp(IsoDoc::WordConvert
|
2839
|
-
.new(wordstylesheet: "spec/assets/word.css",
|
2840
|
-
htmlstylesheet: "spec/assets/html.scss", filename: "test")
|
2841
|
-
.word_cleanup(Nokogiri::XML(input)).to_xml)
|
2842
|
-
.sub(/^.*<main/m, "<main").sub(%r{</main>.*$}m, "</main>"))
|
2843
|
-
.to be_equivalent_to xmlpp(output)
|
2844
|
-
end
|
2845
|
-
|
2846
|
-
it "generates bare HTML file" do
|
2847
|
-
FileUtils.rm_f "test.html"
|
2848
|
-
IsoDoc::HtmlConvert.new(
|
2849
|
-
{ bare: true,
|
2850
|
-
htmlstylesheet: "spec/assets/html.scss",
|
2851
|
-
filename: "test" },
|
2852
|
-
).convert("test", <<~"INPUT", false)
|
2853
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
2854
|
-
<bibdata>
|
2855
|
-
<title language="en">test</title>
|
2856
|
-
</bibdata>
|
2857
|
-
<boilerplate>
|
2858
|
-
<feedback-statement>
|
2859
|
-
<clause><title>I am boilerplate</title></clause>
|
2860
|
-
</feedback-statement>
|
2861
|
-
</boilerplate>
|
2862
|
-
<preface><foreword>
|
2863
|
-
<note>
|
2864
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
2865
|
-
</note>
|
2866
|
-
</foreword></preface>
|
2867
|
-
</iso-standard>
|
2868
|
-
INPUT
|
2869
|
-
output = <<~OUTPUT
|
2870
|
-
<body lang='en' xml:lang='en'>
|
2871
|
-
<main class='main-section'>
|
2872
|
-
<br/>
|
2873
|
-
<div>
|
2874
|
-
<h1 class='ForewordTitle'>Foreword</h1>
|
2875
|
-
<div class='Note'>
|
2876
|
-
<p>
|
2877
|
-
  These results are based on a study carried out on three
|
2878
|
-
different types of kernel.
|
2879
|
-
</p>
|
2880
|
-
</div>
|
2881
|
-
</div>
|
2882
|
-
<p class='zzSTDTitle1'>test</p>
|
2883
|
-
</main>
|
2884
|
-
<script/>
|
2885
|
-
</body>
|
2886
|
-
OUTPUT
|
2887
|
-
expect(File.exist?("test.html")).to be true
|
2888
|
-
html = File.read("test.html")
|
2889
|
-
.sub(%r{^.*<body}m, "<body")
|
2890
|
-
.sub(%r{</body>.*$}m, "</body>")
|
2891
|
-
.gsub(%r{<script.+?</script>}m, "<script/>")
|
2892
|
-
.sub(%r{(<script/>\s+)+}m, "<script/>")
|
2893
|
-
expect(xmlpp(html)).to be_equivalent_to xmlpp(output)
|
2894
|
-
end
|
2895
|
-
|
2896
|
-
it "cleans up lists (HTML)" do
|
2897
|
-
input = <<~INPUT
|
2898
|
-
<html xmlns:epub="http://www.idpf.org/2007/ops">
|
2899
|
-
<head/>
|
2900
|
-
<body>
|
2901
|
-
<div class="main-section">
|
2902
|
-
<ul>
|
2903
|
-
<div>N1</div>
|
2904
|
-
<li>A</li>
|
2905
|
-
<li>B</li>
|
2906
|
-
<div>N2</div>
|
2907
|
-
<li>C</li>
|
2908
|
-
<div>N3</div>
|
2909
|
-
</div>
|
2910
|
-
</body>
|
2911
|
-
</html>
|
2912
|
-
INPUT
|
2913
|
-
output = <<~OUTPUT
|
2914
|
-
<main class='main-section'>
|
2915
|
-
<button onclick='topFunction()' id='myBtn' title='Go to top'>Top</button>
|
2916
|
-
<ul>
|
2917
|
-
<li>
|
2918
|
-
A
|
2919
|
-
<div>N1</div>
|
2920
|
-
</li>
|
2921
|
-
<li>
|
2922
|
-
B
|
2923
|
-
<div>N2</div>
|
2924
|
-
</li>
|
2925
|
-
<li>
|
2926
|
-
C
|
2927
|
-
<div>N3</div>
|
2928
|
-
</li>
|
2929
|
-
</ul>
|
2930
|
-
</main>
|
2931
|
-
OUTPUT
|
2932
|
-
expect(xmlpp(IsoDoc::HtmlConvert
|
2933
|
-
.new(htmlstylesheet: "spec/assets/html.scss", filename: "test")
|
2934
|
-
.html_cleanup(Nokogiri::XML(input)).to_xml)
|
2935
|
-
.sub(/^.*<main/m, "<main").sub(%r{</main>.*$}m, "</main>"))
|
2936
|
-
.to be_equivalent_to xmlpp(output)
|
2937
|
-
end
|
2938
|
-
end
|