isodoc 1.6.2 → 1.6.7

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 (58) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +2 -12
  3. data/.hound.yml +3 -1
  4. data/.rubocop.yml +4 -6
  5. data/Rakefile +2 -2
  6. data/isodoc.gemspec +3 -2
  7. data/lib/isodoc-yaml/i18n-en.yaml +1 -0
  8. data/lib/isodoc-yaml/i18n-fr.yaml +1 -0
  9. data/lib/isodoc-yaml/i18n-zh-Hans.yaml +1 -0
  10. data/lib/isodoc.rb +0 -2
  11. data/lib/isodoc/convert.rb +7 -1
  12. data/lib/isodoc/function/blocks.rb +5 -4
  13. data/lib/isodoc/function/cleanup.rb +52 -43
  14. data/lib/isodoc/function/inline.rb +7 -7
  15. data/lib/isodoc/function/references.rb +32 -51
  16. data/lib/isodoc/function/section.rb +28 -16
  17. data/lib/isodoc/function/table.rb +21 -22
  18. data/lib/isodoc/function/terms.rb +6 -7
  19. data/lib/isodoc/function/to_word_html.rb +6 -3
  20. data/lib/isodoc/function/utils.rb +181 -163
  21. data/lib/isodoc/gem_tasks.rb +8 -9
  22. data/lib/isodoc/headlesshtml_convert.rb +8 -7
  23. data/lib/isodoc/html_convert.rb +5 -1
  24. data/lib/isodoc/html_function/comments.rb +14 -12
  25. data/lib/isodoc/html_function/footnotes.rb +14 -7
  26. data/lib/isodoc/html_function/html.rb +30 -26
  27. data/lib/isodoc/html_function/postprocess.rb +191 -182
  28. data/lib/isodoc/html_function/sectionsplit.rb +230 -0
  29. data/lib/isodoc/metadata.rb +22 -20
  30. data/lib/isodoc/metadata_contributor.rb +31 -28
  31. data/lib/isodoc/pdf_convert.rb +11 -13
  32. data/lib/isodoc/presentation_function/bibdata.rb +61 -30
  33. data/lib/isodoc/presentation_function/inline.rb +34 -27
  34. data/lib/isodoc/presentation_function/section.rb +54 -19
  35. data/lib/isodoc/presentation_xml_convert.rb +2 -0
  36. data/lib/isodoc/sassc_importer.rb +1 -1
  37. data/lib/isodoc/version.rb +1 -1
  38. data/lib/isodoc/word_function/postprocess.rb +50 -36
  39. data/lib/isodoc/xref.rb +2 -0
  40. data/lib/isodoc/xref/xref_counter.rb +1 -2
  41. data/lib/isodoc/xref/xref_gen.rb +21 -14
  42. data/lib/isodoc/xref/xref_gen_seq.rb +60 -35
  43. data/lib/isodoc/xref/xref_sect_gen.rb +15 -15
  44. data/spec/assets/scripts_override.html +3 -0
  45. data/spec/isodoc/blocks_spec.rb +624 -997
  46. data/spec/isodoc/cleanup_spec.rb +40 -42
  47. data/spec/isodoc/i18n_spec.rb +694 -821
  48. data/spec/isodoc/inline_spec.rb +482 -328
  49. data/spec/isodoc/metadata_spec.rb +384 -379
  50. data/spec/isodoc/postproc_spec.rb +163 -55
  51. data/spec/isodoc/presentation_xml_spec.rb +355 -278
  52. data/spec/isodoc/ref_spec.rb +5 -5
  53. data/spec/isodoc/section_spec.rb +216 -199
  54. data/spec/isodoc/sectionsplit_spec.rb +190 -0
  55. data/spec/isodoc/table_spec.rb +41 -42
  56. data/spec/isodoc/terms_spec.rb +84 -84
  57. data/spec/isodoc/xref_spec.rb +974 -932
  58. metadata +22 -5
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  RSpec.describe IsoDoc do
4
4
  it "droplocs xrefs" do
