metanorma-standoc 1.0.7 → 1.0.8

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/Gemfile.lock +212 -0
  3. data/lib/asciidoctor/standoc/base.rb +7 -6
  4. data/lib/asciidoctor/standoc/biblio.rng +42 -3
  5. data/lib/asciidoctor/standoc/cleanup.rb +1 -1
  6. data/lib/asciidoctor/standoc/cleanup_footnotes.rb +1 -1
  7. data/lib/asciidoctor/standoc/front.rb +10 -0
  8. data/lib/asciidoctor/standoc/inline.rb +1 -0
  9. data/lib/asciidoctor/standoc/macros.rb +3 -1
  10. data/lib/asciidoctor/standoc/ref.rb +3 -4
  11. data/lib/asciidoctor/standoc/utils.rb +13 -1
  12. data/lib/metanorma/standoc/processor.rb +2 -2
  13. data/lib/metanorma/standoc/version.rb +1 -1
  14. data/metanorma-standoc.gemspec +4 -4
  15. data/spec/asciidoctor-standoc/base_spec.rb +17 -5
  16. data/spec/asciidoctor-standoc/cleanup_spec.rb +151 -113
  17. data/spec/asciidoctor-standoc/inline_spec.rb +10 -2
  18. data/spec/asciidoctor-standoc/isobib_cache_spec.rb +167 -129
  19. data/spec/asciidoctor-standoc/macros_spec.rb +1 -1
  20. data/spec/asciidoctor-standoc/refs_spec.rb +283 -215
  21. data/spec/asciidoctor-standoc/validate_spec.rb +10 -9
  22. data/spec/examples/iso_123_.xml +1 -0
  23. data/spec/examples/iso_123_all_parts.xml +1 -0
  24. data/spec/examples/iso_123_no_year_note.xml +1 -0
  25. data/spec/examples/iso_124_.xml +1 -0
  26. data/spec/examples/iso_216_.xml +2 -1
  27. data/spec/examples/iso_iec_12382_.xml +2 -1
  28. data/spec/metanorma/processor_spec.rb +5 -5
  29. data/spec/spec_helper.rb +7 -0
  30. data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +879 -0
  31. data/spec/vcr_cassettes/isobib_get_123.yml +667 -0
  32. data/spec/vcr_cassettes/isobib_get_124.yml +1201 -0
  33. data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +129 -0
  34. data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +424 -0
  35. metadata +34 -28
@@ -21,7 +21,7 @@ RSpec.describe Asciidoctor::Standoc do
21
21
  it "processes the PlantUML macro" do
22
22
  expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
23
23
  #{ASCIIDOC_BLANK_HDR}
24
-
24
+
25
25
  [plantuml]
26
26
  ....
27
27
  @startuml
@@ -65,64 +65,78 @@ RSpec.describe Asciidoctor::Standoc do
65
65
 
66
66
 
67
67
  it "fetches simple ISO reference" do
