metanorma-iec 2.1.11 → 2.1.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/lib/isodoc/iec/html/htmlstyle.css +6 -0
  3. data/lib/isodoc/iec/iec.international-standard.xsl +460 -152
  4. data/lib/isodoc/iec/presentation_xml_convert.rb +8 -6
  5. data/lib/isodoc/iec/word_convert.rb +9 -35
  6. data/lib/metanorma/iec/biblio.rng +5 -0
  7. data/lib/metanorma/iec/iec_intro_en.xml +11 -12
  8. data/lib/metanorma/iec/iec_intro_fr.xml +11 -11
  9. data/lib/metanorma/iec/isodoc.rng +47 -13
  10. data/lib/metanorma/iec/version.rb +1 -1
  11. data/metanorma-iec.gemspec +5 -2
  12. metadata +4 -36
  13. data/.github/workflows/automerge.yml +0 -31
  14. data/.github/workflows/rake.yml +0 -15
  15. data/.github/workflows/release.yml +0 -24
  16. data/Rakefile +0 -8
  17. data/bin/rspec +0 -18
  18. data/spec/assets/header.html +0 -7
  19. data/spec/assets/html.css +0 -2
  20. data/spec/assets/iso.xml +0 -71
  21. data/spec/assets/rice_image1.png +0 -0
  22. data/spec/assets/word.css +0 -2
  23. data/spec/assets/wordintro.html +0 -4
  24. data/spec/assets/xref_error.adoc +0 -7
  25. data/spec/isodoc/blocks_spec.rb +0 -200
  26. data/spec/isodoc/i18n_spec.rb +0 -607
  27. data/spec/isodoc/iev_spec.rb +0 -888
  28. data/spec/isodoc/inline_spec.rb +0 -256
  29. data/spec/isodoc/iso_spec.rb +0 -211
  30. data/spec/isodoc/metadata_spec.rb +0 -251
  31. data/spec/isodoc/postproc_spec.rb +0 -303
  32. data/spec/isodoc/ref_spec.rb +0 -335
  33. data/spec/isodoc/section_spec.rb +0 -566
  34. data/spec/isodoc/terms_spec.rb +0 -192
  35. data/spec/metanorma/base_spec.rb +0 -1041
  36. data/spec/metanorma/blocks_spec.rb +0 -470
  37. data/spec/metanorma/cleanup_spec.rb +0 -372
  38. data/spec/metanorma/iev_spec.rb +0 -254
  39. data/spec/metanorma/inline_spec.rb +0 -145
  40. data/spec/metanorma/lists_spec.rb +0 -194
  41. data/spec/metanorma/processor_spec.rb +0 -171
  42. data/spec/metanorma/section_spec.rb +0 -348
  43. data/spec/metanorma/validate_spec.rb +0 -56
  44. data/spec/spec_helper.rb +0 -305
