isodoc 1.8.0 → 1.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/convert.rb +8 -0
- data/lib/isodoc/function/inline.rb +2 -4
- data/lib/isodoc/html_function/html.rb +1 -0
- data/lib/isodoc/html_function/postprocess.rb +4 -6
- data/lib/isodoc/metadata_date.rb +13 -11
- data/lib/isodoc/presentation_function/bibdata.rb +2 -2
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/word_function/body.rb +24 -14
- data/lib/isodoc/word_function/comments.rb +0 -4
- data/lib/isodoc/xref/xref_gen.rb +18 -22
- data/lib/isodoc/xref/xref_gen_seq.rb +10 -16
- data/spec/isodoc/blocks_spec.rb +14 -8
- data/spec/isodoc/lists_spec.rb +344 -222
- data/spec/isodoc/table_spec.rb +71 -73
- data/spec/isodoc/xref_numbering_spec.rb +347 -0
- data/spec/isodoc/xref_spec.rb +268 -347
- metadata +3 -2
data/spec/isodoc/lists_spec.rb
CHANGED
@@ -2,232 +2,247 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
RSpec.describe IsoDoc do
|
4
4
|
it "processes unordered lists" do
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
<
|
11
|
-
|
12
|
-
|
13
|
-
<
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
</div>
|
33
|
-
<p class="zzSTDTitle1"/>
|
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>
|
34
32
|
</div>
|
35
|
-
|
36
|
-
|
37
|
-
|
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)
|
38
41
|
end
|
39
42
|
|
40
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
|
41
83
|
expect(xmlpp(IsoDoc::HtmlConvert.new({})
|
42
|
-
.convert("test",
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
</
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
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>
|
59
118
|
<h1 class='ForewordTitle'>Foreword</h1>
|
60
119
|
<ul id='_61961034-0fb1-436b-b281-828857a59ddb'>
|
61
120
|
<li>
|
62
|
-
|
63
|
-
<input type='checkbox'/>
|
64
|
-
</span>
|
121
|
+
<span class='zzMoveToFollowing'>☑ </span>
|
65
122
|
<p id='_cb370dd3-8463-4ec7-aa1a-96f644e2e9a2'>updated normative references;</p>
|
66
123
|
</li>
|
67
124
|
<li>
|
68
|
-
<span class='zzMoveToFollowing'>
|
69
|
-
<input type='checkbox' checked='checked'/>
|
70
|
-
</span>
|
125
|
+
<span class='zzMoveToFollowing'>☐ </span>
|
71
126
|
<p id='_60eb765c-1f6c-418a-8016-29efa06bf4f9'>deletion of 4.3.</p>
|
72
127
|
</li>
|
73
128
|
</ul>
|
74
129
|
</div>
|
130
|
+
<p> </p>
|
131
|
+
</div>
|
132
|
+
<p>
|
133
|
+
<br clear='all' class='section'/>
|
134
|
+
</p>
|
135
|
+
<div class='WordSection3'>
|
75
136
|
<p class='zzSTDTitle1'/>
|
76
137
|
</div>
|
77
138
|
</body>
|
78
139
|
</html>
|
79
|
-
|
80
|
-
end
|
81
|
-
|
82
|
-
it "processes unordered checklists (Word)" do
|
140
|
+
OUTPUT
|
83
141
|
expect(xmlpp(IsoDoc::WordConvert.new({})
|
84
|
-
.convert("test",
|
85
|
-
|
86
|
-
<preface><foreword>
|
87
|
-
<ul id="_61961034-0fb1-436b-b281-828857a59ddb">
|
88
|
-
<li checkedcheckbox="true" uncheckedcheckbox="false">
|
89
|
-
<p id="_cb370dd3-8463-4ec7-aa1a-96f644e2e9a2">updated normative references;</p>
|
90
|
-
</li>
|
91
|
-
<li checkedcheckbox="false" uncheckedcheckbox="true">
|
92
|
-
<p id="_60eb765c-1f6c-418a-8016-29efa06bf4f9">deletion of 4.3.</p>
|
93
|
-
</li>
|
94
|
-
</ul>
|
95
|
-
</foreword></preface>
|
96
|
-
</iso-standard>
|
97
|
-
INPUT
|
98
|
-
<html xmlns:epub="http://www.idpf.org/2007/ops" lang="en">
|
99
|
-
<head><style/></head>
|
100
|
-
<body lang='EN-US' link='blue' vlink='#954F72'>
|
101
|
-
<div class='WordSection1'>
|
102
|
-
<p> </p>
|
103
|
-
</div>
|
104
|
-
<p>
|
105
|
-
<br clear='all' class='section'/>
|
106
|
-
</p>
|
107
|
-
<div class='WordSection2'>
|
108
|
-
<p>
|
109
|
-
<br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
|
110
|
-
</p>
|
111
|
-
<div>
|
112
|
-
<h1 class='ForewordTitle'>Foreword</h1>
|
113
|
-
<ul id='_61961034-0fb1-436b-b281-828857a59ddb'>
|
114
|
-
<li>
|
115
|
-
<span class='zzMoveToFollowing'>☑ </span>
|
116
|
-
<p id='_cb370dd3-8463-4ec7-aa1a-96f644e2e9a2'>updated normative references;</p>
|
117
|
-
</li>
|
118
|
-
<li>
|
119
|
-
<span class='zzMoveToFollowing'>☐ </span>
|
120
|
-
<p id='_60eb765c-1f6c-418a-8016-29efa06bf4f9'>deletion of 4.3.</p>
|
121
|
-
</li>
|
122
|
-
</ul>
|
123
|
-
</div>
|
124
|
-
<p> </p>
|
125
|
-
</div>
|
126
|
-
<p>
|
127
|
-
<br clear='all' class='section'/>
|
128
|
-
</p>
|
129
|
-
<div class='WordSection3'>
|
130
|
-
<p class='zzSTDTitle1'/>
|
131
|
-
</div>
|
132
|
-
</body>
|
133
|
-
</html>
|
134
|
-
OUTPUT
|
142
|
+
.convert("test", input, true)))
|
143
|
+
.to be_equivalent_to xmlpp(output)
|
135
144
|
end
|
136
145
|
|
137
146
|
it "processes ordered lists" do
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
<
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
<
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
<
|
152
|
-
|
153
|
-
|
154
|
-
</ol>
|
155
|
-
</ol>
|
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>
|
156
163
|
</ol>
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
<
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
<
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
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>
|
178
185
|
</ol>
|
179
|
-
|
180
|
-
|
186
|
+
</ol>
|
187
|
+
</ol>
|
181
188
|
</div>
|
182
|
-
|
183
|
-
|
184
|
-
|
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)
|
185
197
|
end
|
186
198
|
|
187
199
|
it "processes Roman Upper ordered lists" do
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
<
|
194
|
-
|
195
|
-
|
196
|
-
<
|
197
|
-
|
198
|
-
|
199
|
-
<
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
</div>
|
222
|
-
<p class="zzSTDTitle1"/>
|
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>
|
223
233
|
</div>
|
224
|
-
|
225
|
-
|
226
|
-
|
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)
|
227
242
|
end
|
228
243
|
|
229
244
|
it "processes definition lists" do
|
230
|
-
|
245
|
+
input = <<~INPUT
|
231
246
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
232
247
|
<preface><foreword>
|
233
248
|
<dl id="_732d3f57-4f88-40bf-9ae9-633891edc395" keep-with-next="true" keep-lines-together="true">
|
@@ -244,39 +259,43 @@ RSpec.describe IsoDoc do
|
|
244
259
|
</foreword></preface>
|
245
260
|
</iso-standard>
|
246
261
|
INPUT
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
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>
|
275
291
|
OUTPUT
|
292
|
+
expect(xmlpp(IsoDoc::HtmlConvert.new({})
|
293
|
+
.convert("test", input, true)))
|
294
|
+
.to be_equivalent_to xmlpp(output)
|
276
295
|
end
|
277
296
|
|
278
297
|
it "processes definition lists (Word)" do
|
279
|
-
|
298
|
+
input = <<~INPUT
|
280
299
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
281
300
|
<preface><foreword>
|
282
301
|
<dl id="_732d3f57-4f88-40bf-9ae9-633891edc395">
|
@@ -293,6 +312,7 @@ RSpec.describe IsoDoc do
|
|
293
312
|
</foreword></preface>
|
294
313
|
</iso-standard>
|
295
314
|
INPUT
|
315
|
+
output = <<~OUTPUT
|
296
316
|
<html xmlns:epub="http://www.idpf.org/2007/ops" lang="en">
|
297
317
|
<head><style/></head>
|
298
318
|
<body lang="EN-US" link="blue" vlink="#954F72">
|
@@ -343,5 +363,107 @@ RSpec.describe IsoDoc do
|
|
343
363
|
</body>
|
344
364
|
</html>
|
345
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)
|
346
468
|
end
|
347
469
|
end
|