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
data/spec/isodoc/lists_spec.rb
DELETED
@@ -1,469 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
RSpec.describe IsoDoc do
|
4
|
-
it "processes unordered lists" do
|
5
|
-
input = <<~INPUT
|
6
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
7
|
-
<preface><foreword>
|
8
|
-
<ul id="_61961034-0fb1-436b-b281-828857a59ddb" keep-with-next="true" keep-lines-together="true">
|
9
|
-
<li>
|
10
|
-
<p id="_cb370dd3-8463-4ec7-aa1a-96f644e2e9a2">updated normative references;</p>
|
11
|
-
</li>
|
12
|
-
<li>
|
13
|
-
<p id="_60eb765c-1f6c-418a-8016-29efa06bf4f9">deletion of 4.3.</p>
|
14
|
-
</li>
|
15
|
-
</ul>
|
16
|
-
</foreword></preface>
|
17
|
-
</iso-standard>
|
18
|
-
INPUT
|
19
|
-
output = <<~OUTPUT
|
20
|
-
#{HTML_HDR}
|
21
|
-
<br/>
|
22
|
-
<div>
|
23
|
-
<h1 class="ForewordTitle">Foreword</h1>
|
24
|
-
<ul id="_61961034-0fb1-436b-b281-828857a59ddb" style="page-break-after: avoid;page-break-inside: avoid;">
|
25
|
-
<li>
|
26
|
-
<p id="_cb370dd3-8463-4ec7-aa1a-96f644e2e9a2">updated normative references;</p>
|
27
|
-
</li>
|
28
|
-
<li>
|
29
|
-
<p id="_60eb765c-1f6c-418a-8016-29efa06bf4f9">deletion of 4.3.</p>
|
30
|
-
</li>
|
31
|
-
</ul>
|
32
|
-
</div>
|
33
|
-
<p class="zzSTDTitle1"/>
|
34
|
-
</div>
|
35
|
-
</body>
|
36
|
-
</html>
|
37
|
-
OUTPUT
|
38
|
-
expect(xmlpp(IsoDoc::HtmlConvert.new({})
|
39
|
-
.convert("test", input, true)))
|
40
|
-
.to be_equivalent_to xmlpp(output)
|
41
|
-
end
|
42
|
-
|
43
|
-
it "processes unordered checklists" do
|
44
|
-
input = <<~INPUT
|
45
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
46
|
-
<preface><foreword>
|
47
|
-
<ul id="_61961034-0fb1-436b-b281-828857a59ddb">
|
48
|
-
<li checkedcheckbox="true" uncheckedcheckbox="false">
|
49
|
-
<p id="_cb370dd3-8463-4ec7-aa1a-96f644e2e9a2">updated normative references;</p>
|
50
|
-
</li>
|
51
|
-
<li checkedcheckbox="false" uncheckedcheckbox="true">
|
52
|
-
<p id="_60eb765c-1f6c-418a-8016-29efa06bf4f9">deletion of 4.3.</p>
|
53
|
-
</li>
|
54
|
-
</ul>
|
55
|
-
</foreword></preface>
|
56
|
-
</iso-standard>
|
57
|
-
INPUT
|
58
|
-
output = <<~OUTPUT
|
59
|
-
#{HTML_HDR}
|
60
|
-
<br/>
|
61
|
-
<div>
|
62
|
-
<h1 class='ForewordTitle'>Foreword</h1>
|
63
|
-
<ul id='_61961034-0fb1-436b-b281-828857a59ddb'>
|
64
|
-
<li>
|
65
|
-
<span class='zzMoveToFollowing'>
|
66
|
-
<input type='checkbox'/>
|
67
|
-
</span>
|
68
|
-
<p id='_cb370dd3-8463-4ec7-aa1a-96f644e2e9a2'>updated normative references;</p>
|
69
|
-
</li>
|
70
|
-
<li>
|
71
|
-
<span class='zzMoveToFollowing'>
|
72
|
-
<input type='checkbox' checked='checked'/>
|
73
|
-
</span>
|
74
|
-
<p id='_60eb765c-1f6c-418a-8016-29efa06bf4f9'>deletion of 4.3.</p>
|
75
|
-
</li>
|
76
|
-
</ul>
|
77
|
-
</div>
|
78
|
-
<p class='zzSTDTitle1'/>
|
79
|
-
</div>
|
80
|
-
</body>
|
81
|
-
</html>
|
82
|
-
OUTPUT
|
83
|
-
expect(xmlpp(IsoDoc::HtmlConvert.new({})
|
84
|
-
.convert("test", input, true)))
|
85
|
-
.to be_equivalent_to xmlpp(output)
|
86
|
-
end
|
87
|
-
|
88
|
-
it "processes unordered checklists (Word)" do
|
89
|
-
input = <<~INPUT
|
90
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
91
|
-
<preface><foreword>
|
92
|
-
<ul id="_61961034-0fb1-436b-b281-828857a59ddb">
|
93
|
-
<li checkedcheckbox="true" uncheckedcheckbox="false">
|
94
|
-
<p id="_cb370dd3-8463-4ec7-aa1a-96f644e2e9a2">updated normative references;</p>
|
95
|
-
</li>
|
96
|
-
<li checkedcheckbox="false" uncheckedcheckbox="true">
|
97
|
-
<p id="_60eb765c-1f6c-418a-8016-29efa06bf4f9">deletion of 4.3.</p>
|
98
|
-
</li>
|
99
|
-
</ul>
|
100
|
-
</foreword></preface>
|
101
|
-
</iso-standard>
|
102
|
-
INPUT
|
103
|
-
output = <<~OUTPUT
|
104
|
-
<html xmlns:epub="http://www.idpf.org/2007/ops" lang="en">
|
105
|
-
<head><style/></head>
|
106
|
-
<body lang='EN-US' link='blue' vlink='#954F72'>
|
107
|
-
<div class='WordSection1'>
|
108
|
-
<p> </p>
|
109
|
-
</div>
|
110
|
-
<p>
|
111
|
-
<br clear='all' class='section'/>
|
112
|
-
</p>
|
113
|
-
<div class='WordSection2'>
|
114
|
-
<p>
|
115
|
-
<br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
|
116
|
-
</p>
|
117
|
-
<div>
|
118
|
-
<h1 class='ForewordTitle'>Foreword</h1>
|
119
|
-
<ul id='_61961034-0fb1-436b-b281-828857a59ddb'>
|
120
|
-
<li>
|
121
|
-
<span class='zzMoveToFollowing'>☑ </span>
|
122
|
-
<p id='_cb370dd3-8463-4ec7-aa1a-96f644e2e9a2'>updated normative references;</p>
|
123
|
-
</li>
|
124
|
-
<li>
|
125
|
-
<span class='zzMoveToFollowing'>☐ </span>
|
126
|
-
<p id='_60eb765c-1f6c-418a-8016-29efa06bf4f9'>deletion of 4.3.</p>
|
127
|
-
</li>
|
128
|
-
</ul>
|
129
|
-
</div>
|
130
|
-
<p> </p>
|
131
|
-
</div>
|
132
|
-
<p>
|
133
|
-
<br clear='all' class='section'/>
|
134
|
-
</p>
|
135
|
-
<div class='WordSection3'>
|
136
|
-
<p class='zzSTDTitle1'/>
|
137
|
-
</div>
|
138
|
-
</body>
|
139
|
-
</html>
|
140
|
-
OUTPUT
|
141
|
-
expect(xmlpp(IsoDoc::WordConvert.new({})
|
142
|
-
.convert("test", input, true)))
|
143
|
-
.to be_equivalent_to xmlpp(output)
|
144
|
-
end
|
145
|
-
|
146
|
-
it "processes ordered lists" do
|
147
|
-
input = <<~INPUT
|
148
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
149
|
-
<preface><foreword>
|
150
|
-
<ol id="_ae34a226-aab4-496d-987b-1aa7b6314026" type="alphabet" keep-with-next="true" keep-lines-together="true">
|
151
|
-
<li>
|
152
|
-
<p id="_0091a277-fb0e-424a-aea8-f0001303fe78">all information necessary for the complete identification of the sample;</p>
|
153
|
-
</li>
|
154
|
-
<ol>
|
155
|
-
<li>
|
156
|
-
<p id="_8a7b6299-db05-4ff8-9de7-ff019b9017b2">a reference to this document (i.e. ISO 17301-1);</p>
|
157
|
-
</li>
|
158
|
-
<ol>
|
159
|
-
<li>
|
160
|
-
<p id="_ea248b7f-839f-460f-a173-a58a830b2abe">the sampling method used;</p>
|
161
|
-
</li>
|
162
|
-
</ol>
|
163
|
-
</ol>
|
164
|
-
</ol>
|
165
|
-
</foreword></preface>
|
166
|
-
</iso-standard>
|
167
|
-
INPUT
|
168
|
-
output = <<~OUTPUT
|
169
|
-
#{HTML_HDR}
|
170
|
-
<br/>
|
171
|
-
<div>
|
172
|
-
<h1 class="ForewordTitle">Foreword</h1>
|
173
|
-
<ol type="a" id="_ae34a226-aab4-496d-987b-1aa7b6314026" style="page-break-after: avoid;page-break-inside: avoid;">
|
174
|
-
<li>
|
175
|
-
<p id="_0091a277-fb0e-424a-aea8-f0001303fe78">all information necessary for the complete identification of the sample;</p>
|
176
|
-
</li>
|
177
|
-
<ol type="1">
|
178
|
-
<li>
|
179
|
-
<p id="_8a7b6299-db05-4ff8-9de7-ff019b9017b2">a reference to this document (i.e. ISO 17301-1);</p>
|
180
|
-
</li>
|
181
|
-
<ol type="i">
|
182
|
-
<li>
|
183
|
-
<p id="_ea248b7f-839f-460f-a173-a58a830b2abe">the sampling method used;</p>
|
184
|
-
</li>
|
185
|
-
</ol>
|
186
|
-
</ol>
|
187
|
-
</ol>
|
188
|
-
</div>
|
189
|
-
<p class="zzSTDTitle1"/>
|
190
|
-
</div>
|
191
|
-
</body>
|
192
|
-
</html>
|
193
|
-
OUTPUT
|
194
|
-
expect(xmlpp(IsoDoc::HtmlConvert.new({})
|
195
|
-
.convert("test", input, true)))
|
196
|
-
.to be_equivalent_to xmlpp(output)
|
197
|
-
end
|
198
|
-
|
199
|
-
it "processes Roman Upper ordered lists" do
|
200
|
-
input = <<~INPUT
|
201
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
202
|
-
<preface><foreword>
|
203
|
-
<ol id="_ae34a226-aab4-496d-987b-1aa7b6314026" type="roman_upper">
|
204
|
-
<li id="_ae34a226-aab4-496d-987b-1aa7b6314027">
|
205
|
-
<p id="_0091a277-fb0e-424a-aea8-f0001303fe78">all information necessary for the complete identification of the sample;</p>
|
206
|
-
</li>
|
207
|
-
<li>
|
208
|
-
<p id="_8a7b6299-db05-4ff8-9de7-ff019b9017b2">a reference to this document (i.e. ISO 17301-1);</p>
|
209
|
-
</li>
|
210
|
-
<li>
|
211
|
-
<p id="_ea248b7f-839f-460f-a173-a58a830b2abe">the sampling method used;</p>
|
212
|
-
</li>
|
213
|
-
</ol>
|
214
|
-
</foreword></preface>
|
215
|
-
</iso-standard>
|
216
|
-
INPUT
|
217
|
-
output = <<~OUTPUT
|
218
|
-
#{HTML_HDR}
|
219
|
-
<br/>
|
220
|
-
<div>
|
221
|
-
<h1 class="ForewordTitle">Foreword</h1>
|
222
|
-
<ol type="I" id="_ae34a226-aab4-496d-987b-1aa7b6314026">
|
223
|
-
<li id="_ae34a226-aab4-496d-987b-1aa7b6314027">
|
224
|
-
<p id="_0091a277-fb0e-424a-aea8-f0001303fe78">all information necessary for the complete identification of the sample;</p>
|
225
|
-
</li>
|
226
|
-
<li>
|
227
|
-
<p id="_8a7b6299-db05-4ff8-9de7-ff019b9017b2">a reference to this document (i.e. ISO 17301-1);</p>
|
228
|
-
</li>
|
229
|
-
<li>
|
230
|
-
<p id="_ea248b7f-839f-460f-a173-a58a830b2abe">the sampling method used;</p>
|
231
|
-
</li>
|
232
|
-
</ol>
|
233
|
-
</div>
|
234
|
-
<p class="zzSTDTitle1"/>
|
235
|
-
</div>
|
236
|
-
</body>
|
237
|
-
</html>
|
238
|
-
OUTPUT
|
239
|
-
expect(xmlpp(IsoDoc::HtmlConvert.new({})
|
240
|
-
.convert("test", input, true)))
|
241
|
-
.to be_equivalent_to xmlpp(output)
|
242
|
-
end
|
243
|
-
|
244
|
-
it "processes definition lists" do
|
245
|
-
input = <<~INPUT
|
246
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
247
|
-
<preface><foreword>
|
248
|
-
<dl id="_732d3f57-4f88-40bf-9ae9-633891edc395" keep-with-next="true" keep-lines-together="true">
|
249
|
-
<dt>
|
250
|
-
W
|
251
|
-
</dt>
|
252
|
-
<dd>
|
253
|
-
<p id="_05d81174-3a41-44af-94d8-c78b8d2e175d">mass fraction of gelatinized kernels, expressed in per cent</p>
|
254
|
-
</dd>
|
255
|
-
<dt><stem type="AsciiMath">w</stem></dt>
|
256
|
-
<dd><p>??</p></dd>
|
257
|
-
<note><p>This is a note</p></note>
|
258
|
-
</dl>
|
259
|
-
</foreword></preface>
|
260
|
-
</iso-standard>
|
261
|
-
INPUT
|
262
|
-
output = <<~OUTPUT
|
263
|
-
#{HTML_HDR}
|
264
|
-
<br/>
|
265
|
-
<div>
|
266
|
-
<h1 class="ForewordTitle">Foreword</h1>
|
267
|
-
<dl id="_732d3f57-4f88-40bf-9ae9-633891edc395" style="page-break-after: avoid;page-break-inside: avoid;">
|
268
|
-
<dt>
|
269
|
-
<p>
|
270
|
-
W
|
271
|
-
</p>
|
272
|
-
</dt>
|
273
|
-
<dd>
|
274
|
-
<p id="_05d81174-3a41-44af-94d8-c78b8d2e175d">mass fraction of gelatinized kernels, expressed in per cent</p>
|
275
|
-
</dd>
|
276
|
-
<dt>
|
277
|
-
<span class="stem">(#(w)#)</span>
|
278
|
-
</dt>
|
279
|
-
<dd>
|
280
|
-
<p>??</p>
|
281
|
-
</dd>
|
282
|
-
</dl>
|
283
|
-
<div class="Note">
|
284
|
-
<p>  This is a note</p>
|
285
|
-
</div>
|
286
|
-
</div>
|
287
|
-
<p class="zzSTDTitle1"/>
|
288
|
-
</div>
|
289
|
-
</body>
|
290
|
-
</html>
|
291
|
-
OUTPUT
|
292
|
-
expect(xmlpp(IsoDoc::HtmlConvert.new({})
|
293
|
-
.convert("test", input, true)))
|
294
|
-
.to be_equivalent_to xmlpp(output)
|
295
|
-
end
|
296
|
-
|
297
|
-
it "processes definition lists (Word)" do
|
298
|
-
input = <<~INPUT
|
299
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
300
|
-
<preface><foreword>
|
301
|
-
<dl id="_732d3f57-4f88-40bf-9ae9-633891edc395">
|
302
|
-
<dt>
|
303
|
-
W
|
304
|
-
</dt>
|
305
|
-
<dd>
|
306
|
-
<p id="_05d81174-3a41-44af-94d8-c78b8d2e175d">mass fraction of gelatinized kernels, expressed in per cent</p>
|
307
|
-
</dd>
|
308
|
-
<dt><stem type="AsciiMath">w</stem></dt>
|
309
|
-
<dd><p>??</p></dd>
|
310
|
-
<note><p>This is a note</p></note>
|
311
|
-
</dl>
|
312
|
-
</foreword></preface>
|
313
|
-
</iso-standard>
|
314
|
-
INPUT
|
315
|
-
output = <<~OUTPUT
|
316
|
-
<html xmlns:epub="http://www.idpf.org/2007/ops" lang="en">
|
317
|
-
<head><style/></head>
|
318
|
-
<body lang="EN-US" link="blue" vlink="#954F72">
|
319
|
-
<div class="WordSection1">
|
320
|
-
<p> </p>
|
321
|
-
</div>
|
322
|
-
<p><br clear="all" class="section"/></p>
|
323
|
-
<div class="WordSection2">
|
324
|
-
<p><br clear="all" style="mso-special-character:line-break;page-break-before:always"/></p>
|
325
|
-
<div>
|
326
|
-
<h1 class="ForewordTitle">Foreword</h1>
|
327
|
-
<table class="dl">
|
328
|
-
<tr>
|
329
|
-
<td valign="top" align="left">
|
330
|
-
<p align="left" style="margin-left:0pt;text-align:left;">
|
331
|
-
W
|
332
|
-
</p>
|
333
|
-
</td>
|
334
|
-
<td valign="top">
|
335
|
-
<p id="_05d81174-3a41-44af-94d8-c78b8d2e175d">mass fraction of gelatinized kernels, expressed in per cent</p>
|
336
|
-
</td>
|
337
|
-
</tr>
|
338
|
-
<tr>
|
339
|
-
<td valign="top" align="left">
|
340
|
-
<p align="left" style="margin-left:0pt;text-align:left;">
|
341
|
-
<span class="stem">(#(w)#)</span>
|
342
|
-
</p>
|
343
|
-
</td>
|
344
|
-
<td valign="top">
|
345
|
-
<p>??</p>
|
346
|
-
</td>
|
347
|
-
</tr>
|
348
|
-
<tr>
|
349
|
-
<td colspan="2">
|
350
|
-
<div class="Note">
|
351
|
-
<p class="Note"><span class="note_label"/><span style="mso-tab-count:1">  </span>This is a note</p>
|
352
|
-
</div>
|
353
|
-
</td>
|
354
|
-
</tr>
|
355
|
-
</table>
|
356
|
-
</div>
|
357
|
-
<p> </p>
|
358
|
-
</div>
|
359
|
-
<p><br clear="all" class="section"/></p>
|
360
|
-
<div class="WordSection3">
|
361
|
-
<p class="zzSTDTitle1"/>
|
362
|
-
</div>
|
363
|
-
</body>
|
364
|
-
</html>
|
365
|
-
OUTPUT
|
366
|
-
expect(xmlpp(IsoDoc::WordConvert.new({})
|
367
|
-
.convert("test", input, true)))
|
368
|
-
.to be_equivalent_to xmlpp(output)
|
369
|
-
end
|
370
|
-
|
371
|
-
it "processes nested definition lists (Word)" do
|
372
|
-
input = <<~INPUT
|
373
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
374
|
-
<preface><foreword>
|
375
|
-
<dl id="_732d3f57-4f88-40bf-9ae9-633891edc394">
|
376
|
-
<dt>A Deflist</dt>
|
377
|
-
<dd>
|
378
|
-
<dl id="_732d3f57-4f88-40bf-9ae9-633891edc395">
|
379
|
-
<dt>W</dt>
|
380
|
-
<dd><p id="_05d81174-3a41-44af-94d8-c78b8d2e175d">mass fraction of gelatinized kernels</p></dd>
|
381
|
-
</dl>
|
382
|
-
</dd>
|
383
|
-
</dl>
|
384
|
-
<table id="_732d3f57-4f88-40bf-9ae9-633891edc396">
|
385
|
-
<tbody>
|
386
|
-
<tr>
|
387
|
-
<td>
|
388
|
-
<dl id="_732d3f57-4f88-40bf-9ae9-633891edc397">
|
389
|
-
<dt>X</dt>
|
390
|
-
<dd><p id="_05d81174-3a41-44af-94d8-c78b8d2e175e">expressed in per cent</p></dd>
|
391
|
-
</dl>
|
392
|
-
</td>
|
393
|
-
</tr>
|
394
|
-
</tbody>
|
395
|
-
</table>
|
396
|
-
</foreword></preface>
|
397
|
-
</iso-standard>
|
398
|
-
INPUT
|
399
|
-
output = <<~OUTPUT
|
400
|
-
<html xmlns:epub='http://www.idpf.org/2007/ops' lang='en'>
|
401
|
-
<head>
|
402
|
-
<style>
|
403
|
-
</style>
|
404
|
-
</head>
|
405
|
-
<body lang='EN-US' link='blue' vlink='#954F72'>
|
406
|
-
<div class='WordSection1'>
|
407
|
-
<p> </p>
|
408
|
-
</div>
|
409
|
-
<p>
|
410
|
-
<br clear='all' class='section'/>
|
411
|
-
</p>
|
412
|
-
<div class='WordSection2'>
|
413
|
-
<p>
|
414
|
-
<br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
|
415
|
-
</p>
|
416
|
-
<div>
|
417
|
-
<h1 class='ForewordTitle'>Foreword</h1>
|
418
|
-
<table class='dl'>
|
419
|
-
<tr>
|
420
|
-
<td valign='top' align='left'>
|
421
|
-
<p align='left' style='margin-left:0pt;text-align:left;'>A Deflist</p>
|
422
|
-
</td>
|
423
|
-
<td valign='top'>
|
424
|
-
<dl id='_732d3f57-4f88-40bf-9ae9-633891edc395'>
|
425
|
-
<dt>
|
426
|
-
<p align='left' style='margin-left:0pt;text-align:left;'>W</p>
|
427
|
-
</dt>
|
428
|
-
<dd>
|
429
|
-
<p id='_05d81174-3a41-44af-94d8-c78b8d2e175d'>mass fraction of gelatinized kernels</p>
|
430
|
-
</dd>
|
431
|
-
</dl>
|
432
|
-
</td>
|
433
|
-
</tr>
|
434
|
-
</table>
|
435
|
-
<div align='center' class='table_container'>
|
436
|
-
<table id='_732d3f57-4f88-40bf-9ae9-633891edc396' class='MsoISOTable' style='mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
|
437
|
-
<tbody>
|
438
|
-
<tr>
|
439
|
-
<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;'>
|
440
|
-
<dl id='_732d3f57-4f88-40bf-9ae9-633891edc397'>
|
441
|
-
<dt>
|
442
|
-
<p align='left' style='margin-left:0pt;text-align:left;'>X</p>
|
443
|
-
</dt>
|
444
|
-
<dd>
|
445
|
-
<p id='_05d81174-3a41-44af-94d8-c78b8d2e175e'>expressed in per cent</p>
|
446
|
-
</dd>
|
447
|
-
</dl>
|
448
|
-
</td>
|
449
|
-
</tr>
|
450
|
-
</tbody>
|
451
|
-
</table>
|
452
|
-
</div>
|
453
|
-
</div>
|
454
|
-
<p> </p>
|
455
|
-
</div>
|
456
|
-
<p>
|
457
|
-
<br clear='all' class='section'/>
|
458
|
-
</p>
|
459
|
-
<div class='WordSection3'>
|
460
|
-
<p class='zzSTDTitle1'/>
|
461
|
-
</div>
|
462
|
-
</body>
|
463
|
-
</html>
|
464
|
-
OUTPUT
|
465
|
-
expect(xmlpp(IsoDoc::WordConvert.new({})
|
466
|
-
.convert("test", input, true)))
|
467
|
-
.to be_equivalent_to xmlpp(output)
|
468
|
-
end
|
469
|
-
end
|