metanorma-iec 1.4.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 +4 -32
- data/.gitignore +14 -0
- data/Gemfile +6 -0
- data/lib/isodoc/iec/base_convert.rb +25 -26
- data/lib/isodoc/iec/html/htmlstyle.css +56 -21
- data/lib/isodoc/iec/html/htmlstyle.scss +38 -7
- data/lib/isodoc/iec/html/scripts.html +0 -1
- data/lib/isodoc/iec/html/wordstyle.css +13 -11
- data/lib/isodoc/iec/html/wordstyle.scss +13 -11
- data/lib/isodoc/iec/html_convert.rb +2 -1
- data/lib/isodoc/iec/i18n-fr.yaml +1 -1
- data/lib/isodoc/iec/iec.international-standard.xsl +1770 -1324
- data/lib/isodoc/iec/presentation_xml_convert.rb +162 -1
- data/lib/isodoc/iec/word_convert.rb +2 -0
- data/lib/isodoc/iec/xref.rb +9 -8
- data/lib/{asciidoctor → metanorma}/iec/basicdoc.rng +0 -0
- data/lib/{asciidoctor → metanorma}/iec/biblio.rng +0 -0
- data/lib/{asciidoctor → metanorma}/iec/converter.rb +23 -2
- data/lib/{asciidoctor → metanorma}/iec/front.rb +1 -1
- data/lib/{asciidoctor → metanorma}/iec/iec.rng +48 -0
- data/lib/{asciidoctor → metanorma}/iec/iec_intro_en.xml +0 -0
- data/lib/{asciidoctor → metanorma}/iec/iec_intro_fr.xml +0 -0
- data/lib/{asciidoctor → metanorma}/iec/isodoc.rng +49 -2
- data/lib/{asciidoctor → metanorma}/iec/isostandard.rng +14 -0
- data/lib/{asciidoctor → metanorma}/iec/reqt.rng +0 -0
- data/lib/metanorma/iec/version.rb +1 -1
- data/lib/metanorma-iec.rb +1 -1
- data/metanorma-iec.gemspec +1 -1
- data/spec/isodoc/i18n_spec.rb +2 -2
- data/spec/isodoc/iev_spec.rb +334 -100
- data/spec/isodoc/postproc_spec.rb +2 -5
- data/spec/isodoc/ref_spec.rb +359 -353
- data/spec/isodoc/terms_spec.rb +14 -21
- data/spec/{asciidoctor → metanorma}/base_spec.rb +1 -1
- data/spec/{asciidoctor → metanorma}/blocks_spec.rb +1 -1
- data/spec/{asciidoctor → metanorma}/cleanup_spec.rb +1 -1
- data/spec/{asciidoctor → metanorma}/iev_spec.rb +1 -1
- data/spec/{asciidoctor → metanorma}/inline_spec.rb +1 -1
- data/spec/{asciidoctor → metanorma}/lists_spec.rb +1 -1
- data/spec/{asciidoctor → metanorma}/section_spec.rb +1 -1
- data/spec/{asciidoctor → metanorma}/validate_spec.rb +1 -1
- data/spec/spec_helper.rb +2 -2
- metadata +23 -23
data/spec/isodoc/ref_spec.rb
CHANGED
@@ -3,374 +3,380 @@ require "spec_helper"
|
|
3
3
|
RSpec.describe IsoDoc::Iec do
|
4
4
|
it "processes IsoXML 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
|
-
<bibitem id="ISO712" type="standard">
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
</bibitem>
|
36
|
-
<bibitem id="ISO16634" type="standard">
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
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" reference="1" type="Unpublished-Status">Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
|
48
|
+
<extent type="part">
|
49
|
+
<referenceFrom>all</referenceFrom>
|
50
|
+
</extent>
|
51
51
|
|
52
|
-
</bibitem>
|
53
|
-
<bibitem id="ISO20483" type="standard">
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
</bibitem>
|
64
|
-
<bibitem id="ref1">
|
65
|
-
|
66
|
-
|
67
|
-
</bibitem>
|
68
|
-
<note><p>This is an annotation of ISO 20483:2013-2014</p></note>
|
69
|
-
|
52
|
+
</bibitem>
|
53
|
+
<bibitem id="ISO20483" type="standard">
|
54
|
+
<title format="text/plain">Cereals and pulses</title>
|
55
|
+
<docidentifier type="ISO">ISO 20483:2013-2014</docidentifier>
|
56
|
+
<date type="published"><from>2013</from><to>2014</to></date>
|
57
|
+
<contributor>
|
58
|
+
<role type="publisher"/>
|
59
|
+
<organization>
|
60
|
+
<name>International Organization for Standardization</name>
|
61
|
+
</organization>
|
62
|
+
</contributor>
|
63
|
+
</bibitem>
|
64
|
+
<bibitem id="ref1">
|
65
|
+
<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>
|
66
|
+
<docidentifier type="ICC">167</docidentifier>
|
67
|
+
</bibitem>
|
68
|
+
<note><p>This is an annotation of ISO 20483:2013-2014</p></note>
|
69
|
+
<bibitem id="zip_ffs"><formattedref format="application/x-isodoc+xml">Title 5</formattedref><docidentifier type="metanorma">[5]</docidentifier></bibitem>
|
70
70
|
|
71
71
|
|
72
|
-
</references><references id="_bibliography" obligation="informative" normative="false">
|
73
|
-
|
74
|
-
<bibitem id="ISBN" type="ISBN">
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
</bibitem>
|
85
|
-
<bibitem id="ISSN" type="ISSN">
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
</bibitem>
|
96
|
-
<note><p>This is an annotation of document ISSN.</p></note>
|
97
|
-
<note><p>This is another annotation of document ISSN.</p></note>
|
98
|
-
<bibitem id="ISO3696" type="standard">
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
</bibitem>
|
108
|
-
<bibitem id="ref10">
|
109
|
-
|
110
|
-
|
111
|
-
</bibitem>
|
112
|
-
<bibitem id="ref11">
|
113
|
-
|
114
|
-
|
115
|
-
</bibitem>
|
116
|
-
<bibitem id="ref12">
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
</bibitem>
|
72
|
+
</references><references id="_bibliography" obligation="informative" normative="false">
|
73
|
+
<title>Bibliography</title>
|
74
|
+
<bibitem id="ISBN" type="ISBN">
|
75
|
+
<title format="text/plain">Chemicals for analytical laboratory use</title>
|
76
|
+
<docidentifier type="ISBN">ISBN</docidentifier>
|
77
|
+
<docidentifier type="metanorma">[1]</docidentifier>
|
78
|
+
<contributor>
|
79
|
+
<role type="publisher"/>
|
80
|
+
<organization>
|
81
|
+
<abbreviation>ISBN</abbreviation>
|
82
|
+
</organization>
|
83
|
+
</contributor>
|
84
|
+
</bibitem>
|
85
|
+
<bibitem id="ISSN" type="ISSN">
|
86
|
+
<title format="text/plain">Instruments for analytical laboratory use</title>
|
87
|
+
<docidentifier type="ISSN">ISSN</docidentifier>
|
88
|
+
<docidentifier type="metanorma">[2]</docidentifier>
|
89
|
+
<contributor>
|
90
|
+
<role type="publisher"/>
|
91
|
+
<organization>
|
92
|
+
<abbreviation>ISSN</abbreviation>
|
93
|
+
</organization>
|
94
|
+
</contributor>
|
95
|
+
</bibitem>
|
96
|
+
<note><p>This is an annotation of document ISSN.</p></note>
|
97
|
+
<note><p>This is another annotation of document ISSN.</p></note>
|
98
|
+
<bibitem id="ISO3696" type="standard">
|
99
|
+
<title format="text/plain">Water for analytical laboratory use</title>
|
100
|
+
<docidentifier type="ISO">ISO 3696</docidentifier>
|
101
|
+
<contributor>
|
102
|
+
<role type="publisher"/>
|
103
|
+
<organization>
|
104
|
+
<abbreviation>ISO</abbreviation>
|
105
|
+
</organization>
|
106
|
+
</contributor>
|
107
|
+
</bibitem>
|
108
|
+
<bibitem id="ref10">
|
109
|
+
<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>
|
110
|
+
<docidentifier type="metanorma">[10]</docidentifier>
|
111
|
+
</bibitem>
|
112
|
+
<bibitem id="ref11">
|
113
|
+
<title>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</title>
|
114
|
+
<docidentifier type="IETF">RFC 10</docidentifier>
|
115
|
+
</bibitem>
|
116
|
+
<bibitem id="ref12">
|
117
|
+
<formattedref format="application/x-isodoc+xml">CitationWorks. 2019. <em>How to cite a reference</em>.</formattedref>
|
118
|
+
<docidentifier type="metanorma">[Citn]</docidentifier>
|
119
|
+
<docidentifier type="IETF">RFC 20</docidentifier>
|
120
|
+
</bibitem>
|
121
121
|
|
122
122
|
|
123
|
-
</references>
|
124
|
-
</bibliography>
|
125
|
-
|
123
|
+
</references>
|
124
|
+
</bibliography>
|
125
|
+
</iso-standard>
|
126
126
|
INPUT
|
127
127
|
|
128
128
|
presxml = <<~OUTPUT
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
129
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
|
130
|
+
<bibdata>
|
131
|
+
<language current="true">en</language>
|
132
|
+
</bibdata>
|
133
|
+
<preface><foreword displayorder="1">
|
134
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">
|
135
|
+
<eref bibitemid="ISO712">[110]</eref>
|
136
|
+
<eref bibitemid="ISBN">[1]</eref>
|
137
|
+
<eref bibitemid="ISSN">[2]</eref>
|
138
|
+
<eref bibitemid="ISO16634">ISO 16634:--</eref>
|
139
|
+
<eref bibitemid="ref1">ICC 167</eref>
|
140
|
+
<eref bibitemid="ref10">[10]</eref>
|
141
|
+
<eref bibitemid="ref12">Citn</eref>
|
142
|
+
<eref bibitemid="zip_ffs">[5]</eref>
|
143
|
+
</p>
|
144
|
+
</foreword></preface>
|
145
|
+
<bibliography><references id="_normative_references" obligation="informative" normative="true" displayorder="2"><title depth="1">1<tab/>Normative References</title>
|
146
|
+
<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>
|
147
|
+
<bibitem id="ISO712" type="standard">
|
148
|
+
<title format="text/plain">Cereals or cereal products</title>
|
149
|
+
<title type="main" format="text/plain">Cereals and cereal products</title>
|
150
|
+
<docidentifier type="ISO">ISO 712</docidentifier>
|
151
|
+
<docidentifier type="metanorma">[110]</docidentifier>
|
152
|
+
<contributor>
|
153
|
+
<role type="publisher"/>
|
154
|
+
<organization>
|
155
|
+
<name>International Organization for Standardization</name>
|
156
|
+
</organization>
|
157
|
+
</contributor>
|
158
|
+
</bibitem>
|
159
|
+
<bibitem id="ISO16634" type="standard">
|
160
|
+
<title language="x" format="text/plain">Cereals, pulses, milled cereal products, xxxx, oilseeds and animal feeding stuffs</title>
|
161
|
+
<title language="en" format="text/plain">Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</title>
|
162
|
+
<docidentifier type="ISO">ISO 16634:-- (all parts)</docidentifier>
|
163
|
+
<date type="published"><on>--</on></date>
|
164
|
+
<contributor>
|
165
|
+
<role type="publisher"/>
|
166
|
+
<organization>
|
167
|
+
<abbreviation>ISO</abbreviation>
|
168
|
+
</organization>
|
169
|
+
</contributor>
|
170
|
+
<note format="text/plain" reference="1" type="Unpublished-Status">Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
|
171
|
+
<extent type="part">
|
172
|
+
<referenceFrom>all</referenceFrom>
|
173
|
+
</extent>
|
174
174
|
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
175
|
+
</bibitem>
|
176
|
+
<bibitem id="ISO20483" type="standard">
|
177
|
+
<title format="text/plain">Cereals and pulses</title>
|
178
|
+
<docidentifier type="ISO">ISO 20483:2013-2014</docidentifier>
|
179
|
+
<date type="published"><from>2013</from><to>2014</to></date>
|
180
|
+
<contributor>
|
181
|
+
<role type="publisher"/>
|
182
|
+
<organization>
|
183
|
+
<name>International Organization for Standardization</name>
|
184
|
+
</organization>
|
185
|
+
</contributor>
|
186
|
+
</bibitem>
|
187
|
+
<bibitem id="ref1">
|
188
|
+
<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>
|
189
|
+
<docidentifier type="ICC">ICC 167</docidentifier>
|
190
|
+
</bibitem>
|
191
|
+
<note><name>NOTE</name><p>This is an annotation of ISO 20483:2013-2014</p></note>
|
192
|
+
<bibitem id="zip_ffs"><formattedref format="application/x-isodoc+xml">Title 5</formattedref><docidentifier type="metanorma">[5]</docidentifier></bibitem>
|
193
193
|
|
194
194
|
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
<
|
226
|
-
|
227
|
-
<
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
<
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
<
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
<
|
242
|
-
|
243
|
-
|
195
|
+
</references><references id="_bibliography" obligation="informative" normative="false" displayorder="3">
|
196
|
+
<title depth="1">Bibliography</title>
|
197
|
+
<bibitem id="ISBN" type="ISBN">
|
198
|
+
<title format="text/plain">Chemicals for analytical laboratory use</title>
|
199
|
+
<docidentifier type="ISBN">ISBN</docidentifier>
|
200
|
+
<docidentifier type="metanorma">[1]</docidentifier>
|
201
|
+
<contributor>
|
202
|
+
<role type="publisher"/>
|
203
|
+
<organization>
|
204
|
+
<abbreviation>ISBN</abbreviation>
|
205
|
+
</organization>
|
206
|
+
</contributor>
|
207
|
+
</bibitem>
|
208
|
+
<bibitem id="ISSN" type="ISSN">
|
209
|
+
<title format="text/plain">Instruments for analytical laboratory use</title>
|
210
|
+
<docidentifier type="ISSN">ISSN</docidentifier>
|
211
|
+
<docidentifier type="metanorma">[2]</docidentifier>
|
212
|
+
<contributor>
|
213
|
+
<role type="publisher"/>
|
214
|
+
<organization>
|
215
|
+
<abbreviation>ISSN</abbreviation>
|
216
|
+
</organization>
|
217
|
+
</contributor>
|
218
|
+
</bibitem>
|
219
|
+
<note><name>NOTE</name><p>This is an annotation of document ISSN.</p></note>
|
220
|
+
<note><name>NOTE</name><p>This is another annotation of document ISSN.</p></note>
|
221
|
+
<bibitem id="ISO3696" type="standard">
|
222
|
+
<title format="text/plain">Water for analytical laboratory use</title>
|
223
|
+
<docidentifier type='metanorma-ordinal'>[1]</docidentifier>
|
224
|
+
<docidentifier type="ISO">ISO 3696</docidentifier>
|
225
|
+
<contributor>
|
226
|
+
<role type="publisher"/>
|
227
|
+
<organization>
|
228
|
+
<abbreviation>ISO</abbreviation>
|
229
|
+
</organization>
|
230
|
+
</contributor>
|
231
|
+
</bibitem>
|
232
|
+
<bibitem id="ref10">
|
233
|
+
<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>
|
234
|
+
<docidentifier type="metanorma">[10]</docidentifier>
|
235
|
+
</bibitem>
|
236
|
+
<bibitem id="ref11">
|
237
|
+
<title>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</title>
|
238
|
+
<docidentifier type='metanorma-ordinal'>[2]</docidentifier>
|
239
|
+
<docidentifier type="IETF">IETF RFC 10</docidentifier>
|
240
|
+
</bibitem>
|
241
|
+
<bibitem id="ref12">
|
242
|
+
<formattedref format="application/x-isodoc+xml">CitationWorks. 2019. <em>How to cite a reference</em>.</formattedref>
|
243
|
+
<docidentifier type="metanorma">[Citn]</docidentifier>
|
244
|
+
<docidentifier type="IETF">IETF RFC 20</docidentifier>
|
245
|
+
</bibitem>
|
244
246
|
|
245
247
|
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
248
|
+
</references>
|
249
|
+
</bibliography>
|
250
|
+
</iso-standard>
|
251
|
+
OUTPUT
|
250
252
|
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
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
|
-
</html>
|
253
|
+
html = <<~OUTPUT
|
254
|
+
#{HTML_HDR}
|
255
|
+
<div>
|
256
|
+
<h1 class='ForewordTitle'>FOREWORD</h1>
|
257
|
+
<div class='boilerplate_legal'/>
|
258
|
+
<p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
|
259
|
+
<a href='#ISO712'>[110]</a>
|
260
|
+
<a href='#ISBN'>[1]</a>
|
261
|
+
<a href='#ISSN'>[2]</a>
|
262
|
+
<a href='#ISO16634'>ISO 16634:--</a>
|
263
|
+
<a href='#ref1'>ICC 167</a>
|
264
|
+
<a href='#ref10'>[10]</a>
|
265
|
+
<a href='#ref12'>Citn</a>
|
266
|
+
<a href='#zip_ffs'>[5]</a>
|
267
|
+
</p>
|
268
|
+
</div>
|
269
|
+
#{IEC_TITLE1}
|
270
|
+
<div>
|
271
|
+
<h1>1  Normative References</h1>
|
272
|
+
<p>
|
273
|
+
The following documents are referred to in the text in such a way that
|
274
|
+
some or all of their content constitutes requirements of this
|
275
|
+
document. For dated references, only the edition cited applies. For
|
276
|
+
undated references, the latest edition of the referenced document
|
277
|
+
(including any amendments) applies.
|
278
|
+
</p>
|
279
|
+
<p id='ISO712' class='NormRef'>
|
280
|
+
[110], ISO 712,
|
281
|
+
<i>Cereals and cereal products</i>
|
282
|
+
</p>
|
283
|
+
<p id='ISO16634' class='NormRef'>
|
284
|
+
ISO 16634:-- (all parts)
|
285
|
+
<a class='FootnoteRef' href='#fn:1'>
|
286
|
+
<sup>1</sup>
|
287
|
+
</a>
|
288
|
+
,
|
289
|
+
<i>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</i>
|
290
|
+
</p>
|
291
|
+
<p id='ISO20483' class='NormRef'>
|
292
|
+
ISO 20483:2013-2014,
|
293
|
+
<i>Cereals and pulses</i>
|
294
|
+
</p>
|
295
|
+
<p id='ref1' class='NormRef'>
|
296
|
+
ICC 167,
|
297
|
+
<span style='font-variant:small-caps;'>Standard No I.C.C 167</span>
|
298
|
+
.
|
299
|
+
<i>
|
300
|
+
Determination of the protein content in cereal and cereal products
|
301
|
+
for food and animal feeding stuffs according to the Dumas combustion
|
302
|
+
method
|
303
|
+
</i>
|
304
|
+
(see
|
305
|
+
<a href='http://www.icc.or.at'>http://www.icc.or.at</a>
|
306
|
+
)
|
307
|
+
</p>
|
308
|
+
<div class='Note'>
|
309
|
+
<p>
|
310
|
+
<span class='note_label'>NOTE</span>
|
311
|
+
  This is an annotation of ISO 20483:2013-2014
