isodoc 1.8.4 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,121 +3,131 @@ require "spec_helper"
3
3
  RSpec.describe IsoDoc do
4
4
  it "processes Relaton bibliographies" do
5
5
  input = <<~INPUT
6
- <iso-standard xmlns="http://riboseinc.com/isoxml">
7
- <bibdata>
8
- <language>en</language>
9
- </bibdata>
10
- <preface><foreword>
11
- <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">
12
- <eref bibitemid="ISO712"/>
13
- <eref bibitemid="ISBN"/>
14
- <eref bibitemid="ISSN"/>
15
- <eref bibitemid="ISO16634"/>
16
- <eref bibitemid="ref1"/>
17
- <eref bibitemid="ref10"/>
18
- <eref bibitemid="ref12"/>
19
- <eref bibitemid="zip_ffs"/>
20
- </p>
21
- </foreword></preface>
22
- <bibliography><references id="_normative_references" obligation="informative" normative="true"><title>Normative References</title>
23
- <p>The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>
24
- <bibitem id="ISO712" type="standard">
25
- <title format="text/plain">Cereals or cereal products</title>
26
- <title type="main" format="text/plain">Cereals and cereal products</title>
27
- <docidentifier type="ISO">ISO 712</docidentifier>
28
- <docidentifier type="metanorma">[110]</docidentifier>
29
- <contributor>
30
- <role type="publisher"/>
31
- <organization>
32
- <name>International Organization for Standardization</name>
33
- </organization>
34
- </contributor>
35
- </bibitem>
36
- <bibitem id="ISO16634" type="standard">
37
- <title language="x" format="text/plain">Cereals, pulses, milled cereal products, xxxx, oilseeds and animal feeding stuffs</title>
38
- <title language="en" format="text/plain">Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</title>
39
- <docidentifier type="ISO">ISO 16634:-- (all parts)</docidentifier>
40
- <date type="published"><on>--</on></date>
41
- <contributor>
42
- <role type="publisher"/>
43
- <organization>
44
- <abbreviation>ISO</abbreviation>
45
- </organization>
46
- </contributor>
47
- <note format="text/plain" type="Unpublished-Status" reference="1">Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
48
- <extent type="part">
49
- <referenceFrom>all</referenceFrom>
50
- </extent>
51
- </bibitem>
52
- <bibitem id="ISO20483" type="standard">
53
- <title format="text/plain">Cereals and pulses</title>
54
- <docidentifier type="ISO">ISO 20483:2013-2014</docidentifier>
55
- <date type="published"><from>2013</from><to>2014</to></date>
56
- <contributor>
57
- <role type="publisher"/>
58
- <organization>
59
- <name>International Organization for Standardization</name>
60
- </organization>
61
- </contributor>
62
- </bibitem>
63
- <bibitem id="ref1">
64
- <formattedref format="application/x-isodoc+xml"><smallcap>Standard No I.C.C 167</smallcap>. <em>Determination of the protein content in cereal and cereal products for food and animal feeding stuffs according to the Dumas combustion method</em> (see <link target="http://www.icc.or.at"/>)</formattedref>
65
- <docidentifier type="ICC">ICC/167</docidentifier>
66
- </bibitem>
67
- <note><p>This is an annotation of ISO 20483:2013-2014</p></note>
68
- <bibitem id="zip_ffs"><formattedref format="application/x-isodoc+xml">Title 5</formattedref><docidentifier type="metanorma">[5]</docidentifier></bibitem>
69
- </references><references id="_bibliography" obligation="informative" normative="false">
70
- <title>Bibliography</title>
71
- <bibitem id="ISBN" type="ISBN">
72
- <title format="text/plain">Chemicals for analytical laboratory use</title>
73
- <docidentifier type="ISBN">ISBN</docidentifier>
74
- <docidentifier type="metanorma">[1]</docidentifier>
75
- <contributor>
76
- <role type="publisher"/>
77
- <organization>
78
- <abbreviation>ISBN</abbreviation>
79
- </organization>
80
- </contributor>
81
- </bibitem>
82
- <bibitem id="ISSN" type="ISSN">
83
- <title format="text/plain">Instruments for analytical laboratory use</title>
84
- <docidentifier type="ISSN">ISSN</docidentifier>
85
- <docidentifier type="metanorma">[2]</docidentifier>
86
- <contributor>
87
- <role type="publisher"/>
88
- <organization>
89
- <abbreviation>ISSN</abbreviation>
90
- </organization>
91
- </contributor>
92
- </bibitem>
93
- <note><p>This is an annotation of document ISSN.</p></note>
94
- <note><p>This is another annotation of document ISSN.</p></note>
95
- <bibitem id="ISO3696" type="standard">
96
- <title format="text/plain">Water for analytical laboratory use</title>
97
- <docidentifier type="ISO">ISO 3696</docidentifier>
98
- <contributor>
99
- <role type="publisher"/>
100
- <organization>
101
- <abbreviation>ISO</abbreviation>
102
- </organization>
103
- </contributor>
104
- </bibitem>
105
- <bibitem id="ref10">
106
- <formattedref format="application/x-isodoc+xml"><smallcap>Standard No I.C.C 167</smallcap>. <em>Determination of the protein content in cereal and cereal products for food and animal feeding stuffs according to the Dumas combustion method</em> (see <link target="http://www.icc.or.at"/>)</formattedref>
107
- <docidentifier type="metanorma">[10]</docidentifier>
108
- </bibitem>
109
- <bibitem id="ref11">
110
- <title>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</title>
111
- <docidentifier type="IETF">RFC 10</docidentifier>
112
- </bibitem>
113
- <bibitem id="ref12">
114
- <formattedref format="application/x-isodoc+xml">CitationWorks. 2019. <em>How to cite a reference</em>.</formattedref>
115
- <docidentifier type="metanorma">[Citn]</docidentifier>
116
- <docidentifier type="IETF">RFC 20</docidentifier>
117
- </bibitem>
118
- </references>
119
- </bibliography>
120
- </iso-standard>
6
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
7
+ <bibdata>
8
+ <language>en</language>
9
+ </bibdata>
10
+ <preface><foreword>
11
+ <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">
12
+ <eref bibitemid="ISO712"/>
13
+ <eref bibitemid="ISBN"/>
14
+ <eref bibitemid="ISSN"/>
15
+ <eref bibitemid="ISO16634"/>
16
+ <eref bibitemid="ref1"/>
17
+ <eref bibitemid="ref10"/>
18
+ <eref bibitemid="ref12"/>
19
+ <eref bibitemid="zip_ffs"/>
20
+ </p>
21
+ </foreword></preface>
22
+ <bibliography><references id="_normative_references" obligation="informative" normative="true"><title>Normative References</title>
23
+ <p>The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>
24
+ <bibitem id="ISO712" type="standard">
25
+ <title format="text/plain">Cereals or cereal products</title>
26
+ <title type="main" format="text/plain">Cereals and cereal products</title>
27
+ <docidentifier type="ISO">ISO 712</docidentifier>
28
+ <docidentifier type="metanorma">[110]</docidentifier>
29
+ <contributor>
30
+ <role type="publisher"/>
31
+ <organization>
32
+ <name>International Organization for Standardization</name>
33
+ </organization>
34
+ </contributor>
35
+ </bibitem>
36
+ <bibitem id="ISO16634" type="standard">
37
+ <title language="x" format="text/plain">Cereals, pulses, milled cereal products, xxxx, oilseeds and animal feeding stuffs</title>
38
+ <title language="en" format="text/plain">Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</title>
39
+ <docidentifier type="ISO">ISO 16634:-- (all parts)</docidentifier>
40
+ <date type="published"><on>--</on></date>
41
+ <contributor>
42
+ <role type="publisher"/>
43
+ <organization>
44
+ <abbreviation>ISO</abbreviation>
45
+ </organization>
46
+ </contributor>
47
+ <note format="text/plain" type="Unpublished-Status" reference="1">Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
48
+ <extent type="part">
49
+ <referenceFrom>all</referenceFrom>
50
+ </extent>
51
+ </bibitem>
52
+ <bibitem id="ISO20483" type="standard">
53
+ <title format="text/plain">Cereals and pulses</title>
54
+ <docidentifier type="ISO">ISO 20483:2013-2014</docidentifier>
55
+ <date type="published"><from>2013</from><to>2014</to></date>
56
+ <contributor>
57
+ <role type="publisher"/>
58
+ <organization>
59
+ <name>International Organization for Standardization</name>
60
+ </organization>
61
+ </contributor>
62
+ </bibitem>
63
+ <bibitem id="ref1">
64
+ <formattedref format="application/x-isodoc+xml"><smallcap>Standard No I.C.C 167</smallcap>. <em>Determination of the protein content in cereal and cereal products for food and animal feeding stuffs according to the Dumas combustion method</em> (see <link target="http://www.icc.or.at"/>)</formattedref>
65
+ <docidentifier type="ICC">ICC/167</docidentifier>
66
+ </bibitem>
67
+ <note><p>This is an annotation of ISO 20483:2013-2014</p></note>
68
+ <bibitem id="zip_ffs"><formattedref format="application/x-isodoc+xml">Title 5</formattedref><docidentifier type="metanorma">[5]</docidentifier></bibitem>
69
+ </references><references id="_bibliography" obligation="informative" normative="false">
70
+ <title>Bibliography</title>
71
+ <bibitem id="ISBN" type="ISBN">
72
+ <title format="text/plain">Chemicals for analytical laboratory use</title>
73
+ <docidentifier type="ISBN">ISBN</docidentifier>
74
+ <contributor>
75
+ <role type="publisher"/>
76
+ <organization>
77
+ <abbreviation>ISBN</abbreviation>
78
+ </organization>
79
+ </contributor>
80
+ </bibitem>
81
+ <bibitem id="ISSN" type="ISSN">
82
+ <title format="text/plain">Instruments for analytical laboratory use</title>
83
+ <docidentifier type="ISSN">ISSN</docidentifier>
84
+ <contributor>
85
+ <role type="publisher"/>
86
+ <organization>
87
+ <abbreviation>ISSN</abbreviation>
88
+ </organization>
89
+ </contributor>
90
+ </bibitem>
91
+ <note><p>This is an annotation of document ISSN.</p></note>
92
+ <note><p>This is another annotation of document ISSN.</p></note>
93
+ <bibitem id="ISO3696" type="standard">
94
+ <title format="text/plain">Water for analytical laboratory use</title>
95
+ <docidentifier type="ISO">ISO 3696</docidentifier>
96
+ <contributor>
97
+ <role type="publisher"/>
98
+ <organization>
99
+ <abbreviation>ISO</abbreviation>
100
+ </organization>
101
+ </contributor>
102
+ </bibitem>
103
+ <bibitem id="ref10">
104
+ <formattedref format="application/x-isodoc+xml"><smallcap>Standard No I.C.C 167</smallcap>. <em>Determination of the protein content in cereal and cereal products for food and animal feeding stuffs according to the Dumas combustion method</em> (see <link target="http://www.icc.or.at"/>)</formattedref>
105
+ <docidentifier type="metanorma">[10]</docidentifier>
106
+ </bibitem>
107
+ <bibitem id="ref10a" hidden="true">
108
+ <title>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</title>
109
+ <docidentifier type="IETF">RFC 20</docidentifier>
110
+ </bibitem>
111
+ <bibitem id="ref11">
112
+ <title>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</title>
113
+ <docidentifier type="IETF">RFC 10</docidentifier>
114
+ </bibitem>
115
+ <bibitem id="ref12">
116
+ <formattedref format="application/x-isodoc+xml">CitationWorks. 2019. <em>How to cite a reference</em>.</formattedref>
117
+ <docidentifier type="metanorma">[Citn]</docidentifier>
118
+ <docidentifier type="IETF">RFC 20</docidentifier>
119
+ </bibitem>
120
+ <bibitem id="ref10b">
121
+ <title>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</title>
122
+ <docidentifier type="IETF">RFC 20</docidentifier>
123
+ </bibitem>
124
+ <bibitem id="ref10c">
125
+ <title>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</title>
126
+ <docidentifier type="DOI">ABC 20</docidentifier>
127
+ </bibitem>
128
+ </references>
129
+ </bibliography>
130
+ </iso-standard>
121
131
  INPUT
