metanorma-iso 2.2.2 → 2.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/lib/isodoc/iso/html/header-dis.html +111 -29
  3. data/lib/isodoc/iso/html/isodoc-dis.css +65 -64
  4. data/lib/isodoc/iso/html/isodoc-dis.scss +65 -64
  5. data/lib/isodoc/iso/html/style-human.css +7 -2
  6. data/lib/isodoc/iso/html/style-human.scss +0 -1
  7. data/lib/isodoc/iso/html/style-iso.css +7 -2
  8. data/lib/isodoc/iso/html/style-iso.scss +0 -1
  9. data/lib/isodoc/iso/html/wordstyle-dis.css +160 -4
  10. data/lib/isodoc/iso/html/wordstyle-dis.scss +154 -4
  11. data/lib/isodoc/iso/html/wordstyle.css +150 -0
  12. data/lib/isodoc/iso/html/wordstyle.scss +144 -0
  13. data/lib/isodoc/iso/i18n-en.yaml +4 -4
  14. data/lib/isodoc/iso/iso.amendment.xsl +1649 -1199
  15. data/lib/isodoc/iso/iso.international-standard.xsl +1649 -1199
  16. data/lib/isodoc/iso/presentation_bibdata.rb +13 -9
  17. data/lib/isodoc/iso/presentation_xml_convert.rb +5 -3
  18. data/lib/isodoc/iso/word_convert.rb +6 -4
  19. data/lib/isodoc/iso/word_dis_cleanup.rb +30 -8
  20. data/lib/isodoc/iso/word_dis_convert.rb +5 -2
  21. data/lib/metanorma/iso/base.rb +2 -1
  22. data/lib/metanorma/iso/biblio.rng +5 -0
  23. data/lib/metanorma/iso/isodoc.rng +47 -13
  24. data/lib/metanorma/iso/validate.rb +2 -2
  25. data/lib/metanorma/iso/version.rb +1 -1
  26. data/metanorma-iso.gemspec +5 -2
  27. metadata +4 -87
  28. data/.github/workflows/automerge.yml +0 -31
  29. data/.github/workflows/rake.yml +0 -15
  30. data/.github/workflows/release.yml +0 -24
  31. data/.github/workflows/ubuntu.yml +0 -41
  32. data/Rakefile +0 -8
  33. data/bin/rspec +0 -17
  34. data/spec/assets/header.html +0 -7
  35. data/spec/assets/html.css +0 -2
  36. data/spec/assets/htmlcover.html +0 -4
  37. data/spec/assets/htmlintro.html +0 -5
  38. data/spec/assets/i18n.yaml +0 -2
  39. data/spec/assets/iso.adoc +0 -10
  40. data/spec/assets/iso.headless.html +0 -33
  41. data/spec/assets/iso.xml +0 -71
  42. data/spec/assets/rice_image1.png +0 -0
  43. data/spec/assets/scripts.html +0 -3
  44. data/spec/assets/std.css +0 -2
  45. data/spec/assets/word.css +0 -2
  46. data/spec/assets/wordcover.html +0 -3
  47. data/spec/assets/wordintro.html +0 -4
  48. data/spec/examples/103_01_02.html +0 -247
  49. data/spec/examples/english.yaml +0 -69
  50. data/spec/examples/iso_123_.xml +0 -45
  51. data/spec/examples/iso_123_all_parts.xml +0 -45
  52. data/spec/examples/iso_123_no_year_note.xml +0 -46
  53. data/spec/examples/iso_124_.xml +0 -41
  54. data/spec/examples/iso_216_.xml +0 -47
  55. data/spec/examples/iso_iec_12382_.xml +0 -48
  56. data/spec/examples/rice.adoc +0 -714
  57. data/spec/examples/rice.preview.html +0 -1870
  58. data/spec/examples/rice.sh +0 -4
  59. data/spec/examples/rice_img/1000-1_ed2amd3fig1a.png +0 -0
  60. data/spec/examples/rice_img/1000-1_ed2amd3fig1b.png +0 -0
  61. data/spec/examples/rice_img/1000-1_ed2amd3fig2.png +0 -0
  62. data/spec/examples/rice_img/1000-1_ed2amd3fig3.png +0 -0
  63. data/spec/examples/rice_img/1000-1_ed2amd3fig4.png +0 -0
  64. data/spec/examples/rice_img/1000-1_ed2amd3fig5_f.png +0 -0
  65. data/spec/examples/rice_img/1000-1_ed2amd3figA.png +0 -0
  66. data/spec/examples/rice_img/1000-1_ed2amd3figA1.png +0 -0
  67. data/spec/examples/rice_img/1000-1_ed2amd3figA2.png +0 -0
  68. data/spec/examples/rice_img/1000-1_ed2amd3figTab1.png +0 -0
  69. data/spec/examples/rice_img/1000-1_ed2amd3figTab2.png +0 -0
  70. data/spec/examples/rice_img/1001_ed2amd3fig1.png +0 -0
  71. data/spec/examples/rice_img/ISO_1213_1.png +0 -0
  72. data/spec/examples/rice_img/SL1000-1_ed2amd3fig1.png +0 -0
  73. data/spec/examples/rice_img/rice_image1.png +0 -0
  74. data/spec/examples/rice_img/rice_image2.png +0 -0
  75. data/spec/examples/rice_img/rice_image3_1.png +0 -0
  76. data/spec/examples/rice_img/rice_image3_2.png +0 -0
  77. data/spec/examples/rice_img/rice_image3_3.png +0 -0
  78. data/spec/isodoc/amd_spec.rb +0 -986
  79. data/spec/isodoc/blocks_spec.rb +0 -1174
  80. data/spec/isodoc/i18n_spec.rb +0 -1579
  81. data/spec/isodoc/inline_spec.rb +0 -1060
  82. data/spec/isodoc/iso_spec.rb +0 -255
  83. data/spec/isodoc/metadata_spec.rb +0 -701
  84. data/spec/isodoc/postproc_spec.rb +0 -1089
  85. data/spec/isodoc/ref_spec.rb +0 -439
  86. data/spec/isodoc/section_spec.rb +0 -998
  87. data/spec/isodoc/table_spec.rb +0 -420
  88. data/spec/isodoc/terms_spec.rb +0 -314
  89. data/spec/isodoc/word_dis_spec.rb +0 -2064
  90. data/spec/isodoc/xref_spec.rb +0 -1747
  91. data/spec/metanorma/amd_spec.rb +0 -724
  92. data/spec/metanorma/base_spec.rb +0 -1384
  93. data/spec/metanorma/blank_spec.rb +0 -38
  94. data/spec/metanorma/blocks_spec.rb +0 -624
  95. data/spec/metanorma/cleanup_spec.rb +0 -1645
  96. data/spec/metanorma/inline_spec.rb +0 -203
  97. data/spec/metanorma/lists_spec.rb +0 -197
  98. data/spec/metanorma/macros_spec.rb +0 -99
  99. data/spec/metanorma/processor_spec.rb +0 -161
  100. data/spec/metanorma/refs_spec.rb +0 -672
  101. data/spec/metanorma/section_spec.rb +0 -492
  102. data/spec/metanorma/table_spec.rb +0 -329
  103. data/spec/metanorma/validate_spec.rb +0 -2153
  104. data/spec/relaton/render_spec.rb +0 -568
  105. data/spec/requirements/requirement_components_spec.rb +0 -610
  106. data/spec/requirements/requirements_spec.rb +0 -1596
  107. data/spec/requirements/xref_spec.rb +0 -1211
  108. data/spec/spec_helper.rb +0 -313
  109. data/spec/vcr_cassettes/docrels.yml +0 -385
  110. data/spec/vcr_cassettes/withdrawn_iso.yml +0 -295
