isodoc 1.0.28 → 1.0.29

Sign up to get free protection for your applications and to get access to all the features.
@@ -467,6 +467,8 @@ OUTPUT
467
467
  <eref type="inline" bibitemid="ISO712"><locality type="whole"></locality></eref>
468
468
  <eref type="inline" bibitemid="ISO712"><locality type="locality:prelude"><referenceFrom>7</referenceFrom></locality></eref>
469
469
  <eref type="inline" bibitemid="ISO712" citeas="ISO 712">A</eref>
470
+ <eref type="inline" bibitemid="ISO712"><locality type="anchor"><referenceFrom>1</referenceFrom></locality></eref>
471
+ <eref type="inline" bibitemid="ISO712"><locality type="anchor"><referenceFrom>1</referenceFrom></locality><locality type="clause"><referenceFrom>1</referenceFrom></locality></eref>
470
472
  </p>
471
473
  </foreword></preface>
472
474
  <bibliography><references id="_normative_references" obligation="informative" normative="true"><title>Normative References</title>
@@ -499,9 +501,11 @@ OUTPUT
499
501
  <a href="#ISO712">ISO 712, Clause 1</a>
500
502
  <a href="#ISO712">ISO 712, Clause 1.5</a>
501
503
  <a href="#ISO712">A</a>
502
- <a href="#ISO712">ISO 712, </a>
504
+ <a href="#ISO712">ISO 712, Whole of text</a>
503
505
  <a href="#ISO712">ISO 712, Prelude 7</a>
504
506
  <a href="#ISO712">A</a>
507
+ <a href='#ISO712'>ISO 712</a>
508
+ <a href='#ISO712'>ISO 712, Clause 1</a>
505
509
  </p>
506
510
  </div>
507
511
  <p class="zzSTDTitle1"/>
@@ -515,6 +519,209 @@ OUTPUT
515
519
  OUTPUT
516
520
  end
517
521
 