68
- mock_isobib_get_123
69
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
70
- #{ISOBIB_BLANK_HDR}
71
- [bibliography]
72
- == Normative References
73
-
74
- * [[[iso123,ISO 123]]] _Standard_
75
- INPUT
76
- #{BLANK_HDR}
77
- <sections>
78
- </sections><bibliography><references id="_" obligation="informative">
79
- <title>Normative References</title>
80
- <bibitem type="international-standard" id="iso123">
81
- <title format="text/plain" language="en" script="Latn">Rubber latex -- Sampling</title>
82
- <title format="text/plain" language="fr" script="Latn">Latex de caoutchouc -- ?chantillonnage</title>
83
- <uri type="src">https://www.iso.org/standard/23281.html</uri>
84
- <uri type="obp">https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
85
- <uri type="rss">https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
86
- <docidentifier>ISO 123</docidentifier>
87
- <date type="published">
88
- <on>2001</on>
89
- </date>
90
- <contributor>
91
- <role type="publisher"/>
92
- <organization>
93
- <name>International Organization for Standardization</name>
94
- <abbreviation>ISO</abbreviation>
95
- <uri>www.iso.org</uri>
96
- </organization>
97
- </contributor>
98
- <edition>3</edition>
99
- <language>en</language>
100
- <language>fr</language>
101
- <script>Latn</script>
102
- <status>Published</status>
103
- <copyright>
104
- <from>2001</from>
105
- <owner>
106
- <organization>
107
- <name>ISO</name>
108
- <abbreviation/>
109
- </organization>
110
- </owner>
111
- </copyright>
112
- <relation type="obsoletes">
113
- <bibitem>
114
- <formattedref>ISO 123:1985</formattedref>
115
- </bibitem>
116
- </relation>
117
- <relation type="updates">
118
- <bibitem>
119
- <formattedref>ISO 123:2001</formattedref>
120
- </bibitem>
121
- </relation>
122
- </bibitem>
123
- </references></bibliography>
124
- </standard-document>
125
- OUTPUT
68
+ # mock_isobib_get_123
69
+ VCR.use_cassette "isobib_get_123" do
70
+ expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
71
+ #{ISOBIB_BLANK_HDR}
72
+ [bibliography]
73
+ == Normative References
74
+
75
+ * [[[iso123,ISO 123]]] _Standard_
76
+ INPUT
77
+ #{BLANK_HDR}
78
+ <sections>
79
+ </sections><bibliography><references id="_" obligation="informative">
80
+ <title>Normative References</title>
81
+ <bibitem type="international-standard" id="iso123">
82
+ <fetched>#{Date.today}</fetched>
83
+ <title format="text/plain" language="en" script="Latn">Rubber latex — Sampling</title>
84
+ <title format="text/plain" language="fr" script="Latn">Latex de caoutchouc — Échantillonnage</title>
85
+ <uri type="src">https://www.iso.org/standard/23281.html</uri>
86
+ <uri type="obp">https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
87
+ <uri type="rss">https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
88
+ <docidentifier type="ISO">ISO 123</docidentifier>
89
+ <contributor>
90
+ <role type="publisher"/>
91
+ <organization>
92
+ <name>International Organization for Standardization</name>
93
+ <abbreviation>ISO</abbreviation>
94
+ <uri>www.iso.org</uri>
95
+ </organization>
96
+ </contributor>
97
+ <edition>3</edition>
98
+ <language>en</language>
99
+ <language>fr</language>
100
+ <script>Latn</script>
101
+ <status>
102
+ <stage>90</stage>
103
+ <substage>93</substage>
104
+ </status>
105
+ <copyright>
106
+ <from>2001</from>
107
+ <owner>
108
+ <organization>
109
+ <name>ISO</name>
110
+ </organization>
111
+ </owner>
112
+ </copyright>
113
+ <relation type="obsoletes">
114
+ <bibitem>
115
+ <formattedref>ISO 123:1985</formattedref>
116
+ </bibitem>
117
+ </relation>
118
+ <relation type="updates">
119
+ <bibitem>
120
+ <formattedref>ISO 123:2001</formattedref>
121
+ </bibitem>
122
+ </relation>
123
+ <relation type="instance">
124
+ <bibitem>
125
+ <formattedref>ISO 123:2001</formattedref>
126
+ </bibitem>
127
+ </relation>
128
+ <editorialgroup>
129
+ <technical-committee number="45" type="TC">ISO/TC 45/SC 3Raw materials (including latex) for use in the rubber industry</technical-committee>
130
+ </editorialgroup>
131
+ <ics>
132
+ <code>83.040.10</code>
133
+ <text>Latex and raw rubber</text>
134
+ </ics>
135
+ </bibitem>
136
+ </references></bibliography>
137
+ </standard-document>
138
+ OUTPUT
139
+ end
126
140
  end
127
141
 
128
142
  it "processes simple IEC reference" do
@@ -154,123 +168,138 @@ RSpec.describe Asciidoctor::Standoc do
154
168
  end
155
169
 