5
- expect(xmlpp(IsoDoc::PresentationXMLConvert.new({ i18nyaml: "spec/assets/i18n.yaml" }).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
5
+ input = <<~INPUT
6
6
  <iso-standard xmlns="http://riboseinc.com/isoxml">
7
7
  <sections>
8
8
  <clause id="A">
@@ -16,15 +16,16 @@ RSpec.describe IsoDoc do
16
16
  </sections>
17
17
  </iso-standard>
18
18
  INPUT
19
+ output = <<~OUTPUT
19
20
  <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
20
21
  <sections>
21
- <clause id='A'>
22
+ <clause id='A' displayorder="1">
22
23
  <title>1.</title>
23
24
  <formula id='B'>
24
25
  <name>1</name>
25
26
  </formula>
26
27
  </clause>
27
- <clause id='C'>
28
+ <clause id='C' displayorder="2">
28
29
  <title>2.</title>
29
30
  <p>
30
31
  This is
@@ -41,10 +42,13 @@ RSpec.describe IsoDoc do
41
42
  </sections>
42
43
  </iso-standard>
43
44
  OUTPUT
45
+ expect(xmlpp(IsoDoc::PresentationXMLConvert
46
+ .new({ i18nyaml: "spec/assets/i18n.yaml" })
47
+ .convert("test", input, true))).to be_equivalent_to xmlpp(output)
44
48
  end
45
49
 
46
- it "processes inline formatting (HTML)" do
47
- expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
50
+ it "processes inline formatting" do
51
+ input = <<~INPUT
48
52
  <iso-standard xmlns="http://riboseinc.com/isoxml">
49
53
  <preface><foreword>
50
54
  <p>
@@ -56,69 +60,55 @@ RSpec.describe IsoDoc do
56
60
  <sections>
57
61
  </iso-standard>
58
62
  INPUT
59
- #{HTML_HDR}
60
- <br/>
61
- <div>
62
- <h1 class="ForewordTitle">Foreword</h1>
63
- <p>
64
- <i>A</i> <b>B</b> <sup>C</sup> <sub>D</sub> <tt>E</tt>
65
- <s>F</s> <span style="font-variant:small-caps;">G</span> <span class="keyword">I</span> <br/> <hr/>
66
- <a id="H"/> <br/> <br/>
67
- <span style='text-decoration: underline;'>J</span>
68
- </p>
69
- </div>
70
- <p class="zzSTDTitle1"/>
71
- </div>
72
- </body>
73
- </html>
63
+ html = <<~OUTPUT
64
+ <div>
65
+ <h1 class="ForewordTitle">Foreword</h1>
66
+ <p>
67
+ <i>A</i> <b>B</b> <sup>C</sup> <sub>D</sub> <tt>E</tt>
68
+ <s>F</s> <span style="font-variant:small-caps;">G</span> <span class="keyword">I</span> <br/> <hr/>
69
+ <a id="H"/> <br/> <br/>
70
+ <span style='text-decoration: underline;'>J</span>
71
+ </p>
72
+ </div>
74
73
  OUTPUT
75
- end
76
74
 
77
- it "processes inline formatting (Word)" do
78
- expect(xmlpp(IsoDoc::WordConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
79
- <iso-standard xmlns="http://riboseinc.com/isoxml">
80
- <preface/><sections><clause>
81
- <p>
82
- <em>A</em> <strong>B</strong> <sup>C</sup> <sub>D</sub> <tt>E</tt>
83
- <strike>F</strike> <smallcap>G</smallcap> <keyword>I</keyword> <br/> <hr/>
84
- <bookmark id="H"/> <pagebreak/> <pagebreak orientation="landscape"/> <underline>J</underline>
85
- </p>
86
- </clause></sections>
87
- </iso-standard>
88
- INPUT
89
- #{WORD_HDR}
90
- <p class='zzSTDTitle1'/>
91
- <div>
92
- <h1/>
93
- <p>
94
- <i>A</i>
95
- <b>B</b>
96
- <sup>C</sup>
97
- <sub>D</sub>
98
- <tt>E</tt>
99
- <s>F</s>
100
- <span style='font-variant:small-caps;'>G</span>
101
- <span class='keyword'>I</span>
102
- <br/>
103
- <hr/>
104
- <a id='H'/>
105
- <p>
106
- <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
107
- </p>
108
- <p>
109
- <br clear='all' class='section' orientation='landscape'/>
110
- </p>
111
- <u>J</u>
112
- </p>
113
- </div>
114
- </div>
115
- </body>
116
- </html>
75
+ doc = <<~OUTPUT
76
+ <div>
77
+ <h1 class='ForewordTitle'>Foreword</h1>
78
+ <p>
79
+ <i>A</i>
80
+ <b>B</b>
81
+ <sup>C</sup>
82
+ <sub>D</sub>
83
+ <tt>E</tt>
84
+ <s>F</s>
85
+ <span style='font-variant:small-caps;'>G</span>
86
+ <span class='keyword'>I</span>
87
+ <br/>
88
+ <hr/>
89
+ <a id='H'/>
90
+ <p>
91
+ <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
92
+ </p>
93
+ <p>
94
+ <br clear='all' class='section' orientation='landscape'/>
95
+ </p>
96
+ <u>J</u>
97
+ </p>
98
+ </div>
117
99
  OUTPUT
100
+ expect(xmlpp(IsoDoc::HtmlConvert.new({})
101
+ .convert("test", input, true))
102
+ .sub(/^.*<h1/m, "<div><h1").sub(%r{</div>.*$}m, "</div>"))
103
+ .to be_equivalent_to xmlpp(html)
104
+ expect(xmlpp(IsoDoc::WordConvert.new({})
105
+ .convert("test", input, true))
106
+ .sub(/^.*<h1/m, "<div><h1").sub(%r{</div>.*$}m, "</div>"))
107
+ .to be_equivalent_to xmlpp(doc)
118
108
  end
119
109
 
120
110
  it "ignores index entries" do
121
- expect(xmlpp(IsoDoc::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
111
+ input = <<~INPUT
122
112
  <iso-standard xmlns="http://riboseinc.com/isoxml">
123
113
  <preface><foreword>
124
114
  <p><index primary="A" secondary="B" tertiary="C"/></p>
@@ -129,15 +119,18 @@ RSpec.describe IsoDoc do
129
119
  </indexsect>
130
120
  </iso-standard>
131
121
  INPUT
122
+ output = <<~OUTPUT
132
123
  <iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
133
124
  <preface>
134
- <foreword>
125
+ <foreword displayorder="1">
135
126
  <p/>
136
127
  </foreword>
137
128
  </preface>
138
129
  <sections> </sections>
139
130
  </iso-standard>
140
131
  OUTPUT
132
+ expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
133
+ .convert("test", input, true))).to be_equivalent_to xmlpp(output)
141
134
  end
142
135
 
143
136
  it "processes concept markup" do
@@ -226,162 +219,243 @@ RSpec.describe IsoDoc do
226
219
  </iso-standard>
227
220
  INPUT
228
221
  presxml = <<~OUTPUT
229
- <iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
230
- <preface>
231
- <foreword>
232
- <p>
233
- <ul>
234
- <li>
235
- <em>
236
- <xref target='clause1'>Clause 2</xref>
237
- </em>
238
- </li>
239
- <li>
240
- <em>
241
- <xref target='clause1'>w[o]rd</xref>
242
- </em>
243
- </li>
244
- <li>
245
- <em>
246
- <eref bibitemid='ISO712' type='inline' citeas='ISO 712'>ISO 712</eref>
247
- </em>
248
- </li>
249
- <li>
250
- <em>
251
- <eref bibitemid='ISO712' type='inline' citeas='ISO 712'>word</eref>
252
- </em>
253
- </li>
254
- <li>
255
- <em>
256
- <eref bibitemid='ISO712' type='inline' citeas='ISO 712'>
257
- <locality type='clause'>
258
- <referenceFrom>3.1</referenceFrom>
259
- </locality>
260
- <locality type='figure'>
261
- <referenceFrom>a</referenceFrom>
262
- </locality>
263
- ISO 712, Clause 3.1, Figure a
264
- </eref>
265
- </em>
266
- </li>
267
- <li>
268
- <em>
269
- <eref bibitemid='ISO712' type='inline' citeas='ISO 712'>
270
- <localityStack>
271
- <locality type='clause'>
272
- <referenceFrom>3.1</referenceFrom>
273
- </locality>
274
- </localityStack>
275
- <localityStack>
276
- <locality type='figure'>
277
- <referenceFrom>b</referenceFrom>
278
- </locality>
279
- </localityStack>
280
- ISO 712, Clause 3.1; Figure b
281
- </eref>
282
- </em>
283
- </li>
284
- <li>
285
- <em>
286
- <eref bibitemid='ISO712' type='inline' citeas='ISO 712'>
287
- <localityStack>
288
- <locality type='clause'>
289
- <referenceFrom>3.1</referenceFrom>
290
- </locality>
291
- </localityStack>
292
- <localityStack>
293
- <locality type='figure'>
294
- <referenceFrom>b</referenceFrom>
295
- </locality>
296
- </localityStack>
297
- <em>word</em>
298
- </eref>
299
- </em>
300
- </li>
301
- <li>
302
- [term defined in
303
- <termref base='IEV' target='135-13-13'/>
304
- ]
305
- </li>
306
- <li>
307
- <em>
308
- <termref base='IEV' target='135-13-13'>
309
- <em>word</em>
310
- word
311
- </termref>
312
- </em>
313
- </li>
314
- </ul>
315
- </p>
316
- </foreword>
317
- </preface>
318
- <sections>
319
- <clause id='clause1'>
320
- <title depth='1'>
321
- 2.
322
- <tab/>
323
- Clause 1
324
- </title>
325
- </clause>
326
- </sections>
327
- <bibliography>
328
- <references id='_normative_references' obligation='informative' normative='true'>
329
- <title depth='1'>
330
- 1.
331
- <tab/>
332
- Normative References
333
- </title>
334
- <p>
335
- The following documents are referred to in the text in such a way that
336
- some or all of their content constitutes requirements of this document.
337
- For dated references, only the edition cited applies. For undated
338
- references, the latest edition of the referenced document (including any
339
- amendments) applies.
340
- </p>
341
- <bibitem id='ISO712' type='standard'>
342
- <title format='text/plain'>Cereals or cereal products</title>
343
- <title type='main' format='text/plain'>Cereals and cereal products</title>
344
- <docidentifier type='ISO'>ISO 712</docidentifier>
345
- <contributor>
346
- <role type='publisher'/>
347
- <organization>
348
- <name>International Organization for Standardization</name>
349
- </organization>
350
- </contributor>
351
- </bibitem>
352
- </references>
353
- </bibliography>
354
- </iso-standard>
355
- end
356
-
357
- it "processes embedded inline formatting" do
358
- expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
359
- <iso-standard xmlns="http://riboseinc.com/isoxml">
360
- <preface><foreword>
361
- <p>
362
- <em><strong>&lt;</strong></em> <tt><link target="B"/></tt> <xref target="_http_1_1">Requirement <tt>/req/core/http</tt></xref> <eref type="inline" bibitemid="ISO712" citeas="ISO 712">Requirement <tt>/req/core/http</tt></eref>
363
- </p>
364
- </foreword></preface>
365
- <sections>
222
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
223
+ <preface>
224
+ <foreword displayorder="1">
225
+ <p>
226
+ <ul>
227
+ <li>
228
+ <em>
229
+ <xref target='clause1'>Clause 2</xref>
230
+ </em>
231
+ </li>
232
+ <li>
233
+ <em>
234
+ <xref target='clause1'>w[o]rd</xref>
235
+ </em>
236
+ </li>
237
+ <li>
238
+ <em>
239
+ <eref bibitemid='ISO712' type='inline' citeas='ISO 712'>ISO 712</eref>
240
+ </em>
241
+ </li>
242
+ <li>
243
+ <em>
244
+ <eref bibitemid='ISO712' type='inline' citeas='ISO 712'>word</eref>
245
+ </em>
246
+ </li>
247
+ <li>
248
+ <em>
249
+ <eref bibitemid='ISO712' type='inline' citeas='ISO 712'>
250
+ <locality type='clause'>
251
+ <referenceFrom>3.1</referenceFrom>
252
+ </locality>
253
+ <locality type='figure'>
254
+ <referenceFrom>a</referenceFrom>
255
+ </locality>
256
+ ISO 712, Clause 3.1, Figure a
257
+ </eref>
258
+ </em>
259
+ </li>
260
+ <li>
261
+ <em>
262
+ <eref bibitemid='ISO712' type='inline' citeas='ISO 712'>
263
+ <localityStack>
264
+ <locality type='clause'>
265
+ <referenceFrom>3.1</referenceFrom>
266
+ </locality>
267
+ </localityStack>
268
+ <localityStack>
269
+ <locality type='figure'>
270
+ <referenceFrom>b</referenceFrom>
271
+ </locality>
272
+ </localityStack>
273
+ ISO 712, Clause 3.1; Figure b
274
+ </eref>
275
+ </em>
276
+ </li>
277
+ <li>
278
+ <em>
279
+ <eref bibitemid='ISO712' type='inline' citeas='ISO 712'>
280
+ <localityStack>
281
+ <locality type='clause'>
282
+ <referenceFrom>3.1</referenceFrom>
283
+ </locality>
284
+ </localityStack>
285
+ <localityStack>
286
+ <locality type='figure'>
287
+ <referenceFrom>b</referenceFrom>
288
+ </locality>
289
+ </localityStack>
290
+ <em>word</em>
291
+ </eref>
292
+ </em>
293
+ </li>
294
+ <li>
295
+ [term defined in
296
+ <termref base='IEV' target='135-13-13'/>
297
+ ]
298
+ </li>
299
+ <li>
300
+ <em>
301
+ <termref base='IEV' target='135-13-13'>
302
+ <em>word</em>
303
+ word
304
+ </termref>
305
+ </em>
306
+ </li>
307
+ </ul>
308
+ </p>
309
+ </foreword>
310
+ </preface>
311
+ <sections>
312
+ <clause id='clause1' displayorder="3">
313
+ <title depth='1'>
314
+ 2.
315
+ <tab/>
316
+ Clause 1
317
+ </title>
318
+ </clause>
319
+ </sections>
320
+ <bibliography>
321
+ <references id='_normative_references' obligation='informative' normative='true' displayorder="2">
322
+ <title depth='1'>
323
+ 1.
324
+ <tab/>
325
+ Normative References
326
+ </title>
327
+ <p>
328
+ The following documents are referred to in the text in such a way that
329
+ some or all of their content constitutes requirements of this document.
330
+ For dated references, only the edition cited applies. For undated
331
+ references, the latest edition of the referenced document (including any
332
+ amendments) applies.
333
+ </p>
334
+ <bibitem id='ISO712' type='standard'>
335
+ <title format='text/plain'>Cereals or cereal products</title>
336
+ <title type='main' format='text/plain'>Cereals and cereal products</title>
337
+ <docidentifier type='ISO'>ISO 712</docidentifier>
338
+ <contributor>
339
+ <role type='publisher'/>
340
+ <organization>
341
+ <name>International Organization for Standardization</name>
342
+ </organization>
343
+ </contributor>
344
+ </bibitem>
345
+ </references>
346
+ </bibliography>
366
347
  </iso-standard>
367
- INPUT
368
- #{HTML_HDR}
369
- <br/>
370
- <div>
371
- <h1 class="ForewordTitle">Foreword</h1>
372
- <p>
373
- <i><b>&lt;</b></i> <tt><a href="B">B</a></tt> <a href="#_http_1_1">Requirement <tt>/req/core/http</tt></a> <a href="#ISO712">Requirement <tt>/req/core/http</tt></a>
374
- </p>
375
- </div>
376
- <p class="zzSTDTitle1"/>
348
+ OUTPUT
349
+ output = <<~OUTPUT
350
+ #{HTML_HDR}
351
+ <br/>
352
+ <div>
353
+ <h1 class='ForewordTitle'>Foreword</h1>
354
+ <p>
355
+ <ul>
356
+ <li>
357
+ <i>
358
+ <a href='#clause1'>Clause 2</a>
359
+ </i>
360
+ </li>
361
+ <li>
362
+ <i>
363
+ <a href='#clause1'>w[o]rd</a>
364
+ </i>
365
+ </li>
366
+ <li>
367
+ <i>
368
+ <a href='#ISO712'>ISO 712</a>
369
+ </i>
370
+ </li>
371
+ <li>
372
+ <i>
373
+ <a href='#ISO712'>word</a>
374
+ </i>
375
+ </li>
376
+ <li>
377
+ <i>
378
+ <a href='#ISO712'> ISO 712, Clause 3.1, Figure a </a>
379
+ </i>
380
+ </li>
381
+ <li>
382
+ <i>
383
+ <a href='#ISO712'> ISO 712, Clause 3.1; Figure b </a>
384
+ </i>
385
+ </li>
386
+ <li>
387
+ <i>
388
+ <a href='#ISO712'>
389
+ <i>word</i>
390
+ </a>
391
+ </i>
392
+ </li>
393
+ <li> [term defined in Termbase IEV, term ID 135-13-13 ] </li>
394
+ <li>
395
+ <i> Termbase IEV, term ID 135-13-13 </i>
396
+ </li>
397
+ </ul>
398
+ </p>
399
+ </div>
400
+ <p class='zzSTDTitle1'/>
401
+ <div>
402
+ <h1> 1. &#160; Normative References </h1>
403
+ <p>
404
+ The following documents are referred to in the text in such a way
405
+ that some or all of their content constitutes requirements of this
406
+ document. For dated references, only the edition cited applies. For
407
+ undated references, the latest edition of the referenced document
408
+ (including any amendments) applies.
409
+ </p>
410
+ <p id='ISO712' class='NormRef'>
411
+ ISO 712,
412
+ <i>Cereals and cereal products</i>
413
+ </p>
414
+ </div>
415
+ <div id='clause1'>
416
+ <h1> 2. &#160; Clause 1 </h1>
417
+ </div>
418
+ </div>
419
+ </body>
420
+ </html>
421
+ OUTPUT
422
+ expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
423
+ .convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
424
+ expect(xmlpp(IsoDoc::HtmlConvert.new({})
425
+ .convert("test", presxml, true))).to be_equivalent_to xmlpp(output)
426
+ end
427
+
428
+ it "processes embedded inline formatting" do
429
+ input = <<~INPUT
430
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
431
+ <preface><foreword>
432
+ <p>
433
+ <em><strong>&lt;</strong></em> <tt><link target="B"/></tt> <xref target="_http_1_1">Requirement <tt>/req/core/http</tt></xref> <eref type="inline" bibitemid="ISO712" citeas="ISO 712">Requirement <tt>/req/core/http</tt></eref>
434
+ </p>
435
+ </foreword></preface>
436
+ <sections>
437
+ </iso-standard>
438
+ INPUT
439
+ output = <<~OUTPUT
440
+ #{HTML_HDR}
441
+ <br/>
442
+ <div>
443
+ <h1 class="ForewordTitle">Foreword</h1>
444
+ <p>
445
+ <i><b>&lt;</b></i> <tt><a href="B">B</a></tt> <a href="#_http_1_1">Requirement <tt>/req/core/http</tt></a> <a href="#ISO712">Requirement <tt>/req/core/http</tt></a>
446
+ </p>
377
447
  </div>
378
- </body>
379
- </html>
448
+ <p class="zzSTDTitle1"/>
449
+ </div>
450
+ </body>
451
+ </html>
380
452
  OUTPUT
453
+ expect(xmlpp(IsoDoc::HtmlConvert.new({})
454
+ .convert("test", input, true))).to be_equivalent_to xmlpp(output)
381
455
  end
382
456
 
383
457
  it "processes inline images" do
384
- expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
458
+ input = <<~INPUT
385
459
  <iso-standard xmlns="http://riboseinc.com/isoxml">
386
460
  <preface><foreword>
387
461
  <p>
@@ -390,6 +464,7 @@ RSpec.describe IsoDoc do
390
464
  </foreword></preface>
391
465
  </iso-standard>
392
466
  INPUT
467
+ output = <<~OUTPUT
393
468
  #{HTML_HDR}
394
469
  <br/>
395
470
  <div>
@@ -403,10 +478,12 @@ RSpec.describe IsoDoc do
403
478
  </body>
404
479
  </html>
405
480
  OUTPUT
481
+ expect(xmlpp(IsoDoc::HtmlConvert.new({})
482
+ .convert("test", input, true))).to be_equivalent_to xmlpp(output)
406
483
  end
407
484
 
408
485
  it "processes links" do
409
- expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
486
+ input = <<~INPUT
410
487
  <iso-standard xmlns="http://riboseinc.com/isoxml">
411
488
  <preface><foreword>
412
489
  <p>
@@ -420,6 +497,7 @@ RSpec.describe IsoDoc do
420
497
  <sections>
421
498
  </iso-standard>
422
499
  INPUT
500
+ output = <<~OUTPUT
423
501
  #{HTML_HDR}
424
502
  <br/>
425
503
  <div>
@@ -437,10 +515,55 @@ RSpec.describe IsoDoc do
437
515
  </body>
438
516
  </html>
439
517
  OUTPUT
518
+ expect(xmlpp(IsoDoc::HtmlConvert.new({})
519
+ .convert("test", input, true))).to be_equivalent_to xmlpp(output)
520
+ end
521
+
522
+ it "processes updatetype links" do
523
+ input = <<~INPUT
524
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
525
+ <preface><foreword>
526
+ <p>
527
+ <link updatetype="true" target="http://example.com"/>
528
+ <link updatetype="true" target="list.adoc">example</link>
529
+ <link updatetype="true" target="list" alt="tip">example</link>
530
+ </p>
531
+ </foreword></preface>
532
+ <sections>
533
+ </iso-standard>
534
+ INPUT
535
+ html = <<~OUTPUT
536
+ <div>
537
+ <h1 class="ForewordTitle">Foreword</h1>
538
+ <p>
539
+ <a href="http://example.com">http://example.com</a>
540
+ <a href='list.adoc'>example</a>
541
+ <a href='list.html' title='tip'>example</a>
542
+ </p>
543
+ </div>
544
+ OUTPUT
545
+ doc = <<~OUTPUT
546
+ <div>
547
+ <h1 class="ForewordTitle">Foreword</h1>
548
+ <p>
549
+ <a href="http://example.com">http://example.com</a>
550
+ <a href='list.adoc'>example</a>
551
+ <a href='list.doc' title='tip'>example</a>
552
+ </p>
553
+ </div>
554
+ OUTPUT
555
+ expect(xmlpp(IsoDoc::HtmlConvert.new({})
556
+ .convert("test", input, true))
557
+ .sub(/^.*<h1/m, "<div><h1").sub(%r{</div>.*$}m, "</div>"))
558
+ .to be_equivalent_to xmlpp(html)
559
+ expect(xmlpp(IsoDoc::WordConvert.new({})
560
+ .convert("test", input, true))
561
+ .sub(/^.*<h1/m, "<div><h1").sub(%r{</div>.*$}m, "</div>"))
562
+ .to be_equivalent_to xmlpp(doc)
440
563
  end
441
564
 
442
565
  it "processes unrecognised markup" do
443
- expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
566
+ input = <<~INPUT
444
567
  <iso-standard xmlns="http://riboseinc.com/isoxml">
445
568
  <preface><foreword>
446
569
  <p>
@@ -450,6 +573,7 @@ RSpec.describe IsoDoc do
450
573
  <sections>
451
574
  </iso-standard>
452
575
  INPUT
576
+ output = <<~OUTPUT
453
577
  #{HTML_HDR}
454
578
  <br/>
455
579
  <div>
@@ -463,10 +587,12 @@ RSpec.describe IsoDoc do
463
587
  </body>
464
588
  </html>
465
589
  OUTPUT
590
+ expect(xmlpp(IsoDoc::HtmlConvert.new({})
591
+ .convert("test", input, true))).to be_equivalent_to xmlpp(output)
466
592
  end
467
593
 
468
594
  it "processes AsciiMath and MathML" do
469
- expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true).sub(/<html/, "<html xmlns:m='m'"))).to be_equivalent_to xmlpp(<<~"OUTPUT")
595
+ input = <<~INPUT
470
596
  <iso-standard xmlns="http://riboseinc.com/isoxml">
471
597
  <preface><foreword>
472
598
  <p>
@@ -478,6 +604,7 @@ RSpec.describe IsoDoc do
478
604
  <sections>
479
605
  </iso-standard>
480
606
  INPUT
607
+ output = <<~OUTPUT
481
608
  #{HTML_HDR.sub(/<html/, "<html xmlns:m='m'")}
482
609
  <br/>
483
610
  <div>
@@ -495,10 +622,13 @@ RSpec.describe IsoDoc do
495
622
  </body>
496
623
  </html>
497
624
  OUTPUT
625
+ expect(xmlpp(IsoDoc::HtmlConvert.new({})
626
+ .convert("test", input, true).sub(/<html/, "<html xmlns:m='m'")))
627
+ .to be_equivalent_to xmlpp(output)
498
628
  end
499
629
 
500
630
  it "overrides AsciiMath delimiters" do
501
- expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
631
+ input = <<~INPUT
502
632
  <iso-standard xmlns="http://riboseinc.com/isoxml">
503
633
  <preface><foreword>
504
634
  <p>
@@ -509,6 +639,7 @@ RSpec.describe IsoDoc do
509
639
  <sections>
510
640
  </iso-standard>
511
641
  INPUT
642
+ output = <<~OUTPUT
512
643
  #{HTML_HDR}
513
644
  <br/>
514
645
  <div>
@@ -523,10 +654,12 @@ RSpec.describe IsoDoc do
523
654
  </body>
524
655
  </html>
525
656
  OUTPUT
657
+ expect(xmlpp(IsoDoc::HtmlConvert.new({})
658
+ .convert("test", input, true))).to be_equivalent_to xmlpp(output)
526
659
  end
527
660
 
528
661
  it "processes eref types" do
529
- expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
662
+ input = <<~INPUT
530
663
  <iso-standard xmlns="http://riboseinc.com/isoxml">
531
664
  <preface><foreword>
532
665
  <p>
@@ -549,6 +682,7 @@ RSpec.describe IsoDoc do
549
682
  </bibliography>
550
683
  </iso-standard>
551
684
  INPUT
685
+ output = <<~OUTPUT
552
686
  #{HTML_HDR}
553
687
  <br/>
554
688
  <div>
@@ -567,6 +701,8 @@ RSpec.describe IsoDoc do
567
701
  </body>
568
702
  </html>
569
703
  OUTPUT
704
+ expect(xmlpp(IsoDoc::HtmlConvert.new({})
705
+ .convert("test", input, true))).to be_equivalent_to xmlpp(output)
570
706
  end
571
707
 
572
708
  it "processes eref content" do
@@ -610,7 +746,7 @@ RSpec.describe IsoDoc do
610
746
  INPUT
611
747
  presxml = <<~OUTPUT
612
748
  <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
613
- <preface><foreword>
749
+ <preface><foreword displayorder="1">
614
750
  <p>
615
751
  <eref type="inline" bibitemid="ISO712" citeas="ISO 712">ISO 712</eref>
616
752
  <eref type="inline" bibitemid="ISO712">ISO 712</eref>
@@ -631,7 +767,8 @@ RSpec.describe IsoDoc do
631
767
  <eref type="inline" case="lowercase" bibitemid="ISO712"><locality type="anchor"><referenceFrom>1</referenceFrom></locality><locality type="clause"><referenceFrom>1</referenceFrom></locality>ISO 712, clause 1</eref>
632
768
  </p>
633
769
  </foreword></preface>
634
- <bibliography><references id="_normative_references" obligation="informative" normative="true"><title depth='1'>1.<tab/>Normative References</title>
770
+ <bibliography><references id="_normative_references" obligation="informative" normative="true" displayorder=
771
+ "2"><title depth='1'>1.<tab/>Normative References</title>
635
772
  <bibitem id="ISO712" type="standard">
636
773
  <title format="text/plain">Cereals and cereal products</title>
637
774
  <docidentifier>ISO 712</docidentifier>
@@ -681,8 +818,10 @@ RSpec.describe IsoDoc do
681
818
  </body>
682
819
  </html>
683
820
  OUTPUT
684
- expect(xmlpp(IsoDoc::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
685
- expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
821
+ expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
822
+ .convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
823
+ expect(xmlpp(IsoDoc::HtmlConvert.new({})
824
+ .convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
686
825
  end
687
826
 
688
827
  it "processes eref content pointing to reference with citation URL" do
@@ -749,7 +888,7 @@ RSpec.describe IsoDoc do
749
888
  presxml = <<~OUTPUT
750
889
  <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
751
890
  <preface>
752
- <foreword>
891
+ <foreword displayorder="1">
753
892
  <p>
754
893
  <eref type='inline' bibitemid='ISO712' citeas='ISO 712'>ISO 712</eref>
755
894
  <eref type='inline' bibitemid='ISO712'>ISO 712</eref>
@@ -784,7 +923,7 @@ RSpec.describe IsoDoc do
784
923
  </foreword>
785
924
  </preface>
786
925
  <bibliography>
787
- <references id='_normative_references' obligation='informative' normative='true'>
926
+ <references id='_normative_references' obligation='informative' normative='true' displayorder="2">
788
927
  <title depth='1'>1.<tab/>Normative References</title>
789
928
  <bibitem id='ISO712' type='standard'>
790
929
  <title format='text/plain'>Cereals and cereal products</title>
@@ -870,80 +1009,83 @@ RSpec.describe IsoDoc do
870
1009
  OUTPUT
871
1010
 
872
1011
  word = <<~OUTPUT
873
- <html xmlns:epub='http://www.idpf.org/2007/ops' lang='en'>
874
- <head>
875
- <style>
876
- </style>
877
- </head>
878
- <body lang='EN-US' link='blue' vlink='#954F72'>
879
- <div class='WordSection1'>
880
- <p>&#160;</p>
881
- </div>
882
- <p>
883
- <br clear='all' class='section'/>
884
- </p>
885
- <div class='WordSection2'>
886
- <p>
887
- <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
888
- </p>
889
- <div>
890
- <h1 class='ForewordTitle'>Foreword</h1>
891
- <p>
892
- <a href='http://www.example.com'>ISO 712</a>
893
- <a href='http://www.example.com'>ISO 712</a>
894
- <a href='spec/assets/iso713.doc'>ISO 713, Table 1</a>
895
- <a href='spec/assets/iso713.doc'>ISO 713, Table 1</a>
896
- <a href='spec/assets/iso713.doc'>ISO 713, Table 1; Clause 1</a>
897
- <a href='spec/assets/iso713.doc'>ISO 713, Table 1&#8211;1</a>
898
- <a href='spec/assets/iso713.doc'>ISO 713, Clause 1, Table 1</a>
899
- <a href='spec/assets/iso713.doc'>ISO 713, Clause 1</a>
900
- <a href='spec/assets/iso713.doc'>ISO 713, Clause 1.5</a>
901
- <a href='spec/assets/iso713.doc'>A</a>
902
- <a href='spec/assets/iso713.doc'>ISO 713, Whole of text</a>
903
- <a href='spec/assets/iso713.doc'>ISO 713, Prelude 7</a>
904
- <a href='spec/assets/iso713.doc'>A</a>
905
- <a href='spec/assets/iso713.doc#xyz'>ISO 713</a>
906
- <a href='spec/assets/iso713.doc#xyz'>ISO 713, Clause 1</a>
907
- <a href='spec/assets/iso714.svg'>ISO 714</a>
908
- </p>
909
- </div>
910
- <p>&#160;</p>
911
- </div>
912
- <p>
913
- <br clear='all' class='section'/>
914
- </p>
915
- <div class='WordSection3'>
916
- <p class='zzSTDTitle1'/>
917
- <div>
918
- <h1>
919
- 1.
920
- <span style='mso-tab-count:1'>&#160; </span>
921
- Normative References
922
- </h1>
923
- <p id='ISO712' class='NormRef'>
924
- ISO 712,
925
- <i>Cereals and cereal products</i>
926
- </p>
927
- <p id='ISO713' class='NormRef'>
928
- ISO 713,
929
- <i>Cereals and cereal products</i>
930
- </p>
931
- <p id='ISO714' class='NormRef'>
932
- ISO 714,
933
- <i>Cereals and cereal products</i>
934
- </p>
935
- </div>
936
- </div>
937
- </body>
938
- </html>
1012
+ <html xmlns:epub='http://www.idpf.org/2007/ops' lang='en'>
1013
+ <head>
1014
+ <style>
1015
+ </style>
1016
+ </head>
1017
+ <body lang='EN-US' link='blue' vlink='#954F72'>
1018
+ <div class='WordSection1'>
1019
+ <p>&#160;</p>
1020
+ </div>
1021
+ <p>
1022
+ <br clear='all' class='section'/>
1023
+ </p>
1024
+ <div class='WordSection2'>
1025
+ <p>
1026
+ <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
1027
+ </p>
1028
+ <div>
1029
+ <h1 class='ForewordTitle'>Foreword</h1>
1030
+ <p>
1031
+ <a href='http://www.example.com'>ISO 712</a>
1032
+ <a href='http://www.example.com'>ISO 712</a>
1033
+ <a href='spec/assets/iso713.doc'>ISO 713, Table 1</a>
1034
+ <a href='spec/assets/iso713.doc'>ISO 713, Table 1</a>
1035
+ <a href='spec/assets/iso713.doc'>ISO 713, Table 1; Clause 1</a>
1036
+ <a href='spec/assets/iso713.doc'>ISO 713, Table 1&#8211;1</a>
1037
+ <a href='spec/assets/iso713.doc'>ISO 713, Clause 1, Table 1</a>
1038
+ <a href='spec/assets/iso713.doc'>ISO 713, Clause 1</a>
1039
+ <a href='spec/assets/iso713.doc'>ISO 713, Clause 1.5</a>
1040
+ <a href='spec/assets/iso713.doc'>A</a>
1041
+ <a href='spec/assets/iso713.doc'>ISO 713, Whole of text</a>
1042
+ <a href='spec/assets/iso713.doc'>ISO 713, Prelude 7</a>
1043
+ <a href='spec/assets/iso713.doc'>A</a>
1044
+ <a href='spec/assets/iso713.doc#xyz'>ISO 713</a>
1045
+ <a href='spec/assets/iso713.doc#xyz'>ISO 713, Clause 1</a>
1046
+ <a href='spec/assets/iso714.svg'>ISO 714</a>
1047
+ </p>
1048
+ </div>
1049
+ <p>&#160;</p>
1050
+ </div>
1051
+ <p>
1052
+ <br clear='all' class='section'/>
1053
+ </p>
1054
+ <div class='WordSection3'>
1055
+ <p class='zzSTDTitle1'/>
1056
+ <div>
1057
+ <h1>
1058
+ 1.
1059
+ <span style='mso-tab-count:1'>&#160; </span>
1060
+ Normative References
1061
+ </h1>
1062
+ <p id='ISO712' class='NormRef'>
1063
+ ISO 712,
1064
+ <i>Cereals and cereal products</i>
1065
+ </p>
1066
+ <p id='ISO713' class='NormRef'>
1067
+ ISO 713,
1068
+ <i>Cereals and cereal products</i>
1069
+ </p>
1070
+ <p id='ISO714' class='NormRef'>
1071
+ ISO 714,
1072
+ <i>Cereals and cereal products</i>
1073
+ </p>
1074
+ </div>
1075
+ </div>
1076
+ </body>
1077
+ </html>
939
1078
  OUTPUT
940
- expect(xmlpp(IsoDoc::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
941
- expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
942
- expect(xmlpp(IsoDoc::WordConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(word)
1079
+ expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
1080
+ .convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
1081
+ expect(xmlpp(IsoDoc::HtmlConvert.new({})
1082
+ .convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
1083
+ expect(xmlpp(IsoDoc::WordConvert.new({})
1084
+ .convert("test", presxml, true))).to be_equivalent_to xmlpp(word)
943
1085
  end
944
1086
 
945
1087
  it "processes variant" do
946
- expect(xmlpp(IsoDoc::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true).sub(%r{<localized-strings>.*</localized-strings>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
1088
+ input = <<~INPUT
947
1089
  <iso-standard xmlns="http://riboseinc.com/isoxml">
948
1090
  <bibdata>
949
1091
  <language>en</language>
@@ -961,41 +1103,46 @@ RSpec.describe IsoDoc do
961
1103
  </preface>
962
1104
  </iso-standard>
963
1105
  INPUT
964
- <iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
965
- <bibdata>
966
- <language current='true'>en</language>
967
- <script current='true'>Latn</script>
968
- </bibdata>
969
- <preface>
970
- <clause id='A'>
971
- <title depth='1'>ABC</title>
972
- </clause>
973
- <clause id='A1'>
974
- <title depth='1'>ABC/DEF</title>
975
- </clause>
976
- <clause id='A2'>
977
- <title depth='1'>ABC</title>
978
- </clause>
979
- <clause id='B'>
980
- <title depth='1'>GHI/JKL</title>
981
- </clause>
982
- <clause id='C'>
983
- <title depth='1'>DEF</title>
984
- </clause>
985
- <clause id='C1'>
986
- <title depth='1'>ABC/DEF</title>
987
- </clause>
988
- <clause id='C2'>
989
- <title depth='1'>DEF</title>
990
- </clause>
991
- <p>A B D E</p>
992
- </preface>
993
- </iso-standard>
1106
+ output = <<~OUTPUT
1107
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
1108
+ <bibdata>
1109
+ <language current='true'>en</language>
1110
+ <script current='true'>Latn</script>
1111
+ </bibdata>
1112
+ <preface>
1113
+ <clause id='A' displayorder='1'>
1114
+ <title depth='1'>ABC</title>
1115
+ </clause>
1116
+ <clause id='A1' displayorder='2'>
1117
+ <title depth='1'>ABC/DEF</title>
1118
+ </clause>
1119
+ <clause id='A2' displayorder='3'>
1120
+ <title depth='1'>ABC</title>
1121
+ </clause>
1122
+ <clause id='B' displayorder='4'>
1123
+ <title depth='1'>GHI/JKL</title>
1124
+ </clause>
1125
+ <clause id='C' displayorder='5'>
1126
+ <title depth='1'>DEF</title>
1127
+ </clause>
1128
+ <clause id='C1' displayorder='6'>
1129
+ <title depth='1'>ABC/DEF</title>
1130
+ </clause>
1131
+ <clause id='C2' displayorder='7'>
1132
+ <title depth='1'>DEF</title>
1133
+ </clause>
1134
+ <p displayorder='8'>A B D E</p>
1135
+ </preface>
1136
+ </iso-standard>
994
1137
  OUTPUT
1138
+ expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
1139
+ .convert("test", input, true)
1140
+ .sub(%r{<localized-strings>.*</localized-strings>}m, "")))
1141
+ .to be_equivalent_to xmlpp(output)
995
1142
  end
996
1143
 
997
1144
  it "cases xrefs" do
998
- expect(xmlpp(IsoDoc::PresentationXMLConvert.new({ i18nyaml: "spec/assets/i18n.yaml" }).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
1145
+ input = <<~INPUT
999
1146
  <iso-standard xmlns="http://riboseinc.com/isoxml">
1000
1147
  <sections>
1001
1148
  <clause id="A">
@@ -1013,16 +1160,17 @@ RSpec.describe IsoDoc do
1013
1160
  </sections>
1014
1161
  </iso-standard>
1015
1162
  INPUT
1163
+ output = <<~OUTPUT
1016
1164
  <?xml version='1.0'?>
1017
1165
  <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
1018
1166
  <sections>
1019
- <clause id='A'>
1167
+ <clause id='A' displayorder="1">
1020
1168
  <title>1.</title>
1021
1169
  <table id='B'>
1022
1170
  <name>Tabelo 1</name>
1023
1171
  </table>
1024
1172
  </clause>
1025
- <clause id='C'>
1173
+ <clause id='C' displayorder="2">
1026
1174
  <title>2.</title>
1027
1175
  <p>
1028
1176
  This is
@@ -1053,16 +1201,20 @@ RSpec.describe IsoDoc do
1053
1201
  </sections>
1054
1202
  </iso-standard>
1055
1203
  OUTPUT
1204
+ expect(xmlpp(IsoDoc::PresentationXMLConvert
1205
+ .new({ i18nyaml: "spec/assets/i18n.yaml" })
1206
+ .convert("test", input, true))).to be_equivalent_to xmlpp(output)
1056
1207
  end
1057
1208
 
1058
1209
  it "processes add, del" do
1059
- expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
1210
+ input = <<~INPUT
1060
1211
  <itu-standard xmlns="https://www.calconnect.org/standards/itu">
1061
1212
  <preface><foreword id="A">
1062
1213
  <add>ABC <xref target="A"></add> <del><strong>B</strong></del>
1063
1214
  </foreword></preface>
1064
1215
  </itu-standard>
1065
1216
  INPUT
1217
+ output = <<~OUTPUT
1066
1218
  #{HTML_HDR}
1067
1219
  <br/>
1068
1220
  <div id='A'>
@@ -1080,5 +1232,7 @@ RSpec.describe IsoDoc do
1080
1232
  </body>
1081
1233
  </html>
1082
1234
  OUTPUT
1235
+ expect(xmlpp(IsoDoc::HtmlConvert.new({})
1236
+ .convert("test", input, true))).to be_equivalent_to xmlpp(output)
1083
1237
  end
1084
1238
  end