122
132
  presxml = <<~PRESXML
123
133
  <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
@@ -223,8 +233,8 @@ RSpec.describe IsoDoc do
223
233
  <title depth="1">Bibliography</title>
224
234
  <bibitem id='ISBN' type='ISBN'>
225
235
  <title format='text/plain'>Chemicals for analytical laboratory use</title>
236
+ <docidentifier type='metanorma-ordinal'>[1]</docidentifier>
226
237
  <docidentifier type='ISBN'>ISBN</docidentifier>
227
- <docidentifier type='metanorma'>[1]</docidentifier>
228
238
  <contributor>
229
239
  <role type='publisher'/>
230
240
  <organization>
@@ -234,8 +244,8 @@ RSpec.describe IsoDoc do
234
244
  </bibitem>
235
245
  <bibitem id='ISSN' type='ISSN'>
236
246
  <title format='text/plain'>Instruments for analytical laboratory use</title>
247
+ <docidentifier type='metanorma-ordinal'>[2]</docidentifier>
237
248
  <docidentifier type='ISSN'>ISSN</docidentifier>
238
- <docidentifier type='metanorma'>[2]</docidentifier>
239
249
  <contributor>
240
250
  <role type='publisher'/>
241
251
  <organization>
@@ -253,6 +263,7 @@ RSpec.describe IsoDoc do
253
263
  </note>