156
170
  it "processes dated ISO reference and joint ISO/IEC references" do
157
- mock_isobib_get_iec12382
158
- mock_isobib_get_124
159
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
160
- #{ISOBIB_BLANK_HDR}
161
- [bibliography]
162
- == Normative References
163
-
164
- * [[[iso123,ISO/IEC TR 12382:1992]]] _Standard_
165
- * [[[iso124,ISO 124:2014]]] _Standard_
166
- INPUT
167
- #{BLANK_HDR}
168
- <sections>
169
-
170
- </sections><bibliography><references id="_" obligation="informative">
171
- <title>Normative References</title>
172
- <bibitem type="international-standard" id="iso123">
173
- <title format="text/plain" language="en" script="Latn">Permuted index of the vocabulary of information technology</title>
174
- <title format="text/plain" language="fr" script="Latn">Index permuté du vocabulaire des technologies de l'information</title>
175
- <uri type="src">https://www.iso.org/standard/21071.html</uri>
176
- <uri type="obp">https://www.iso.org/obp/ui/#!iso:std:21071:en</uri>
177
- <uri type="rss">https://www.iso.org/contents/data/standard/02/10/21071.detail.rss</uri>
178
- <docidentifier>ISO/IEC 12382</docidentifier>
179
- <date type="published">
180
- <on>1992</on>
181
- </date>
182
- <contributor>
183
- <role type="publisher"/>
184
- <organization>
185
- <name>International Organization for Standardization</name>
186
- <abbreviation>ISO</abbreviation>
187
- <uri>www.iso.org</uri>
188
- </organization>
189
- </contributor>
190
- <contributor>
191
- <role type="publisher"/>
192
- <organization>
193
- <name>International Electrotechnical Commission</name>
194
- <abbreviation>IEC</abbreviation>
195
- <uri>www.iec.ch</uri>
196
- </organization>
197
- </contributor>
198
- <edition>2</edition>
199
- <language>en</language>
200
- <language>fr</language>
201
- <script>Latn</script>
202
- <abstract format="plain" language="en" script="Latn">Contains a permuted index of all terms included in the parts 1 - 28 of ISO 2382. If any of these parts has been revised, the present TR refers to the revision.</abstract>
203
- <status>Published</status>
204
- <copyright>
205
- <from>1992</from>
206
- <owner>
207
- <organization>
208
- <name>ISO/IEC</name>
209
- <abbreviation/>
210
- </organization>
211
- </owner>
212
- </copyright>
213
- <relation type="updates">
214
- <bibitem>
215
- <formattedref>ISO/IEC TR 12382:1992</formattedref>
216
- </bibitem>
217
- </relation>
218
- <ics>
219
- <code>35.020</code>
220
- <text>Information technology (IT) in general</text>
221
- </ics>
222
- <ics>
223
- <code>01.040.35</code>
224
- <text>Information technology (Vocabularies)</text>
225
- </ics>
226
- </bibitem>
227
- <bibitem type="international-standard" id="iso124">
228
- <title format="text/plain" language="en" script="Latn">Latex, rubber -- Determination of total solids content</title>
229
- <title format="text/plain" language="fr" script="Latn">Latex de caoutchouc -- Détermination des matières solides totales</title>
230
- <uri type="src">https://www.iso.org/standard/61884.html</uri>
231
- <uri type="obp">https://www.iso.org/obp/ui/#!iso:std:61884:en</uri>
232
- <uri type="rss">https://www.iso.org/contents/data/standard/06/18/61884.detail.rss</uri>
233
- <docidentifier>ISO 124</docidentifier>
234
- <date type="published">
235
- <on>2014</on>
236
- </date>
237
- <contributor>
238
- <role type="publisher"/>
239
- <organization>
240
- <name>International Organization for Standardization</name>
241
- <abbreviation>ISO</abbreviation>
242
- <uri>www.iso.org</uri>
243
- </organization>
244
- </contributor>
245
- <edition>7</edition>
246
- <language>en</language>
247
- <language>fr</language>
248
- <script>Latn</script>
249
- <abstract format="plain" language="en" script="Latn">ISO 124:2014 specifies methods for the determination of the total solids content of natural rubber field and concentrated latices and synthetic rubber latex. These methods are not necessarily suitable for latex from natural sources other than the Hevea brasiliensis, for vulcanized latex, for compounded latex, or for artificial dispersions of rubber.</abstract>
250
- <status>Published</status>
251
- <copyright>
252
- <from>2014</from>
253
- <owner>
254
- <organization>
255
- <name>ISO</name>
256
- <abbreviation/>
257
- </organization>
258
- </owner>
259
- </copyright>
260
- <relation type="obsoletes">
261
- <bibitem>
262
- <formattedref>ISO 124:2011</formattedref>
263
- </bibitem>
264
- </relation>
265
- <ics>
266
- <code>83.040.10</code>
267
- <text>Latex and raw rubber</text>
268
- </ics>
269
- </bibitem>
270
- </references></bibliography>
271
- </standard-document>
272
-
273
- OUTPUT
171
+ # mock_isobib_get_iec12382
172
+ # mock_isobib_get_124
173
+ VCR.use_cassette "dated_iso_ref_joint_iso_iec" do
174
+ expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
175
+ #{ISOBIB_BLANK_HDR}
176
+ [bibliography]
177
+ == Normative References
178
+
179
+ * [[[iso123,ISO/IEC TR 12382:1992]]] _Standard_
180
+ * [[[iso124,ISO 124:2014]]] _Standard_
181
+ INPUT
182
+ #{BLANK_HDR}
183
+ <sections>
184
+
185
+ </sections><bibliography><references id="_" obligation="informative">
186
+ <title>Normative References</title>
187
+ <bibitem type="international-standard" id="iso123">
188
+ <fetched>#{Date.today}</fetched>
189
+ <title format="text/plain" language="en" script="Latn">Permuted index of the vocabulary of information technology</title>
190
+ <title format="text/plain" language="fr" script="Latn">Index permuté du vocabulaire des technologies de l’information</title>
191
+ <uri type="src">https://www.iso.org/standard/21071.html</uri>
192
+ <uri type="obp">https://www.iso.org/obp/ui/#!iso:std:21071:en</uri>
193
+ <uri type="rss">https://www.iso.org/contents/data/standard/02/10/21071.detail.rss</uri>
194
+ <docidentifier type="ISO">ISO/IEC TR 12382:1992</docidentifier>
195
+ <date type="published">
196
+ <on>1992</on>
197
+ </date>
198
+ <contributor>
199
+ <role type="publisher"/>
200
+ <organization>
201
+ <name>International Organization for Standardization</name>
202
+ <abbreviation>ISO</abbreviation>
203
+ <uri>www.iso.org</uri>
204
+ </organization>
205
+ </contributor>
206
+ <contributor>
207
+ <role type="publisher"/>
208
+ <organization>
209
+ <name>International Electrotechnical Commission</name>
210
+ <abbreviation>IEC</abbreviation>
211
+ <uri>www.iec.ch</uri>
212
+ </organization>
213
+ </contributor>
214
+ <edition>2</edition>
215
+ <language>en</language>
216
+ <language>fr</language>
217
+ <script>Latn</script>
218
+ <abstract format="plain" language="en" script="Latn">Contains a permuted index of all terms included in the parts 1 - 28 of ISO 2382. If any of these parts has been revised, the present TR refers to the revision.</abstract>
219
+ <status>
220
+ <stage>90</stage>
221
+ <substage>93</substage>
222
+ </status>
223
+ <copyright>
224
+ <from>1992</from>
225
+ <owner>
226
+ <organization>
227
+ <name>ISO/IEC</name>
228
+ </organization>
229
+ </owner>
230
+ </copyright>
231
+ <relation type="updates">
232
+ <bibitem>
233
+ <formattedref>ISO/IEC TR 12382:1992</formattedref>
234
+ </bibitem>
235
+ </relation>
236
+ <editorialgroup>
237
+ <technical-committee number="1" type="TC">ISO/IEC JTC 1Information technology</technical-committee>
238
+ </editorialgroup>
239
+ <ics>
240
+ <code>35.020</code>
241
+ <text>Information technology (IT) in general</text>
242
+ </ics>
243
+ <ics>
244
+ <code>01.040.35</code>
245
+ <text>Information technology (Vocabularies)</text>
246
+ </ics>
247
+ </bibitem>
248
+ <bibitem type="international-standard" id="iso124">
249
+ <fetched>#{Date.today}</fetched>
250
+ <title format="text/plain" language="en" script="Latn">Latex, rubber — Determination of total solids content</title>
251
+ <title format="text/plain" language="fr" script="Latn">Latex de caoutchouc — Détermination des matières solides totales</title>
252
+ <uri type="src">https://www.iso.org/standard/61884.html</uri>
253
+ <uri type="obp">https://www.iso.org/obp/ui/#!iso:std:61884:en</uri>
254
+ <uri type="rss">https://www.iso.org/contents/data/standard/06/18/61884.detail.rss</uri>
255
+ <docidentifier type="ISO">ISO 124:2014</docidentifier>
256
+ <date type="published">
257
+ <on>2014</on>
258
+ </date>
259
+ <contributor>
260
+ <role type="publisher"/>
261
+ <organization>
262
+ <name>International Organization for Standardization</name>
263
+ <abbreviation>ISO</abbreviation>
264
+ <uri>www.iso.org</uri>
265
+ </organization>
266
+ </contributor>
267
+ <edition>7</edition>
268
+ <language>en</language>
269
+ <language>fr</language>
270
+ <script>Latn</script>
271
+ <abstract format="plain" language="en" script="Latn">ISO 124:2014 specifies methods for the determination of the total solids content of natural rubber field and concentrated latices and synthetic rubber latex. These methods are not necessarily suitable for latex from natural sources other than the Hevea brasiliensis, for vulcanized latex, for compounded latex, or for artificial dispersions of rubber.</abstract>
272
+ <abstract format="plain" language="fr" script="Latn">L’ISO 124:2014 spécifie des méthodes pour la détermination des matières solides totales dans le latex de plantation, le latex de concentré de caoutchouc naturel et le latex de caoutchouc synthétique. Ces méthodes ne conviennent pas nécessairement au latex d’origine naturelle autre que celui de l’Hevea brasiliensis, au latex vulcanisé, aux mélanges de latex, ou aux dispersions artificielles de caoutchouc.</abstract>
273
+ <status>
274
+ <stage>60</stage>
275
+ <substage>60</substage>
276
+ </status>
277
+ <copyright>
278
+ <from>2014</from>
279
+ <owner>
280
+ <organization>
281
+ <name>ISO</name>
282
+ </organization>
283
+ </owner>
284
+ </copyright>
285
+ <relation type="obsoletes">
286
+ <bibitem>
287
+ <formattedref>ISO 124:2011</formattedref>
288
+ </bibitem>
289
+ </relation>
290
+ <editorialgroup>
291
+ <technical-committee number="45" type="TC">ISO/TC 45/SC 3Raw materials (including latex) for use in the rubber industry</technical-committee>
292
+ </editorialgroup>
293
+ <ics>
294
+ <code>83.040.10</code>
295
+ <text>Latex and raw rubber</text>
296
+ </ics>
297
+ </bibitem>
298
+ </references></bibliography>
299
+ </standard-document>
300
+
301
+ OUTPUT
302
+ end
274
303
  end
