metanorma-iec 1.4.4 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +4 -32
  3. data/.gitignore +14 -0
  4. data/Gemfile +4 -0
  5. data/lib/isodoc/iec/base_convert.rb +25 -14
  6. data/lib/isodoc/iec/html/htmlstyle.css +36 -21
  7. data/lib/isodoc/iec/html/htmlstyle.scss +13 -7
  8. data/lib/isodoc/iec/html/wordstyle.css +13 -11
  9. data/lib/isodoc/iec/html/wordstyle.scss +13 -11
  10. data/lib/isodoc/iec/html_convert.rb +2 -1
  11. data/lib/isodoc/iec/i18n-fr.yaml +1 -1
  12. data/lib/isodoc/iec/iec.international-standard.xsl +1637 -1280
  13. data/lib/isodoc/iec/presentation_xml_convert.rb +37 -7
  14. data/lib/isodoc/iec/word_convert.rb +2 -0
  15. data/lib/isodoc/iec/xref.rb +9 -8
  16. data/lib/{asciidoctor → metanorma}/iec/basicdoc.rng +0 -0
  17. data/lib/{asciidoctor → metanorma}/iec/biblio.rng +2 -2
  18. data/lib/{asciidoctor → metanorma}/iec/converter.rb +22 -8
  19. data/lib/{asciidoctor → metanorma}/iec/front.rb +1 -1
  20. data/lib/{asciidoctor → metanorma}/iec/iec.rng +48 -0
  21. data/lib/{asciidoctor → metanorma}/iec/iec_intro_en.xml +0 -0
  22. data/lib/{asciidoctor → metanorma}/iec/iec_intro_fr.xml +0 -0
  23. data/lib/{asciidoctor → metanorma}/iec/isodoc.rng +104 -3
  24. data/lib/{asciidoctor → metanorma}/iec/isostandard.rng +0 -0
  25. data/lib/{asciidoctor → metanorma}/iec/reqt.rng +0 -0
  26. data/lib/metanorma/iec/version.rb +1 -1
  27. data/lib/metanorma-iec.rb +1 -1
  28. data/metanorma-iec.gemspec +1 -1
  29. data/spec/isodoc/i18n_spec.rb +2 -2
  30. data/spec/isodoc/iev_spec.rb +67 -57
  31. data/spec/isodoc/ref_spec.rb +359 -353
  32. data/spec/{asciidoctor → metanorma}/base_spec.rb +1 -1
  33. data/spec/{asciidoctor → metanorma}/blocks_spec.rb +1 -1
  34. data/spec/{asciidoctor → metanorma}/cleanup_spec.rb +1 -1
  35. data/spec/{asciidoctor → metanorma}/iev_spec.rb +10 -2
  36. data/spec/{asciidoctor → metanorma}/inline_spec.rb +1 -1
  37. data/spec/{asciidoctor → metanorma}/lists_spec.rb +1 -1
  38. data/spec/{asciidoctor → metanorma}/section_spec.rb +1 -1
  39. data/spec/{asciidoctor → metanorma}/validate_spec.rb +1 -1
  40. data/spec/spec_helper.rb +2 -2
  41. metadata +22 -22
@@ -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
- <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>
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
- <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>
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
- <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>
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
- </iso-standard>
123
+ </references>
124
+ </bibliography>
125
+ </iso-standard>
126
126
  INPUT
127
127
 
128
128
  presxml = <<~OUTPUT
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>
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
- </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>
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
- </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="ISO">ISO 3696</docidentifier>
224
- <contributor>
225
- <role type="publisher"/>
226
- <organization>
227
- <abbreviation>ISO</abbreviation>
228
- </organization>
229
- </contributor>
230
- </bibitem>
231
- <bibitem id="ref10">
232
- <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>
233
- <docidentifier type="metanorma">[10]</docidentifier>
234
- </bibitem>
235
- <bibitem id="ref11">
236
- <title>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</title>
237
- <docidentifier type="IETF">IETF RFC 10</docidentifier>
238
- </bibitem>
239
- <bibitem id="ref12">
240
- <formattedref format="application/x-isodoc+xml">CitationWorks. 2019. <em>How to cite a reference</em>.</formattedref>
241
- <docidentifier type="metanorma">[Citn]</docidentifier>
242
- <docidentifier type="IETF">IETF RFC 20</docidentifier>
243
- </bibitem>
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
- </references>
247
- </bibliography>
248
- </iso-standard>
249
- OUTPUT
248
+ </references>
249
+ </bibliography>
250
+ </iso-standard>
251
+ OUTPUT
250
252
 