|
312
|
+
</p>
|
313
|
+
</div>
|
314
|
+
<p id='zip_ffs' class='NormRef'>[5], Title 5</p>
|
315
|
+
</div>
|
316
|
+
<br/>
|
317
|
+
<div>
|
318
|
+
<h1 class='Section3'>Bibliography</h1>
|
319
|
+
<p id='ISBN' class='Biblio'>
|
320
|
+
[1] 
|
321
|
+
<i>Chemicals for analytical laboratory use</i>
|
322
|
+
</p>
|
323
|
+
<p id='ISSN' class='Biblio'>
|
324
|
+
[2] 
|
325
|
+
<i>Instruments for analytical laboratory use</i>
|
326
|
+
</p>
|
327
|
+
<div class='Note'>
|
328
|
+
<p>
|
329
|
+
<span class='note_label'>NOTE</span>
|
330
|
+
  This is an annotation of document ISSN.
|
331
|
+
</p>
|
332
|
+
</div>
|
333
|
+
<div class='Note'>
|
334
|
+
<p>
|
335
|
+
<span class='note_label'>NOTE</span>
|
336
|
+
  This is another annotation of document ISSN.
|
337
|
+
</p>
|
338
|
+
</div>
|
339
|
+
<p id='ISO3696' class='Biblio'>
|
340
|
+
[1]  ISO 3696,
|
341
|
+
<i>Water for analytical laboratory use</i>
|
342
|
+
</p>
|
343
|
+
<p id='ref10' class='Biblio'>
|
344
|
+
[10] 
|
345
|
+
<span style='font-variant:small-caps;'>Standard No I.C.C 167</span>
|
346
|
+
.
|
347
|
+
<i>
|
348
|
+
Determination of the protein content in cereal and cereal products
|
349
|
+
for food and animal feeding stuffs according to the Dumas combustion
|
350
|
+
method
|
351
|
+
</i>
|
352
|
+
(see
|
353
|
+
<a href='http://www.icc.or.at'>http://www.icc.or.at</a>
|
354
|
+
)
|
355
|
+
</p>
|
356
|
+
<p id='ref11' class='Biblio'>
|
357
|
+
[2]  IETF RFC 10,
|
358
|
+
<i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i>
|
359
|
+
</p>
|
360
|
+
<p id='ref12' class='Biblio'>
|
361
|
+
Citn  IETF RFC 20, CitationWorks. 2019.
|
362
|
+
<i>How to cite a reference</i>
|
363
|
+
.
|
364
|
+
</p>
|
365
|
+
</div>
|
366
|
+
<aside id='fn:1' class='footnote'>
|
367
|
+
<p>Under preparation. (Stage at the time of publication ISO/DIS 16634)</p>
|
368
|
+
</aside>
|
369
|
+
</div>
|
370
|
+
</body>
|
371
|
+
</html>
|
370
372
|
|
371
373
|
OUTPUT
|
372
|
-
expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({})
|
373
|
-
|
374
|
+
expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({})
|
375
|
+
.convert("test", input, true).sub(
|
376
|
+
%r{<localized-strings>.*</localized-strings>}m, ""
|
377
|
+
))).to be_equivalent_to xmlpp(presxml)
|
378
|
+
expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({})
|
379
|
+
.convert("test", presxml,
|
380
|
+
true))).to be_equivalent_to xmlpp(html)
|
374
381
|
end
|
375
|
-
|
376
382
|
end
|