275
304
 
276
305
  it "processes draft ISO reference" do
@@ -342,42 +371,81 @@ RSpec.describe Asciidoctor::Standoc do
342
371
  end
343
372
 
344
373
  it "processes RFC reference in Normative References" do
345
- mock_rfcbib_get_rfc8341
346
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
347
- #{ISOBIB_BLANK_HDR}
348
- [bibliography]
349
- == Normative References
350
-
351
- * [[[iso123,IETF(RFC 8341)]]], _Standard_
352
-
353
- == Clause 4
354
-
355
- <<iso123>>
356
- INPUT
357
- #{BLANK_HDR}
358
- <sections>
359
- <clause id="_" inline-header="false" obligation="normative">
360
- <title>Clause 4</title>
361
- <p id="_">
362
- <eref type="inline" bibitemid="iso123" citeas="RFC 8341"/>
363
- </p>
364
- </clause>
365
-
366
- </sections><bibliography><references id="_" obligation="informative">
367
- <title>Normative References</title>
368
- <bibitem type="" id="iso123">
369
- <title format="text/plain" language="en" script="Latn">Network Configuration Access Control Model</title>
370
- <docidentifier type="DOI">10.17487/RFC8341</docidentifier>
371
- <docidentifier type="IETF">RFC 8341</docidentifier>
372
- <date type="published">
373
- <on>2018</on>
374
- </date>
375
- <status>published</status>
376
- </bibitem>
377
- </references>
378
- </bibliography>
379
- </standard-document>
380
- OUTPUT
374
+ # mock_rfcbib_get_rfc8341
375
+ VCR.use_cassette "rfcbib_get_rfc8341" do
376
+ expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
377
+ #{ISOBIB_BLANK_HDR}
378
+ [bibliography]
379
+ == Normative References
380
+
381
+ * [[[iso123,IETF(RFC 8341)]]], _Standard_
382
+
383
+ == Clause 4
384
+
385
+ <<iso123>>
386
+ INPUT
387
+ #{BLANK_HDR}
388
+ <sections>
389
+ <clause id="_" inline-header="false" obligation="normative">
390
+ <title>Clause 4</title>
391
+ <p id="_">
392
+ <eref type="inline" bibitemid="iso123" citeas="RFC 8341"/>
393
+ </p>
394
+ </clause>
395
+ </sections><bibliography><references id="_" obligation="informative">
396
+ <title>Normative References</title>
397
+ <bibitem id="iso123">
398
+ <fetched>#{Date.today}</fetched>
399
+ <title format="plain" language="en" script="Latn">Network Configuration Access Control Model</title>
400
+ <uri type="src">https://www.rfc-editor.org/info/rfc8341</uri>
401
+ <docidentifier type="IETF">RFC 8341</docidentifier>
402
+ <docidentifier type="DOI">10.17487/RFC8341</docidentifier>
403
+ <date type="published">
404
+ <on>2018</on>
405
+ </date>
406
+ <contributor>
407
+ <role type="author"/>
408
+ <person>
409
+ <name>
410
+ <completename language="en">A. Bierman</completename>
411
+ </name>
412
+ <affiliation>
413
+ <organization>
414
+ <name>IETF</name>
415
+ <abbreviation>IETF</abbreviation>
416
+ </organization>
417
+ </affiliation>
418
+ </person>
419
+ </contributor>
420
+ <contributor>
421
+ <role type="author"/>
422
+ <person>
423
+ <name>
424
+ <completename language="en">M. Bjorklund</completename>
425
+ </name>
426
+ <affiliation>
427
+ <organization>
428
+ <name>IETF</name>
429
+ <abbreviation>IETF</abbreviation>
430
+ </organization>
431
+ </affiliation>
432
+ </person>
433
+ </contributor>
434
+ <language>en</language>
435
+ <series type="main">
436
+ <title format="plain" language="en" script="Latn">STD</title>
437
+ <number>91</number>
438
+ </series>
439
+ <series type="main">
440
+ <title format="plain" language="en" script="Latn">RFC</title>
441
+ <number>8341</number>
442
+ </series>
443
+ </bibitem>
444
+ </references>
445
+ </bibliography>
446
+ </standard-document>
447
+ OUTPUT
448
+ end
381
449
  end
