metanorma-iso 1.7.1 → 1.7.2

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