254
264
  <bibitem id='ISO3696' type='standard'>
255
265
  <title format='text/plain'>Water for analytical laboratory use</title>
266
+ <docidentifier type='metanorma-ordinal'>[3]</docidentifier>
256
267
  <docidentifier type='ISO'>ISO 3696</docidentifier>
257
268
  <contributor>
258
269
  <role type='publisher'/>
@@ -276,8 +287,13 @@ RSpec.describe IsoDoc do
276
287
  </formattedref>
277
288
  <docidentifier type='metanorma'>[10]</docidentifier>
278
289
  </bibitem>
290
+ <bibitem id="ref10a" hidden="true">
291
+ <title>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</title>
292
+ <docidentifier type="IETF">IETF RFC 20</docidentifier>
293
+ </bibitem>
279
294
  <bibitem id='ref11'>
280
295
  <title>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</title>
296
+ <docidentifier type='metanorma-ordinal'>[4]</docidentifier>
281
297
  <docidentifier type='IETF'>IETF RFC 10</docidentifier>
282
298
  </bibitem>
283
299
  <bibitem id='ref12'>
@@ -289,131 +305,148 @@ RSpec.describe IsoDoc do
289
305
  <docidentifier type='metanorma'>[Citn]</docidentifier>
290
306
  <docidentifier type='IETF'>IETF RFC 20</docidentifier>
