isodoc 2.1.0.2 → 2.1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/isodoc.gemspec +6 -3
- data/lib/isodoc/base_style/all.css +227 -0
- data/lib/isodoc/base_style/blocks.css +0 -0
- data/lib/isodoc/base_style/blocks.scss +7 -0
- data/lib/isodoc/base_style/coverpage.css +0 -0
- data/lib/isodoc/base_style/defaults.css +0 -0
- data/lib/isodoc/base_style/metanorma_word.css +47 -0
- data/lib/isodoc/base_style/nav.css +0 -0
- data/lib/isodoc/base_style/reset.css +125 -0
- data/lib/isodoc/base_style/typography.css +0 -0
- data/lib/isodoc/class_utils.rb +1 -1
- data/lib/isodoc/function/blocks.rb +1 -1
- data/lib/isodoc/function/cleanup.rb +1 -1
- data/lib/isodoc/function/inline.rb +4 -2
- data/lib/isodoc/function/lists.rb +24 -9
- data/lib/isodoc/function/table.rb +1 -1
- data/lib/isodoc/function/to_word_html.rb +3 -2
- data/lib/isodoc/function/utils.rb +18 -8
- data/lib/isodoc/gem_tasks.rb +19 -10
- data/lib/isodoc/html_function/html.rb +2 -2
- data/lib/isodoc/i18n.rb +19 -0
- data/lib/isodoc/metadata.rb +2 -2
- data/lib/isodoc/presentation_function/block.rb +3 -3
- data/lib/isodoc/presentation_function/image.rb +1 -1
- data/lib/isodoc/presentation_function/inline.rb +13 -6
- data/lib/isodoc/presentation_function/section.rb +3 -1
- data/lib/isodoc/presentation_function/xrefs.rb +22 -6
- data/lib/isodoc/presentation_xml_convert.rb +1 -0
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/word_function/body.rb +9 -6
- data/lib/isodoc/word_function/postprocess.rb +1 -1
- data/lib/isodoc/word_function/postprocess_cover.rb +5 -5
- data/lib/isodoc/xref/xref_gen.rb +6 -6
- metadata +16 -69
- data/.github/workflows/rake.yml +0 -15
- data/.github/workflows/release.yml +0 -24
- data/.hound.yml +0 -5
- data/.oss-guides.rubocop.yml +0 -1077
- data/.rubocop.yml +0 -10
- data/Rakefile +0 -8
- data/bin/rspec +0 -17
- data/spec/assets/header.html +0 -7
- data/spec/assets/html.scss +0 -20
- data/spec/assets/html_override.css +0 -1
- data/spec/assets/htmlcover.html +0 -4
- data/spec/assets/htmlintro.html +0 -5
- data/spec/assets/i18n.yaml +0 -41
- data/spec/assets/iso.xml +0 -8
- data/spec/assets/odf.emf +0 -0
- data/spec/assets/odf.svg +0 -1
- data/spec/assets/odf1.svg +0 -4
- data/spec/assets/outputtest/a.xml +0 -66
- data/spec/assets/outputtest/iso.international-standard.xsl +0 -3011
- data/spec/assets/rice_image1 +0 -0
- data/spec/assets/rice_image1.png +0 -0
- data/spec/assets/scripts.html +0 -3
- data/spec/assets/scripts_override.html +0 -3
- data/spec/assets/std.css +0 -2
- data/spec/assets/word.css +0 -2
- data/spec/assets/word_override.css +0 -1
- data/spec/assets/wordcover.html +0 -3
- data/spec/assets/wordintro.html +0 -4
- data/spec/isodoc/blocks_spec.rb +0 -2934
- data/spec/isodoc/cleanup_spec.rb +0 -1056
- data/spec/isodoc/footnotes_spec.rb +0 -264
- data/spec/isodoc/form_spec.rb +0 -160
- data/spec/isodoc/i18n_spec.rb +0 -1201
- data/spec/isodoc/inline_spec.rb +0 -2301
- data/spec/isodoc/lists_spec.rb +0 -469
- data/spec/isodoc/metadata_spec.rb +0 -401
- data/spec/isodoc/postproc_spec.rb +0 -2941
- data/spec/isodoc/presentation_xml_spec.rb +0 -1476
- data/spec/isodoc/ref_spec.rb +0 -955
- data/spec/isodoc/section_spec.rb +0 -2123
- data/spec/isodoc/table_spec.rb +0 -588
- data/spec/isodoc/terms_spec.rb +0 -712
- data/spec/isodoc/utils_spec.rb +0 -57
- data/spec/isodoc/xref_numbering_spec.rb +0 -378
- data/spec/isodoc/xref_spec.rb +0 -1837
- data/spec/isodoc/xslfo_convert_spec.rb +0 -103
- data/spec/spec_helper.rb +0 -81
data/spec/isodoc/ref_spec.rb
DELETED
@@ -1,955 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
RSpec.describe IsoDoc do
|
4
|
-
it "processes Relaton bibliographies" do
|
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="book">
|
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="journal">
|
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>
|
131
|
-
INPUT
|
132
|
-
presxml = <<~PRESXML
|
133
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
134
|
-
<bibdata>
|
135
|
-
<language current="true">en</language>
|
136
|
-
</bibdata>
|
137
|
-
<preface>
|
138
|
-
<foreword displayorder="1">
|
139
|
-
<p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
|
140
|
-
<eref bibitemid='ISO712'>[110]</eref>
|
141
|
-
<eref bibitemid='ISBN'>[1]</eref>
|
142
|
-
<eref bibitemid='ISSN'>[2]</eref>
|
143
|
-
<eref bibitemid='ISO16634'>ISO 16634:-- (all parts)</eref>
|
144
|
-
<eref bibitemid='ref1'>ICC/167</eref>
|
145
|
-
<eref bibitemid='ref10'>[10]</eref>
|
146
|
-
<eref bibitemid='ref12'>Citn</eref>
|
147
|
-
<eref bibitemid='zip_ffs'>[5]</eref>
|
148
|
-
</p>
|
149
|
-
</foreword>
|
150
|
-
</preface>
|
151
|
-
<bibliography>
|
152
|
-
<references id='_normative_references' obligation='informative' normative='true' displayorder="2">
|
153
|
-
<title depth='1'>1.<tab/>Normative References</title>
|
154
|
-
<p>
|
155
|
-
The following documents are referred to in the text in such a way that
|
156
|
-
some or all of their content constitutes requirements of this document.
|
157
|
-
For dated references, only the edition cited applies. For undated
|
158
|
-
references, the latest edition of the referenced document (including any
|
159
|
-
amendments) applies.
|
160
|
-
</p>
|
161
|
-
<bibitem id='ISO712' type='standard'>
|
162
|
-
<formattedref>International Organization for Standardization. <em>Cereals and cereal products</em>.</formattedref>
|
163
|
-
<docidentifier type='ISO'>ISO 712</docidentifier>
|
164
|
-
<docidentifier type='metanorma'>[110]</docidentifier>
|
165
|
-
</bibitem>
|
166
|
-
<bibitem id='ISO16634' type='standard'>
|
167
|
-
<formattedref><em>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</em>.</formattedref>
|
168
|
-
<docidentifier type='ISO'>ISO 16634:-- (all parts)</docidentifier>
|
169
|
-
<note format='text/plain' type='Unpublished-Status' reference='1'>Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
|
170
|
-
</bibitem>
|
171
|
-
<bibitem id='ISO20483' type='standard'>
|
172
|
-
<formattedref>International Organization for Standardization. <em>Cereals and pulses</em>. 2013–2014.</formattedref>
|
173
|
-
<docidentifier type='ISO'>ISO 20483:2013-2014</docidentifier>
|
174
|
-
</bibitem>
|
175
|
-
<bibitem id='ref1'>
|
176
|
-
<formattedref format='application/x-isodoc+xml'>
|
177
|
-
<smallcap>Standard No I.C.C 167</smallcap>
|
178
|
-
.
|
179
|
-
<em>
|
180
|
-
Determination of the protein content in cereal and cereal products
|
181
|
-
for food and animal feeding stuffs according to the Dumas combustion
|
182
|
-
method
|
183
|
-
</em>
|
184
|
-
(see
|
185
|
-
<link target='http://www.icc.or.at'/>
|
186
|
-
) [ICC/167]
|
187
|
-
</formattedref>
|
188
|
-
<docidentifier type='ICC'>ICC/167</docidentifier>
|
189
|
-
</bibitem>
|
190
|
-
<note>
|
191
|
-
<name>NOTE</name>
|
192
|
-
<p>This is an annotation of ISO 20483:2013-2014</p>
|
193
|
-
</note>
|
194
|
-
<bibitem id='zip_ffs'>
|
195
|
-
<formattedref format='application/x-isodoc+xml'>Title 5</formattedref>
|
196
|
-
<docidentifier type='metanorma'>[5]</docidentifier>
|
197
|
-
</bibitem>
|
198
|
-
</references>
|
199
|
-
<references id='_bibliography' obligation='informative' normative='false' displayorder="3">
|
200
|
-
<title depth="1">Bibliography</title>
|
201
|
-
<bibitem id='ISBN' type='book'>
|
202
|
-
<formattedref><em>Chemicals for analytical laboratory use</em>. ISBN.</formattedref>
|
203
|
-
<docidentifier type='metanorma-ordinal'>[1]</docidentifier>
|
204
|
-
<docidentifier type='ISBN'>ISBN</docidentifier>
|
205
|
-
</bibitem>
|
206
|
-
<bibitem id='ISSN' type='journal'>
|
207
|
-
<formattedref><em>Instruments for analytical laboratory use</em>. ISSN.</formattedref>
|
208
|
-
<docidentifier type='metanorma-ordinal'>[2]</docidentifier>
|
209
|
-
<docidentifier type='ISSN'>ISSN</docidentifier>
|
210
|
-
</bibitem>
|
211
|
-
<note>
|
212
|
-
<name>NOTE</name>
|
213
|
-
<p>This is an annotation of document ISSN.</p>
|
214
|
-
</note>
|
215
|
-
<note>
|
216
|
-
<name>NOTE</name>
|
217
|
-
<p>This is another annotation of document ISSN.</p>
|
218
|
-
</note>
|
219
|
-
<bibitem id='ISO3696' type='standard'>
|
220
|
-
<formattedref><em>Water for analytical laboratory use</em>.</formattedref>
|
221
|
-
<docidentifier type='metanorma-ordinal'>[3]</docidentifier>
|
222
|
-
<docidentifier type='ISO'>ISO 3696</docidentifier>
|
223
|
-
</bibitem>
|
224
|
-
<bibitem id='ref10'>
|
225
|
-
<formattedref format='application/x-isodoc+xml'>
|
226
|
-
<smallcap>Standard No I.C.C 167</smallcap>
|
227
|
-
.
|
228
|
-
<em>
|
229
|
-
Determination of the protein content in cereal and cereal products
|
230
|
-
for food and animal feeding stuffs according to the Dumas combustion
|
231
|
-
method
|
232
|
-
</em>
|
233
|
-
(see
|
234
|
-
<link target='http://www.icc.or.at'/>
|
235
|
-
)
|
236
|
-
</formattedref>
|
237
|
-
<docidentifier type='metanorma'>[10]</docidentifier>
|
238
|
-
</bibitem>
|
239
|
-
<bibitem id="ref10a" hidden="true">
|
240
|
-
<formattedref><em>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</em>.</formattedref>
|
241
|
-
<docidentifier type="IETF">IETF RFC 20</docidentifier>
|
242
|
-
</bibitem>
|
243
|
-
<bibitem id='ref11'>
|
244
|
-
<formattedref><em>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</em>.</formattedref>
|
245
|
-
<docidentifier type='metanorma-ordinal'>[4]</docidentifier>
|
246
|
-
<docidentifier type='IETF'>IETF RFC 10</docidentifier>
|
247
|
-
</bibitem>
|
248
|
-
<bibitem id='ref12'>
|
249
|
-
<formattedref format='application/x-isodoc+xml'>
|
250
|
-
CitationWorks. 2019.
|
251
|
-
<em>How to cite a reference</em>
|
252
|
-
. [IETF RFC 20]
|
253
|
-
</formattedref>
|
254
|
-
<docidentifier type='metanorma'>[Citn]</docidentifier>
|
255
|
-
<docidentifier type='IETF'>IETF RFC 20</docidentifier>
|
256
|
-
</bibitem>
|
257
|
-
<bibitem id="ref10b">
|
258
|
-
<formattedref><em>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</em>.</formattedref>
|
259
|
-
<docidentifier type='metanorma-ordinal'>[5]</docidentifier>
|
260
|
-
<docidentifier type="IETF">IETF RFC 20</docidentifier>
|
261
|
-
</bibitem>
|
262
|
-
<bibitem id='ref10c'>
|
263
|
-
<formattedref><em>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</em>.</formattedref>
|
264
|
-
<docidentifier type='metanorma-ordinal'>[6]</docidentifier>
|
265
|
-
<docidentifier type='DOI'>DOI ABC 20</docidentifier>
|
266
|
-
</bibitem>
|
267
|
-
</references>
|
268
|
-
</bibliography>
|
269
|
-
</iso-standard>
|
270
|
-
PRESXML
|
271
|
-
|
272
|
-
html = <<~OUTPUT
|
273
|
-
#{HTML_HDR}
|
274
|
-
<br/>
|
275
|
-
<div>
|
276
|
-
<h1 class='ForewordTitle'>Foreword</h1>
|
277
|
-
<p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
|
278
|
-
<a href='#ISO712'>[110]</a>
|
279
|
-
<a href='#ISBN'>[1]</a>
|
280
|
-
<a href='#ISSN'>[2]</a>
|
281
|
-
<a href='#ISO16634'>ISO 16634:-- (all parts)</a>
|
282
|
-
<a href='#ref1'>ICC/167</a>
|
283
|
-
<a href='#ref10'>[10]</a>
|
284
|
-
<a href='#ref12'>Citn</a>
|
285
|
-
<a href='#zip_ffs'>[5]</a>
|
286
|
-
</p>
|
287
|
-
</div>
|
288
|
-
<p class='zzSTDTitle1'/>
|
289
|
-
<div>
|
290
|
-
<h1>1.  Normative References</h1>
|
291
|
-
<p>
|
292
|
-
The following documents are referred to in the text in such a way
|
293
|
-
that some or all of their content constitutes requirements of this
|
294
|
-
document. For dated references, only the edition cited applies. For
|
295
|
-
undated references, the latest edition of the referenced document
|
296
|
-
(including any amendments) applies.
|
297
|
-
</p>
|
298
|
-
<p id='ISO712' class='NormRef'>
|
299
|
-
[110], ISO 712, International Organization for Standardization.
|
300
|
-
<i>Cereals and cereal products</i>
|
301
|
-
.
|
302
|
-
</p>
|
303
|
-
<p id='ISO16634' class='NormRef'>
|
304
|
-
ISO 16634:-- (all parts)
|
305
|
-
<a class='FootnoteRef' href='#fn:1'>
|
306
|
-
<sup>1</sup>
|
307
|
-
</a>
|
308
|
-
,
|
309
|
-
<i>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</i>
|
310
|
-
.
|
311
|
-
</p>
|
312
|
-
<p id='ISO20483' class='NormRef'>
|
313
|
-
ISO 20483:2013-2014, International Organization for Standardization.
|
314
|
-
<i>Cereals and pulses</i>
|
315
|
-
. 2013–2014.
|
316
|
-
</p>
|
317
|
-
<p id='ref1' class='NormRef'>
|
318
|
-
ICC/167,
|
319
|
-
<span style='font-variant:small-caps;'>Standard No I.C.C 167</span>
|
320
|
-
.
|
321
|
-
<i>
|
322
|
-
Determination of the protein content in cereal and cereal products
|
323
|
-
for food and animal feeding stuffs according to the Dumas combustion
|
324
|
-
method
|
325
|
-
</i>
|
326
|
-
(see
|
327
|
-
<a href='http://www.icc.or.at'>http://www.icc.or.at</a>
|
328
|
-
) [ICC/167]
|
329
|
-
</p>
|
330
|
-
<div class='Note'>
|
331
|
-
<p>
|
332
|
-
<span class='note_label'>NOTE</span>
|
333
|
-
  This is an annotation of ISO 20483:2013-2014