@@ -1,420 +0,0 @@
1
- require "spec_helper"
2
-
3
- RSpec.describe IsoDoc do
4
- it "processes IsoXML tables" do
5
- input = <<~INPUT
6
- <iso-standard xmlns="http://riboseinc.com/isoxml">
7
- <preface>
8
- <foreword>
9
- <table alt="tool tip" id="tableD-1" summary="long desc">
10
- <name>Repeatability and reproducibility of
11
- <em>husked</em>
12
- rice yield</name>
13
- <thead>
14
- <tr>
15
- <td align="left" rowspan="2">Description</td>
16
- <td align="center" colspan="4">Rice sample</td>
17
- </tr>
18
- <tr>
19
- <td align="left">Arborio</td>
20
- <td align="center">Drago
21
- <fn reference="a">
22
- <p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p></fn>
23
- </td>
24
- <td align="center">Balilla
25
- <fn reference="a">
26
- <p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p></fn>
27
- </td>
28
- <td align="center">Thaibonnet</td>
29
- </tr>
30
- </thead>
31
- <tbody>
32
- <tr>
33
- <th align="left">Number of laboratories retained after eliminating outliers</th>
34
- <td align="center">13</td>
35
- <td align="center">11</td>
36
- <td align="center">13</td>
37
- <td align="center">13</td>
38
- </tr>
39
- <tr>
40
- <td align="left">Mean value, g/100 g</td>
41
- <td align="center">81,2</td>
42
- <td align="center">82,0</td>
43
- <td align="center">81,8</td>
44
- <td align="center">77,7</td>
45
- </tr>
46
- </tbody>
47
- <tfoot>
48
- <tr>
49
- <td align="left">Reproducibility limit,
50
- <stem type="AsciiMath">R</stem>
51
- (= 2,83
52
- <stem type="AsciiMath">s_R</stem>
53
- )</td>
54
- <td align="center">2,89</td>
55
- <td align="center">0,57</td>
56
- <td align="center">2,26</td>
57
- <td align="center">6,06</td>
58
- </tr>
59
- </tfoot>
60
- <dl>
61
- <dt>Drago</dt>
62
- <dd>A type of rice</dd>
63
- </dl>
64
- <note>
65
- <p>This is a table about rice</p>
66
- </note>
67
- </table>
68
- </foreword>
69
- </preface>
70
- <annex id="Annex"><title>Annex</title>
71
- <table id="AnnexTable">
72
- <name>Another table</name>
73
- <tbody><td>?</td></tbody>
74
- </table>
75
- </annex>
76
- </iso-standard>
77
- INPUT
78
- presxml = <<~OUTPUT
79
- <?xml version='1.0'?>
80
- <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
81
- <preface>
82
- <foreword displayorder='1'>
83
- <table id='tableD-1' alt='tool tip' summary='long desc'>
84
- <name>
85
- Table 1&#xA0;&#x2014; Repeatability and reproducibility of
86
- <em>husked</em>
87
- rice yield
88
- </name>
89
- <thead>
90
- <tr>
91
- <td rowspan='2' align='left'>Description</td>
92
- <td colspan='4' align='center'>Rice sample</td>
93
- </tr>
94
- <tr>
95
- <td align='left'>Arborio</td>
96
- <td align='center'>
97
- Drago
98
- <fn reference='a'>
99
- <p id='_0fe65e9a-5531-408e-8295-eeff35f41a55'>Parboiled rice.</p>
100
- </fn>
101
- </td>
102
- <td align='center'>
103
- Balilla
104
- <fn reference='a'>
105
- <p id='_0fe65e9a-5531-408e-8295-eeff35f41a55'>Parboiled rice.</p>
106
- </fn>
107
- </td>
108
- <td align='center'>Thaibonnet</td>
109
- </tr>
110
- </thead>
111
- <tbody>
112
- <tr>
113
- <th align='left'>Number of laboratories retained after eliminating outliers</th>
114
- <td align='center'>13</td>
115
- <td align='center'>11</td>
116
- <td align='center'>13</td>
117
- <td align='center'>13</td>
118
- </tr>
119
- <tr>
120
- <td align='left'>Mean value, g/100 g</td>
121
- <td align='center'>81,2</td>
122
- <td align='center'>82,0</td>
123
- <td align='center'>81,8</td>
124
- <td align='center'>77,7</td>
125
- </tr>
126
- </tbody>
127
- <tfoot>
128
- <tr>
129
- <td align='left'>
130
- Reproducibility limit,
131
- <stem type='AsciiMath'>R</stem>
132
- (= 2,83
133
- <stem type='AsciiMath'>s_R</stem>
134
- )
135
- </td>
136
- <td align='center'>2,89</td>
137
- <td align='center'>0,57</td>
138
- <td align='center'>2,26</td>
139
- <td align='center'>6,06</td>
140
- </tr>
141
- </tfoot>
142
- <dl>
143
- <dt>Drago</dt>
144
- <dd>A type of rice</dd>
145
- </dl>
146
- <note>
147
- <name>NOTE</name>
148
- <p>This is a table about rice</p>
149
- </note>
150
- </table>
151
- </foreword>
152
- </preface>
153
- <annex id='Annex' displayorder='2'>
154
- <title>
155
- <strong>Annex A</strong>
156
- <br/>
157
- <span class="obligation">(informative)</span>
158
- <br/>
159
- <br/>
160
- <strong>Annex</strong>
161
- </title>
162
- <table id='AnnexTable'>
163
- <name>Table A.1&#xA0;&#x2014; Another table</name>
164
- <tbody>
165
- <td>?</td>
166
- </tbody>
167
- </table>
168
- </annex>
169
- </iso-standard>
170
- OUTPUT
171
-
172
- html = <<~OUTPUT
173
- <main class='main-section'>
174
- <button onclick='topFunction()' id='myBtn' title='Go to top'>Top</button>
175
- <br/>
176
- <div>
177
- <h1 class='ForewordTitle' id="toc0">Foreword</h1>
178
- <p class='TableTitle' style='text-align:center;'>
179
- Table 1&#xA0;&#x2014; Repeatability and reproducibility of
180
- <i>husked</i>
181
- rice yield
182
- </p>
183
- <table id='tableD-1' class='MsoISOTable' style='border-width:1px;border-spacing:0;' title='tool tip'>
184
- <caption>
185
- <span style='display:none'>long desc</span>
186
- </caption>
187
- <thead>
188
- <tr>
189
- <td rowspan='2' style='text-align:left;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;;text-align:center;vertical-align:middle;' scope='col'>Description</td>
190
- <td colspan='4' style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;;text-align:center;vertical-align:middle;' scope='colgroup'>Rice sample</td>
191
- </tr>
192
- <tr>
193
- <td style='text-align:left;border-top:none;border-bottom:solid windowtext 1.5pt;;text-align:center;vertical-align:middle;' scope='col'>Arborio</td>
194
- <td style='text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;;text-align:center;vertical-align:middle;' scope='col'>
195
- Drago
196
- <a href='#tableD-1a' class='TableFootnoteRef'>a</a>
197
- </td>
198
- <td style='text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;;text-align:center;vertical-align:middle;' scope='col'>
199
- Balilla
200
- <a href='#tableD-1a' class='TableFootnoteRef'>a</a>
201
- </td>
202
- <td style='text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;;text-align:center;vertical-align:middle;' scope='col'>Thaibonnet</td>
203
- </tr>
204
- </thead>
205
- <tbody>
206
- <tr>
207
- <th style='font-weight:bold;text-align:left;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;' scope='row'>Number of laboratories retained after eliminating outliers</th>
208
- <td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;'>13</td>
209
- <td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;'>11</td>
210
- <td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;'>13</td>
211
- <td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;'>13</td>
212
- </tr>
213
- <tr>
214
- <td style='text-align:left;border-top:none;border-bottom:solid windowtext 1.5pt;'>Mean value, g/100 g</td>
215
- <td style='text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;'>81,2</td>
216
- <td style='text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;'>82,0</td>
217
- <td style='text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;'>81,8</td>
218
- <td style='text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;'>77,7</td>
219
- </tr>
220
- </tbody>
221
- <tfoot>
222
- <tr>
223
- <td style='text-align:left;border-top:solid windowtext 1.5pt;border-bottom:0pt;'>
224
- Reproducibility limit,
225
- <span class='stem'>(#(R)#)</span>
226
- (= 2,83
227
- <span class='stem'>(#(s_R)#)</span>
228
- )
229
- </td>
230
- <td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:0pt;'>2,89</td>
231
- <td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:0pt;'>0,57</td>
232
- <td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:0pt;'>2,26</td>
233
- <td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:0pt;'>6,06</td>
234
- </tr>
235
- <tr>
236
- <td colspan='5' style='border-top:0pt;border-bottom:solid windowtext 1.5pt;'>
237
- <div class='Note'>
238
- <p>
239
- <span class='note_label'>NOTE</span>
240
- &#xA0; This is a table about rice
241
- </p>
242
- </div>
243
- <div class='TableFootnote'>
244
- <div id='fn:tableD-1a'>
245
- <p id='_0fe65e9a-5531-408e-8295-eeff35f41a55' class='TableFootnote'>
246
- <span>
247
- <span id='tableD-1a' class='TableFootnoteRef'>a</span>
248
- &#xA0;
249
- </span>
250
- Parboiled rice.
251
- </p>
252
- </div>
253
- </div>
254
- </td>
255
- </tr>
256
- </tfoot>
257
- <dl>
258
- <dt>
259
- <p>Drago</p>
260
- </dt>
261
- <dd>A type of rice</dd>
262
- </dl>
263
- </table>
264
- </div>
265
- <p class='zzSTDTitle1'/>
266
- <br/>
267
- <div id='Annex' class='Section3'>
268
- <h1 class='Annex' id='toc1'>
269
- <b>Annex A</b>
270
- <br/>
271
- (informative)
272
- <br/>
273
- <br/>
274
- <b>Annex</b>
275
- </h1>
276
- <p class='TableTitle' style='text-align:center;'>Table A.1&#xA0;&#x2014; Another table</p>
277
- <table id='AnnexTable' class='MsoISOTable' style='border-width:1px;border-spacing:0;'>
278
- <tbody>
279
- <tr/>
280
- </tbody>
281
- </table>
282
- </div>
283
- </main>
284
- OUTPUT
285
-
286
- doc = <<~OUTPUT
287
- <div>
288
- <table class="MsoISOTable" style="mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;" summary="long desc" title="tool tip" xmlns:m="m">
289
- <a id="tableD-1" name="tableD-1"/>
290
- <thead>
291
- <tr>
292
- <td align="center" rowspan="2" 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;" valign="middle">Description</td>
293
- <td align="center" colspan="4" 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;" valign="middle">Rice sample</td>
294
- </tr>
295
- <tr>
296
- <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;" valign="middle">Arborio</td>
297
- <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;" valign="middle">Drago
298
- <a class="TableFootnoteRef" href="#tableD-1a">a</a></td>
299
- <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;" valign="middle">Balilla
300
- <a class="TableFootnoteRef" href="#tableD-1a">a</a></td>
301
- <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;" valign="middle">Thaibonnet</td>
302
- </tr>
303
- </thead>
304
- <tbody>
305
- <tr>
306
- <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>
307
- <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>
308
- <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>
309
- <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>
310
- <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>
311
- </tr>
312
- <tr>
313
- <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>
314
- <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>
315
- <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>
316
- <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>
317
- <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>
318
- </tr>
319
- </tbody>
320
- <tfoot>
321
- <tr>
322
- <td align="left" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:0pt;mso-border-bottom-alt:0pt;">Reproducibility limit,
323
- <span class="stem">
324
- <m:oMath>
325
- <m:r>
326
- <m:t>R</m:t></m:r>
327
- </m:oMath>
328
- </span>(= 2,83
329
- <span class="stem">
330
- <m:oMath>
331
- <m:sSub>
332
- <m:e>
333
- <m:r>
334
- <m:t>s</m:t></m:r>
335
- </m:e>
336
- <m:sub>
337
- <m:r>
338
- <m:t>R</m:t>
339
- </m:r>
340
- </m:sub>
341
- </m:sSub>
342
- </m:oMath>
343
- </span>)</td>
344
- <td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:0pt;mso-border-bottom-alt:0pt;">2,89</td>
345
- <td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:0pt;mso-border-bottom-alt:0pt;">0,57</td>
346
- <td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:0pt;mso-border-bottom-alt:0pt;">2,26</td>
347
- <td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:0pt;mso-border-bottom-alt:0pt;">6,06</td>
348
- </tr>
349
- <tr>
350
- <td colspan="5" style="border-top:0pt;mso-border-top-alt:0pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">
351
- <div class="Note">
352
- <p class="Note">
353
- <span class="note_label">NOTE</span>
354
- <span style="mso-tab-count:1">  </span>This is a table about rice</p>
355
- </div>
356
- <div class="TableFootnote">
357
- <div>
358
- <a id="ftntableD-1a" name="ftntableD-1a"/>
359
- <p class="TableFootnote">
360
- <a id="_0fe65e9a-5531-408e-8295-eeff35f41a55" name="_0fe65e9a-5531-408e-8295-eeff35f41a55"/>
361
- <span>
362
- <span class="TableFootnoteRef">
363
- <a id="tableD-1a" name="tableD-1a"/>a</span>
364
- <span style="mso-tab-count:1">  </span>
365
- </span>Parboiled rice.</p>
366
- </div>
367
- </div>
368
- </td>
369
- </tr>
370
- </tfoot>
371
- <dl>
372
- <dt>
373
- <p align='left' style='margin-left:0pt;text-align:left;' class='MsoNormal'>Drago</p>
374
- </dt>
375
- <dd>A type of rice</dd>
376
- </dl>
377
- </table>
378
- </div>
379
- OUTPUT
380
- doc2 = <<~OUTPUT
381
- <div class='Section3'>
382
- <a name='Annex' id='Annex'/>
383
- <p class='ANNEX'>
384
- <br/>
385
- <span style='font-weight:normal;'>(informative)</span>
386
- <br/>
387
- <br/>
388
- <b>Annex</b>
389
- </p>
390
- <p class='AnnexTableTitle' style='text-align:center;'>Table A.1&#xA0;&#x2014; Another table</p>
391
- <div align='center' class='table_container'>
392
- <table class='MsoISOTable' style='mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
393
- <a name='AnnexTable' id='AnnexTable'/>
394
- <tbody>
395
- <tr/>
396
- </tbody>
397
- </table>
398
- </div>
399
- </div>
400
- OUTPUT
401
- expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
402
- .convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
403
- IsoDoc::Iso::HtmlConvert.new({}).convert("test", presxml, false)
404
- expect(File.exist?("test.html")).to be true
405
- out = File.read("test.html")
406
- .sub(/^.*<main /m, "<main ")
407
- .sub(%r{</main>.*$}m, "</main>")
408
- expect(xmlpp(out)).to be_equivalent_to xmlpp(html)
409
- IsoDoc::Iso::WordConvert.new({}).convert("test", presxml, false)
410
- expect(File.exist?("test.doc")).to be true
411
- out = File.read("test.doc")
412
- .sub(/^.+?<table /m, '<table xmlns:m="m" ')
413
- .sub(%r{</div>\s*<p class="MsoNormal">.*$}m, "")
414
- expect(xmlpp("<div>#{out}")).to be_equivalent_to xmlpp(doc)
415
- out = File.read("test.doc")
416
- .sub(/^.+?<div class="Section3"/m, '<div class="Section3"')
417
- .sub(%r{</div>\s*<br[^>]+>\s*<div class="colophon".*$}m, "")
418
- expect(xmlpp(out)).to be_equivalent_to xmlpp(doc2)
419
- end
420
- end