291
307
  </bibitem>
308
+ <bibitem id="ref10b">
309
+ <title>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</title>
310
+ <docidentifier type='metanorma-ordinal'>[5]</docidentifier>
311
+ <docidentifier type="IETF">IETF RFC 20</docidentifier>
312
+ </bibitem>
313
+ <bibitem id='ref10c'>
314
+ <title>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</title>
315
+ <docidentifier type='metanorma-ordinal'>[6]</docidentifier>
316
+ <docidentifier type='DOI'>DOI ABC 20</docidentifier>
317
+ </bibitem>
292
318
  </references>
293
319
  </bibliography>
294
320
  </iso-standard>
295
321
  PRESXML
296
322
 
297
323
  html = <<~OUTPUT
298
- #{HTML_HDR}
299
- <br/>
300
- <div>
301
- <h1 class='ForewordTitle'>Foreword</h1>
302
- <p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
303
- <a href='#ISO712'>[110]</a>
304
- <a href='#ISBN'>[1]</a>
305
- <a href='#ISSN'>[2]</a>
306
- <a href='#ISO16634'>ISO 16634:-- (all parts)</a>
307
- <a href='#ref1'>ICC/167</a>
308
- <a href='#ref10'>[10]</a>
309
- <a href='#ref12'>Citn</a>
310
- <a href='#zip_ffs'>[5]</a>
311
- </p>
312
- </div>
313
- <p class='zzSTDTitle1'/>
314
- <div>
315
- <h1>1.&#160; Normative References</h1>
316
- <p>
317
- The following documents are referred to in the text in such a way that
318
- some or all of their content constitutes requirements of this
319
- document. For dated references, only the edition cited applies. For
320
- undated references, the latest edition of the referenced document
321
- (including any amendments) applies.
322
- </p>
323
- <p id='ISO712' class='NormRef'>
324
- [110], ISO 712,
325
- <i>Cereals and cereal products</i>
326
- </p>
327
- <p id='ISO16634' class='NormRef'>
328
- ISO 16634:-- (all parts)
329
- <a class='FootnoteRef' href='#fn:1'>
330
- <sup>1</sup>
331
- </a>
332
- ,
333
- <i>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</i>
334
- </p>
335
- <p id='ISO20483' class='NormRef'>
336
- ISO 20483:2013-2014,
337
- <i>Cereals and pulses</i>
338
- </p>
339
- <p id='ref1' class='NormRef'>
340
- ICC/167,
341
- <span style='font-variant:small-caps;'>Standard No I.C.C 167</span>
342
- .
343
- <i>
344
- Determination of the protein content in cereal and cereal products
345
- for food and animal feeding stuffs according to the Dumas combustion
346
- method
347
- </i>
348
- (see
349
- <a href='http://www.icc.or.at'>http://www.icc.or.at</a>
350
- )
351
- </p>
352
- <div class='Note'>
353
- <p>
354
- <span class='note_label'>NOTE</span>
355
- &#160; This is an annotation of ISO 20483:2013-2014
356
- </p>
357
- </div>
358
- <p id='zip_ffs' class='NormRef'>[5], Title 5</p>
359
- </div>
360
- <br/>
361
- <div>
362
- <h1 class='Section3'>Bibliography</h1>
363
- <p id='ISBN' class='Biblio'>
364
- [1]&#160;
365
- <i>Chemicals for analytical laboratory use</i>
366
- </p>
367
- <p id='ISSN' class='Biblio'>
368
- [2]&#160;
369
- <i>Instruments for analytical laboratory use</i>
370
- </p>
371
- <div class='Note'>
372
- <p>
373
- <span class='note_label'>NOTE</span>
374
- &#160; This is an annotation of document ISSN.
375
- </p>
376
- </div>
377
- <div class='Note'>
378
- <p>
379
- <span class='note_label'>NOTE</span>
380
- &#160; This is another annotation of document ISSN.
381
- </p>
382
- </div>
383
- <p id='ISO3696' class='Biblio'>
384
- [3]&#160; ISO 3696,
385
- <i>Water for analytical laboratory use</i>
386
- </p>
387
- <p id='ref10' class='Biblio'>
388
- [10]&#160;
389
- <span style='font-variant:small-caps;'>Standard No I.C.C 167</span>
390
- .
391
- <i>
392
- Determination of the protein content in cereal and cereal products
393
- for food and animal feeding stuffs according to the Dumas combustion
394
- method
395
- </i>
396
- (see
397
- <a href='http://www.icc.or.at'>http://www.icc.or.at</a>
398
- )
399
- </p>
400
- <p id='ref11' class='Biblio'>
401
- [5]&#160; IETF RFC 10,
402
- <i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i>
403
- </p>
404
- <p id='ref12' class='Biblio'>
405
- Citn&#160; IETF RFC 20, CitationWorks. 2019.
406
- <i>How to cite a reference</i>
407
- .
408
- </p>
409
- </div>
410
- <aside id='fn:1' class='footnote'>
411
- <p>Under preparation. (Stage at the time of publication ISO/DIS 16634)</p>
412
- </aside>
413
- </div>
414
- </body>
415
- </html>
416
- #{' '}
324
+ #{HTML_HDR}
325
+ <br/>
326
+ <div>
327
+ <h1 class='ForewordTitle'>Foreword</h1>
328
+ <p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
329
+ <a href='#ISO712'>[110]</a>
330
+ <a href='#ISBN'>[1]</a>
331
+ <a href='#ISSN'>[2]</a>
332
+ <a href='#ISO16634'>ISO 16634:-- (all parts)</a>
333
+ <a href='#ref1'>ICC/167</a>
334
+ <a href='#ref10'>[10]</a>
335
+ <a href='#ref12'>Citn</a>
336
+ <a href='#zip_ffs'>[5]</a>
337
+ </p>
338
+ </div>
339
+ <p class='zzSTDTitle1'/>
340
+ <div>
341
+ <h1>1.&#160; Normative References</h1>
342
+ <p>
343
+ The following documents are referred to in the text in such a way that
344
+ some or all of their content constitutes requirements of this
345
+ document. For dated references, only the edition cited applies. For
346
+ undated references, the latest edition of the referenced document
347
+ (including any amendments) applies.
348
+ </p>
349
+ <p id='ISO712' class='NormRef'>
350
+ [110], ISO 712,
351
+ <i>Cereals and cereal products</i>
352
+ </p>
353
+ <p id='ISO16634' class='NormRef'>
354
+ ISO 16634:-- (all parts)
355
+ <a class='FootnoteRef' href='#fn:1'>
356
+ <sup>1</sup>
357
+ </a>
358
+ ,
359
+ <i>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</i>
360
+ </p>
361
+ <p id='ISO20483' class='NormRef'>
362
+ ISO 20483:2013-2014,
363
+ <i>Cereals and pulses</i>
364
+ </p>
365
+ <p id='ref1' class='NormRef'>
366
+ ICC/167,
367
+ <span style='font-variant:small-caps;'>Standard No I.C.C 167</span>
368
+ .
369
+ <i>
370
+ Determination of the protein content in cereal and cereal products
371
+ for food and animal feeding stuffs according to the Dumas combustion
372
+ method
373
+ </i>
374
+ (see
375
+ <a href='http://www.icc.or.at'>http://www.icc.or.at</a>
376
+ )
377
+ </p>
378
+ <div class='Note'>
379
+ <p>
380
+ <span class='note_label'>NOTE</span>
381
+ &#160; This is an annotation of ISO 20483:2013-2014
382
+ </p>
383
+ </div>
384
+ <p id='zip_ffs' class='NormRef'>[5], Title 5</p>
385
+ </div>
386
+ <br/>
387
+ <div>
388
+ <h1 class='Section3'>Bibliography</h1>
389
+ <p id='ISBN' class='Biblio'>
390
+ [1]&#160;
391
+ <i>Chemicals for analytical laboratory use</i>
392
+ </p>
393
+ <p id='ISSN' class='Biblio'>
394
+ [2]&#160;
395
+ <i>Instruments for analytical laboratory use</i>
396
+ </p>
397
+ <div class='Note'>
398
+ <p>
399
+ <span class='note_label'>NOTE</span>
400
+ &#160; This is an annotation of document ISSN.
401
+ </p>
402
+ </div>
403
+ <div class='Note'>
404
+ <p>
405
+ <span class='note_label'>NOTE</span>
406
+ &#160; This is another annotation of document ISSN.
407
+ </p>
408
+ </div>
409
+ <p id='ISO3696' class='Biblio'>
410
+ [3]&#160; ISO 3696,
411
+ <i>Water for analytical laboratory use</i>
412
+ </p>
413
+ <p id='ref10' class='Biblio'>
414
+ [10]&#160;
415
+ <span style='font-variant:small-caps;'>Standard No I.C.C 167</span>
416
+ .
417
+ <i>
418
+ Determination of the protein content in cereal and cereal products
419
+ for food and animal feeding stuffs according to the Dumas combustion
420
+ method
421
+ </i>
422
+ (see
423
+ <a href='http://www.icc.or.at'>http://www.icc.or.at</a>
424
+ )
425
+ </p>
426
+ <p id='ref11' class='Biblio'>
427
+ [4]&#160; IETF RFC 10,
428
+ <i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i>
429
+ </p>
430
+ <p id='ref12' class='Biblio'>
431
+ Citn&#160; IETF RFC 20, CitationWorks. 2019.
432
+ <i>How to cite a reference</i>
433
+ .
434
+ </p>
435
+ <p id='ref10b' class='Biblio'>
436
+ [5]&#160; IETF RFC 20,
437
+ <i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i>
438
+ </p>
439
+ <p id='ref10c' class='Biblio'>
440
+ [6]&#160;
441
+ <i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i>
442
+ </p>
443
+ </div>
444
+ <aside id='fn:1' class='footnote'>
445
+ <p>Under preparation. (Stage at the time of publication ISO/DIS 16634)</p>
446
+ </aside>
447
+ </div>
448
+ </body>
449
+ </html>
417
450
  OUTPUT
