metanorma-standoc 1.11.1 → 1.11.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/standoc/blocks.rb +1 -1
- data/lib/asciidoctor/standoc/cleanup.rb +1 -1
- data/lib/asciidoctor/standoc/cleanup_boilerplate.rb +28 -20
- data/lib/asciidoctor/standoc/cleanup_ref_dl.rb +25 -15
- data/lib/asciidoctor/standoc/cleanup_section_names.rb +2 -2
- data/lib/asciidoctor/standoc/cleanup_terms.rb +23 -19
- data/lib/asciidoctor/standoc/cleanup_terms_designations.rb +31 -14
- data/lib/asciidoctor/standoc/datamodel/attributes_table_preprocessor.rb +6 -6
- data/lib/asciidoctor/standoc/inline.rb +13 -11
- data/lib/asciidoctor/standoc/isodoc.rng +42 -17
- data/lib/asciidoctor/standoc/ref.rb +101 -75
- data/lib/asciidoctor/standoc/ref_date_id.rb +30 -1
- data/lib/asciidoctor/standoc/ref_sect.rb +16 -6
- data/lib/asciidoctor/standoc/reqt.rb +1 -1
- data/lib/asciidoctor/standoc/section.rb +1 -1
- data/lib/asciidoctor/standoc/validate.rb +1 -1
- data/lib/isodoc/html/htmlstyle.css +1 -1
- data/lib/isodoc/html/htmlstyle.scss +1 -1
- data/lib/metanorma/standoc/version.rb +1 -1
- data/metanorma-standoc.gemspec +2 -2
- data/spec/asciidoctor/blocks_spec.rb +15 -15
- data/spec/asciidoctor/cleanup_sections_spec.rb +1 -1
- data/spec/asciidoctor/cleanup_spec.rb +4 -4
- data/spec/asciidoctor/cleanup_terms_spec.rb +248 -63
- data/spec/asciidoctor/datamodel/attributes_table_preprocessor_spec.rb +21 -21
- data/spec/asciidoctor/datamodel/diagram_preprocessor_spec.rb +16 -16
- data/spec/asciidoctor/inline_spec.rb +5 -5
- data/spec/asciidoctor/isobib_cache_spec.rb +4 -8
- data/spec/asciidoctor/macros_spec.rb +2 -2
- data/spec/asciidoctor/refs_spec.rb +842 -664
- data/spec/asciidoctor/section_spec.rb +2 -2
- data/spec/spec_helper.rb +0 -1
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +176 -176
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec1.yml +12 -12
- data/spec/vcr_cassettes/isobib_get_123.yml +12 -12
- data/spec/vcr_cassettes/isobib_get_123_1.yml +24 -24
- data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +34 -34
- data/spec/vcr_cassettes/isobib_get_123_2001.yml +11 -11
- data/spec/vcr_cassettes/isobib_get_124.yml +13 -13
- data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +14 -14
- data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +46 -46
- metadata +5 -5
@@ -4,7 +4,7 @@ require "relaton_ietf"
|
|
4
4
|
|
5
5
|
RSpec.describe Asciidoctor::Standoc do
|
6
6
|
it "processes simple ISO reference" do
|
7
|
-
|
7
|
+
input = <<~INPUT
|
8
8
|
#{ASCIIDOC_BLANK_HDR}
|
9
9
|
[bibliography]
|
10
10
|
== Normative References
|
@@ -12,6 +12,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
12
12
|
* [[[iso123,ISO 123]]] _Standard_
|
13
13
|
* [[[iso124,(1)ISO 123]]] _Standard_
|
14
14
|
INPUT
|
15
|
+
output = <<~OUTPUT
|
15
16
|
#{BLANK_HDR}
|
16
17
|
<sections>
|
17
18
|
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
@@ -44,10 +45,12 @@ RSpec.describe Asciidoctor::Standoc do
|
|
44
45
|
</bibliography>
|
45
46
|
</standard-document>
|
46
47
|
OUTPUT
|
48
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
49
|
+
.to be_equivalent_to xmlpp(output)
|
47
50
|
end
|
48
51
|
|
49
52
|
it "processes simple ISO reference with date range" do
|
50
|
-
|
53
|
+
input = <<~INPUT
|
51
54
|
#{ASCIIDOC_BLANK_HDR}
|
52
55
|
[bibliography]
|
53
56
|
== Normative References
|
@@ -55,6 +58,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
55
58
|
* [[[iso123,ISO 123:1066-1067]]] _Standard_
|
56
59
|
* [[[iso124,(1)ISO 123:1066-1067]]] _Standard_
|
57
60
|
INPUT
|
61
|
+
output = <<~OUTPUT
|
58
62
|
#{BLANK_HDR}
|
59
63
|
<sections>
|
60
64
|
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
@@ -96,6 +100,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
96
100
|
</bibliography>
|
97
101
|
</standard-document>
|
98
102
|
OUTPUT
|
103
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
104
|
+
.to be_equivalent_to xmlpp(output)
|
99
105
|
end
|
100
106
|
|
101
107
|
it "repairs simple fetched ISO reference" do
|
@@ -113,118 +119,122 @@ RSpec.describe Asciidoctor::Standoc do
|
|
113
119
|
* [[[iso123,ISO 123]]] _Standard_
|
114
120
|
* [[[iso124,(1)ISO 123]]] _Standard_
|
115
121
|
INPUT
|
116
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
<
|
121
|
-
|
122
|
-
<
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
<
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
<
|
136
|
-
|
137
|
-
|
138
|
-
<
|
139
|
-
|
140
|
-
<name>International Organization for Standardization</name>
|
141
|
-
<abbreviation>ISO</abbreviation>
|
142
|
-
<uri>www.iso.org</uri>
|
143
|
-
</organization>
|
144
|
-
</contributor>
|
145
|
-
<edition>3</edition>
|
146
|
-
<language>en</language>
|
147
|
-
<language>fr</language>
|
148
|
-
<script>Latn</script>
|
149
|
-
<status>
|
150
|
-
<stage>Published</stage>
|
151
|
-
</status>
|
152
|
-
<copyright>
|
153
|
-
<from>2001</from>
|
154
|
-
<owner>
|
122
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
123
|
+
.to be_equivalent_to xmlpp(<<~"OUTPUT")
|
124
|
+
#{BLANK_HDR}
|
125
|
+
<preface>
|
126
|
+
<foreword id='_' obligation='informative'>
|
127
|
+
<title>Foreword</title>
|
128
|
+
<p id='_'>
|
129
|
+
<eref type='inline' bibitemid='iso123' citeas='ISO 123'/>
|
130
|
+
<eref type='inline' bibitemid='iso124' citeas='[1]'/>
|
131
|
+
</p>
|
132
|
+
</foreword>
|
133
|
+
</preface>
|
134
|
+
<sections>
|
135
|
+
</sections><bibliography><references id="_" obligation="informative" normative="true"><title>Normative references</title>
|
136
|
+
#{NORM_REF_BOILERPLATE}
|
137
|
+
<bibitem type="standard" id="iso123">
|
138
|
+
<uri type="src">https://www.iso.org/standard/23281.html</uri>
|
139
|
+
<uri type="obp">https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
140
|
+
<uri type="rss">https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
141
|
+
<date type="published">
|
142
|
+
<on>2001</on>
|
143
|
+
</date>
|
144
|
+
<contributor>
|
145
|
+
<role type="publisher"/>
|
155
146
|
<organization>
|
156
|
-
<name>
|
157
|
-
<abbreviation
|
147
|
+
<name>International Organization for Standardization</name>
|
148
|
+
<abbreviation>ISO</abbreviation>
|
149
|
+
<uri>www.iso.org</uri>
|
158
150
|
</organization>
|
159
|
-
</
|
160
|
-
|
161
|
-
|
162
|
-
<
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
<
|
168
|
-
<
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
</
|
189
|
-
<
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
<owner>
|
151
|
+
</contributor>
|
152
|
+
<edition>3</edition>
|
153
|
+
<language>en</language>
|
154
|
+
<language>fr</language>
|
155
|
+
<script>Latn</script>
|
156
|
+
<status>
|
157
|
+
<stage>Published</stage>
|
158
|
+
</status>
|
159
|
+
<copyright>
|
160
|
+
<from>2001</from>
|
161
|
+
<owner>
|
162
|
+
<organization>
|
163
|
+
<name>ISO</name>
|
164
|
+
<abbreviation/>
|
165
|
+
</organization>
|
166
|
+
</owner>
|
167
|
+
</copyright>
|
168
|
+
<relation type="obsoletes">
|
169
|
+
<bibitem type="standard">
|
170
|
+
<formattedref format="text/plain">ISO 123:1985</formattedref>
|
171
|
+
</bibitem>
|
172
|
+
</relation>
|
173
|
+
<relation type="updates">
|
174
|
+
<bibitem type="standard">
|
175
|
+
<formattedref format="text/plain">ISO 123:2001</formattedref>
|
176
|
+
</bibitem>
|
177
|
+
</relation>
|
178
|
+
<docidentifier>ISO 123</docidentifier>
|
179
|
+
<title><em>Standard</em></title>
|
180
|
+
</bibitem>
|
181
|
+
<bibitem type="standard" id="iso124">
|
182
|
+
<uri type="src">https://www.iso.org/standard/23281.html</uri>
|
183
|
+
<uri type="obp">https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
184
|
+
<uri type="rss">https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
185
|
+
<date type="published">
|
186
|
+
<on>2001</on>
|
187
|
+
</date>
|
188
|
+
<contributor>
|
189
|
+
<role type="publisher"/>
|
199
190
|
<organization>
|
200
|
-
<name>
|
201
|
-
<abbreviation
|
191
|
+
<name>International Organization for Standardization</name>
|
192
|
+
<abbreviation>ISO</abbreviation>
|
193
|
+
<uri>www.iso.org</uri>
|
202
194
|
</organization>
|
203
|
-
</
|
204
|
-
|
205
|
-
|
206
|
-
<
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
<
|
212
|
-
<
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
195
|
+
</contributor>
|
196
|
+
<edition>3</edition>
|
197
|
+
<language>en</language>
|
198
|
+
<language>fr</language>
|
199
|
+
<script>Latn</script>
|
200
|
+
<status>
|
201
|
+
<stage>Published</stage>
|
202
|
+
</status>
|
203
|
+
<copyright>
|
204
|
+
<from>2001</from>
|
205
|
+
<owner>
|
206
|
+
<organization>
|
207
|
+
<name>ISO</name>
|
208
|
+
<abbreviation/>
|
209
|
+
</organization>
|
210
|
+
</owner>
|
211
|
+
</copyright>
|
212
|
+
<relation type="obsoletes">
|
213
|
+
<bibitem type="standard">
|
214
|
+
<formattedref format="text/plain">ISO 123:1985</formattedref>
|
215
|
+
</bibitem>
|
216
|
+
</relation>
|
217
|
+
<relation type="updates">
|
218
|
+
<bibitem type="standard">
|
219
|
+
<formattedref format="text/plain">ISO 123:2001</formattedref>
|
220
|
+
</bibitem>
|
221
|
+
</relation>
|
222
|
+
<docidentifier>ISO 123</docidentifier>
|
223
|
+
<docidentifier type='metanorma'>[1]</docidentifier>
|
224
|
+
<title><em>Standard</em></title>
|
225
|
+
</bibitem>
|
226
|
+
</references></bibliography>
|
227
|
+
</standard-document>
|
228
|
+
OUTPUT
|
229
|
+
expect do
|
230
|
+
Asciidoctor.convert(input, *OPTIONS)
|
231
|
+
end.to output(/ERROR: No document identifier retrieved for ISO 123/)
|
232
|
+
.to_stderr
|
223
233
|
end
|
224
234
|
|
225
235
|
it "fetches simple ISO reference" do
|
226
236
|
VCR.use_cassette "isobib_get_123_1" do
|
227
|
-
|
237
|
+
input = <<~INPUT
|
228
238
|
#{ISOBIB_BLANK_HDR}
|
229
239
|
[bibliography]
|
230
240
|
== Normative References
|
@@ -232,210 +242,213 @@ RSpec.describe Asciidoctor::Standoc do
|
|
232
242
|
* [[[iso123,ISO 123]]] _Standard_
|
233
243
|
* [[[iso124,(1)ISO 123]]] _Standard_
|
234
244
|
INPUT
|
235
|
-
|
236
|
-
|
245
|
+
output = <<~OUTPUT
|
246
|
+
#{BLANK_HDR}
|
247
|
+
<sections>
|
237
248
|
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
249
|
+
</sections><bibliography><references id="_" obligation="informative" normative="true"><title>Normative references</title>
|
250
|
+
#{NORM_REF_BOILERPLATE}
|
251
|
+
<bibitem id='iso123' type='standard'>
|
252
|
+
<fetched/>
|
253
|
+
<title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
|
254
|
+
<title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
|
255
|
+
<title type='main' format='text/plain' language='en' script='Latn'>Rubber latex — Sampling</title>
|
256
|
+
<uri type='src'>https://www.iso.org/standard/23281.html</uri>
|
257
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
258
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
259
|
+
<docidentifier type='ISO'>ISO 123</docidentifier>
|
260
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:en</docidentifier>
|
261
|
+
<docnumber>123</docnumber>
|
262
|
+
<contributor>
|
263
|
+
<role type='publisher'/>
|
264
|
+
<organization>
|
265
|
+
<name>International Organization for Standardization</name>
|
266
|
+
<abbreviation>ISO</abbreviation>
|
267
|
+
<uri>www.iso.org</uri>
|
268
|
+
</organization>
|
269
|
+
</contributor>
|
270
|
+
<edition>3</edition>
|
271
|
+
<language>en</language>
|
272
|
+
<script>Latn</script>
|
273
|
+
<status>
|
274
|
+
<stage>90</stage>
|
275
|
+
<substage>93</substage>
|
276
|
+
</status>
|
277
|
+
<copyright>
|
278
|
+
<from>2001</from>
|
279
|
+
<owner>
|
280
|
+
<organization>
|
281
|
+
<name>ISO</name>
|
282
|
+
</organization>
|
283
|
+
</owner>
|
284
|
+
</copyright>
|
285
|
+
<relation type='obsoletes'>
|
286
|
+
<bibitem type='standard'>
|
287
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
288
|
+
</bibitem>
|
289
|
+
</relation>
|
290
|
+
<relation type='instance'>
|
291
|
+
<bibitem type='standard'>
|
292
|
+
<fetched/>
|
293
|
+
<title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
|
294
|
+
<title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
|
295
|
+
<title type='main' format='text/plain' language='en' script='Latn'>Rubber latex — Sampling</title>
|
296
|
+
<uri type='src'>https://www.iso.org/standard/23281.html</uri>
|
297
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
298
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
299
|
+
<docidentifier type='ISO'>ISO 123:2001</docidentifier>
|
300
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:en</docidentifier>
|
301
|
+
<docnumber>123</docnumber>
|
302
|
+
<date type='published'>
|
303
|
+
<on>2001-05</on>
|
304
|
+
</date>
|
305
|
+
<contributor>
|
306
|
+
<role type='publisher'/>
|
307
|
+
<organization>
|
308
|
+
<name>International Organization for Standardization</name>
|
309
|
+
<abbreviation>ISO</abbreviation>
|
310
|
+
<uri>www.iso.org</uri>
|
311
|
+
</organization>
|
312
|
+
</contributor>
|
313
|
+
<edition>3</edition>
|
314
|
+
<language>en</language>
|
315
|
+
<script>Latn</script>
|
316
|
+
<abstract format='text/plain' language='en' script='Latn'>
|
317
|
+
This International Standard specifies procedures for sampling
|
318
|
+
natural rubber latex concentrate and for sampling synthetic rubber
|
319
|
+
latices and artificial latices. It is also suitable for sampling
|
320
|
+
rubber latex contained in drums, tank cars or tanks. The
|
321
|
+
procedures may also be used for sampling plastics dispersions.
|
322
|
+
</abstract>
|
323
|
+
<status>
|
324
|
+
<stage>90</stage>
|
325
|
+
<substage>93</substage>
|
326
|
+
</status>
|
327
|
+
<copyright>
|
328
|
+
<from>2001</from>
|
329
|
+
<owner>
|
330
|
+
<organization>
|
331
|
+
<name>ISO</name>
|
332
|
+
</organization>
|
333
|
+
</owner>
|
334
|
+
</copyright>
|
335
|
+
<relation type='obsoletes'>
|
336
|
+
<bibitem type='standard'>
|
337
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
338
|
+
</bibitem>
|
339
|
+
</relation>
|
340
|
+
<place>Geneva</place>
|
341
|
+
</bibitem>
|
342
|
+
</relation>
|
343
|
+
<place>Geneva</place>
|
344
|
+
</bibitem>
|
345
|
+
<bibitem id='iso124' type='standard'>
|
346
|
+
<fetched/>
|
347
|
+
<title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
|
348
|
+
<title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
|
349
|
+
<title type='main' format='text/plain' language='en' script='Latn'>Rubber latex — Sampling</title>
|
350
|
+
<uri type='src'>https://www.iso.org/standard/23281.html</uri>
|
351
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
352
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
353
|
+
<docidentifier type='ISO'>ISO 123</docidentifier>
|
354
|
+
<docidentifier type='metanorma'>[1]</docidentifier>
|
355
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:en</docidentifier>
|
356
|
+
<docnumber>123</docnumber>
|
357
|
+
<contributor>
|
358
|
+
<role type='publisher'/>
|
359
|
+
<organization>
|
360
|
+
<name>International Organization for Standardization</name>
|
361
|
+
<abbreviation>ISO</abbreviation>
|
362
|
+
<uri>www.iso.org</uri>
|
363
|
+
</organization>
|
364
|
+
</contributor>
|
365
|
+
<edition>3</edition>
|
366
|
+
<language>en</language>
|
367
|
+
<script>Latn</script>
|
368
|
+
<status>
|
369
|
+
<stage>90</stage>
|
370
|
+
<substage>93</substage>
|
371
|
+
</status>
|
372
|
+
<copyright>
|
373
|
+
<from>2001</from>
|
374
|
+
<owner>
|
375
|
+
<organization>
|
376
|
+
<name>ISO</name>
|
377
|
+
</organization>
|
378
|
+
</owner>
|
379
|
+
</copyright>
|
380
|
+
<relation type='obsoletes'>
|
381
|
+
<bibitem type='standard'>
|
382
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
383
|
+
</bibitem>
|
384
|
+
</relation>
|
385
|
+
<relation type='instance'>
|
386
|
+
<bibitem type='standard'>
|
387
|
+
<fetched/>
|
388
|
+
<title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
|
389
|
+
<title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
|
390
|
+
<title type='main' format='text/plain' language='en' script='Latn'>Rubber latex — Sampling</title>
|
391
|
+
<uri type='src'>https://www.iso.org/standard/23281.html</uri>
|
392
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
393
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
394
|
+
<docidentifier type='ISO'>ISO 123:2001</docidentifier>
|
395
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:en</docidentifier>
|
396
|
+
<docnumber>123</docnumber>
|
397
|
+
<date type='published'>
|
398
|
+
<on>2001-05</on>
|
399
|
+
</date>
|
400
|
+
<contributor>
|
401
|
+
<role type='publisher'/>
|
402
|
+
<organization>
|
403
|
+
<name>International Organization for Standardization</name>
|
404
|
+
<abbreviation>ISO</abbreviation>
|
405
|
+
<uri>www.iso.org</uri>
|
406
|
+
</organization>
|
407
|
+
</contributor>
|
408
|
+
<edition>3</edition>
|
409
|
+
<language>en</language>
|
410
|
+
<script>Latn</script>
|
411
|
+
<abstract format='text/plain' language='en' script='Latn'>
|
412
|
+
This International Standard specifies procedures for sampling
|
413
|
+
natural rubber latex concentrate and for sampling synthetic rubber
|
414
|
+
latices and artificial latices. It is also suitable for sampling
|
415
|
+
rubber latex contained in drums, tank cars or tanks. The
|
416
|
+
procedures may also be used for sampling plastics dispersions.
|
417
|
+
</abstract>
|
418
|
+
<status>
|
419
|
+
<stage>90</stage>
|
420
|
+
<substage>93</substage>
|
421
|
+
</status>
|
422
|
+
<copyright>
|
423
|
+
<from>2001</from>
|
424
|
+
<owner>
|
425
|
+
<organization>
|
426
|
+
<name>ISO</name>
|
427
|
+
</organization>
|
428
|
+
</owner>
|
429
|
+
</copyright>
|
430
|
+
<relation type='obsoletes'>
|
431
|
+
<bibitem type='standard'>
|
432
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
433
|
+
</bibitem>
|
434
|
+
</relation>
|
435
|
+
<place>Geneva</place>
|
436
|
+
</bibitem>
|
437
|
+
</relation>
|
438
|
+
<place>Geneva</place>
|
439
|
+
</bibitem>
|
440
|
+
</references>
|
441
|
+
</bibliography>
|
442
|
+
</standard-document>
|
432
443
|
OUTPUT
|
444
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
445
|
+
.to be_equivalent_to xmlpp(output)
|
433
446
|
end
|
434
447
|
end
|
435
448
|
|
436
449
|
it "fetches simple ISO reference in French" do
|
437
450
|
VCR.use_cassette "isobib_get_123_1_fr" do
|
438
|
-
|
451
|
+
input = <<~INPUT
|
439
452
|
= Document title
|
440
453
|
Author
|
441
454
|
:docfile: test.adoc
|
@@ -450,230 +463,233 @@ RSpec.describe Asciidoctor::Standoc do
|
|
450
463
|
* [[[iso123,ISO 123]]] _Standard_
|
451
464
|
* [[[iso124,(1)ISO 123]]] _Standard_
|
452
465
|
INPUT
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
466
|
+
output = <<~OUTPUT
|
467
|
+
#{BLANK_HDR.sub(%r{<language>en</language>}, '<language>fr</language>')}
|
468
|
+
<sections> </sections>
|
469
|
+
<bibliography>
|
470
|
+
<references id='_' normative='true' obligation='informative'>
|
471
|
+
<title>Références normatives</title>
|
472
|
+
<p id='_'>
|
473
|
+
Les documents suivants cités dans le texte constituent, pour tout
|
474
|
+
ou partie de leur contenu, des exigences du présent document. Pour
|
475
|
+
les références datées, seule l’édition
|
476
|
+
citée s’applique. Pour les références non
|
477
|
+
datées, la dernière édition du document de
|
478
|
+
référence s’applique (y compris les éventuels
|
479
|
+
amendements).
|
480
|
+
</p>
|
481
|
+
<bibitem id='iso123' type='standard'>
|
482
|
+
<fetched/>
|
483
|
+
<title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc</title>
|
484
|
+
<title type='title-main' format='text/plain' language='fr' script='Latn'>Échantillonnage</title>
|
485
|
+
<title type='main' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc — Échantillonnage</title>
|
486
|
+
<uri type='src'>https://www.iso.org/standard/23281.html</uri>
|
487
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
488
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
489
|
+
<docidentifier type='ISO'>ISO 123</docidentifier>
|
490
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:fr</docidentifier>
|
491
|
+
<docnumber>123</docnumber>
|
492
|
+
<contributor>
|
493
|
+
<role type='publisher'/>
|
494
|
+
<organization>
|
495
|
+
<name>International Organization for Standardization</name>
|
496
|
+
<abbreviation>ISO</abbreviation>
|
497
|
+
<uri>www.iso.org</uri>
|
498
|
+
</organization>
|
499
|
+
</contributor>
|
500
|
+
<edition>3</edition>
|
501
|
+
<language>en</language>
|
502
|
+
<language>fr</language>
|
503
|
+
<script>Latn</script>
|
504
|
+
<status>
|
505
|
+
<stage>90</stage>
|
506
|
+
<substage>93</substage>
|
507
|
+
</status>
|
508
|
+
<copyright>
|
509
|
+
<from>2001</from>
|
510
|
+
<owner>
|
511
|
+
<organization>
|
512
|
+
<name>ISO</name>
|
513
|
+
</organization>
|
514
|
+
</owner>
|
515
|
+
</copyright>
|
516
|
+
<relation type='obsoletes'>
|
517
|
+
<bibitem type='standard'>
|
518
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
519
|
+
</bibitem>
|
520
|
+
</relation>
|
521
|
+
<relation type='instance'>
|
522
|
+
<bibitem type='standard'>
|
523
|
+
<fetched/>
|
524
|
+
<title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc</title>
|
525
|
+
<title type='title-main' format='text/plain' language='fr' script='Latn'>Échantillonnage</title>
|
526
|
+
<title type='main' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc — Échantillonnage</title>
|
527
|
+
<uri type='src'>https://www.iso.org/standard/23281.html</uri>
|
528
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
529
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
530
|
+
<docidentifier type='ISO'>ISO 123:2001</docidentifier>
|
531
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:fr</docidentifier>
|
532
|
+
<docnumber>123</docnumber>
|
533
|
+
<date type='published'>
|
534
|
+
<on>2001-05</on>
|
535
|
+
</date>
|
536
|
+
<contributor>
|
537
|
+
<role type='publisher'/>
|
538
|
+
<organization>
|
539
|
+
<name>International Organization for Standardization</name>
|
540
|
+
<abbreviation>ISO</abbreviation>
|
541
|
+
<uri>www.iso.org</uri>
|
542
|
+
</organization>
|
543
|
+
</contributor>
|
544
|
+
<edition>3</edition>
|
545
|
+
<language>en</language>
|
546
|
+
<language>fr</language>
|
547
|
+
<script>Latn</script>
|
548
|
+
<abstract format='text/plain' language='fr' script='Latn'>
|
549
|
+
La présente Norme internationale spécifie des
|
550
|
+
méthodes d’échantillonnage pour des
|
551
|
+
concentrés de latex de caoutchouc naturel et pour
|
552
|
+
échantillonner des latex de caoutchouc synthétique et
|
553
|
+
des latex artificiels. Elle s’applique également à
|
554
|
+
l’échantillonnage de latex de caoutchouc contenus dans
|
555
|
+
des fûts, citernes routières ou de stockage. Le mode
|
556
|
+
opératoire peut aussi être utilisé pour
|
557
|
+
l’échantillonnage de dispersions de plastiques.
|
558
|
+
</abstract>
|
559
|
+
<status>
|
560
|
+
<stage>90</stage>
|
561
|
+
<substage>93</substage>
|
562
|
+
</status>
|
563
|
+
<copyright>
|
564
|
+
<from>2001</from>
|
565
|
+
<owner>
|
566
|
+
<organization>
|
567
|
+
<name>ISO</name>
|
568
|
+
</organization>
|
569
|
+
</owner>
|
570
|
+
</copyright>
|
571
|
+
<relation type='obsoletes'>
|
572
|
+
<bibitem type='standard'>
|
573
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
574
|
+
</bibitem>
|
575
|
+
</relation>
|
576
|
+
<place>Geneva</place>
|
577
|
+
</bibitem>
|
578
|
+
</relation>
|
579
|
+
<place>Geneva</place>
|
580
|
+
</bibitem>
|
581
|
+
<bibitem id='iso124' type='standard'>
|
582
|
+
<fetched/>
|
583
|
+
<title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc</title>
|
584
|
+
<title type='title-main' format='text/plain' language='fr' script='Latn'>Échantillonnage</title>
|
585
|
+
<title type='main' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc — Échantillonnage</title>
|
586
|
+
<uri type='src'>https://www.iso.org/standard/23281.html</uri>
|
587
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
588
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
589
|
+
<docidentifier type='ISO'>ISO 123</docidentifier>
|
590
|
+
<docidentifier type='metanorma'>[1]</docidentifier>
|
591
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:fr</docidentifier>
|
592
|
+
<docnumber>123</docnumber>
|
593
|
+
<contributor>
|
594
|
+
<role type='publisher'/>
|
595
|
+
<organization>
|
596
|
+
<name>International Organization for Standardization</name>
|
597
|
+
<abbreviation>ISO</abbreviation>
|
598
|
+
<uri>www.iso.org</uri>
|
599
|
+
</organization>
|
600
|
+
</contributor>
|
601
|
+
<edition>3</edition>
|
602
|
+
<language>en</language>
|
603
|
+
<language>fr</language>
|
604
|
+
<script>Latn</script>
|
605
|
+
<status>
|
606
|
+
<stage>90</stage>
|
607
|
+
<substage>93</substage>
|
608
|
+
</status>
|
609
|
+
<copyright>
|
610
|
+
<from>2001</from>
|
611
|
+
<owner>
|
612
|
+
<organization>
|
613
|
+
<name>ISO</name>
|
614
|
+
</organization>
|
615
|
+
</owner>
|
616
|
+
</copyright>
|
617
|
+
<relation type='obsoletes'>
|
618
|
+
<bibitem type='standard'>
|
619
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
620
|
+
</bibitem>
|
621
|
+
</relation>
|
622
|
+
<relation type='instance'>
|
623
|
+
<bibitem type='standard'>
|
624
|
+
<fetched/>
|
625
|
+
<title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc</title>
|
626
|
+
<title type='title-main' format='text/plain' language='fr' script='Latn'>Échantillonnage</title>
|
627
|
+
<title type='main' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc — Échantillonnage</title>
|
628
|
+
<uri type='src'>https://www.iso.org/standard/23281.html</uri>
|
629
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
630
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
631
|
+
<docidentifier type='ISO'>ISO 123:2001</docidentifier>
|
632
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:fr</docidentifier>
|
633
|
+
<docnumber>123</docnumber>
|
634
|
+
<date type='published'>
|
635
|
+
<on>2001-05</on>
|
636
|
+
</date>
|
637
|
+
<contributor>
|
638
|
+
<role type='publisher'/>
|
639
|
+
<organization>
|
640
|
+
<name>International Organization for Standardization</name>
|
641
|
+
<abbreviation>ISO</abbreviation>
|
642
|
+
<uri>www.iso.org</uri>
|
643
|
+
</organization>
|
644
|
+
</contributor>
|
645
|
+
<edition>3</edition>
|
646
|
+
<language>en</language>
|
647
|
+
<language>fr</language>
|
648
|
+
<script>Latn</script>
|
649
|
+
<abstract format='text/plain' language='fr' script='Latn'>
|
650
|
+
La présente Norme internationale spécifie des
|
651
|
+
méthodes d’échantillonnage pour des
|
652
|
+
concentrés de latex de caoutchouc naturel et pour
|
653
|
+
échantillonner des latex de caoutchouc synthétique et
|
654
|
+
des latex artificiels. Elle s’applique également à
|
655
|
+
l’échantillonnage de latex de caoutchouc contenus dans
|
656
|
+
des fûts, citernes routières ou de stockage. Le mode
|
657
|
+
opératoire peut aussi être utilisé pour
|
658
|
+
l’échantillonnage de dispersions de plastiques.
|
659
|
+
</abstract>
|
660
|
+
<status>
|
661
|
+
<stage>90</stage>
|
662
|
+
<substage>93</substage>
|
663
|
+
</status>
|
664
|
+
<copyright>
|
665
|
+
<from>2001</from>
|
666
|
+
<owner>
|
667
|
+
<organization>
|
668
|
+
<name>ISO</name>
|
669
|
+
</organization>
|
670
|
+
</owner>
|
671
|
+
</copyright>
|
672
|
+
<relation type='obsoletes'>
|
673
|
+
<bibitem type='standard'>
|
674
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
675
|
+
</bibitem>
|
676
|
+
</relation>
|
677
|
+
<place>Geneva</place>
|
678
|
+
</bibitem>
|
679
|
+
</relation>
|
680
|
+
<place>Geneva</place>
|
681
|
+
</bibitem>
|
682
|
+
</references>
|
683
|
+
</bibliography>
|
684
|
+
</standard-document>
|
671
685
|
OUTPUT
|
686
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
687
|
+
.to be_equivalent_to xmlpp(output)
|
672
688
|
end
|
673
689
|
end
|
674
690
|
|
675
691
|
it "processes simple IEC reference" do
|
676
|
-
|
692
|
+
input = <<~INPUT
|
677
693
|
#{ASCIIDOC_BLANK_HDR}
|
678
694
|
[bibliography]
|
679
695
|
== Normative References
|
@@ -681,6 +697,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
681
697
|
* [[[iso123,IEC 123]]] _Standard_
|
682
698
|
* [[[iso124,(1)IEC 123]]] _Standard_
|
683
699
|
INPUT
|
700
|
+
output = <<~OUTPUT
|
684
701
|
#{BLANK_HDR}
|
685
702
|
<sections>
|
686
703
|
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
@@ -713,13 +730,13 @@ RSpec.describe Asciidoctor::Standoc do
|
|
713
730
|
</bibliography>
|
714
731
|
</standard-document>
|
715
732
|
OUTPUT
|
733
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
734
|
+
.to be_equivalent_to xmlpp(output)
|
716
735
|
end
|
717
736
|
|
718
737
|
it "processes dated ISO reference and joint ISO/IEC references" do
|
719
|
-
|
720
|
-
|
721
|
-
VCR.use_cassette "dated_iso_ref_joint_iso_iec" do
|
722
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
738
|
+
VCR.use_cassette("dated_iso_ref_joint_iso_iec", match_requests_on: %i[method uri body]) do
|
739
|
+
input = <<~INPUT
|
723
740
|
#{ISOBIB_BLANK_HDR}
|
724
741
|
[bibliography]
|
725
742
|
== Normative References
|
@@ -729,6 +746,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
729
746
|
* [[[iso125,(1)ISO/IEC TR 12382:1992]]] _Standard_
|
730
747
|
* [[[iso126,(1)ISO 124:2014]]] _Standard_
|
731
748
|
INPUT
|
749
|
+
output = <<~OUTPUT
|
732
750
|
#{BLANK_HDR}
|
733
751
|
<sections>
|
734
752
|
|
@@ -925,12 +943,14 @@ RSpec.describe Asciidoctor::Standoc do
|
|
925
943
|
</standard-document>
|
926
944
|
|
927
945
|
OUTPUT
|
946
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
947
|
+
.to be_equivalent_to xmlpp(output)
|
928
948
|
end
|
929
949
|
end
|
930
950
|
|
931
951
|
it "declines to fetch individual references" do
|
932
952
|
VCR.use_cassette "dated_iso_ref_joint_iso_iec1" do
|
933
|
-
|
953
|
+
input = <<~INPUT
|
934
954
|
#{ISOBIB_BLANK_HDR}
|
935
955
|
[bibliography]
|
936
956
|
== Normative References
|
@@ -938,6 +958,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
938
958
|
* [[[iso123,nofetch(ISO/IEC TR 12382:1992)]]] _Standard_
|
939
959
|
* [[[iso124,ISO 124:2014]]] _Standard_
|
940
960
|
INPUT
|
961
|
+
output = <<~OUTPUT
|
941
962
|
#{BLANK_HDR}
|
942
963
|
<sections>
|
943
964
|
|
@@ -998,13 +1019,15 @@ RSpec.describe Asciidoctor::Standoc do
|
|
998
1019
|
</bibitem>
|
999
1020
|
</references></bibliography></standard-document>
|
1000
1021
|
OUTPUT
|
1022
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1023
|
+
.to be_equivalent_to xmlpp(output)
|
1001
1024
|
end
|
1002
1025
|
end
|
1003
1026
|
|
1004
1027
|
it "processes draft ISO reference" do
|
1005
1028
|
# stub_fetch_ref no_year: true, note: "The standard is in press"
|
1006
1029
|
|
1007
|
-
|
1030
|
+
input = <<~INPUT
|
1008
1031
|
#{ASCIIDOC_BLANK_HDR}
|
1009
1032
|
[bibliography]
|
1010
1033
|
== Normative References
|
@@ -1014,6 +1037,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1014
1037
|
* [[[iso125,ISO 125:–]]], footnote:[The standard is in press] _Standard_
|
1015
1038
|
* [[[iso126,(1)ISO 123:--]]] _Standard_
|
1016
1039
|
INPUT
|
1040
|
+
output = <<~OUTPUT
|
1017
1041
|
#{BLANK_HDR}
|
1018
1042
|
<sections>
|
1019
1043
|
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
@@ -1082,12 +1106,14 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1082
1106
|
</bibliography>
|
1083
1107
|
</standard-document>
|
1084
1108
|
OUTPUT
|
1109
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1110
|
+
.to be_equivalent_to xmlpp(output)
|
1085
1111
|
end
|
1086
1112
|
|
1087
1113
|
it "processes all-parts ISO reference" do
|
1088
1114
|
# stub_fetch_ref(all_parts: true)
|
1089
1115
|
|
1090
|
-
|
1116
|
+
input = <<~INPUT
|
1091
1117
|
#{ASCIIDOC_BLANK_HDR}
|
1092
1118
|
[bibliography]
|
1093
1119
|
== Normative References
|
@@ -1095,6 +1121,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1095
1121
|
* [[[iso123,ISO 123:1066 (all parts)]]] _Standard_
|
1096
1122
|
* [[[iso124,(1)ISO 123:1066 (all parts)]]] _Standard_
|
1097
1123
|
INPUT
|
1124
|
+
output = <<~OUTPUT
|
1098
1125
|
#{BLANK_HDR}
|
1099
1126
|
<sections>
|
1100
1127
|
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
@@ -1139,12 +1166,14 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1139
1166
|
</bibliography>
|
1140
1167
|
</standard-document>
|
1141
1168
|
OUTPUT
|
1169
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1170
|
+
.to be_equivalent_to xmlpp(output)
|
1142
1171
|
end
|
1143
1172
|
|
1144
1173
|
it "processes RFC reference in Normative References" do
|
1145
1174
|
# mock_rfcbib_get_rfc8341
|
1146
1175
|
VCR.use_cassette "rfcbib_get_rfc8341" do
|
1147
|
-
|
1176
|
+
input = <<~INPUT
|
1148
1177
|
#{ISOBIB_BLANK_HDR}
|
1149
1178
|
[bibliography]
|
1150
1179
|
== Normative References
|
@@ -1156,6 +1185,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1156
1185
|
|
1157
1186
|
<<iso123>>
|
1158
1187
|
INPUT
|
1188
|
+
output = <<~OUTPUT
|
1159
1189
|
#{BLANK_HDR}
|
1160
1190
|
<sections>
|
1161
1191
|
<clause id="_" inline-header="false" obligation="normative">
|
@@ -1294,11 +1324,13 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1294
1324
|
</bibliography>
|
1295
1325
|
</standard-document>
|
1296
1326
|
OUTPUT
|
1327
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1328
|
+
.to be_equivalent_to xmlpp(output)
|
1297
1329
|
end
|
1298
1330
|
end
|
1299
1331
|
|
1300
1332
|
it "processes non-ISO reference in Normative References" do
|
1301
|
-
|
1333
|
+
input = <<~INPUT
|
1302
1334
|
#{ASCIIDOC_BLANK_HDR}
|
1303
1335
|
[bibliography]
|
1304
1336
|
== Normative References
|
@@ -1306,6 +1338,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1306
1338
|
* [[[iso123,XYZ 123:1066 (all parts)]]] _Standard_
|
1307
1339
|
* [[[iso124,(1)XYZ 123:1066 (all parts)]]] _Standard_
|
1308
1340
|
INPUT
|
1341
|
+
output = <<~OUTPUT
|
1309
1342
|
#{BLANK_HDR}
|
1310
1343
|
<sections>
|
1311
1344
|
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
@@ -1330,10 +1363,12 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1330
1363
|
</bibliography>
|
1331
1364
|
</standard-document>
|
1332
1365
|
OUTPUT
|
1366
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1367
|
+
.to be_equivalent_to xmlpp(output)
|
1333
1368
|
end
|
1334
1369
|
|
1335
1370
|
it "processes non-ISO reference in Bibliography" do
|
1336
|
-
|
1371
|
+
input = <<~INPUT
|
1337
1372
|
#{ASCIIDOC_BLANK_HDR}
|
1338
1373
|
[bibliography]
|
1339
1374
|
== Bibliography
|
@@ -1344,6 +1379,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1344
1379
|
* [[[iso126,(A1)]]] _Standard_
|
1345
1380
|
* [[[iso127,(4)XYZ 123:1066 (all parts)]]] _Standard_
|
1346
1381
|
INPUT
|
1382
|
+
output = <<~OUTPUT
|
1347
1383
|
#{BLANK_HDR}
|
1348
1384
|
<sections>
|
1349
1385
|
</sections>
|
@@ -1381,13 +1417,15 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1381
1417
|
</bibliography>
|
1382
1418
|
</standard-document>
|
1383
1419
|
OUTPUT
|
1420
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1421
|
+
.to be_equivalent_to xmlpp(output)
|
1384
1422
|
end
|
1385
1423
|
|
1386
1424
|
it "process ISO reference without an Internet connection" do
|
1387
1425
|
expect(RelatonIso::IsoBibliography).to receive(:search).with("ISO 123") do
|
1388
1426
|
raise RelatonBib::RequestError.new "getaddrinfo"
|
1389
1427
|
end.at_least :once
|
1390
|
-
|
1428
|
+
input = <<~INPUT
|
1391
1429
|
#{ISOBIB_BLANK_HDR}
|
1392
1430
|
[bibliography]
|
1393
1431
|
== Normative References
|
@@ -1395,6 +1433,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1395
1433
|
* [[[iso123,ISO 123]]] _Standard_
|
1396
1434
|
* [[[iso124,(1)ISO 123]]] _Standard_
|
1397
1435
|
INPUT
|
1436
|
+
output = <<~OUTPUT
|
1398
1437
|
<?xml version="1.0" encoding="UTF-8"?>
|
1399
1438
|
<standard-document xmlns="https://www.metanorma.org/ns/standoc" type="semantic" version="#{Metanorma::Standoc::VERSION}">
|
1400
1439
|
<bibdata type="standard">
|
@@ -1439,10 +1478,12 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1439
1478
|
</references></bibliography>
|
1440
1479
|
</standard-document>
|
1441
1480
|
OUTPUT
|
1481
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1482
|
+
.to be_equivalent_to xmlpp(output)
|
1442
1483
|
end
|
1443
1484
|
|
1444
1485
|
it "processes repository reference" do
|
1445
|
-
|
1486
|
+
input = <<~INPUT
|
1446
1487
|
#{ISOBIB_BLANK_HDR}
|
1447
1488
|
== Scope
|
1448
1489
|
|
@@ -1457,6 +1498,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1457
1498
|
* [[[iso123,repo:(ab/ISO 123)]]] _Standard_
|
1458
1499
|
* [[[iso124,repo:(ab/ISO 124,id)]]] _Standard_
|
1459
1500
|
INPUT
|
1501
|
+
output = <<~OUTPUT
|
1460
1502
|
#{BLANK_HDR}
|
1461
1503
|
<sections>
|
1462
1504
|
<clause id='_' type='scope' inline-header='false' obligation='normative'>
|
@@ -1510,10 +1552,12 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1510
1552
|
</bibliography>
|
1511
1553
|
</standard-document>
|
1512
1554
|
OUTPUT
|
1555
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1556
|
+
.to be_equivalent_to xmlpp(output)
|
1513
1557
|
end
|
1514
1558
|
|
1515
1559
|
it "processes hyperlink reference, ingest RXL or XML if available" do
|
1516
|
-
|
1560
|
+
input = <<~INPUT
|
1517
1561
|
#{ISOBIB_BLANK_HDR}
|
1518
1562
|
== Scope
|
1519
1563
|
|
@@ -1531,6 +1575,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1531
1575
|
* [[[iso123,path:(spec/assets/iso123,ISO 123)]]] _Standard_
|
1532
1576
|
* [[[iso124,path:(a/b.adoc,ISO 124)]]] _Standard_
|
1533
1577
|
INPUT
|
1578
|
+
output = <<~OUTPUT
|
1534
1579
|
#{BLANK_HDR}
|
1535
1580
|
<sections>
|
1536
1581
|
<clause id='_' type="scope" inline-header='false' obligation='normative'>
|
@@ -1700,141 +1745,253 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1700
1745
|
</bibliography>
|
1701
1746
|
</standard-document>
|
1702
1747
|
OUTPUT
|
1748
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1749
|
+
.to be_equivalent_to xmlpp(output)
|
1703
1750
|
end
|
1704
1751
|
|
1705
1752
|
it "overrides normative status of bibliographies" do
|
1706
|
-
mock_isobib_get_123_no_docid(1)
|
1707
|
-
mock_isobib_get_123_no_docid_lbl(1)
|
1708
|
-
|
1709
|
-
|
1710
|
-
|
1711
|
-
== Normative References
|
1753
|
+
# mock_isobib_get_123_no_docid(1)
|
1754
|
+
# mock_isobib_get_123_no_docid_lbl(1)
|
1755
|
+
VCR.use_cassette "isobib_get_123_1" do
|
1756
|
+
input = <<~INPUT
|
1757
|
+
#{ISOBIB_BLANK_HDR}
|
1712
1758
|
|
1713
|
-
|
1759
|
+
[bibliography,normative=false]
|
1760
|
+
== Normative References
|
1714
1761
|
|
1715
|
-
|
1716
|
-
== Bibliography
|
1762
|
+
* [[[iso123,ISO 123]]] _Standard_
|
1717
1763
|
|
1718
|
-
|
1719
|
-
|
1720
|
-
|
1721
|
-
|
1722
|
-
|
1723
|
-
|
1724
|
-
|
1725
|
-
|
1726
|
-
|
1727
|
-
|
1728
|
-
|
1729
|
-
|
1730
|
-
|
1731
|
-
|
1732
|
-
|
1733
|
-
|
1734
|
-
|
1735
|
-
|
1736
|
-
|
1737
|
-
|
1738
|
-
|
1739
|
-
|
1740
|
-
|
1741
|
-
|
1742
|
-
|
1743
|
-
|
1744
|
-
|
1745
|
-
|
1746
|
-
|
1747
|
-
|
1748
|
-
|
1749
|
-
|
1750
|
-
|
1751
|
-
|
1752
|
-
|
1753
|
-
|
1754
|
-
|
1755
|
-
|
1756
|
-
|
1757
|
-
|
1758
|
-
|
1759
|
-
|
1760
|
-
|
1761
|
-
|
1762
|
-
|
1763
|
-
|
1764
|
-
|
1765
|
-
|
1766
|
-
|
1767
|
-
|
1768
|
-
|
1769
|
-
|
1770
|
-
|
1771
|
-
|
1772
|
-
|
1773
|
-
|
1774
|
-
|
1775
|
-
|
1776
|
-
|
1777
|
-
|
1778
|
-
|
1779
|
-
|
1780
|
-
|
1781
|
-
|
1782
|
-
|
1783
|
-
|
1784
|
-
|
1785
|
-
|
1786
|
-
|
1787
|
-
|
1788
|
-
|
1789
|
-
|
1790
|
-
|
1791
|
-
|
1792
|
-
|
1793
|
-
|
1794
|
-
|
1795
|
-
|
1796
|
-
|
1797
|
-
|
1798
|
-
|
1799
|
-
|
1800
|
-
|
1801
|
-
|
1802
|
-
|
1803
|
-
|
1804
|
-
|
1805
|
-
|
1806
|
-
|
1807
|
-
|
1808
|
-
|
1809
|
-
|
1810
|
-
|
1811
|
-
|
1812
|
-
|
1813
|
-
|
1814
|
-
|
1815
|
-
|
1816
|
-
|
1817
|
-
|
1818
|
-
|
1819
|
-
|
1820
|
-
|
1821
|
-
|
1822
|
-
|
1823
|
-
|
1824
|
-
|
1825
|
-
|
1826
|
-
|
1827
|
-
|
1828
|
-
|
1829
|
-
|
1830
|
-
|
1831
|
-
|
1764
|
+
[bibliography,normative=true]
|
1765
|
+
== Bibliography
|
1766
|
+
|
1767
|
+
* [[[iso124,(1)ISO 123]]] _Standard_
|
1768
|
+
INPUT
|
1769
|
+
output = <<~OUTPUT
|
1770
|
+
#{BLANK_HDR}
|
1771
|
+
<sections> </sections>
|
1772
|
+
<bibliography>
|
1773
|
+
<references id='_' normative='false' obligation='informative'>
|
1774
|
+
<title>Bibliography</title>
|
1775
|
+
<bibitem id='iso123' type='standard'>
|
1776
|
+
<fetched/>
|
1777
|
+
<title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
|
1778
|
+
<title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
|
1779
|
+
<title type='main' format='text/plain' language='en' script='Latn'>Rubber latex — Sampling</title>
|
1780
|
+
<uri type='src'>https://www.iso.org/standard/23281.html</uri>
|
1781
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
1782
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
1783
|
+
<docidentifier type='ISO'>ISO 123</docidentifier>
|
1784
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:en</docidentifier>
|
1785
|
+
<docnumber>123</docnumber>
|
1786
|
+
<contributor>
|
1787
|
+
<role type='publisher'/>
|
1788
|
+
<organization>
|
1789
|
+
<name>International Organization for Standardization</name>
|
1790
|
+
<abbreviation>ISO</abbreviation>
|
1791
|
+
<uri>www.iso.org</uri>
|
1792
|
+
</organization>
|
1793
|
+
</contributor>
|
1794
|
+
<edition>3</edition>
|
1795
|
+
<language>en</language>
|
1796
|
+
<script>Latn</script>
|
1797
|
+
<status>
|
1798
|
+
<stage>90</stage>
|
1799
|
+
<substage>93</substage>
|
1800
|
+
</status>
|
1801
|
+
<copyright>
|
1802
|
+
<from>2001</from>
|
1803
|
+
<owner>
|
1804
|
+
<organization>
|
1805
|
+
<name>ISO</name>
|
1806
|
+
</organization>
|
1807
|
+
</owner>
|
1808
|
+
</copyright>
|
1809
|
+
<relation type='obsoletes'>
|
1810
|
+
<bibitem type='standard'>
|
1811
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
1812
|
+
</bibitem>
|
1813
|
+
</relation>
|
1814
|
+
<relation type='instance'>
|
1815
|
+
<bibitem type='standard'>
|
1816
|
+
<fetched/>
|
1817
|
+
<title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
|
1818
|
+
<title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
|
1819
|
+
<title type='main' format='text/plain' language='en' script='Latn'>Rubber latex — Sampling</title>
|
1820
|
+
<uri type='src'>https://www.iso.org/standard/23281.html</uri>
|
1821
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
1822
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
1823
|
+
<docidentifier type='ISO'>ISO 123:2001</docidentifier>
|
1824
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:en</docidentifier>
|
1825
|
+
<docnumber>123</docnumber>
|
1826
|
+
<date type='published'>
|
1827
|
+
<on>2001-05</on>
|
1828
|
+
</date>
|
1829
|
+
<contributor>
|
1830
|
+
<role type='publisher'/>
|
1831
|
+
<organization>
|
1832
|
+
<name>International Organization for Standardization</name>
|
1833
|
+
<abbreviation>ISO</abbreviation>
|
1834
|
+
<uri>www.iso.org</uri>
|
1835
|
+
</organization>
|
1836
|
+
</contributor>
|
1837
|
+
<edition>3</edition>
|
1838
|
+
<language>en</language>
|
1839
|
+
<script>Latn</script>
|
1840
|
+
<abstract format='text/plain' language='en' script='Latn'>
|
1841
|
+
This International Standard specifies procedures for sampling
|
1842
|
+
natural rubber latex concentrate and for sampling synthetic rubber
|
1843
|
+
latices and artificial latices. It is also suitable for sampling
|
1844
|
+
rubber latex contained in drums, tank cars or tanks. The
|
1845
|
+
procedures may also be used for sampling plastics dispersions.
|
1846
|
+
</abstract>
|
1847
|
+
<status>
|
1848
|
+
<stage>90</stage>
|
1849
|
+
<substage>93</substage>
|
1850
|
+
</status>
|
1851
|
+
<copyright>
|
1852
|
+
<from>2001</from>
|
1853
|
+
<owner>
|
1854
|
+
<organization>
|
1855
|
+
<name>ISO</name>
|
1856
|
+
</organization>
|
1857
|
+
</owner>
|
1858
|
+
</copyright>
|
1859
|
+
<relation type='obsoletes'>
|
1860
|
+
<bibitem type='standard'>
|
1861
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
1862
|
+
</bibitem>
|
1863
|
+
</relation>
|
1864
|
+
<place>Geneva</place>
|
1865
|
+
</bibitem>
|
1866
|
+
</relation>
|
1867
|
+
<place>Geneva</place>
|
1868
|
+
</bibitem>
|
1869
|
+
</references>
|
1870
|
+
<references id='_' normative='true' obligation='informative'>
|
1871
|
+
<title>Normative references</title>
|
1872
|
+
<p id='_'>
|
1873
|
+
The following documents are referred to in the text in such a way that
|
1874
|
+
some or all of their content constitutes requirements of this document.
|
1875
|
+
For dated references, only the edition cited applies. For undated
|
1876
|
+
references, the latest edition of the referenced document (including any
|
1877
|
+
amendments) applies.
|
1878
|
+
</p>
|
1879
|
+
<bibitem id='iso124' type='standard'>
|
1880
|
+
<fetched/>
|
1881
|
+
<title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
|
1882
|
+
<title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
|
1883
|
+
<title type='main' format='text/plain' language='en' script='Latn'>Rubber latex — Sampling</title>
|
1884
|
+
<uri type='src'>https://www.iso.org/standard/23281.html</uri>
|
1885
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
1886
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
1887
|
+
<docidentifier type='ISO'>ISO 123</docidentifier>
|
1888
|
+
<docidentifier type='metanorma'>[1]</docidentifier>
|
1889
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:en</docidentifier>
|
1890
|
+
<docnumber>123</docnumber>
|
1891
|
+
<contributor>
|
1892
|
+
<role type='publisher'/>
|
1893
|
+
<organization>
|
1894
|
+
<name>International Organization for Standardization</name>
|
1895
|
+
<abbreviation>ISO</abbreviation>
|
1896
|
+
<uri>www.iso.org</uri>
|
1897
|
+
</organization>
|
1898
|
+
</contributor>
|
1899
|
+
<edition>3</edition>
|
1900
|
+
<language>en</language>
|
1901
|
+
<script>Latn</script>
|
1902
|
+
<status>
|
1903
|
+
<stage>90</stage>
|
1904
|
+
<substage>93</substage>
|
1905
|
+
</status>
|
1906
|
+
<copyright>
|
1907
|
+
<from>2001</from>
|
1908
|
+
<owner>
|
1909
|
+
<organization>
|
1910
|
+
<name>ISO</name>
|
1911
|
+
</organization>
|
1912
|
+
</owner>
|
1913
|
+
</copyright>
|
1914
|
+
<relation type='obsoletes'>
|
1915
|
+
<bibitem type='standard'>
|
1916
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
1917
|
+
</bibitem>
|
1918
|
+
</relation>
|
1919
|
+
<relation type='instance'>
|
1920
|
+
<bibitem type='standard'>
|
1921
|
+
<fetched/>
|
1922
|
+
<title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
|
1923
|
+
<title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
|
1924
|
+
<title type='main' format='text/plain' language='en' script='Latn'>Rubber latex — Sampling</title>
|
1925
|
+
<uri type='src'>https://www.iso.org/standard/23281.html</uri>
|
1926
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
1927
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
1928
|
+
<docidentifier type='ISO'>ISO 123:2001</docidentifier>
|
1929
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:en</docidentifier>
|
1930
|
+
<docnumber>123</docnumber>
|
1931
|
+
<date type='published'>
|
1932
|
+
<on>2001-05</on>
|
1933
|
+
</date>
|
1934
|
+
<contributor>
|
1935
|
+
<role type='publisher'/>
|
1936
|
+
<organization>
|
1937
|
+
<name>International Organization for Standardization</name>
|
1938
|
+
<abbreviation>ISO</abbreviation>
|
1939
|
+
<uri>www.iso.org</uri>
|
1940
|
+
</organization>
|
1941
|
+
</contributor>
|
1942
|
+
<edition>3</edition>
|
1943
|
+
<language>en</language>
|
1944
|
+
<script>Latn</script>
|
1945
|
+
<abstract format='text/plain' language='en' script='Latn'>
|
1946
|
+
This International Standard specifies procedures for sampling
|
1947
|
+
natural rubber latex concentrate and for sampling synthetic rubber
|
1948
|
+
latices and artificial latices. It is also suitable for sampling
|
1949
|
+
rubber latex contained in drums, tank cars or tanks. The
|
1950
|
+
procedures may also be used for sampling plastics dispersions.
|
1951
|
+
</abstract>
|
1952
|
+
<status>
|
1953
|
+
<stage>90</stage>
|
1954
|
+
<substage>93</substage>
|
1955
|
+
</status>
|
1956
|
+
<copyright>
|
1957
|
+
<from>2001</from>
|
1958
|
+
<owner>
|
1959
|
+
<organization>
|
1960
|
+
<name>ISO</name>
|
1961
|
+
</organization>
|
1962
|
+
</owner>
|
1963
|
+
</copyright>
|
1964
|
+
<relation type='obsoletes'>
|
1965
|
+
<bibitem type='standard'>
|
1966
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
1967
|
+
</bibitem>
|
1968
|
+
</relation>
|
1969
|
+
<place>Geneva</place>
|
1970
|
+
</bibitem>
|
1971
|
+
</relation>
|
1972
|
+
<place>Geneva</place>
|
1973
|
+
</bibitem>
|
1974
|
+
</references>
|
1975
|
+
</bibliography>
|
1976
|
+
</standard-document>
|
1977
|
+
OUTPUT
|
1978
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1979
|
+
.to be_equivalent_to xmlpp(output)
|
1980
|
+
end
|
1832
1981
|
end
|
1833
1982
|
|
1834
1983
|
private
|
1835
1984
|
|
1836
1985
|
def mock_isobib_get_123
|
1837
|
-
expect(RelatonIso::IsoBibliography).to receive(:get)
|
1986
|
+
expect(RelatonIso::IsoBibliography).to receive(:get)
|
1987
|
+
.with("ISO 123", nil, { code: "ISO 123",
|
1988
|
+
lang: "en",
|
1989
|
+
match: anything,
|
1990
|
+
process: 1,
|
1991
|
+
ord: anything,
|
1992
|
+
title: "<em>Standard</em>",
|
1993
|
+
usrlbl: nil,
|
1994
|
+
year: nil }) do
|
1838
1995
|
IsoBibItem::XMLParser.from_xml(<<~"OUTPUT")
|
1839
1996
|
<bibitem type=\"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 type="standard">\n <formattedref format="text/plain">ISO 123:1985</formattedref>\n </bibitem>\n </relation>\n <relation type=\"updates\">\n <bibitem type="standard">\n <formattedref format="text/plain">ISO 123:2001</formattedref>\n </bibitem>\n </relation>\n</bibitem>
|
1840
1997
|
OUTPUT
|
@@ -1842,7 +1999,15 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1842
1999
|
end
|
1843
2000
|
|
1844
2001
|
def mock_isobib_get_123_no_docid(n)
|
1845
|
-
expect(RelatonIso::IsoBibliography).to receive(:get)
|
2002
|
+
expect(RelatonIso::IsoBibliography).to receive(:get)
|
2003
|
+
.with("ISO 123", nil, { code: "ISO 123",
|
2004
|
+
lang: "en",
|
2005
|
+
match: anything,
|
2006
|
+
process: 1,
|
2007
|
+
ord: anything,
|
2008
|
+
title: "<em>Standard</em>",
|
2009
|
+
usrlbl: nil,
|
2010
|
+
year: nil }) do
|
1846
2011
|
RelatonBib::XMLParser.from_xml(<<~"OUTPUT")
|
1847
2012
|
<bibitem type=\"standard\" id=\"ISO123\">\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 <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><stage>Published</stage></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 type="standard">\n <formattedref format="text/plain">ISO 123:1985</formattedref>\n </bibitem>\n </relation>\n <relation type=\"updates\">\n <bibitem type="standard">\n <formattedref format="text/plain">ISO 123:2001</formattedref>\n </bibitem>\n </relation>\n<ext></fred></ext></bibitem>
|
1848
2013
|
OUTPUT
|
@@ -1850,7 +2015,15 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1850
2015
|
end
|
1851
2016
|
|
1852
2017
|
def mock_isobib_get_123_no_docid_lbl(n)
|
1853
|
-
expect(RelatonIso::IsoBibliography).to receive(:get)
|
2018
|
+
expect(RelatonIso::IsoBibliography).to receive(:get)
|
2019
|
+
.with("ISO 123", nil, { code: "ISO 123",
|
2020
|
+
lang: "en",
|
2021
|
+
match: anything,
|
2022
|
+
process: 1,
|
2023
|
+
ord: anything,
|
2024
|
+
title: "<em>Standard</em>",
|
2025
|
+
usrlbl: "(1)",
|
2026
|
+
year: nil }) do
|
1854
2027
|
RelatonBib::XMLParser.from_xml(<<~"OUTPUT")
|
1855
2028
|
<bibitem type=\"standard\" id=\"ISO123\">\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 <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><stage>Published</stage></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 type="standard">\n <formattedref format="text/plain">ISO 123:1985</formattedref>\n </bibitem>\n </relation>\n <relation type=\"updates\">\n <bibitem type="standard">\n <formattedref format="text/plain">ISO 123:2001</formattedref>\n </bibitem>\n </relation>\n<ext></fred></ext></bibitem>
|
1856
2029
|
OUTPUT
|
@@ -1858,7 +2031,9 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1858
2031
|
end
|
1859
2032
|
|
1860
2033
|
def mock_isobib_get_124
|
1861
|
-
expect(RelatonIso::IsoBibliography).to receive(:get)
|
2034
|
+
expect(RelatonIso::IsoBibliography).to receive(:get)
|
2035
|
+
.with("ISO 124",
|
2036
|
+
"2014", anything) do
|
1862
2037
|
IsoBibItem::XMLParser.from_xml(<<~"OUTPUT")
|
1863
2038
|
<bibitem type="standard" id="iso124">
|
1864
2039
|
<title format="text/plain" language="en" script="Latn">Latex, rubber -- Determination of total solids content</title>
|
@@ -1908,7 +2083,9 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1908
2083
|
end
|
1909
2084
|
|
1910
2085
|
def mock_isobib_get_iec12382
|
1911
|
-
expect(RelatonIso::IsoBibliography).to receive(:get).with(
|
2086
|
+
expect(RelatonIso::IsoBibliography).to receive(:get).with(
|
2087
|
+
"ISO/IEC TR 12382", "1992", anything
|
2088
|
+
) do
|
1912
2089
|
IsoBibItem::XMLParser.from_xml(<<~"OUTPUT")
|
1913
2090
|
<bibitem type="standard" id="iso123">
|
1914
2091
|
<title format="text/plain" language="en" script="Latn">Permuted index of the vocabulary of information technology</title>
|
@@ -1970,7 +2147,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1970
2147
|
end
|
1971
2148
|
|
1972
2149
|
def mock_rfcbib_get_rfc8341
|
1973
|
-
expect(IETFBib::RfcBibliography).to receive(:get).with("RFC 8341", nil,
|
2150
|
+
expect(IETFBib::RfcBibliography).to receive(:get).with("RFC 8341", nil,
|
2151
|
+
anything) do
|
1974
2152
|
IsoBibItem::XMLParser.from_xml(<<~"OUTPUT")
|
1975
2153
|
<bibitem id="RFC8341">
|
1976
2154
|
<title format="text/plain" language="en" script="Latn">Network Configuration Access Control Model</title>
|