251
- html = <<~OUTPUT
252
- #{HTML_HDR}
253
- <div>
254
- <h1 class='ForewordTitle'>FOREWORD</h1>
255
- <div class='boilerplate_legal'/>
256
- <p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
257
- <a href='#ISO712'>[110]</a>
258
- <a href='#ISBN'>[1]</a>
259
- <a href='#ISSN'>[2]</a>
260
- <a href='#ISO16634'>ISO 16634:--</a>
261
- <a href='#ref1'>ICC 167</a>
262
- <a href='#ref10'>[10]</a>
263
- <a href='#ref12'>Citn</a>
264
- <a href='#zip_ffs'>[5]</a>
265
- </p>
266
- </div>
267
- #{IEC_TITLE1}
268
- <div>
269
- <h1>1&#160; Normative References</h1>
270
- <p>
271
- The following documents are referred to in the text in such a way that
272
- some or all of their content constitutes requirements of this
273
- document. For dated references, only the edition cited applies. For
274
- undated references, the latest edition of the referenced document
275
- (including any amendments) applies.
276
- </p>
277
- <p id='ISO712' class='NormRef'>
278
- [110], ISO 712,
279
- <i>Cereals and cereal products</i>
280
- </p>
281
- <p id='ISO16634' class='NormRef'>
282
- ISO 16634:-- (all parts)
283
- <a class='FootnoteRef' href='#fn:1'>
284
- <sup>1</sup>
285
- </a>
286
- ,
287
- <i>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</i>
288
- </p>
289
- <p id='ISO20483' class='NormRef'>
290
- ISO 20483:2013-2014,
291
- <i>Cereals and pulses</i>
292
- </p>
293
- <p id='ref1' class='NormRef'>
294
- ICC 167,
295
- <span style='font-variant:small-caps;'>Standard No I.C.C 167</span>
296
- .
297
- <i>
298
- Determination of the protein content in cereal and cereal products
299
- for food and animal feeding stuffs according to the Dumas combustion
300
- method
301
- </i>
302
- (see
303
- <a href='http://www.icc.or.at'>http://www.icc.or.at</a>
304
- )
305
- </p>
306
- <div class='Note'>
307
- <p>
308
- <span class='note_label'>NOTE</span>
309
- &#160; This is an annotation of ISO 20483:2013-2014
310
- </p>
311
- </div>
312
- <p id='zip_ffs' class='NormRef'>[5], Title 5</p>
313
- </div>
314
- <br/>
315
- <div>
316
- <h1 class='Section3'>Bibliography</h1>
317
- <p id='ISBN' class='Biblio'>
318
- [1]&#160;
319
- <i>Chemicals for analytical laboratory use</i>
320
- </p>
321
- <p id='ISSN' class='Biblio'>
322
- [2]&#160;
323
- <i>Instruments for analytical laboratory use</i>
324
- </p>
325
- <div class='Note'>
326
- <p>
327
- <span class='note_label'>NOTE</span>
328
- &#160; This is an annotation of document ISSN.
329
- </p>
330
- </div>
331
- <div class='Note'>
332
- <p>
333
- <span class='note_label'>NOTE</span>
334
- &#160; This is another annotation of document ISSN.
335
- </p>
336
- </div>
337
- <p id='ISO3696' class='Biblio'>
338
- [3]&#160; ISO 3696,
339
- <i>Water for analytical laboratory use</i>
340
- </p>
341
- <p id='ref10' class='Biblio'>
342
- [10]&#160;
343
- <span style='font-variant:small-caps;'>Standard No I.C.C 167</span>
344
- .
345
- <i>
346
- Determination of the protein content in cereal and cereal products
347
- for food and animal feeding stuffs according to the Dumas combustion
348
- method
349
- </i>
350
- (see
351
- <a href='http://www.icc.or.at'>http://www.icc.or.at</a>
352
- )
353
- </p>
354
- <p id='ref11' class='Biblio'>
355
- [5]&#160; IETF RFC 10,
356
- <i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i>
357
- </p>
358
- <p id='ref12' class='Biblio'>
359
- Citn&#160; IETF RFC 20, CitationWorks. 2019.
360
- <i>How to cite a reference</i>
361
- .
362
- </p>
363
- </div>
364
- <aside id='fn:1' class='footnote'>
365
- <p>Under preparation. (Stage at the time of publication ISO/DIS 16634)</p>
366
- </aside>
367
- </div>
368
- </body>
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&#160; 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
+ &#160; 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]&#160;
321
+ <i>Chemicals for analytical laboratory use</i>
322
+ </p>
323
+ <p id='ISSN' class='Biblio'>
324
+ [2]&#160;
325
+ <i>Instruments for analytical laboratory use</i>
326
+ </p>
327
+ <div class='Note'>
328
+ <p>
329
+ <span class='note_label'>NOTE</span>
330
+ &#160; 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
+ &#160; This is another annotation of document ISSN.
337
+ </p>
338
+ </div>
339
+ <p id='ISO3696' class='Biblio'>
340
+ [1]&#160; ISO 3696,
341
+ <i>Water for analytical laboratory use</i>
342
+ </p>
343
+ <p id='ref10' class='Biblio'>
344
+ [10]&#160;
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]&#160; IETF RFC 10,
358
+ <i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i>
359
+ </p>
360
+ <p id='ref12' class='Biblio'>
361
+ Citn&#160; 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({}).convert("test", input, true).sub(%r{<localized-strings>.*</localized-strings>}m, ""))).to be_equivalent_to xmlpp(presxml)
373
- expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
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