|
334
|
-
</p>
|
335
|
-
</div>
|
336
|
-
<p id='zip_ffs' class='NormRef'>[5], Title 5</p>
|
337
|
-
</div>
|
338
|
-
<br/>
|
339
|
-
<div>
|
340
|
-
<h1 class='Section3'>Bibliography</h1>
|
341
|
-
<p id='ISBN' class='Biblio'>
|
342
|
-
[1] 
|
343
|
-
<i>Chemicals for analytical laboratory use</i>
|
344
|
-
. ISBN.
|
345
|
-
</p>
|
346
|
-
<p id='ISSN' class='Biblio'>
|
347
|
-
[2] 
|
348
|
-
<i>Instruments for analytical laboratory use</i>
|
349
|
-
. ISSN.
|
350
|
-
</p>
|
351
|
-
<div class='Note'>
|
352
|
-
<p>
|
353
|
-
<span class='note_label'>NOTE</span>
|
354
|
-
  This is an annotation of document ISSN.
|
355
|
-
</p>
|
356
|
-
</div>
|
357
|
-
<div class='Note'>
|
358
|
-
<p>
|
359
|
-
<span class='note_label'>NOTE</span>
|
360
|
-
  This is another annotation of document ISSN.
|
361
|
-
</p>
|
362
|
-
</div>
|
363
|
-
<p id='ISO3696' class='Biblio'>
|
364
|
-
[3]  ISO 3696,
|
365
|
-
<i>Water for analytical laboratory use</i>
|
366
|
-
.
|
367
|
-
</p>
|
368
|
-
<p id='ref10' class='Biblio'>
|
369
|
-
[10] 
|
370
|
-
<span style='font-variant:small-caps;'>Standard No I.C.C 167</span>
|
371
|
-
.
|
372
|
-
<i>
|
373
|
-
Determination of the protein content in cereal and cereal products
|
374
|
-
for food and animal feeding stuffs according to the Dumas combustion
|
375
|
-
method
|
376
|
-
</i>
|
377
|
-
(see
|
378
|
-
<a href='http://www.icc.or.at'>http://www.icc.or.at</a>
|
379
|
-
)
|
380
|
-
</p>
|
381
|
-
<p id='ref11' class='Biblio'>
|
382
|
-
[4]  IETF RFC 10,
|
383
|
-
<i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i>
|
384
|
-
.
|
385
|
-
</p>
|
386
|
-
<p id='ref12' class='Biblio'>
|
387
|
-
Citn  IETF RFC 20, CitationWorks. 2019.
|
388
|
-
<i>How to cite a reference</i>
|
389
|
-
. [IETF RFC 20]
|
390
|
-
</p>
|
391
|
-
<p id='ref10b' class='Biblio'>
|
392
|
-
[5]  IETF RFC 20,
|
393
|
-
<i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i>
|
394
|
-
.
|
395
|
-
</p>
|
396
|
-
<p id='ref10c' class='Biblio'>
|
397
|
-
[6] 
|
398
|
-
<i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i>
|
399
|
-
.
|
400
|
-
</p>
|
401
|
-
</div>
|
402
|
-
<aside id='fn:1' class='footnote'>
|
403
|
-
<p>Under preparation. (Stage at the time of publication ISO/DIS 16634)</p>
|
404
|
-
</aside>
|
405
|
-
</div>
|
406
|
-
</body>
|
407
|
-
</html>
|
408
|
-
OUTPUT
|
409
|
-
expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
|
410
|
-
.convert("test", input, true)
|
411
|
-
.sub(%r{<localized-strings>.*</localized-strings>}m, "")))
|
412
|
-
.to be_equivalent_to xmlpp(presxml)
|
413
|
-
expect(xmlpp(IsoDoc::HtmlConvert.new({})
|
414
|
-
.convert("test", presxml, true)))
|
415
|
-
.to be_equivalent_to xmlpp(html)
|
416
|
-
end
|
417
|
-
|
418
|
-
it "processes hidden references sections in Relaton bibliographies" do
|
419
|
-
presxml = <<~PRESXML
|
420
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
421
|
-
<bibdata>
|
422
|
-
<language current="true">en</language>
|
423
|
-
</bibdata>
|
424
|
-
<preface>
|
425
|
-
<foreword>
|
426
|
-
<p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
|
427
|
-
<eref bibitemid='ISO712'>[110]</eref>
|
428
|
-
<eref bibitemid='ISBN'>[1]</eref>
|
429
|
-
<eref bibitemid='ISSN'>[2]</eref>
|
430
|
-
<eref bibitemid='ISO16634'>ISO 16634:-- (all parts)</eref>
|
431
|
-
<eref bibitemid='ref1'>ICC/167</eref>
|
432
|
-
<eref bibitemid='ref10'>[10]</eref>
|
433
|
-
<eref bibitemid='ref12'>Citn</eref>
|
434
|
-
<eref bibitemid='zip_ffs'>[5]</eref>
|
435
|
-
</p>
|
436
|
-
</foreword>
|
437
|
-
</preface>
|
438
|
-
<bibliography>
|
439
|
-
<references id='_normative_references' obligation='informative' normative='true' hidden="true">
|
440
|
-
<title depth='1'>1.<tab/>Normative References</title>
|
441
|
-
<p>
|
442
|
-
The following documents are referred to in the text in such a way that
|
443
|
-
some or all of their content constitutes requirements of this document.
|
444
|
-
For dated references, only the edition cited applies. For undated
|
445
|
-
references, the latest edition of the referenced document (including any
|
446
|
-
amendments) applies.
|
447
|
-
</p>
|
448
|
-
<bibitem id='ISO712' type='standard'>
|
449
|
-
<title format='text/plain'>Cereals or cereal products</title>
|
450
|
-
<title type='main' format='text/plain'>Cereals and cereal products</title>
|
451
|
-
<docidentifier type='ISO'>ISO 712</docidentifier>
|
452
|
-
<docidentifier type='metanorma'>[110]</docidentifier>
|
453
|
-
<contributor>
|
454
|
-
<role type='publisher'/>
|
455
|
-
<organization>
|
456
|
-
<name>International Organization for Standardization</name>
|
457
|
-
</organization>
|
458
|
-
</contributor>
|
459
|
-
</bibitem>
|
460
|
-
<bibitem id='ISO16634' type='standard'>
|
461
|
-
<title language='x' format='text/plain'>
|
462
|
-
Cereals, pulses, milled cereal products, xxxx, oilseeds and animal
|
463
|
-
feeding stuffs
|
464
|
-
</title>
|
465
|
-
<title language='en' format='text/plain'>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</title>
|
466
|
-
<docidentifier type='ISO'>ISO 16634:-- (all parts)</docidentifier>
|
467
|
-
<date type='published'>
|
468
|
-
<on>--</on>
|
469
|
-
</date>
|
470
|
-
<contributor>
|
471
|
-
<role type='publisher'/>
|
472
|
-
<organization>
|
473
|
-
<abbreviation>ISO</abbreviation>
|
474
|
-
</organization>
|
475
|
-
</contributor>
|
476
|
-
<note format='text/plain' type='Unpublished-Status' reference='1'>Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
|
477
|
-
<extent type='part'>
|
478
|
-
<referenceFrom>all</referenceFrom>
|
479
|
-
</extent>
|
480
|
-
</bibitem>
|
481
|
-
<bibitem id='ISO20483' type='standard'>
|
482
|
-
<title format='text/plain'>Cereals and pulses</title>
|
483
|
-
<docidentifier type='ISO'>ISO 20483:2013-2014</docidentifier>
|
484
|
-
<date type='published'>
|
485
|
-
<from>2013</from>
|
486
|
-
<to>2014</to>
|
487
|
-
</date>
|
488
|
-
<contributor>
|
489
|
-
<role type='publisher'/>
|
490
|
-
<organization>
|
491
|
-
<name>International Organization for Standardization</name>
|
492
|
-
</organization>
|
493
|
-
</contributor>
|
494
|
-
</bibitem>
|
495
|
-
<bibitem id='ref1'>
|
496
|
-
<formattedref format='application/x-isodoc+xml'>
|
497
|
-
<smallcap>Standard No I.C.C 167</smallcap>
|
498
|
-
.
|
499
|
-
<em>
|
500
|
-
Determination of the protein content in cereal and cereal products
|
501
|
-
for food and animal feeding stuffs according to the Dumas combustion
|
502
|
-
method
|
503
|
-
</em>
|
504
|
-
(see
|
505
|
-
<link target='http://www.icc.or.at'/>
|
506
|
-
)
|
507
|
-
</formattedref>
|
508
|
-
<docidentifier type='ICC'>ICC/167</docidentifier>
|
509
|
-
</bibitem>
|
510
|
-
<note>
|
511
|
-
<name>NOTE</name>
|
512
|
-
<p>This is an annotation of ISO 20483:2013-2014</p>
|
513
|
-
</note>
|
514
|
-
<bibitem id='zip_ffs'>
|
515
|
-
<formattedref format='application/x-isodoc+xml'>Title 5</formattedref>
|
516
|
-
<docidentifier type='metanorma'>[5]</docidentifier>
|
517
|
-
</bibitem>
|
518
|
-
</references>
|
519
|
-
<references id='_bibliography' obligation='informative' normative='false' hidden="true">
|
520
|
-
<title depth="1">Bibliography</title>
|
521
|
-
<bibitem id='ISBN' type='ISBN'>
|
522
|
-
<title format='text/plain'>Chemicals for analytical laboratory use</title>
|
523
|
-
<docidentifier type='ISBN'>ISBN</docidentifier>
|
524
|
-
<docidentifier type='metanorma'>[1]</docidentifier>
|
525
|
-
<contributor>
|
526
|
-
<role type='publisher'/>
|
527
|
-
<organization>
|
528
|
-
<abbreviation>ISBN</abbreviation>
|
529
|
-
</organization>
|
530
|
-
</contributor>
|
531
|
-
</bibitem>
|
532
|
-
<bibitem id='ISSN' type='ISSN'>
|
533
|
-
<title format='text/plain'>Instruments for analytical laboratory use</title>
|
534
|
-
<docidentifier type='ISSN'>ISSN</docidentifier>
|
535
|
-
<docidentifier type='metanorma'>[2]</docidentifier>
|
536
|
-
<contributor>
|
537
|
-
<role type='publisher'/>
|
538
|
-
<organization>
|
539
|
-
<abbreviation>ISSN</abbreviation>
|
540
|
-
</organization>
|
541
|
-
</contributor>
|
542
|
-
</bibitem>
|
543
|
-
<note>
|
544
|
-
<name>NOTE</name>
|
545
|
-
<p>This is an annotation of document ISSN.</p>
|
546
|
-
</note>
|
547
|
-
<note>
|
548
|
-
<name>NOTE</name>
|
549
|
-
<p>This is another annotation of document ISSN.</p>
|
550
|
-
</note>
|
551
|
-
<bibitem id='ISO3696' type='standard'>
|
552
|
-
<title format='text/plain'>Water for analytical laboratory use</title>
|
553
|
-
<docidentifier type='ISO'>ISO 3696</docidentifier>
|
554
|
-
<contributor>
|
555
|
-
<role type='publisher'/>
|
556
|
-
<organization>
|
557
|
-
<abbreviation>ISO</abbreviation>
|
558
|
-
</organization>
|
559
|
-
</contributor>
|
560
|
-
</bibitem>
|
561
|
-
<bibitem id='ref10'>
|
562
|
-
<formattedref format='application/x-isodoc+xml'>
|
563
|
-
<smallcap>Standard No I.C.C 167</smallcap>
|
564
|
-
.
|
565
|
-
<em>
|
566
|
-
Determination of the protein content in cereal and cereal products
|
567
|
-
for food and animal feeding stuffs according to the Dumas combustion
|
568
|
-
method
|
569
|
-
</em>
|
570
|
-
(see
|
571
|
-
<link target='http://www.icc.or.at'/>
|
572
|
-
)
|
573
|
-
</formattedref>
|
574
|
-
<docidentifier type='metanorma'>[10]</docidentifier>
|
575
|
-
</bibitem>
|
576
|
-
<bibitem id='ref11'>
|
577
|
-
<title>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</title>
|
578
|
-
<docidentifier type='IETF'>RFC 10</docidentifier>
|
579
|
-
</bibitem>
|
580
|
-
<bibitem id='ref12'>
|
581
|
-
<formattedref format='application/x-isodoc+xml'>
|
582
|
-
CitationWorks. 2019.
|
583
|
-
<em>How to cite a reference</em>
|
584
|
-
.
|
585
|
-
</formattedref>
|
586
|
-
<docidentifier type='metanorma'>[Citn]</docidentifier>
|
587
|
-
<docidentifier type='IETF'>RFC 20</docidentifier>
|
588
|
-
</bibitem>
|
589
|
-
</references>
|
590
|
-
</bibliography>
|
591
|
-
</iso-standard>
|
592
|
-
PRESXML
|
593
|
-
|
594
|
-
html = <<~OUTPUT
|
595
|
-
#{HTML_HDR}
|
596
|
-
<br/>
|
597
|
-
<div>
|
598
|
-
<h1 class='ForewordTitle'>Foreword</h1>
|
599
|
-
<p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
|
600
|
-
<a href='#ISO712'>[110]</a>
|
601
|
-
<a href='#ISBN'>[1]</a>
|
602
|
-
<a href='#ISSN'>[2]</a>
|
603
|
-
<a href='#ISO16634'>ISO 16634:-- (all parts)</a>
|
604
|
-
<a href='#ref1'>ICC/167</a>
|
605
|
-
<a href='#ref10'>[10]</a>
|
606
|
-
<a href='#ref12'>Citn</a>
|
607
|
-
<a href='#zip_ffs'>[5]</a>
|
608
|
-
</p>
|
609
|
-
</div>
|
610
|
-
<p class='zzSTDTitle1'/>
|
611
|
-
</div>
|
612
|
-
</body>
|
613
|
-
</html>
|
614
|
-
OUTPUT
|
615
|
-
expect(xmlpp(IsoDoc::HtmlConvert.new({})
|
616
|
-
.convert("test", presxml, true)))
|
617
|
-
.to be_equivalent_to xmlpp(html)
|
618
|
-
end
|
619
|
-
|
620
|
-
it "processes hidden references sections in Relaton bibliographies" do
|
621
|
-
presxml = <<~PRESXML
|
622
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
623
|
-
<bibdata>
|
624
|
-
<language current="true">en</language>
|
625
|
-
</bibdata>
|
626
|
-
<preface>
|
627
|
-
<foreword>
|
628
|
-
<p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
|
629
|
-
<eref bibitemid='ISO712'>[110]</eref>
|
630
|
-
<eref bibitemid='ISBN'>[1]</eref>
|
631
|
-
<eref bibitemid='ISSN'>[2]</eref>
|
632
|
-
<eref bibitemid='ISO16634'>ISO 16634:-- (all parts)</eref>
|
633
|
-
<eref bibitemid='ref1'>ICC/167</eref>
|
634
|
-
<eref bibitemid='ref10'>[10]</eref>
|
635
|
-
<eref bibitemid='ref12'>Citn</eref>
|
636
|
-
<eref bibitemid='zip_ffs'>[5]</eref>
|
637
|
-
</p>
|
638
|
-
</foreword>
|
639
|
-
</preface>
|
640
|
-
<bibliography>
|
641
|
-
<references id='_normative_references' obligation='informative' normative='true'>
|
642
|
-
<title depth='1'>1.<tab/>Normative References</title>
|
643
|
-
<p>
|
644
|
-
The following documents are referred to in the text in such a way that
|
645
|
-
some or all of their content constitutes requirements of this document.
|
646
|
-
For dated references, only the edition cited applies. For undated
|
647
|
-
references, the latest edition of the referenced document (including any
|
648
|
-
amendments) applies.
|
649
|
-
</p>
|
650
|
-
<bibitem id='ISO712' type='standard' hidden="true">
|
651
|
-
<title format='text/plain'>Cereals or cereal products</title>
|
652
|
-
<title type='main' format='text/plain'>Cereals and cereal products</title>
|
653
|
-
<docidentifier type='ISO'>ISO 712</docidentifier>
|
654
|
-
<docidentifier type='metanorma'>[110]</docidentifier>
|
655
|
-
<contributor>
|
656
|
-
<role type='publisher'/>
|
657
|
-
<organization>
|
658
|
-
<name>International Organization for Standardization</name>
|
659
|
-
</organization>
|
660
|
-
</contributor>
|
661
|
-
</bibitem>
|
662
|
-
<bibitem id='ISO16634' type='standard'>
|
663
|
-
<formattedref language='en' format='text/plain'><em>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</em></formattedref>
|
664
|
-
<docidentifier type='ISO'>ISO 16634:-- (all parts)</docidentifier>
|
665
|
-
<date type='published'>
|
666
|
-
<on>--</on>
|
667
|
-
</date>
|
668
|
-
<contributor>
|
669
|
-
<role type='publisher'/>
|
670
|
-
<organization>
|
671
|
-
<abbreviation>ISO</abbreviation>
|
672
|
-
</organization>
|
673
|
-
</contributor>
|
674
|
-
<note format='text/plain' type='Unpublished-Status' reference='1'>Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
|
675
|
-
<extent type='part'>
|
676
|
-
<referenceFrom>all</referenceFrom>
|
677
|
-
</extent>
|
678
|
-
</bibitem>
|
679
|
-
</references></bibliography></iso-standard>
|
680
|
-
PRESXML
|
681
|
-
|
682
|
-
html = <<~OUTPUT
|
683
|
-
#{HTML_HDR}
|
684
|
-
<br/>
|
685
|
-
<div>
|
686
|
-
<h1 class='ForewordTitle'>Foreword</h1>
|
687
|
-
<p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
|
688
|
-
[110]
|
689
|
-
[1]
|
690
|
-
[2]
|
691
|
-
<a href='#ISO16634'>ISO 16634:-- (all parts)</a>
|
692
|
-
ICC/167
|
693
|
-
[10]
|
694
|
-
Citn
|
695
|
-
[5]
|
696
|
-
</p>
|
697
|
-
</div>
|
698
|
-
<p class='zzSTDTitle1'/>
|
699
|
-
<div>
|
700
|
-
<h1>1.  Normative References</h1>
|
701
|
-
<p>
|
702
|
-
The following documents are referred to in the text in such a way
|
703
|
-
that some or all of their content constitutes requirements of this
|
704
|
-
document. For dated references, only the edition cited applies. For
|
705
|
-
undated references, the latest edition of the referenced document
|
706
|
-
(including any amendments) applies.
|
707
|
-
</p>
|
708
|
-
<p id='ISO16634' class='NormRef'>
|
709
|
-
ISO 16634:-- (all parts)
|
710
|
-
<a class='FootnoteRef' href='#fn:1'>
|
711
|
-
<sup>1</sup>
|
712
|
-
</a>
|
713
|
-
,
|
714
|
-
<i>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</i>
|
715
|
-
</p>
|
716
|
-
</div>
|
717
|
-
<aside id='fn:1' class='footnote'>
|
718
|
-
<p>Under preparation. (Stage at the time of publication ISO/DIS 16634)</p>
|
719
|
-
</aside>
|
720
|
-
</div>
|
721
|
-
</body>
|
722
|
-
</html>
|
723
|
-
OUTPUT
|
724
|
-
expect(xmlpp(IsoDoc::HtmlConvert.new({})
|
725
|
-
.convert("test", presxml, true)))
|
726
|
-
.to be_equivalent_to xmlpp(html)
|
727
|
-
end
|
728
|
-
|
729
|
-
it "selects the primary identifier" do
|
730
|
-
input = <<~INPUT
|
731
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
732
|
-
<bibdata>
|
733
|
-
<language>en</language>
|
734
|
-
</bibdata>
|
735
|
-
<preface><foreword>
|
736
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">
|
737
|
-
<eref bibitemid="ISO712"/>
|
738
|
-
</p>
|
739
|
-
</foreword></preface>
|
740
|
-
<bibliography><references id="_normative_references" obligation="informative" normative="true"><title>Normative References</title>
|
741
|
-
<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>
|
742
|
-
<bibitem id="ISO712" type="standard">
|
743
|
-
<title format="text/plain">Cereals or cereal products</title>
|
744
|
-
<title type="main" format="text/plain">Cereals and cereal products</title>
|
745
|
-
<docidentifier type="ISO">ISO 712</docidentifier>
|
746
|
-
<docidentifier type="IEC" primary="true">IEC 217</docidentifier>
|
747
|
-
<contributor>
|
748
|
-
<role type="publisher"/>
|
749
|
-
<organization>
|
750
|
-
<name>International Organization for Standardization</name>
|
751
|
-
</organization>
|
752
|
-
</contributor>
|
753
|
-
</bibitem>
|
754
|
-
</references></bibliography></iso-standard>
|
755
|
-
INPUT
|
756
|
-
presxml = <<~PRESXML
|
757
|
-
<foreword displayorder='1'>
|
758
|
-
<p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
|
759
|
-
<eref bibitemid='ISO712'>IEC 217</eref>
|
760
|
-
</p>
|
761
|
-
</foreword>
|
762
|
-
PRESXML
|
763
|
-
expect(xmlpp(Nokogiri::XML(
|
764
|
-
IsoDoc::PresentationXMLConvert.new({})
|
765
|
-
.convert("test", input, true),
|
766
|
-
).at("//xmlns:foreword").to_xml))
|
767
|
-
.to be_equivalent_to xmlpp(presxml)
|
768
|
-
end
|
769
|
-
|
770
|
-
it "selects multiple primary identifiers" do
|
771
|
-
input = <<~INPUT
|
772
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
773
|
-
<bibdata>
|
774
|
-
<language>en</language>
|
775
|
-
</bibdata>
|
776
|
-
<preface><foreword>
|
777
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">
|
778
|
-
<eref bibitemid="ISO712"/>
|
779
|
-
</p>
|
780
|
-
</foreword></preface>
|
781
|
-
<bibliography><references id="_normative_references" obligation="informative" normative="true"><title>Normative References</title>
|
782
|
-
<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>
|
783
|
-
<bibitem id="ISO712" type="standard">
|
784
|
-
<title format="text/plain">Cereals or cereal products</title>
|
785
|
-
<title type="main" format="text/plain">Cereals and cereal products</title>
|
786
|
-
<docidentifier type="ISO" primary="true">ISO 712</docidentifier>
|
787
|
-
<docidentifier type="IEC" primary="true">IEC 217</docidentifier>
|
788
|
-
<contributor>
|
789
|
-
<role type="publisher"/>
|
790
|
-
<organization>
|
791
|
-
<name>International Organization for Standardization</name>
|
792
|
-
</organization>
|
793
|
-
</contributor>
|
794
|
-
</bibitem>
|
795
|
-
</references></bibliography></iso-standard>
|
796
|
-
INPUT
|
797
|
-
presxml = <<~PRESXML
|
798
|
-
<foreword displayorder='1'>
|
799
|
-
<p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
|
800
|
-
<eref bibitemid='ISO712'>ISO 712 / IEC 217</eref>
|
801
|
-
</p>
|
802
|
-
</foreword>
|
803
|
-
PRESXML
|
804
|
-
expect(xmlpp(Nokogiri::XML(
|
805
|
-
IsoDoc::PresentationXMLConvert.new({})
|
806
|
-
.convert("test", input, true),
|
807
|
-
).at("//xmlns:foreword").to_xml))
|
808
|
-
.to be_equivalent_to xmlpp(presxml)
|
809
|
-
end
|
810
|
-
|
811
|
-
it "enforces consistent metanorma-ordinal numbering" do
|
812
|
-
input = <<~INPUT
|
813
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
814
|
-
<bibdata>
|
815
|
-
<language>en</language>
|
816
|
-
</bibdata>
|
817
|
-
<bibliography><references id="_normative_references" obligation="informative" normative="false"><title>Bibliography</title>
|
818
|
-
<bibitem id="ref1" type="standard">
|
819
|
-
<title format="text/plain">Cereals or cereal products</title>
|
820
|
-
<docidentifier type="IEC">IEC 217</docidentifier>
|
821
|
-
</bibitem>
|
822
|
-
<bibitem id="ref2" type="standard">
|
823
|
-
<title format="text/plain">Cereals or cereal products</title>
|
824
|
-
<docidentifier type="metanorma">[3]</docidentifier>
|
825
|
-
</bibitem>
|
826
|
-
<bibitem id="ref3" type="standard">
|
827
|
-
<title format="text/plain">Cereals or cereal products</title>
|
828
|
-
<docidentifier>ABC</docidentifier>
|
829
|
-
</bibitem>
|
830
|
-
</references></bibliography></iso-standard>
|
831
|
-
INPUT
|
832
|
-
presxml = <<~PRESXML
|
833
|
-
<bibliography>
|
834
|
-
<references id='_normative_references' obligation='informative' normative='false' displayorder='1'>
|
835
|
-
<title depth='1'>Bibliography</title>
|
836
|
-
<bibitem id='ref1' type='standard'>
|
837
|
-
<formattedref><em>Cereals or cereal products</em>.</formattedref>
|
838
|
-
<docidentifier type='metanorma-ordinal'>[1]</docidentifier>
|
839
|
-
<docidentifier type='IEC'>IEC 217</docidentifier>
|
840
|
-
</bibitem>
|
841
|
-
<bibitem id='ref2' type='standard'>
|
842
|
-
<formattedref><em>Cereals or cereal products</em>.</formattedref>
|
843
|
-
<docidentifier type='metanorma'>[3]</docidentifier>
|
844
|
-
</bibitem>
|
845
|
-
<bibitem id='ref3' type='standard'>
|
846
|
-
<formattedref><em>Cereals or cereal products</em>.</formattedref>
|
847
|
-
<docidentifier type='metanorma-ordinal'>[4]</docidentifier>
|
848
|
-
<docidentifier>ABC</docidentifier>
|
849
|
-
</bibitem>
|
850
|
-
</references>
|
851
|
-
</bibliography>
|
852
|
-
PRESXML
|
853
|
-
expect(xmlpp(Nokogiri::XML(
|
854
|
-
IsoDoc::PresentationXMLConvert.new({})
|
855
|
-
.convert("test", input, true),
|
856
|
-
).at("//xmlns:bibliography").to_xml))
|
857
|
-
.to be_equivalent_to xmlpp(presxml)
|
858
|
-
end
|
859
|
-
|
860
|
-
it "enforces consistent references numbering with hidden items: metanorma identifiers" do
|
861
|
-
input = <<~INPUT
|
862
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
863
|
-
<bibdata>
|
864
|
-
<language>en</language>
|
865
|
-
</bibdata>
|
866
|
-
<bibliography><references id="_normative_references" obligation="informative" normative="false"><title>Bibliography</title>
|
867
|
-
<bibitem id="ref1" type="standard">
|
868
|
-
<title format="text/plain">Cereals or cereal products</title>
|
869
|
-
<docidentifier type="metanorma">[1]</docidentifier>
|
870
|
-
</bibitem>
|
871
|
-
<bibitem id="ref2" type="standard" hidden="true">
|
872
|
-
<title format="text/plain">Cereals or cereal products</title>
|
873
|
-
<docidentifier type="metanorma">[2]</docidentifier>
|
874
|
-
</bibitem>
|
875
|
-
<bibitem id="ref3" type="standard">
|
876
|
-
<title format="text/plain">Cereals or cereal products</title>
|
877
|
-
<docidentifier type="metanorma">[3]</docidentifier>
|
878
|
-
</bibitem>
|
879
|
-
</references></bibliography></iso-standard>
|
880
|
-
INPUT
|
881
|
-
presxml = <<~PRESXML
|
882
|
-
<bibliography>
|
883
|
-
<references id='_normative_references' obligation='informative' normative='false' displayorder='1'>
|
884
|
-
<title depth='1'>Bibliography</title>
|
885
|
-
<bibitem id='ref1' type='standard'>
|
886
|
-
<formattedref><em>Cereals or cereal products</em>.</formattedref>
|
887
|
-
<docidentifier type='metanorma'>[1]</docidentifier>
|
888
|
-
</bibitem>
|
889
|
-
<bibitem id='ref2' type='standard' hidden='true'>
|
890
|
-
<formattedref><em>Cereals or cereal products</em>.</formattedref>
|
891
|
-
<docidentifier type='metanorma'>[2]</docidentifier>
|
892
|
-
</bibitem>
|
893
|
-
<bibitem id='ref3' type='standard'>
|
894
|
-
<formattedref><em>Cereals or cereal products</em>.</formattedref>
|
895
|
-
<docidentifier type='metanorma'>[3]</docidentifier>
|
896
|
-
</bibitem>
|
897
|
-
</references>
|
898
|
-
</bibliography>
|
899
|
-
PRESXML
|
900
|
-
expect(xmlpp(Nokogiri::XML(
|
901
|
-
IsoDoc::PresentationXMLConvert.new({})
|
902
|
-
.convert("test", input, true),
|
903
|
-
).at("//xmlns:bibliography").to_xml))
|
904
|
-
.to be_equivalent_to xmlpp(presxml)
|
905
|
-
end
|
906
|
-
|
907
|
-
it "enforces consistent references numbering with hidden items: metanorma-ordinal identifiers" do
|
908
|
-
input = <<~INPUT
|
909
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
910
|
-
<bibdata>
|
911
|
-
<language>en</language>
|
912
|
-
</bibdata>
|
913
|
-
<bibliography><references id="_normative_references" obligation="informative" normative="false"><title>Bibliography</title>
|
914
|
-
<bibitem id="ref1" type="standard">
|
915
|
-
<title format="text/plain">Cereals or cereal products</title>
|
916
|
-
<docidentifier>ABC</docidentifier>
|
917
|
-
</bibitem>
|
918
|
-
<bibitem id="ref2" type="standard" hidden="true">
|
919
|
-
<title format="text/plain">Cereals or cereal products</title>
|
920
|
-
<docidentifier>ABD</docidentifier>
|
921
|
-
</bibitem>
|
922
|
-
<bibitem id="ref3" type="standard">
|
923
|
-
<title format="text/plain">Cereals or cereal products</title>
|
924
|
-
<docidentifier>ABE</docidentifier>
|
925
|
-
</bibitem>
|
926
|
-
</references></bibliography></iso-standard>
|
927
|
-
INPUT
|
928
|
-
presxml = <<~PRESXML
|
929
|
-
<bibliography>
|
930
|
-
<references id='_normative_references' obligation='informative' normative='false' displayorder='1'>
|
931
|
-
<title depth='1'>Bibliography</title>
|
932
|
-
<bibitem id='ref1' type='standard'>
|
933
|
-
<formattedref><em>Cereals or cereal products</em>.</formattedref>
|
934
|
-
<docidentifier type='metanorma-ordinal'>[1]</docidentifier>
|
935
|
-
<docidentifier>ABC</docidentifier>
|
936
|
-
</bibitem>
|
937
|
-
<bibitem id='ref2' type='standard' hidden='true'>
|
938
|
-
<formattedref><em>Cereals or cereal products</em>.</formattedref>
|
939
|
-
<docidentifier>ABD</docidentifier>
|
940
|
-
</bibitem>
|
941
|
-
<bibitem id='ref3' type='standard'>
|
942
|
-
<formattedref><em>Cereals or cereal products</em>.</formattedref>
|
943
|
-
<docidentifier type='metanorma-ordinal'>[2]</docidentifier>
|
944
|
-
<docidentifier>ABE</docidentifier>
|
945
|
-
</bibitem>
|
946
|
-
</references>
|
947
|
-
</bibliography>
|
948
|
-
PRESXML
|
949
|
-
expect(xmlpp(Nokogiri::XML(
|
950
|
-
IsoDoc::PresentationXMLConvert.new({})
|
951
|
-
.convert("test", input, true),
|
952
|
-
).at("//xmlns:bibliography").to_xml))
|
953
|
-
.to be_equivalent_to xmlpp(presxml)
|
954
|
-
end
|
955
|
-
end
|