isodoc 1.8.3.3 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +3 -31
- data/Gemfile +0 -1
- data/lib/isodoc/base_style/all.css +9 -0
- data/lib/isodoc/base_style/reset.css +9 -0
- data/lib/isodoc/base_style/reset.scss +11 -0
- data/lib/isodoc/class_utils.rb +18 -6
- data/lib/isodoc/convert.rb +8 -1
- data/lib/isodoc/function/blocks.rb +4 -1
- data/lib/isodoc/function/references.rb +32 -23
- data/lib/isodoc/function/section_titles.rb +22 -3
- data/lib/isodoc/function/to_word_html.rb +3 -3
- data/lib/isodoc/function/utils.rb +13 -14
- data/lib/isodoc/headlesshtml_convert.rb +1 -1
- data/lib/isodoc/html_convert.rb +1 -1
- data/lib/isodoc/html_function/postprocess.rb +9 -2
- data/lib/isodoc/i18n.rb +6 -3
- data/lib/isodoc/pdf_convert.rb +1 -1
- data/lib/isodoc/presentation_function/bibdata.rb +0 -6
- data/lib/isodoc/presentation_function/section.rb +42 -4
- data/lib/isodoc/presentation_function/terms.rb +25 -20
- data/lib/isodoc/presentation_xml_convert.rb +1 -0
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/xref/xref_sect_gen.rb +7 -3
- data/lib/isodoc/xslfo_convert.rb +1 -1
- data/spec/isodoc/blocks_spec.rb +3 -2
- data/spec/isodoc/postproc_spec.rb +46 -16
- data/spec/isodoc/presentation_xml_spec.rb +208 -37
- data/spec/isodoc/ref_spec.rb +332 -300
- data/spec/isodoc/section_spec.rb +818 -601
- data/spec/isodoc/utils_spec.rb +57 -0
- metadata +7 -6
data/spec/isodoc/ref_spec.rb
CHANGED
@@ -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
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
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
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
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.  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
|
+
  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] 
|
391
|
+
<i>Chemicals for analytical laboratory use</i>
|
392
|
+
</p>
|
393
|
+
<p id='ISSN' class='Biblio'>
|
394
|
+
[2] 
|
395
|
+
<i>Instruments for analytical laboratory use</i>
|
396
|
+
</p>
|
397
|
+
<div class='Note'>
|
398
|
+
<p>
|
399
|
+
<span class='note_label'>NOTE</span>
|
400
|
+
  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
|
+
  This is another annotation of document ISSN.
|
407
|
+
</p>
|
408
|
+
</div>
|
409
|
+
<p id='ISO3696' class='Biblio'>
|
410
|
+
[3]  ISO 3696,
|
411
|
+
<i>Water for analytical laboratory use</i>
|
412
|
+
</p>
|
413
|
+
<p id='ref10' class='Biblio'>
|
414
|
+
[10] 
|
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]  IETF RFC 10,
|
428
|
+
<i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i>
|
429
|
+
</p>
|
430
|
+
<p id='ref12' class='Biblio'>
|
431
|
+
Citn  IETF RFC 20, CitationWorks. 2019.
|
432
|
+
<i>How to cite a reference</i>
|
433
|
+
.
|
434
|
+
</p>
|
435
|
+
<p id='ref10b' class='Biblio'>
|
436
|
+
[5]  IETF RFC 20,
|
437
|
+
<i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i>
|
438
|
+
</p>
|
439
|
+
<p id='ref10c' class='Biblio'>
|
440
|
+
[6] 
|
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
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
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,
|
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
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
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.  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,
|
769
|
+
expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", presxml,
|
770
|
+
true))).to be_equivalent_to xmlpp(html)
|
739
771
|
end
|
740
772
|
end
|