382
450
 
383
451
  it "processes non-ISO reference in Normative References" do
@@ -482,7 +550,7 @@ RSpec.describe Asciidoctor::Standoc do
482
550
 
483
551
  def mock_isobib_get_123
484
552
  expect(Isobib::IsoBibliography).to receive(:get).with("ISO 123", nil, {}) do
485
- IsoBibItem.from_xml(<<~"OUTPUT")
553
+ IsoBibItem::XMLParser.from_xml(<<~"OUTPUT")
486
554
  <bibitem type=\"international-standard\" id=\"ISO123\">\n <title format=\"text/plain\" language=\"en\" script=\"Latn\">Rubber latex -- Sampling</title>\n <title format=\"text/plain\" language=\"fr\" script=\"Latn\">Latex de caoutchouc -- ?chantillonnage</title>\n <uri type=\"src\">https://www.iso.org/standard/23281.html</uri>\n <uri type=\"obp\">https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>\n <uri type=\"rss\">https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>\n <docidentifier>ISO 123</docidentifier>\n <date type=\"published\">\n <on>2001</on>\n </date>\n <contributor>\n <role type=\"publisher\"/>\n <organization>\n <name>International Organization for Standardization</name>\n <abbreviation>ISO</abbreviation>\n <uri>www.iso.org</uri>\n </organization>\n </contributor>\n <edition>3</edition>\n <language>en</language>\n <language>fr</language>\n <script>Latn</script>\n <status>Published</status>\n <copyright>\n <from>2001</from>\n <owner>\n <organization>\n <name>ISO</name>\n <abbreviation></abbreviation>\n </organization>\n </owner>\n </copyright>\n <relation type=\"obsoletes\">\n <bibitem>\n <formattedref>ISO 123:1985</formattedref>\n </bibitem>\n </relation>\n <relation type=\"updates\">\n <bibitem>\n <formattedref>ISO 123:2001</formattedref>\n </bibitem>\n </relation>\n</bibitem>
