isodoc 1.5.4 → 1.6.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +6 -4
  3. data/Gemfile +2 -2
  4. data/Rakefile +2 -2
  5. data/bin/rspec +1 -2
  6. data/isodoc.gemspec +11 -11
  7. data/lib/isodoc-yaml/i18n-ar.yaml +152 -0
  8. data/lib/isodoc-yaml/i18n-de.yaml +149 -0
  9. data/lib/isodoc-yaml/i18n-es.yaml +151 -0
  10. data/lib/isodoc-yaml/i18n-ru.yaml +154 -0
  11. data/lib/isodoc/base_style/all.css +7 -0
  12. data/lib/isodoc/base_style/metanorma_word.css +7 -0
  13. data/lib/isodoc/base_style/metanorma_word.scss +8 -0
  14. data/lib/isodoc/base_style/reset.css +7 -0
  15. data/lib/isodoc/base_style/reset.scss +9 -0
  16. data/lib/isodoc/base_style/scripts.html +187 -0
  17. data/lib/isodoc/class_utils.rb +6 -5
  18. data/lib/isodoc/common.rb +2 -0
  19. data/lib/isodoc/convert.rb +30 -17
  20. data/lib/isodoc/css.rb +42 -28
  21. data/lib/isodoc/function/blocks.rb +21 -4
  22. data/lib/isodoc/function/blocks_example_note.rb +2 -2
  23. data/lib/isodoc/function/cleanup.rb +1 -2
  24. data/lib/isodoc/function/form.rb +51 -0
  25. data/lib/isodoc/function/inline.rb +32 -10
  26. data/lib/isodoc/function/references.rb +55 -42
  27. data/lib/isodoc/function/table.rb +1 -0
  28. data/lib/isodoc/function/to_word_html.rb +29 -28
  29. data/lib/isodoc/function/utils.rb +41 -38
  30. data/lib/isodoc/gem_tasks.rb +30 -31
  31. data/lib/isodoc/html_convert.rb +6 -4
  32. data/lib/isodoc/html_function/form.rb +62 -0
  33. data/lib/isodoc/html_function/postprocess.rb +35 -76
  34. data/lib/isodoc/html_function/postprocess_footnotes.rb +59 -0
  35. data/lib/isodoc/i18n.rb +33 -31
  36. data/lib/isodoc/pdf_convert.rb +1 -3
  37. data/lib/isodoc/presentation_function/bibdata.rb +13 -10
  38. data/lib/isodoc/presentation_function/block.rb +17 -8
  39. data/lib/isodoc/presentation_function/inline.rb +75 -118
  40. data/lib/isodoc/presentation_function/math.rb +84 -0
  41. data/lib/isodoc/presentation_function/section.rb +20 -22
  42. data/lib/isodoc/presentation_xml_convert.rb +2 -1
  43. data/lib/isodoc/sassc_importer.rb +1 -1
  44. data/lib/isodoc/version.rb +1 -1
  45. data/lib/isodoc/word_function/body.rb +28 -24
  46. data/lib/isodoc/word_function/footnotes.rb +22 -15
  47. data/lib/isodoc/word_function/postprocess.rb +16 -6
  48. data/lib/isodoc/xref.rb +10 -11
  49. data/lib/isodoc/xref/xref_counter.rb +32 -17
  50. data/lib/isodoc/xref/xref_gen.rb +45 -32
  51. data/lib/isodoc/xref/xref_sect_gen.rb +33 -31
  52. data/lib/isodoc/xslfo_convert.rb +36 -25
  53. data/spec/assets/html_override.css +1 -0
  54. data/spec/assets/word_override.css +1 -0
  55. data/spec/isodoc/blocks_spec.rb +2518 -2570
  56. data/spec/isodoc/cleanup_spec.rb +1107 -1109
  57. data/spec/isodoc/footnotes_spec.rb +1 -16
  58. data/spec/isodoc/form_spec.rb +156 -0
  59. data/spec/isodoc/i18n_spec.rb +984 -972
  60. data/spec/isodoc/inline_spec.rb +984 -920
  61. data/spec/isodoc/lists_spec.rb +316 -315
  62. data/spec/isodoc/postproc_spec.rb +1692 -1538
  63. data/spec/isodoc/presentation_xml_spec.rb +345 -342
  64. data/spec/isodoc/ref_spec.rb +718 -723
  65. data/spec/isodoc/section_spec.rb +910 -902
  66. data/spec/isodoc/table_spec.rb +566 -556
  67. data/spec/isodoc/terms_spec.rb +252 -256
  68. data/spec/isodoc/xref_spec.rb +3040 -2985
  69. data/spec/isodoc/xslfo_convert_spec.rb +39 -0
  70. data/spec/spec_helper.rb +30 -29
  71. metadata +80 -70
  72. data/.rubocop.ribose.yml +0 -65
  73. data/.rubocop.tb.yml +0 -650
  74. data/lib/twitter-cldr/patch.rb +0 -39