418
451
  expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
419
452
  .convert("test", input, true)
@@ -601,28 +634,28 @@ RSpec.describe IsoDoc do
601
634
  PRESXML
602
635
 
603
636
  html = <<~OUTPUT
604
- #{HTML_HDR}
605
- <br/>
606
- <div>
607
- <h1 class='ForewordTitle'>Foreword</h1>
608
- <p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
609
- <a href='#ISO712'>[110]</a>
610
- <a href='#ISBN'>[1]</a>
611
- <a href='#ISSN'>[2]</a>
612
- <a href='#ISO16634'>ISO 16634:-- (all parts)</a>
613
- <a href='#ref1'>ICC/167</a>
614
- <a href='#ref10'>[10]</a>
615
- <a href='#ref12'>Citn</a>
616
- <a href='#zip_ffs'>[5]</a>
617
- </p>
618
- </div>
619
- <p class='zzSTDTitle1'/>
620
- </div>
621
- </body>
622
- </html>
623
- #{' '}
637
+ #{HTML_HDR}
638
+ <br/>
639
+ <div>
640
+ <h1 class='ForewordTitle'>Foreword</h1>
641
+ <p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
642
+ <a href='#ISO712'>[110]</a>
643
+ <a href='#ISBN'>[1]</a>
644
+ <a href='#ISSN'>[2]</a>
645
+ <a href='#ISO16634'>ISO 16634:-- (all parts)</a>
646
+ <a href='#ref1'>ICC/167</a>
647
+ <a href='#ref10'>[10]</a>
648
+ <a href='#ref12'>Citn</a>
649
+ <a href='#zip_ffs'>[5]</a>
650
+ </p>
651
+ </div>
652
+ <p class='zzSTDTitle1'/>
653
+ </div>
654
+ </body>
655
+ </html>
624
656
  OUTPUT