522
+ it "processes eref content pointing to reference with citation URL" do
523
+ expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
524
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
525
+ <preface><foreword>
526
+ <p>
527
+ <eref type="inline" bibitemid="ISO712" citeas="ISO 712"/>
528
+ <eref type="inline" bibitemid="ISO712"/>
529
+ <eref type="inline" bibitemid="ISO713"><locality type="table"><referenceFrom>1</referenceFrom></locality></eref>
530
+ <eref type="inline" bibitemid="ISO713"><localityStack><locality type="table"><referenceFrom>1</referenceFrom></locality></localityStack></eref>
531
+ <eref type="inline" bibitemid="ISO713"><localityStack><locality type="table"><referenceFrom>1</referenceFrom></locality></localityStack><localityStack><locality type="clause"><referenceFrom>1</referenceFrom></locality></localityStack></eref>
532
+ <eref type="inline" bibitemid="ISO713"><locality type="table"><referenceFrom>1</referenceFrom><referenceTo>1</referenceTo></locality></eref>
533
+ <eref type="inline" bibitemid="ISO713"><locality type="clause"><referenceFrom>1</referenceFrom></locality><locality type="table"><referenceFrom>1</referenceFrom></locality></eref>
534
+ <eref type="inline" bibitemid="ISO713"><locality type="clause"><referenceFrom>1</referenceFrom></locality></eref>
535
+ <eref type="inline" bibitemid="ISO713"><locality type="clause"><referenceFrom>1.5</referenceFrom></locality></eref>
536
+ <eref type="inline" bibitemid="ISO713"><locality type="table"><referenceFrom>1</referenceFrom></locality>A</eref>
537
+ <eref type="inline" bibitemid="ISO713"><locality type="whole"></locality></eref>
538
+ <eref type="inline" bibitemid="ISO713"><locality type="locality:prelude"><referenceFrom>7</referenceFrom></locality></eref>
539
+ <eref type="inline" bibitemid="ISO713" citeas="ISO 713">A</eref>
540
+ <eref type="inline" bibitemid="ISO713"><locality type="anchor"><referenceFrom>xyz</referenceFrom></locality></eref>
541
+ <eref type="inline" bibitemid="ISO713"><locality type="anchor"><referenceFrom>xyz</referenceFrom></locality><locality type="clause"><referenceFrom>1</referenceFrom></locality></eref>
542
+ </p>
543
+ </foreword></preface>
544
+ <bibliography><references id="_normative_references" obligation="informative" normative="true"><title>Normative References</title>
545
+ <bibitem id="ISO712" type="standard">
546
+ <title format="text/plain">Cereals and cereal products</title>
547
+ <uri type="citation">http://www.example.com</uri>
548
+ <docidentifier>ISO 712</docidentifier>
549
+ <contributor>
550
+ <role type="publisher"/>
551
+ <organization>
552
+ <abbreviation>ISO</abbreviation>
553
+ </organization>
554
+ </contributor>
555
+ </bibitem>
556
+ <bibitem id="ISO713" type="standard">
557
+ <title format="text/plain">Cereals and cereal products</title>
558
+ <uri type="citation">spec/assets/iso713</uri>
559
+ <docidentifier>ISO 713</docidentifier>
560
+ <contributor>
561
+ <role type="publisher"/>
562
+ <organization>
563
+ <abbreviation>ISO</abbreviation>
564
+ </organization>
565
+ </contributor>
566
+ </bibitem>
567
+ </references>
568
+ </bibliography>
569
+ </iso-standard>
570
+ INPUT
571
+ #{HTML_HDR}
572
+ <br/>
573
+ <div>
574
+ <h1 class='ForewordTitle'>Foreword</h1>
575
+ <p>
576
+ <a href='http://www.example.com'>ISO 712</a>
577
+ <a href='http://www.example.com'>ISO 712</a>
578
+ <a href='spec/assets/iso713.html'>ISO 713, Table 1</a>
579
+ <a href='spec/assets/iso713.html'>ISO 713, Table 1</a>
580
+ <a href='spec/assets/iso713.html'>ISO 713, Table 1; Clause 1</a>
581
+ <a href='spec/assets/iso713.html'>ISO 713, Table 1&#8211;1</a>
582
+ <a href='spec/assets/iso713.html'>ISO 713, Clause 1, Table 1</a>
583
+ <a href='spec/assets/iso713.html'>ISO 713, Clause 1</a>
584
+ <a href='spec/assets/iso713.html'>ISO 713, Clause 1.5</a>
585
+ <a href='spec/assets/iso713.html'>A</a>
586
+ <a href='spec/assets/iso713.html'>ISO 713, Whole of text</a>
587
+ <a href='spec/assets/iso713.html'>ISO 713, Prelude 7</a>
588
+ <a href='spec/assets/iso713.html'>A</a>
589
+ <a href='spec/assets/iso713.html#xyz'>ISO 713</a>
590
+ <a href='spec/assets/iso713.html#xyz'>ISO 713, Clause 1</a>
591
+ </p>
592
+ </div>
593
+ <p class='zzSTDTitle1'/>
594
+ <div>
595
+ <h1>1.&#160; Normative references</h1>
596
+ <p id='ISO712' class='NormRef'>
597
+ ISO 712,
598
+ <i>Cereals and cereal products</i>
599
+ </p>
600
+ <p id='ISO713' class='NormRef'>
601
+ ISO 713,
602
+ <i>Cereals and cereal products</i>
603
+ </p>
604
+ </div>
605
+ </div>
606
+ </body>
607
+ </html>
608
+ OUTPUT
609
+ end
610
+
611
+ it "processes eref content pointing to reference with citation URL (Word)" do
612
+ expect(xmlpp(IsoDoc::WordConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
613
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
614
+ <preface><foreword>
615
+ <p>
616
+ <eref type="inline" bibitemid="ISO712" citeas="ISO 712"/>
617
+ <eref type="inline" bibitemid="ISO712"/>
618
+ <eref type="inline" bibitemid="ISO713"><locality type="table"><referenceFrom>1</referenceFrom></locality></eref>
619
+ <eref type="inline" bibitemid="ISO713"><localityStack><locality type="table"><referenceFrom>1</referenceFrom></locality></localityStack></eref>
620
+ <eref type="inline" bibitemid="ISO713"><localityStack><locality type="table"><referenceFrom>1</referenceFrom></locality></localityStack><localityStack><locality type="clause"><referenceFrom>1</referenceFrom></locality></localityStack></eref>
621
+ <eref type="inline" bibitemid="ISO713"><locality type="table"><referenceFrom>1</referenceFrom><referenceTo>1</referenceTo></locality></eref>
622
+ <eref type="inline" bibitemid="ISO713"><locality type="clause"><referenceFrom>1</referenceFrom></locality><locality type="table"><referenceFrom>1</referenceFrom></locality></eref>
623
+ <eref type="inline" bibitemid="ISO713"><locality type="clause"><referenceFrom>1</referenceFrom></locality></eref>
624
+ <eref type="inline" bibitemid="ISO713"><locality type="clause"><referenceFrom>1.5</referenceFrom></locality></eref>
625
+ <eref type="inline" bibitemid="ISO713"><locality type="table"><referenceFrom>1</referenceFrom></locality>A</eref>
626
+ <eref type="inline" bibitemid="ISO713"><locality type="whole"></locality></eref>
627
+ <eref type="inline" bibitemid="ISO713"><locality type="locality:prelude"><referenceFrom>7</referenceFrom></locality></eref>
628
+ <eref type="inline" bibitemid="ISO713" citeas="ISO 713">A</eref>
629
+ <eref type="inline" bibitemid="ISO713"><locality type="anchor"><referenceFrom>xyz</referenceFrom></locality></eref>
630
+ <eref type="inline" bibitemid="ISO713"><locality type="anchor"><referenceFrom>xyz</referenceFrom></locality><locality type="clause"><referenceFrom>1</referenceFrom></locality></eref>
631
+ </p>
632
+ </foreword></preface>
633
+ <bibliography><references id="_normative_references" obligation="informative" normative="true"><title>Normative References</title>
634
+ <bibitem id="ISO712" type="standard">
635
+ <title format="text/plain">Cereals and cereal products</title>
636
+ <uri type="citation">http://www.example.com</uri>
637
+ <docidentifier>ISO 712</docidentifier>
638
+ <contributor>
639
+ <role type="publisher"/>
640
+ <organization>
641
+ <abbreviation>ISO</abbreviation>
642
+ </organization>
643
+ </contributor>
644
+ </bibitem>
645
+ <bibitem id="ISO713" type="standard">
646
+ <title format="text/plain">Cereals and cereal products</title>
647
+ <uri type="citation">spec/assets/iso713</uri>
648
+ <docidentifier>ISO 713</docidentifier>
649
+ <contributor>
650
+ <role type="publisher"/>
651
+ <organization>
652
+ <abbreviation>ISO</abbreviation>
653
+ </organization>
654
+ </contributor>
655
+ </bibitem>
656
+ </references>
657
+ </bibliography>
658
+ </iso-standard>
659
+ INPUT
660
+ <html xmlns:epub='http://www.idpf.org/2007/ops' lang='en'>
661
+ <head>
662
+ <style>
663
+ </style>
664
+ </head>
665
+ <body lang='EN-US' link='blue' vlink='#954F72'>
666
+ <div class='WordSection1'>
667
+ <p>&#160;</p>
668
+ </div>
669
+ <p>
670
+ <br clear='all' class='section'/>
671
+ </p>
672
+ <div class='WordSection2'>
673
+ <p>
674
+ <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
675
+ </p>
676
+ <div>
677
+ <h1 class='ForewordTitle'>Foreword</h1>
678
+ <p>
679
+ <a href='http://www.example.com'>ISO 712</a>
680
+ <a href='http://www.example.com'>ISO 712</a>
681
+ <a href='spec/assets/iso713.doc'>ISO 713, Table 1</a>
682
+ <a href='spec/assets/iso713.doc'>ISO 713, Table 1</a>
683
+ <a href='spec/assets/iso713.doc'>ISO 713, Table 1; Clause 1</a>
684
+ <a href='spec/assets/iso713.doc'>ISO 713, Table 1&#8211;1</a>
685
+ <a href='spec/assets/iso713.doc'>ISO 713, Clause 1, Table 1</a>
686
+ <a href='spec/assets/iso713.doc'>ISO 713, Clause 1</a>
687
+ <a href='spec/assets/iso713.doc'>ISO 713, Clause 1.5</a>
688
+ <a href='spec/assets/iso713.doc'>A</a>
689
+ <a href='spec/assets/iso713.doc'>ISO 713, Whole of text</a>
690
+ <a href='spec/assets/iso713.doc'>ISO 713, Prelude 7</a>
691
+ <a href='spec/assets/iso713.doc'>A</a>
692
+ <a href='spec/assets/iso713.doc#xyz'>ISO 713</a>
693
+ <a href='spec/assets/iso713.doc#xyz'>ISO 713, Clause 1</a>
694
+ </p>
695
+ </div>
696
+ <p>&#160;</p>
697
+ </div>
698
+ <p>
699
+ <br clear='all' class='section'/>
700
+ </p>
701
+ <div class='WordSection3'>
702
+ <p class='zzSTDTitle1'/>
703
+ <div>
704
+ <h1>
705
+ 1.
706
+ <span style='mso-tab-count:1'>&#160; </span>
707
+ Normative references
708
+ </h1>
709
+ <p id='ISO712' class='NormRef'>
710
+ ISO 712,
711
+ <i>Cereals and cereal products</i>
712
+ </p>
713
+ <p id='ISO713' class='NormRef'>
714
+ ISO 713,
715
+ <i>Cereals and cereal products</i>
716
+ </p>
717
+ </div>
718
+ </div>
719
+ </body>
720
+ </html>
721
+
722
+ OUTPUT
723
+ end
724
+
518
725
  it "processes variant" do
519
726
  expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
520
727
  <iso-standard xmlns="http://riboseinc.com/isoxml">
@@ -5,7 +5,7 @@ RSpec.describe IsoDoc do
5
5
  expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
6
6
  <iso-standard xmlns="http://riboseinc.com/isoxml">
7
7
  <preface><foreword>
8
- <ul id="_61961034-0fb1-436b-b281-828857a59ddb">
8
+ <ul id="_61961034-0fb1-436b-b281-828857a59ddb" keep-with-next="true" keep-lines-together="true">
9
9
  <li>
10
10
  <p id="_cb370dd3-8463-4ec7-aa1a-96f644e2e9a2">updated normative references;</p>
11
11
  </li>
@@ -20,7 +20,7 @@ RSpec.describe IsoDoc do
20
20
  <br/>
21
21
  <div>
22
22
  <h1 class="ForewordTitle">Foreword</h1>
23
- <ul id="_61961034-0fb1-436b-b281-828857a59ddb">
23
+ <ul id="_61961034-0fb1-436b-b281-828857a59ddb" style="page-break-after: avoid;page-break-inside: avoid;">
24
24
  <li>
25
25
  <p id="_cb370dd3-8463-4ec7-aa1a-96f644e2e9a2">updated normative references;</p>
26
26
  </li>
@@ -136,7 +136,7 @@ RSpec.describe IsoDoc do
136
136
  expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
137
137
  <iso-standard xmlns="http://riboseinc.com/isoxml">
138
138
  <preface><foreword>
139
- <ol id="_ae34a226-aab4-496d-987b-1aa7b6314026" type="alphabet">
139
+ <ol id="_ae34a226-aab4-496d-987b-1aa7b6314026" type="alphabet" keep-with-next="true" keep-lines-together="true">
140
140
  <li>
141
141
  <p id="_0091a277-fb0e-424a-aea8-f0001303fe78">all information necessary for the complete identification of the sample;</p>
142
142
  </li>
@@ -158,7 +158,7 @@ RSpec.describe IsoDoc do
158
158
  <br/>
159
159
  <div>
160
160
  <h1 class="ForewordTitle">Foreword</h1>
161
- <ol type="a" id="_ae34a226-aab4-496d-987b-1aa7b6314026">
161
+ <ol type="a" id="_ae34a226-aab4-496d-987b-1aa7b6314026" style="page-break-after: avoid;page-break-inside: avoid;">
162
162
  <li>
163
163
  <p id="_0091a277-fb0e-424a-aea8-f0001303fe78">all information necessary for the complete identification of the sample;</p>
164
164
  </li>
@@ -226,7 +226,7 @@ RSpec.describe IsoDoc do
226
226
  expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
227
227
  <iso-standard xmlns="http://riboseinc.com/isoxml">
228
228
  <preface><foreword>
229
- <dl id="_732d3f57-4f88-40bf-9ae9-633891edc395">
229
+ <dl id="_732d3f57-4f88-40bf-9ae9-633891edc395" keep-with-next="true" keep-lines-together="true">
230
230
  <dt>
231
231
  W
232
232
  </dt>
@@ -244,7 +244,7 @@ RSpec.describe IsoDoc do
244
244
  <br/>
245
245
  <div>
246
246
  <h1 class="ForewordTitle">Foreword</h1>
247
- <dl id="_732d3f57-4f88-40bf-9ae9-633891edc395">
247
+ <dl id="_732d3f57-4f88-40bf-9ae9-633891edc395" style="page-break-after: avoid;page-break-inside: avoid;">
248
248
  <dt>
249
249
  <p>
250
250
  W
@@ -260,7 +260,7 @@ RSpec.describe IsoDoc do
260
260
  <p>??</p>
261
261
  </dd>
262
262
  </dl>
263
- <div id="" class="Note">
263
+ <div class="Note">
264
264
  <p><span class="note_label">NOTE</span>&#160; This is a note</p>
265
265
  </div>
266
266
  </div>
@@ -323,7 +323,7 @@ RSpec.describe IsoDoc do
323
323
  </tr>
324
324
  <tr>
325
325
  <td colspan="2">
326
- <div id="" class="Note">
326
+ <div class="Note">
327
327
  <p class="Note"><span class="note_label">NOTE</span><span style="mso-tab-count:1">&#160; </span>This is a note</p>
328
328
  </div>
329
329
  </td>
@@ -97,7 +97,47 @@ RSpec.describe IsoDoc do
97
97
  </bibdata>
98
98
  </iso-standard>
99
99
  INPUT
100
- {:accesseddate=>"2012", :activateddate=>"2013", :agency=>"ISO", :authors=>["Barney Rubble", "Fred Flintstone"], :authors_affiliations=>{"Slate Inc., Bedrock"=>["Barney Rubble"], ""=>["Fred Flintstone"]}, :circulateddate=>"2015", :confirmeddate=>"2017", :copieddate=>"2016", :createddate=>"2010&ndash;2011", :doc=>"URL E", :docnumber=>"17301-1", :docnumeric=>"17301", :doctitle=>"Cereals and pulses", :doctype=>"International Standard", :docyear=>"2016", :draft=>"0.4", :draftinfo=>" (draft 0.4, 2016-05-01)", :edition=>"2", :html=>"URL B", :implementeddate=>"XXX", :issueddate=>"XXX", :iteration=>"2", :keywords=>["KW2", "KW1", "KW3"], :obsoleteddate=>"2014", :pdf=>"URL D", :publisheddate=>"2011", :publisher=>"", :receiveddate=>"XXX", :revdate=>"2016-05-01", :revdate_monthyear=>"May 2016", :stage=>"Committee draft", :stageabbr=>"CD", :substage=>"Withdrawn", :transmitteddate=>"2020", :unchangeddate=>"2019", :unpublished=>true, :updateddate=>"2018", :url=>"URL A", :vote_endeddate=>"2022", :vote_starteddate=>"2021", :xml=>"URL C"}
100
+ {:accesseddate=>"2012",
101
+ :activateddate=>"2013",
102
+ :agency=>"ISO",
103
+ :authors=>["Barney Rubble", "Fred Flintstone"],
104
+ :authors_affiliations=>{"Slate Inc., Bedrock"=>["Barney Rubble"], ""=>["Fred Flintstone"]},
105
+ :circulateddate=>"2015",
106
+ :confirmeddate=>"2017",
107
+ :copieddate=>"2016",
108
+ :createddate=>"2010&ndash;2011",
109
+ :doc=>"URL E",
110
+ :docnumber=>"17301-1",
111
+ :docnumeric=>"17301",
112
+ :doctitle=>"Cereals and pulses",
113
+ :doctype=>"International Standard",
114
+ :docyear=>"2016",
115
+ :draft=>"0.4",
116
+ :draftinfo=>" (draft 0.4, 2016-05-01)",
117
+ :edition=>"2",
118
+ :html=>"URL B",
119
+ :implementeddate=>"XXX",
120
+ :issueddate=>"XXX",
121
+ :iteration=>"2",
122
+ :keywords=>["KW2", "KW1", "KW3"],
123
+ :obsoleteddate=>"2014",
124
+ :pdf=>"URL D",
125
+ :publisheddate=>"2011",
126
+ :publisher=>"",
127
+ :receiveddate=>"XXX",
128
+ :revdate=>"2016-05-01",
129
+ :revdate_monthyear=>"May 2016",
130
+ :stage=>"Committee draft",
131
+ :stageabbr=>"CD",
132
+ :substage=>"Withdrawn",
133
+ :transmitteddate=>"2020",
134
+ :unchangeddate=>"2019",
135
+ :unpublished=>true,
136
+ :updateddate=>"2018",
137
+ :url=>"URL A",
138
+ :vote_endeddate=>"2022",
139
+ :vote_starteddate=>"2021",
140
+ :xml=>"URL C"}
101
141
  OUTPUT
102
142
  end
103
143
 
@@ -171,7 +211,41 @@ OUTPUT
171
211
  </version>
172
212
  </iso-standard>
173
213
  INPUT
174
- {:accesseddate=>"XXX", :agency=>"ISO/IEC/IEEE", :authors=>[], :authors_affiliations=>{}, :circulateddate=>"XXX", :confirmeddate=>"XXX", :copieddate=>"XXX", :createddate=>"XXX", :docnumber=>"17301-1-3", :docnumeric=>"17301", :doctitle=>"Cereals and pulses", :doctype=>"International Standard", :docyear=>"2016", :draft=>"12", :draftinfo=>" (draft 12, 2016-05)", :edition=>nil, :implementeddate=>"XXX", :issueddate=>"XXX", :keywords=>[], :obsoleteddate=>"XXX", :obsoletes=>"IEC 8121", :obsoletes_part=>"3.1", :partof=>"IEC 8122", :publisheddate=>"2011-01", :publisher=>"International Organization for Standardization, International Electrotechnical Commission and Institute of Electrical and Electronics Engineers", :receiveddate=>"XXX", :revdate=>"2016-05", :revdate_monthyear=>"May 2016", :stage=>"Published", :transmitteddate=>"XXX", :unchangeddate=>"XXX", :unpublished=>false, :updateddate=>"XXX", :vote_endeddate=>"XXX", :vote_starteddate=>"XXX"}
214
+ {:accesseddate=>"XXX",
215
+ :agency=>"ISO/IEC/IEEE",
216
+ :authors=>[],
217
+ :authors_affiliations=>{},
218
+ :circulateddate=>"XXX",
219
+ :confirmeddate=>"XXX",
220
+ :copieddate=>"XXX",
221
+ :createddate=>"XXX",
222
+ :docnumber=>"17301-1-3",
223
+ :docnumeric=>"17301",
224
+ :doctitle=>"Cereals and pulses",
225
+ :doctype=>"International Standard",
226
+ :docyear=>"2016",
227
+ :draft=>"12",
228
+ :draftinfo=>" (draft 12, 2016-05)",
229
+ :edition=>nil,
230
+ :implementeddate=>"XXX",
231
+ :issueddate=>"XXX",
232
+ :keywords=>[],
233
+ :obsoleteddate=>"XXX",
234
+ :obsoletes=>"IEC 8121",
235
+ :obsoletes_part=>"3.1",
236
+ :partof=>"IEC 8122",
237
+ :publisheddate=>"2011-01",
238
+ :publisher=>"International Organization for Standardization, International Electrotechnical Commission and Institute of Electrical and Electronics Engineers",
239
+ :receiveddate=>"XXX",
240
+ :revdate=>"2016-05",
241
+ :revdate_monthyear=>"May 2016",
242
+ :stage=>"Published",
243
+ :transmitteddate=>"XXX",
244
+ :unchangeddate=>"XXX",
245
+ :unpublished=>false,
246
+ :updateddate=>"XXX",
247
+ :vote_endeddate=>"XXX",
248
+ :vote_starteddate=>"XXX"}
175
249
  OUTPUT
176
250
  end
177
251
 
@@ -230,7 +304,37 @@ OUTPUT
230
304
  </bibdata>
231
305
  </iso-standard>
232
306
  INPUT
233
- {:accesseddate=>"XXX", :agency=>"ISO/IEC", :authors=>[], :authors_affiliations=>{}, :circulateddate=>"XXX", :confirmeddate=>"XXX", :copieddate=>"XXX", :createddate=>"XXX", :docnumber=>"17301-1-3", :docnumeric=>"17301", :doctitle=>"Cereals and pulses", :docyear=>"2016", :draft=>nil, :draftinfo=>"", :edition=>nil, :implementeddate=>"XXX", :issueddate=>"XXX", :keywords=>[], :obsoleteddate=>"XXX", :publisheddate=>"2011-01", :publisher=>"International Organization for Standardization et International Electrotechnical Commission", :receiveddate=>"XXX", :revdate=>"2016-05", :revdate_monthyear=>"Mai 2016", :stage=>"Published", :transmitteddate=>"XXX", :unchangeddate=>"XXX", :unpublished=>false, :updateddate=>"XXX", :vote_endeddate=>"XXX", :vote_starteddate=>"XXX"}
307
+ {:accesseddate=>"XXX",
308
+ :agency=>"ISO/IEC",
309
+ :authors=>[],
310
+ :authors_affiliations=>{},
311
+ :circulateddate=>"XXX",
312
+ :confirmeddate=>"XXX",
313
+ :copieddate=>"XXX",
314
+ :createddate=>"XXX",
315
+ :docnumber=>"17301-1-3",
316
+ :docnumeric=>"17301",
317
+ :doctitle=>"Cereals and pulses",
318
+ :docyear=>"2016",
319
+ :draft=>nil,
320
+ :draftinfo=>"",
321
+ :edition=>nil,
322
+ :implementeddate=>"XXX",
323
+ :issueddate=>"XXX",
324
+ :keywords=>[],
325
+ :obsoleteddate=>"XXX",
326
+ :publisheddate=>"2011-01",
327
+ :publisher=>"International Organization for Standardization et International Electrotechnical Commission",
328
+ :receiveddate=>"XXX",
329
+ :revdate=>"2016-05",
330
+ :revdate_monthyear=>"Mai 2016",
331
+ :stage=>"Published",
332
+ :transmitteddate=>"XXX",
333
+ :unchangeddate=>"XXX",
334
+ :unpublished=>false,
335
+ :updateddate=>"XXX",
336
+ :vote_endeddate=>"XXX",
337
+ :vote_starteddate=>"XXX"}
234
338
  OUTPUT
235
339
  end
236
340
 
@@ -134,12 +134,6 @@ expect(File.exist?("test.doc")).to be true
134
134
  expect(word).to match(/one empty stylesheet/)
135
135
  end
136
136
 
137
- it "generates PDF output docs with null configuration from file" do
138
- FileUtils.rm_f "spec/assets/iso.pdf"
139
- IsoDoc::PdfConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css"}).convert("spec/assets/iso.xml", nil, false)
140
- expect(File.exist?("spec/assets/iso.pdf")).to be true
141
- end
142
-
143
137
  it "generates HTML output docs with complete configuration" do
144
138
  FileUtils.rm_f "test.doc"
145
139
  FileUtils.rm_f "test.html"
@@ -921,8 +915,9 @@ TOCLEVEL
921
915
  <p class='MsoListParagraphCxSpLast'>
922
916
  C1
923
917
  <div class='ListContLevel2'>
924
- <div class='formula'>
918
+ <div>
925
919
  <a name='_5fc1ef0f-75d2-4b54-802c-b1bad4a53b62' id='_5fc1ef0f-75d2-4b54-802c-b1bad4a53b62'/>
920
+ <div class='formula'>
926
921
  <p class='MsoNormal'>
927
922
  <span class='stem'>
928
923
  <m:oMath>
@@ -934,6 +929,7 @@ TOCLEVEL
934
929
  <span style='mso-tab-count:1'>&#xA0; </span>
935
930
  (1)
936
931
  </p>
932
+ </div>
937
933
  </div>
938
934
  </div>
939
935
  </p>
@@ -1346,7 +1342,7 @@ expect(xmlpp(html.sub(/^.*.*$}m, ""))).
1346
1342
  </p>
1347
1343
  <div class='Section3' id=''>
1348
1344
  <h1 class='IntroTitle'>Introduction</h1>
1349
- <p align='center' style='text-align:center' class='MsoNormal'>
1345
+ <p align='center' style='text-align:center;' class='MsoNormal'>
1350
1346
  This is a
1351
1347
  <p class='MsoNormal'>
1352
1348
  <br clear='all' class='section'/>
@@ -1389,7 +1385,7 @@ expect(xmlpp(html.sub(/^.*.*$}m, ""))).
1389
1385
  <p class='zzSTDTitle1'>Document title</p>
1390
1386
  <div>
1391
1387
  <h1>Foreword</h1>
1392
- <div id='' class='Note'>
1388
+ <div class='Note'>
1393
1389
  <p class='Note'>
1394
1390
  <span class='note_label'>NOTE 1</span>
1395
1391
  <span style='mso-tab-count:1'>&#xA0; </span>