@@ -2,345 +2,346 @@ require "spec_helper"
2
2
 
3
3
  RSpec.describe IsoDoc do
4
4
  it "processes unordered lists" do
5
- expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
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
- #{HTML_HDR}
20
- <br/>
21
- <div>
22
- <h1 class="ForewordTitle">Foreword</h1>
23
- <ul id="_61961034-0fb1-436b-b281-828857a59ddb" style="page-break-after: avoid;page-break-inside: avoid;">
24
- <li>
25
- <p id="_cb370dd3-8463-4ec7-aa1a-96f644e2e9a2">updated normative references;</p>
26
- </li>
27
- <li>
28
- <p id="_60eb765c-1f6c-418a-8016-29efa06bf4f9">deletion of 4.3.</p>
29
- </li>
30
- </ul>
31
- </div>
32
- <p class="zzSTDTitle1"/>
33
- </div>
34
- </body>
35
- </html>
36
- OUTPUT
5
+ expect(xmlpp(IsoDoc::HtmlConvert.new({})
6
+ .convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
7
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
8
+ <preface><foreword>
9
+ <ul id="_61961034-0fb1-436b-b281-828857a59ddb" keep-with-next="true" keep-lines-together="true">
10
+ <li>
11
+ <p id="_cb370dd3-8463-4ec7-aa1a-96f644e2e9a2">updated normative references;</p>
12
+ </li>
13
+ <li>
14
+ <p id="_60eb765c-1f6c-418a-8016-29efa06bf4f9">deletion of 4.3.</p>
15
+ </li>
16
+ </ul>
17
+ </foreword></preface>
18
+ </iso-standard>
19
+ INPUT
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
37
38
  end
38
39
 
39
40
  it "processes unordered checklists" do
40
- expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
41
- <iso-standard xmlns="http://riboseinc.com/isoxml">
42
- <preface><foreword>
43
- <ul id="_61961034-0fb1-436b-b281-828857a59ddb">
44
- <li checkedcheckbox="true" uncheckedcheckbox="false">
45
- <p id="_cb370dd3-8463-4ec7-aa1a-96f644e2e9a2">updated normative references;</p>
46
- </li>
47
- <li checkedcheckbox="false" uncheckedcheckbox="true">
48
- <p id="_60eb765c-1f6c-418a-8016-29efa06bf4f9">deletion of 4.3.</p>
49
- </li>
50
- </ul>
51
- </foreword></preface>
52
- </iso-standard>
53
- INPUT
54
- #{HTML_HDR}
55
- <br/>
56
- <div>
57
- <h1 class='ForewordTitle'>Foreword</h1>
58
- <ul id='_61961034-0fb1-436b-b281-828857a59ddb'>
59
- <li>
60
- <span class='zzMoveToFollowing'>
61
- <input type='checkbox'/>
62
- </span>
63
- <p id='_cb370dd3-8463-4ec7-aa1a-96f644e2e9a2'>updated normative references;</p>
64
- </li>
65
- <li>
66
- <span class='zzMoveToFollowing'>
67
- <input type='checkbox' checked='checked'/>
68
- </span>
69
- <p id='_60eb765c-1f6c-418a-8016-29efa06bf4f9'>deletion of 4.3.</p>
70
- </li>
71
- </ul>
72
- </div>
73
- <p class='zzSTDTitle1'/>
74
- </div>
75
- </body>
76
- </html>
77
- OUTPUT
41
+ expect(xmlpp(IsoDoc::HtmlConvert.new({})
42
+ .convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
43
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
44
+ <preface><foreword>
45
+ <ul id="_61961034-0fb1-436b-b281-828857a59ddb">
46
+ <li checkedcheckbox="true" uncheckedcheckbox="false">
47
+ <p id="_cb370dd3-8463-4ec7-aa1a-96f644e2e9a2">updated normative references;</p>
48
+ </li>
49
+ <li checkedcheckbox="false" uncheckedcheckbox="true">
50
+ <p id="_60eb765c-1f6c-418a-8016-29efa06bf4f9">deletion of 4.3.</p>
51
+ </li>
52
+ </ul>
53
+ </foreword></preface>
54
+ </iso-standard>
55
+ INPUT
56
+ #{HTML_HDR}
57
+ <br/>
58
+ <div>
59
+ <h1 class='ForewordTitle'>Foreword</h1>
60
+ <ul id='_61961034-0fb1-436b-b281-828857a59ddb'>
61
+ <li>
62
+ <span class='zzMoveToFollowing'>
63
+ <input type='checkbox'/>
64
+ </span>
65
+ <p id='_cb370dd3-8463-4ec7-aa1a-96f644e2e9a2'>updated normative references;</p>
66
+ </li>
67
+ <li>
68
+ <span class='zzMoveToFollowing'>
69
+ <input type='checkbox' checked='checked'/>
70
+ </span>
71
+ <p id='_60eb765c-1f6c-418a-8016-29efa06bf4f9'>deletion of 4.3.</p>
72
+ </li>
73
+ </ul>
74
+ </div>
75
+ <p class='zzSTDTitle1'/>
76
+ </div>
77
+ </body>
78
+ </html>
79
+ OUTPUT
78
80
  end
79
81
 
80
- it "processes unordered checklists (Word)" do
81
- expect(xmlpp(IsoDoc::WordConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
82
- <iso-standard xmlns="http://riboseinc.com/isoxml">
83
- <preface><foreword>
84
- <ul id="_61961034-0fb1-436b-b281-828857a59ddb">
85
- <li checkedcheckbox="true" uncheckedcheckbox="false">
86
- <p id="_cb370dd3-8463-4ec7-aa1a-96f644e2e9a2">updated normative references;</p>
87
- </li>
88
- <li checkedcheckbox="false" uncheckedcheckbox="true">
89
- <p id="_60eb765c-1f6c-418a-8016-29efa06bf4f9">deletion of 4.3.</p>
90
- </li>
91
- </ul>
92
- </foreword></preface>
93
- </iso-standard>
94
- INPUT
95
- <html xmlns:epub="http://www.idpf.org/2007/ops" lang="en">
96
- <head><style/></head>
97
- <body lang='EN-US' link='blue' vlink='#954F72'>
98
- <div class='WordSection1'>
99
- <p>&#160;</p>
100
- </div>
101
- <p>
102
- <br clear='all' class='section'/>
103
- </p>
104
- <div class='WordSection2'>
105
- <p>
106
- <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
107
- </p>
108
- <div>
109
- <h1 class='ForewordTitle'>Foreword</h1>
110
- <ul id='_61961034-0fb1-436b-b281-828857a59ddb'>
111
- <li>
112
- <span class='zzMoveToFollowing'>&#9745; </span>
113
- <p id='_cb370dd3-8463-4ec7-aa1a-96f644e2e9a2'>updated normative references;</p>
114
- </li>
115
- <li>
116
- <span class='zzMoveToFollowing'>&#9744; </span>
117
- <p id='_60eb765c-1f6c-418a-8016-29efa06bf4f9'>deletion of 4.3.</p>
118
- </li>
119
- </ul>
120
- </div>
121
- <p>&#160;</p>
122
- </div>
123
- <p>
124
- <br clear='all' class='section'/>
125
- </p>
126
- <div class='WordSection3'>
127
- <p class='zzSTDTitle1'/>
128
- </div>
129
- </body>
130
- </html>
131
- OUTPUT
82
+ it "processes unordered checklists (Word)" do
83
+ expect(xmlpp(IsoDoc::WordConvert.new({})
84
+ .convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
85
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
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>&#160;</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'>&#9745; </span>
116
+ <p id='_cb370dd3-8463-4ec7-aa1a-96f644e2e9a2'>updated normative references;</p>
117
+ </li>
118
+ <li>
119
+ <span class='zzMoveToFollowing'>&#9744; </span>
120
+ <p id='_60eb765c-1f6c-418a-8016-29efa06bf4f9'>deletion of 4.3.</p>
121
+ </li>
122
+ </ul>
123
+ </div>
124
+ <p>&#160;</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
132
135
  end
133
136
 
134
-
135
137
  it "processes ordered lists" do
136
- expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
137
- <iso-standard xmlns="http://riboseinc.com/isoxml">
138
- <preface><foreword>
139
- <ol id="_ae34a226-aab4-496d-987b-1aa7b6314026" type="alphabet" keep-with-next="true" keep-lines-together="true">
140
- <li>
141
- <p id="_0091a277-fb0e-424a-aea8-f0001303fe78">all information necessary for the complete identification of the sample;</p>
142
- </li>
143
- <ol>
144
- <li>
145
- <p id="_8a7b6299-db05-4ff8-9de7-ff019b9017b2">a reference to this document (i.e. ISO 17301-1);</p>
146
- </li>
147
- <ol>
148
- <li>
149
- <p id="_ea248b7f-839f-460f-a173-a58a830b2abe">the sampling method used;</p>
150
- </li>
151
- </ol>
152
- </ol>
153
- </ol>
154
- </foreword></preface>
155
- </iso-standard>
156
- INPUT
157
- #{HTML_HDR}
158
- <br/>
159
- <div>
160
- <h1 class="ForewordTitle">Foreword</h1>
161
- <ol type="a" id="_ae34a226-aab4-496d-987b-1aa7b6314026" style="page-break-after: avoid;page-break-inside: avoid;">
162
- <li>
163
- <p id="_0091a277-fb0e-424a-aea8-f0001303fe78">all information necessary for the complete identification of the sample;</p>
164
- </li>
165
- <ol type="1">
166
- <li>
167
- <p id="_8a7b6299-db05-4ff8-9de7-ff019b9017b2">a reference to this document (i.e. ISO 17301-1);</p>
168
- </li>
169
- <ol type="i">
170
- <li>
171
- <p id="_ea248b7f-839f-460f-a173-a58a830b2abe">the sampling method used;</p>
172
- </li>
173
- </ol>
174
- </ol>
175
- </ol>
176
- </div>
177
- <p class="zzSTDTitle1"/>
178
- </div>
179
- </body>
180
- </html>
181
- OUTPUT
138
+ expect(xmlpp(IsoDoc::HtmlConvert.new({})
139
+ .convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
140
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
141
+ <preface><foreword>
142
+ <ol id="_ae34a226-aab4-496d-987b-1aa7b6314026" type="alphabet" keep-with-next="true" keep-lines-together="true">
143
+ <li>
144
+ <p id="_0091a277-fb0e-424a-aea8-f0001303fe78">all information necessary for the complete identification of the sample;</p>
145
+ </li>
146
+ <ol>
147
+ <li>
148
+ <p id="_8a7b6299-db05-4ff8-9de7-ff019b9017b2">a reference to this document (i.e. ISO 17301-1);</p>
149
+ </li>
150
+ <ol>
151
+ <li>
152
+ <p id="_ea248b7f-839f-460f-a173-a58a830b2abe">the sampling method used;</p>
153
+ </li>
154
+ </ol>
155
+ </ol>
156
+ </ol>
157
+ </foreword></preface>
158
+ </iso-standard>
159
+ INPUT
160
+ #{HTML_HDR}
161
+ <br/>
162
+ <div>
163
+ <h1 class="ForewordTitle">Foreword</h1>
164
+ <ol type="a" id="_ae34a226-aab4-496d-987b-1aa7b6314026" style="page-break-after: avoid;page-break-inside: avoid;">
165
+ <li>
166
+ <p id="_0091a277-fb0e-424a-aea8-f0001303fe78">all information necessary for the complete identification of the sample;</p>
167
+ </li>
168
+ <ol type="1">
169
+ <li>
170
+ <p id="_8a7b6299-db05-4ff8-9de7-ff019b9017b2">a reference to this document (i.e. ISO 17301-1);</p>
171
+ </li>
172
+ <ol type="i">
173
+ <li>
174
+ <p id="_ea248b7f-839f-460f-a173-a58a830b2abe">the sampling method used;</p>
175
+ </li>
176
+ </ol>
177
+ </ol>
178
+ </ol>
179
+ </div>
180
+ <p class="zzSTDTitle1"/>
181
+ </div>
182
+ </body>
183
+ </html>
184
+ OUTPUT
182
185
  end
183
186
 
184
187
  it "processes Roman Upper ordered lists" do
185
- expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
186
- <iso-standard xmlns="http://riboseinc.com/isoxml">
187
- <preface><foreword>
188
- <ol id="_ae34a226-aab4-496d-987b-1aa7b6314026" type="roman_upper">
189
- <li id="_ae34a226-aab4-496d-987b-1aa7b6314027">
190
- <p id="_0091a277-fb0e-424a-aea8-f0001303fe78">all information necessary for the complete identification of the sample;</p>
191
- </li>
192
- <li>
193
- <p id="_8a7b6299-db05-4ff8-9de7-ff019b9017b2">a reference to this document (i.e. ISO 17301-1);</p>
194
- </li>
195
- <li>
196
- <p id="_ea248b7f-839f-460f-a173-a58a830b2abe">the sampling method used;</p>
197
- </li>
198
- </ol>
199
- </foreword></preface>
200
- </iso-standard>
201
- INPUT
202
- #{HTML_HDR}
203
- <br/>
204
- <div>
205
- <h1 class="ForewordTitle">Foreword</h1>
206
- <ol type="I" id="_ae34a226-aab4-496d-987b-1aa7b6314026">
207
- <li id="_ae34a226-aab4-496d-987b-1aa7b6314027">
208
- <p id="_0091a277-fb0e-424a-aea8-f0001303fe78">all information necessary for the complete identification of the sample;</p>
209
- </li>
210
- <li>
211
- <p id="_8a7b6299-db05-4ff8-9de7-ff019b9017b2">a reference to this document (i.e. ISO 17301-1);</p>
212
- </li>
213
- <li>
214
- <p id="_ea248b7f-839f-460f-a173-a58a830b2abe">the sampling method used;</p>
215
- </li>
216
- </ol>
217
- </div>
218
- <p class="zzSTDTitle1"/>
219
- </div>
220
- </body>
221
- </html>
222
- OUTPUT
188
+ expect(xmlpp(IsoDoc::HtmlConvert.new({})
189
+ .convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
190
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
191
+ <preface><foreword>
192
+ <ol id="_ae34a226-aab4-496d-987b-1aa7b6314026" type="roman_upper">
193
+ <li id="_ae34a226-aab4-496d-987b-1aa7b6314027">
194
+ <p id="_0091a277-fb0e-424a-aea8-f0001303fe78">all information necessary for the complete identification of the sample;</p>
195
+ </li>
196
+ <li>
197
+ <p id="_8a7b6299-db05-4ff8-9de7-ff019b9017b2">a reference to this document (i.e. ISO 17301-1);</p>
198
+ </li>
199
+ <li>
200
+ <p id="_ea248b7f-839f-460f-a173-a58a830b2abe">the sampling method used;</p>
201
+ </li>
202
+ </ol>
203
+ </foreword></preface>
204
+ </iso-standard>
205
+ INPUT
206
+ #{HTML_HDR}
207
+ <br/>
208
+ <div>
209
+ <h1 class="ForewordTitle">Foreword</h1>
210
+ <ol type="I" id="_ae34a226-aab4-496d-987b-1aa7b6314026">
211
+ <li id="_ae34a226-aab4-496d-987b-1aa7b6314027">
212
+ <p id="_0091a277-fb0e-424a-aea8-f0001303fe78">all information necessary for the complete identification of the sample;</p>
213
+ </li>
214
+ <li>
215
+ <p id="_8a7b6299-db05-4ff8-9de7-ff019b9017b2">a reference to this document (i.e. ISO 17301-1);</p>
216
+ </li>
217
+ <li>
218
+ <p id="_ea248b7f-839f-460f-a173-a58a830b2abe">the sampling method used;</p>
219
+ </li>
220
+ </ol>
221
+ </div>
222
+ <p class="zzSTDTitle1"/>
223
+ </div>
224
+ </body>
225
+ </html>
226
+ OUTPUT
223
227
  end
224
228
 
225
229
  it "processes definition lists" do
226
230
  expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
227
- <iso-standard xmlns="http://riboseinc.com/isoxml">
228
- <preface><foreword>
229
- <dl id="_732d3f57-4f88-40bf-9ae9-633891edc395" keep-with-next="true" keep-lines-together="true">
230
- <dt>
231
- W
232
- </dt>
233
- <dd>
234
- <p id="_05d81174-3a41-44af-94d8-c78b8d2e175d">mass fraction of gelatinized kernels, expressed in per cent</p>
235
- </dd>
236
- <dt><stem type="AsciiMath">w</stem></dt>
237
- <dd><p>??</p></dd>
238
- <note><p>This is a note</p></note>
239
- </dl>
240
- </foreword></preface>
241
- </iso-standard>
231
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
232
+ <preface><foreword>
233
+ <dl id="_732d3f57-4f88-40bf-9ae9-633891edc395" keep-with-next="true" keep-lines-together="true">
234
+ <dt>
235
+ W
236
+ </dt>
237
+ <dd>
238
+ <p id="_05d81174-3a41-44af-94d8-c78b8d2e175d">mass fraction of gelatinized kernels, expressed in per cent</p>
239
+ </dd>
240
+ <dt><stem type="AsciiMath">w</stem></dt>
241
+ <dd><p>??</p></dd>
242
+ <note><p>This is a note</p></note>
243
+ </dl>
244
+ </foreword></preface>
245
+ </iso-standard>
242
246
  INPUT
243
- #{HTML_HDR}
244
- <br/>
245
- <div>
246
- <h1 class="ForewordTitle">Foreword</h1>
247
- <dl id="_732d3f57-4f88-40bf-9ae9-633891edc395" style="page-break-after: avoid;page-break-inside: avoid;">
248
- <dt>
249
- <p>
250
- W
251
- </p>
252
- </dt>
253
- <dd>
254
- <p id="_05d81174-3a41-44af-94d8-c78b8d2e175d">mass fraction of gelatinized kernels, expressed in per cent</p>
255
- </dd>
256
- <dt>
257
- <span class="stem">(#(w)#)</span>
258
- </dt>
259
- <dd>
260
- <p>??</p>
261
- </dd>
262
- </dl>
263
- <div class="Note">
264
- <p>&#160; This is a note</p>
265
- </div>
266
- </div>
267
- <p class="zzSTDTitle1"/>
268
- </div>
269
- </body>
270
- </html>
247
+ #{HTML_HDR}
248
+ <br/>
249
+ <div>
250
+ <h1 class="ForewordTitle">Foreword</h1>
251
+ <dl id="_732d3f57-4f88-40bf-9ae9-633891edc395" style="page-break-after: avoid;page-break-inside: avoid;">
252
+ <dt>
253
+ <p>
254
+ W
255
+ </p>
256
+ </dt>
257
+ <dd>
258
+ <p id="_05d81174-3a41-44af-94d8-c78b8d2e175d">mass fraction of gelatinized kernels, expressed in per cent</p>
259
+ </dd>
260
+ <dt>
261
+ <span class="stem">(#(w)#)</span>
262
+ </dt>
263
+ <dd>
264
+ <p>??</p>
265
+ </dd>
266
+ </dl>
267
+ <div class="Note">
268
+ <p>&#160; This is a note</p>
269
+ </div>
270
+ </div>
271
+ <p class="zzSTDTitle1"/>
272
+ </div>
273
+ </body>
274
+ </html>
271
275
  OUTPUT
272
276
  end
273
277
 
274
278
  it "processes definition lists (Word)" do
275
279
  expect(xmlpp(IsoDoc::WordConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
276
- <iso-standard xmlns="http://riboseinc.com/isoxml">
277
- <preface><foreword>
278
- <dl id="_732d3f57-4f88-40bf-9ae9-633891edc395">
279
- <dt>
280
- W
281
- </dt>
282
- <dd>
283
- <p id="_05d81174-3a41-44af-94d8-c78b8d2e175d">mass fraction of gelatinized kernels, expressed in per cent</p>
284
- </dd>
285
- <dt><stem type="AsciiMath">w</stem></dt>
286
- <dd><p>??</p></dd>
287
- <note><p>This is a note</p></note>
288
- </dl>
289
- </foreword></preface>
290
- </iso-standard>
280
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
281
+ <preface><foreword>
282
+ <dl id="_732d3f57-4f88-40bf-9ae9-633891edc395">
283
+ <dt>
284
+ W
285
+ </dt>
286
+ <dd>
287
+ <p id="_05d81174-3a41-44af-94d8-c78b8d2e175d">mass fraction of gelatinized kernels, expressed in per cent</p>
288
+ </dd>
289
+ <dt><stem type="AsciiMath">w</stem></dt>
290
+ <dd><p>??</p></dd>
291
+ <note><p>This is a note</p></note>
292
+ </dl>
293
+ </foreword></preface>
294
+ </iso-standard>
291
295
  INPUT
292
- <html xmlns:epub="http://www.idpf.org/2007/ops" lang="en">
293
- <head><style/></head>
294
- <body lang="EN-US" link="blue" vlink="#954F72">
295
- <div class="WordSection1">
296
- <p>&#160;</p>
297
- </div>
298
- <p><br clear="all" class="section"/></p>
299
- <div class="WordSection2">
300
- <p><br clear="all" style="mso-special-character:line-break;page-break-before:always"/></p>
301
- <div>
302
- <h1 class="ForewordTitle">Foreword</h1>
303
- <table class="dl">
304
- <tr>
305
- <td valign="top" align="left">
306
- <p align="left" style="margin-left:0pt;text-align:left;">
307
- W
308
- </p>
309
- </td>
310
- <td valign="top">
311
- <p id="_05d81174-3a41-44af-94d8-c78b8d2e175d">mass fraction of gelatinized kernels, expressed in per cent</p>
312
- </td>
313
- </tr>
314
- <tr>
315
- <td valign="top" align="left">
296
+ <html xmlns:epub="http://www.idpf.org/2007/ops" lang="en">
297
+ <head><style/></head>
298
+ <body lang="EN-US" link="blue" vlink="#954F72">
299
+ <div class="WordSection1">
300
+ <p>&#160;</p>
301
+ </div>
302
+ <p><br clear="all" class="section"/></p>
303
+ <div class="WordSection2">
304
+ <p><br clear="all" style="mso-special-character:line-break;page-break-before:always"/></p>
305
+ <div>
306
+ <h1 class="ForewordTitle">Foreword</h1>
307
+ <table class="dl">
308
+ <tr>
309
+ <td valign="top" align="left">
316
310
  <p align="left" style="margin-left:0pt;text-align:left;">
317
- <span class="stem">(#(w)#)</span>
318
- </p>
319
- </td>
320
- <td valign="top">
321
- <p>??</p>
322
- </td>
323
- </tr>
324
- <tr>
325
- <td colspan="2">
326
- <div class="Note">
327
- <p class="Note"><span class="note_label"/><span style="mso-tab-count:1">&#160; </span>This is a note</p>
328
- </div>
329
- </td>
330
- </tr>
331
- </table>
332
- </div>
333
- <p>&#160;</p>
334
- </div>
335
- <p><br clear="all" class="section"/></p>
336
- <div class="WordSection3">
337
- <p class="zzSTDTitle1"/>
311
+ W
312
+ </p>
313
+ </td>
314
+ <td valign="top">
315
+ <p id="_05d81174-3a41-44af-94d8-c78b8d2e175d">mass fraction of gelatinized kernels, expressed in per cent</p>
316
+ </td>
317
+ </tr>
318
+ <tr>
319
+ <td valign="top" align="left">
320
+ <p align="left" style="margin-left:0pt;text-align:left;">
321
+ <span class="stem">(#(w)#)</span>
322
+ </p>
323
+ </td>
324
+ <td valign="top">
325
+ <p>??</p>
326
+ </td>
327
+ </tr>
328
+ <tr>
329
+ <td colspan="2">
330
+ <div class="Note">
331
+ <p class="Note"><span class="note_label"/><span style="mso-tab-count:1">&#160; </span>This is a note</p>
332
+ </div>
333
+ </td>
334
+ </tr>
335
+ </table>
338
336
  </div>
339
- </body>
340
- </html>
337
+ <p>&#160;</p>
338
+ </div>
339
+ <p><br clear="all" class="section"/></p>
340
+ <div class="WordSection3">
341
+ <p class="zzSTDTitle1"/>
342
+ </div>
343
+ </body>
344
+ </html>
341
345
  OUTPUT
342
346
  end
343
-
344
-
345
347
  end
346
-