625
- expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
657
+ expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", presxml,
658
+ true))).to be_equivalent_to xmlpp(html)
626
659
  end
627
660
 
628
661
  it "processes hidden references sections in Relaton bibliographies" do
@@ -692,49 +725,48 @@ RSpec.describe IsoDoc do
692
725
  PRESXML
693
726
 
694
727
  html = <<~OUTPUT
695
- #{HTML_HDR}
696
- <br/>
697
- <div>
698
- <h1 class='ForewordTitle'>Foreword</h1>
699
- <p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
700
- <a href='#ISO712'>[110]</a>
701
- <a href='#ISBN'>[1]</a>
702
- <a href='#ISSN'>[2]</a>
703
- <a href='#ISO16634'>ISO 16634:-- (all parts)</a>
704
- <a href='#ref1'>ICC/167</a>
705
- <a href='#ref10'>[10]</a>
706
- <a href='#ref12'>Citn</a>
707
- <a href='#zip_ffs'>[5]</a>
708
- </p>
709
- </div>
710
- <p class='zzSTDTitle1'/>
711
- <div>
712
- <h1>1.&#160; Normative References</h1>
713
- <p>
714
- The following documents are referred to in the text in such a way
715
- that some or all of their content constitutes requirements of this
716
- document. For dated references, only the edition cited applies. For
717
- undated references, the latest edition of the referenced document
718
- (including any amendments) applies.
719
- </p>
720
- <p id='ISO16634' class='NormRef'>
721
- ISO 16634:-- (all parts)
722
- <a class='FootnoteRef' href='#fn:1'>
723
- <sup>1</sup>
724
- </a>
725
- ,
726
- <i>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</i>
727
- </p>
728
- </div>
729
- <aside id='fn:1' class='footnote'>
730
- <p>Under preparation. (Stage at the time of publication ISO/DIS 16634)</p>
731
- </aside>
732
- #{' '}
733
- </div>
734
- </body>
735
- </html>
736
- #{' '}
728
+ #{HTML_HDR}
729
+ <br/>
730
+ <div>
731
+ <h1 class='ForewordTitle'>Foreword</h1>
732
+ <p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
733
+ <a href='#ISO712'>[110]</a>
734
+ <a href='#ISBN'>[1]</a>
735
+ <a href='#ISSN'>[2]</a>
736
+ <a href='#ISO16634'>ISO 16634:-- (all parts)</a>
737
+ <a href='#ref1'>ICC/167</a>
738
+ <a href='#ref10'>[10]</a>
739
+ <a href='#ref12'>Citn</a>
740
+ <a href='#zip_ffs'>[5]</a>
741
+ </p>
742
+ </div>
743
+ <p class='zzSTDTitle1'/>
744
+ <div>
745
+ <h1>1.&#160; Normative References</h1>
746
+ <p>
747
+ The following documents are referred to in the text in such a way
748
+ that some or all of their content constitutes requirements of this
749
+ document. For dated references, only the edition cited applies. For
750
+ undated references, the latest edition of the referenced document
751
+ (including any amendments) applies.
752
+ </p>
753
+ <p id='ISO16634' class='NormRef'>
754
+ ISO 16634:-- (all parts)
755
+ <a class='FootnoteRef' href='#fn:1'>
756
+ <sup>1</sup>
757
+ </a>
758
+ ,
759
+ <i>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</i>
760
+ </p>
761
+ </div>
762
+ <aside id='fn:1' class='footnote'>
763
+ <p>Under preparation. (Stage at the time of publication ISO/DIS 16634)</p>
764
+ </aside>
765
+ </div>
766
+ </body>
767
+ </html>
737
768
  OUTPUT
738
- expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
769
+ expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", presxml,
770
+ true))).to be_equivalent_to xmlpp(html)
739
771
  end
740
772
  end