@@ -1,335 +0,0 @@
1
- require "spec_helper"
2
-
3
- RSpec.describe IsoDoc::Iec 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
- <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
-
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
-
71
-
72
- </references><references id="_bibliography" obligation="informative" normative="false">
73
- <title>Bibliography</title>
74
- <bibitem id="ISBN" type="book">
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="journal">
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" type="standard">
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
-
122
-
123
- </references>
124
- </bibliography>
125
- </iso-standard>
126
- INPUT
127
-
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">[4]</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
- <formattedref><em><span class='stddocTitle'>Cereals and cereal products</span></em></formattedref>
149
- <docidentifier type="ISO">ISO 712</docidentifier>
150
- <docidentifier type="metanorma">[110]</docidentifier>
151
- </bibitem>
152
- <bibitem id="ISO16634" type="standard">
153
- <formattedref><em><span class='stddocTitle'>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</span></em></formattedref>
154
- <docidentifier type="ISO">ISO 16634:-- (all parts)</docidentifier>
155
- <note format="text/plain" reference="1" type="Unpublished-Status">Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
156
- </bibitem>
157
- <bibitem id="ISO20483" type="standard">
158
- <formattedref><em><span class='stddocTitle'>Cereals and pulses</span></em></formattedref>
159
- <docidentifier type="ISO">ISO 20483:2013-2014</docidentifier>
160
- </bibitem>
161
- <bibitem id="ref1">
162
- <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"/>) [ICC 167]</formattedref>
163
- <docidentifier type="ICC">ICC 167</docidentifier>
164
- </bibitem>
165
- <note><name>NOTE</name><p>This is an annotation of ISO 20483:2013-2014</p></note>
166
- <bibitem id="zip_ffs"><formattedref format="application/x-isodoc+xml">Title 5</formattedref><docidentifier type="metanorma">[5]</docidentifier></bibitem>
167
- </references><references id="_bibliography" obligation="informative" normative="false" displayorder="3">
168
- <title depth="1">Bibliography</title>
169
- <bibitem id="ISBN" type="book">
170
- <formattedref><em>Chemicals for analytical laboratory use</em>. n.p.: n.d.</formattedref>
171
- <docidentifier type="metanorma-ordinal">[1]</docidentifier>
172
- <docidentifier type="ISBN">ISBN</docidentifier>
173
- </bibitem>
174
- <bibitem id="ISSN" type="journal">
175
- <formattedref><em>Instruments for analytical laboratory use</em>. n.d.</formattedref>
176
- <docidentifier type="metanorma-ordinal">[2]</docidentifier>
177
- <docidentifier type="ISSN">ISSN</docidentifier>
178
- </bibitem>
179
- <note><name>NOTE</name><p>This is an annotation of document ISSN.</p></note>
180
- <note><name>NOTE</name><p>This is another annotation of document ISSN.</p></note>
181
- <bibitem id="ISO3696" type="standard">
182
- <formattedref><em><span class='stddocTitle'>Water for analytical laboratory use</span></em></formattedref>
183
- <docidentifier type='metanorma-ordinal'>[3]</docidentifier>
184
- <docidentifier type="ISO">ISO 3696</docidentifier>
185
- </bibitem>
186
- <bibitem id="ref10">
187
- <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>
188
- <docidentifier type="metanorma-ordinal">[4]</docidentifier>
189
- </bibitem>
190
- <bibitem id="ref11">
191
- <formattedref><em><span class='stddocTitle'>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</span></em></formattedref>
192
- <docidentifier type='metanorma-ordinal'>[5]</docidentifier>
193
- <docidentifier type="IETF">IETF RFC 10</docidentifier>
194
- </bibitem>
195
- <bibitem id="ref12" type="standard">
196
- <formattedref format="application/x-isodoc+xml">CitationWorks. 2019. <em>How to cite a reference</em>.</formattedref>
197
- <docidentifier type="metanorma">[Citn]</docidentifier>
198
- <docidentifier type="IETF">IETF RFC 20</docidentifier>
199
- </bibitem>
200
- </references>
201
- </bibliography>
202
- </iso-standard>
203
- OUTPUT
204
-
205
- html = <<~OUTPUT
206
- #{HTML_HDR}
207
- <div>
208
- <h1 class='ForewordTitle'>FOREWORD</h1>
209
- <div class='boilerplate_legal'/>
210
- <p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
211
- <a href='#ISO712'>[110]</a>
212
- <a href='#ISBN'>[1]</a>
213
- <a href='#ISSN'>[2]</a>
214
- <a href='#ISO16634'>ISO 16634:--</a>
215
- <a href='#ref1'>ICC 167</a>
216
- <a href='#ref10'>[4]</a>
217
- <a href='#ref12'>Citn</a>
218
- <a href='#zip_ffs'>[5]</a>
219
- </p>
220
- </div>
221
- #{IEC_TITLE1}
222
- <div>
223
- <h1>1&#xa0; Normative References</h1>
224
- <p>
225
- The following documents are referred to in the text in such a way that
226
- some or all of their content constitutes requirements of this
227
- document. For dated references, only the edition cited applies. For
228
- undated references, the latest edition of the referenced document
229
- (including any amendments) applies.
230
- </p>
231
- <p id='ISO712' class='NormRef'>
232
- [110], ISO 712,
233
- <i>Cereals and cereal products</i>
234
- </p>
235
- <p id='ISO16634' class='NormRef'>
236
- ISO 16634:-- (all parts)
237
- <a class='FootnoteRef' href='#fn:1'>
238
- <sup>1</sup>
239
- </a>
240
- ,
241
- <i>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</i>
242
- </p>
243
- <p id='ISO20483' class='NormRef'>
244
- ISO 20483:2013-2014,
245
- <i>Cereals and pulses</i>
246
- </p>
247
- <p id='ref1' class='NormRef'>
248
- ICC 167,
249
- <span style='font-variant:small-caps;'>Standard No I.C.C 167</span>
250
- .
251
- <i>
252
- Determination of the protein content in cereal and cereal products
253
- for food and animal feeding stuffs according to the Dumas combustion
254
- method
255
- </i>
256
- (see
257
- <a href='http://www.icc.or.at'>http://www.icc.or.at</a>
258
- ) [ICC 167]
259
- </p>
260
- <div class='Note'>
261
- <p>
262
- <span class='note_label'>NOTE</span>
263
- &#xa0; This is an annotation of ISO 20483:2013-2014
264
- </p>
265
- </div>
266
- <p id='zip_ffs' class='NormRef'>[5] Title 5</p>
267
- </div>
268
- <br/>
269
- <div>
270
- <h1 class='Section3'>Bibliography</h1>
271
- <p id='ISBN' class='Biblio'>
272
- [1]&#xa0;
273
- <i>Chemicals for analytical laboratory use</i>
274
- . n.p.: n.d.
275
- </p>
276
- <p id='ISSN' class='Biblio'>
277
- [2]&#xa0;
278
- <i>Instruments for analytical laboratory use</i>
279
- . n.d.
280
- </p>
281
- <div class='Note'>
282
- <p>
283
- <span class='note_label'>NOTE</span>
284
- &#xa0; This is an annotation of document ISSN.
285
- </p>
286
- </div>
287
- <div class='Note'>
288
- <p>
289
- <span class='note_label'>NOTE</span>
290
- &#xa0; This is another annotation of document ISSN.
291
- </p>
292
- </div>
293
- <p id='ISO3696' class='Biblio'>
294
- [3]&#xa0; ISO 3696,
295
- <i>Water for analytical laboratory use</i>
296
- </p>
297
- <p id='ref10' class='Biblio'>
298
- [4]&#xa0;
299
- <span style='font-variant:small-caps;'>Standard No I.C.C 167</span>
300
- .
301
- <i>
302
- Determination of the protein content in cereal and cereal products
303
- for food and animal feeding stuffs according to the Dumas combustion
304
- method
305
- </i>
306
- (see
307
- <a href='http://www.icc.or.at'>http://www.icc.or.at</a>
308
- )
309
- </p>
310
- <p id='ref11' class='Biblio'>
311
- [5]&#xa0; IETF RFC 10,
312
- <i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i>
313
- </p>
314
- <p id='ref12' class='Biblio'>
315
- Citn&#xa0; IETF RFC 20, CitationWorks. 2019.
316
- <i>How to cite a reference</i>
317
- .
318
- </p>
319
- </div>
320
- <aside id='fn:1' class='footnote'>
321
- <p>Under preparation. (Stage at the time of publication ISO/DIS 16634)</p>
322
- </aside>
323
- </div>
324
- </body>
325
- </html>
326
- OUTPUT
327
- expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({})
328
- .convert("test", input, true).sub(
329
- %r{<localized-strings>.*</localized-strings>}m, ""
330
- ))).to be_equivalent_to xmlpp(presxml)
331
- expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({})
332
- .convert("test", presxml,
333
- true))).to be_equivalent_to xmlpp(html)
334
- end
335
- end