487
555
  OUTPUT
488
556
  end
@@ -490,7 +558,7 @@ RSpec.describe Asciidoctor::Standoc do
490
558
 
491
559
  def mock_isobib_get_124
492
560
  expect(Isobib::IsoBibliography).to receive(:get).with("ISO 124", "2014", {}) do
493
- IsoBibItem.from_xml(<<~"OUTPUT")
561
+ IsoBibItem::XMLParser.from_xml(<<~"OUTPUT")
494
562
  <bibitem type="international-standard" id="iso124">
495
563
  <title format="text/plain" language="en" script="Latn">Latex, rubber -- Determination of total solids content</title>
496
564
  <title format="text/plain" language="fr" script="Latn">Latex de caoutchouc -- Détermination des matières solides totales</title>
@@ -540,7 +608,7 @@ RSpec.describe Asciidoctor::Standoc do
540
608
 
541
609
  def mock_isobib_get_iec12382
542
610
  expect(Isobib::IsoBibliography).to receive(:get).with("ISO/IEC TR 12382", "1992", {}) do
543
- IsoBibItem.from_xml(<<~"OUTPUT")
611
+ IsoBibItem::XMLParser.from_xml(<<~"OUTPUT")
544
612
  <bibitem type="international-standard" id="iso123">
545
613
  <title format="text/plain" language="en" script="Latn">Permuted index of the vocabulary of information technology</title>
546
614
  <title format="text/plain" language="fr" script="Latn">Index permuté du vocabulaire des technologies de l'information</title>
@@ -602,7 +670,7 @@ end
602
670
 
603
671
  def mock_rfcbib_get_rfc8341
604
672
  expect(IETFBib::RfcBibliography).to receive(:get).with("RFC 8341", nil, {}) do
605
- IsoBibItem.from_xml(<<~"OUTPUT")
673
+ IsoBibItem::XMLParser.from_xml(<<~"OUTPUT")
606
674
  <bibitem id="RFC8341">
607
675
  <title format="text/plain" language="en" script="Latn">Network Configuration Access Control Model</title>
608
676
  <docidentifier type="DOI">10.17487/RFC8341</docidentifier>