metanorma-standoc 1.11.0.1 → 1.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/lib/asciidoctor/standoc/base.rb +4 -100
- data/lib/asciidoctor/standoc/blocks.rb +1 -1
- data/lib/asciidoctor/standoc/cleanup.rb +2 -1
- data/lib/asciidoctor/standoc/cleanup_block.rb +1 -2
- data/lib/asciidoctor/standoc/cleanup_boilerplate.rb +28 -20
- data/lib/asciidoctor/standoc/cleanup_inline.rb +14 -4
- data/lib/asciidoctor/standoc/cleanup_ref_dl.rb +25 -15
- data/lib/asciidoctor/standoc/cleanup_reqt.rb +3 -3
- data/lib/asciidoctor/standoc/cleanup_section_names.rb +2 -2
- data/lib/asciidoctor/standoc/cleanup_terms.rb +58 -21
- data/lib/asciidoctor/standoc/cleanup_terms_designations.rb +58 -21
- data/lib/asciidoctor/standoc/cleanup_text.rb +23 -0
- data/lib/asciidoctor/standoc/datamodel/attributes_table_preprocessor.rb +6 -6
- data/lib/asciidoctor/standoc/front.rb +13 -9
- data/lib/asciidoctor/standoc/inline.rb +13 -11
- data/lib/asciidoctor/standoc/isodoc.rng +73 -19
- data/lib/asciidoctor/standoc/lists.rb +1 -3
- 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/render.rb +115 -0
- data/lib/asciidoctor/standoc/reqt.rb +1 -1
- data/lib/asciidoctor/standoc/section.rb +33 -15
- data/lib/asciidoctor/standoc/terms.rb +7 -1
- data/lib/asciidoctor/standoc/utils.rb +0 -16
- data/lib/asciidoctor/standoc/validate.rb +1 -1
- data/lib/isodoc/html/htmlstyle.css +20 -11
- data/lib/isodoc/html/htmlstyle.scss +11 -11
- data/lib/metanorma/standoc/version.rb +1 -1
- data/metanorma-standoc.gemspec +3 -3
- data/spec/asciidoctor/base_spec.rb +48 -0
- data/spec/asciidoctor/blocks_spec.rb +99 -17
- data/spec/asciidoctor/cleanup_blocks_spec.rb +24 -0
- data/spec/asciidoctor/cleanup_sections_spec.rb +1 -1
- data/spec/asciidoctor/cleanup_spec.rb +6 -6
- data/spec/asciidoctor/cleanup_terms_spec.rb +556 -89
- 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 +174 -5
- data/spec/asciidoctor/isobib_cache_spec.rb +4 -8
- data/spec/asciidoctor/macros_spec.rb +2 -2
- data/spec/asciidoctor/refs_dl_spec.rb +4 -4
- data/spec/asciidoctor/refs_spec.rb +889 -495
- data/spec/asciidoctor/section_spec.rb +64 -2
- data/spec/spec_helper.rb +2 -2
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +182 -182
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec1.yml +12 -12
- data/spec/vcr_cassettes/isobib_get_123.yml +14 -14
- data/spec/vcr_cassettes/isobib_get_123_1.yml +99 -99
- data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +107 -107
- data/spec/vcr_cassettes/isobib_get_123_2001.yml +14 -14
- data/spec/vcr_cassettes/isobib_get_124.yml +12 -12
- 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 +9 -8
@@ -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,124 +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
|
-
|
237
|
-
|
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
|
-
|
245
|
+
output = <<~OUTPUT
|
246
|
+
#{BLANK_HDR}
|
247
|
+
<sections>
|
248
|
+
|
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>
|
346
443
|
OUTPUT
|
444
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
445
|
+
.to be_equivalent_to xmlpp(output)
|
347
446
|
end
|
348
447
|
end
|
349
448
|
|
350
449
|
it "fetches simple ISO reference in French" do
|
351
450
|
VCR.use_cassette "isobib_get_123_1_fr" do
|
352
|
-
|
451
|
+
input = <<~INPUT
|
353
452
|
= Document title
|
354
453
|
Author
|
355
454
|
:docfile: test.adoc
|
@@ -364,138 +463,233 @@ RSpec.describe Asciidoctor::Standoc do
|
|
364
463
|
* [[[iso123,ISO 123]]] _Standard_
|
365
464
|
* [[[iso124,(1)ISO 123]]] _Standard_
|
366
465
|
INPUT
|
367
|
-
|
368
|
-
<
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
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/>
|
381
483
|
<title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc</title>
|
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
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
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
|
-
|
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>
|
493
685
|
OUTPUT
|
686
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
687
|
+
.to be_equivalent_to xmlpp(output)
|
494
688
|
end
|
495
689
|
end
|
496
690
|
|
497
691
|
it "processes simple IEC reference" do
|
498
|
-
|
692
|
+
input = <<~INPUT
|
499
693
|
#{ASCIIDOC_BLANK_HDR}
|
500
694
|
[bibliography]
|
501
695
|
== Normative References
|
@@ -503,6 +697,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
503
697
|
* [[[iso123,IEC 123]]] _Standard_
|
504
698
|
* [[[iso124,(1)IEC 123]]] _Standard_
|
505
699
|
INPUT
|
700
|
+
output = <<~OUTPUT
|
506
701
|
#{BLANK_HDR}
|
507
702
|
<sections>
|
508
703
|
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
@@ -535,13 +730,14 @@ RSpec.describe Asciidoctor::Standoc do
|
|
535
730
|
</bibliography>
|
536
731
|
</standard-document>
|
537
732
|
OUTPUT
|
733
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
734
|
+
.to be_equivalent_to xmlpp(output)
|
538
735
|
end
|
539
736
|
|
540
737
|
it "processes dated ISO reference and joint ISO/IEC references" do
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
738
|
+
VCR.use_cassette("dated_iso_ref_joint_iso_iec",
|
739
|
+
match_requests_on: %i[method uri body]) do
|
740
|
+
input = <<~INPUT
|
545
741
|
#{ISOBIB_BLANK_HDR}
|
546
742
|
[bibliography]
|
547
743
|
== Normative References
|
@@ -551,6 +747,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
551
747
|
* [[[iso125,(1)ISO/IEC TR 12382:1992]]] _Standard_
|
552
748
|
* [[[iso126,(1)ISO 124:2014]]] _Standard_
|
553
749
|
INPUT
|
750
|
+
output = <<~OUTPUT
|
554
751
|
#{BLANK_HDR}
|
555
752
|
<sections>
|
556
753
|
|
@@ -558,7 +755,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
558
755
|
<title>Normative references</title>
|
559
756
|
#{NORM_REF_BOILERPLATE}
|
560
757
|
<bibitem type="standard" id="iso123">
|
561
|
-
<fetched
|
758
|
+
<fetched/>
|
562
759
|
<title type="title-main" format="text/plain" language="en" script="Latn">Permuted index of the vocabulary of information technology</title>
|
563
760
|
<title type="main" format="text/plain" language="en" script="Latn">Permuted index of the vocabulary of information technology</title>
|
564
761
|
<uri type="src">https://www.iso.org/standard/21071.html</uri>
|
@@ -605,7 +802,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
605
802
|
<place>Geneva</place>
|
606
803
|
</bibitem>
|
607
804
|
<bibitem id="iso124" type="standard">
|
608
|
-
<fetched
|
805
|
+
<fetched/>
|
609
806
|
<title type="title-intro" format="text/plain" language="en" script="Latn">Latex, rubber</title>
|
610
807
|
<title type="title-main" format="text/plain" language="en" script="Latn">Determination of total solids content</title>
|
611
808
|
<title type='main' format='text/plain' language='en' script='Latn'>Latex, rubber — Determination of total solids content</title>
|
@@ -650,7 +847,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
650
847
|
<place>Geneva</place>
|
651
848
|
</bibitem>
|
652
849
|
<bibitem id="iso125" type="standard">
|
653
|
-
<fetched
|
850
|
+
<fetched/>
|
654
851
|
<title type="title-main" format="text/plain" language="en" script="Latn">Permuted index of the vocabulary of information technology</title>
|
655
852
|
<title type='main' format='text/plain' language='en' script='Latn'>Permuted index of the vocabulary of information technology</title>
|
656
853
|
<uri type="src">https://www.iso.org/standard/21071.html</uri>
|
@@ -698,7 +895,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
698
895
|
<place>Geneva</place>
|
699
896
|
</bibitem>
|
700
897
|
<bibitem id="iso126" type="standard">
|
701
|
-
<fetched
|
898
|
+
<fetched/>
|
702
899
|
<title type="title-intro" format="text/plain" language="en" script="Latn">Latex, rubber</title>
|
703
900
|
<title type="title-main" format="text/plain" language="en" script="Latn">Determination of total solids content</title>
|
704
901
|
<title type='main' format='text/plain' language='en' script='Latn'>Latex, rubber — Determination of total solids content</title>
|
@@ -747,12 +944,14 @@ RSpec.describe Asciidoctor::Standoc do
|
|
747
944
|
</standard-document>
|
748
945
|
|
749
946
|
OUTPUT
|
947
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
948
|
+
.to be_equivalent_to xmlpp(output)
|
750
949
|
end
|
751
950
|
end
|
752
951
|
|
753
952
|
it "declines to fetch individual references" do
|
754
953
|
VCR.use_cassette "dated_iso_ref_joint_iso_iec1" do
|
755
|
-
|
954
|
+
input = <<~INPUT
|
756
955
|
#{ISOBIB_BLANK_HDR}
|
757
956
|
[bibliography]
|
758
957
|
== Normative References
|
@@ -760,6 +959,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
760
959
|
* [[[iso123,nofetch(ISO/IEC TR 12382:1992)]]] _Standard_
|
761
960
|
* [[[iso124,ISO 124:2014]]] _Standard_
|
762
961
|
INPUT
|
962
|
+
output = <<~OUTPUT
|
763
963
|
#{BLANK_HDR}
|
764
964
|
<sections>
|
765
965
|
|
@@ -774,7 +974,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
774
974
|
<docnumber>12382:1992</docnumber>
|
775
975
|
</bibitem>
|
776
976
|
<bibitem id='iso124' type='standard'>
|
777
|
-
<fetched
|
977
|
+
<fetched/>
|
778
978
|
<title type='title-intro' format='text/plain' language='en' script='Latn'>Latex, rubber</title>
|
779
979
|
<title type='title-main' format='text/plain' language='en' script='Latn'>Determination of total solids content</title>
|
780
980
|
<title type='main' format='text/plain' language='en' script='Latn'>Latex, rubber — Determination of total solids content</title>
|
@@ -820,13 +1020,15 @@ RSpec.describe Asciidoctor::Standoc do
|
|
820
1020
|
</bibitem>
|
821
1021
|
</references></bibliography></standard-document>
|
822
1022
|
OUTPUT
|
1023
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1024
|
+
.to be_equivalent_to xmlpp(output)
|
823
1025
|
end
|
824
1026
|
end
|
825
1027
|
|
826
1028
|
it "processes draft ISO reference" do
|
827
1029
|
# stub_fetch_ref no_year: true, note: "The standard is in press"
|
828
1030
|
|
829
|
-
|
1031
|
+
input = <<~INPUT
|
830
1032
|
#{ASCIIDOC_BLANK_HDR}
|
831
1033
|
[bibliography]
|
832
1034
|
== Normative References
|
@@ -836,6 +1038,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
836
1038
|
* [[[iso125,ISO 125:–]]], footnote:[The standard is in press] _Standard_
|
837
1039
|
* [[[iso126,(1)ISO 123:--]]] _Standard_
|
838
1040
|
INPUT
|
1041
|
+
output = <<~OUTPUT
|
839
1042
|
#{BLANK_HDR}
|
840
1043
|
<sections>
|
841
1044
|
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
@@ -904,12 +1107,14 @@ RSpec.describe Asciidoctor::Standoc do
|
|
904
1107
|
</bibliography>
|
905
1108
|
</standard-document>
|
906
1109
|
OUTPUT
|
1110
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1111
|
+
.to be_equivalent_to xmlpp(output)
|
907
1112
|
end
|
908
1113
|
|
909
1114
|
it "processes all-parts ISO reference" do
|
910
1115
|
# stub_fetch_ref(all_parts: true)
|
911
1116
|
|
912
|
-
|
1117
|
+
input = <<~INPUT
|
913
1118
|
#{ASCIIDOC_BLANK_HDR}
|
914
1119
|
[bibliography]
|
915
1120
|
== Normative References
|
@@ -917,6 +1122,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
917
1122
|
* [[[iso123,ISO 123:1066 (all parts)]]] _Standard_
|
918
1123
|
* [[[iso124,(1)ISO 123:1066 (all parts)]]] _Standard_
|
919
1124
|
INPUT
|
1125
|
+
output = <<~OUTPUT
|
920
1126
|
#{BLANK_HDR}
|
921
1127
|
<sections>
|
922
1128
|
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
@@ -961,12 +1167,14 @@ RSpec.describe Asciidoctor::Standoc do
|
|
961
1167
|
</bibliography>
|
962
1168
|
</standard-document>
|
963
1169
|
OUTPUT
|
1170
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1171
|
+
.to be_equivalent_to xmlpp(output)
|
964
1172
|
end
|
965
1173
|
|
966
1174
|
it "processes RFC reference in Normative References" do
|
967
1175
|
# mock_rfcbib_get_rfc8341
|
968
1176
|
VCR.use_cassette "rfcbib_get_rfc8341" do
|
969
|
-
|
1177
|
+
input = <<~INPUT
|
970
1178
|
#{ISOBIB_BLANK_HDR}
|
971
1179
|
[bibliography]
|
972
1180
|
== Normative References
|
@@ -978,6 +1186,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
978
1186
|
|
979
1187
|
<<iso123>>
|
980
1188
|
INPUT
|
1189
|
+
output = <<~OUTPUT
|
981
1190
|
#{BLANK_HDR}
|
982
1191
|
<sections>
|
983
1192
|
<clause id="_" inline-header="false" obligation="normative">
|
@@ -990,7 +1199,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
990
1199
|
<title>Normative references</title>
|
991
1200
|
#{NORM_REF_BOILERPLATE}
|
992
1201
|
<bibitem id='iso123' type='standard'>
|
993
|
-
<fetched
|
1202
|
+
<fetched/>
|
994
1203
|
<title format='text/plain' language='en' script='Latn'>Network Configuration Access Control Model</title>
|
995
1204
|
<uri type='xml'>
|
996
1205
|
https://raw.githubusercontent.com/relaton/relaton-data-ietf/master/data/reference.RFC.8341.xml
|
@@ -1051,7 +1260,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1051
1260
|
<place>Fremont, CA</place>
|
1052
1261
|
</bibitem>
|
1053
1262
|
<bibitem id='iso124' type='standard'>
|
1054
|
-
<fetched
|
1263
|
+
<fetched/>
|
1055
1264
|
<title format='text/plain' language='en' script='Latn'>Network Configuration Access Control Model</title>
|
1056
1265
|
<uri type='xml'>
|
1057
1266
|
https://raw.githubusercontent.com/relaton/relaton-data-ietf/master/data/reference.RFC.8341.xml
|
@@ -1116,11 +1325,13 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1116
1325
|
</bibliography>
|
1117
1326
|
</standard-document>
|
1118
1327
|
OUTPUT
|
1328
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1329
|
+
.to be_equivalent_to xmlpp(output)
|
1119
1330
|
end
|
1120
1331
|
end
|
1121
1332
|
|
1122
1333
|
it "processes non-ISO reference in Normative References" do
|
1123
|
-
|
1334
|
+
input = <<~INPUT
|
1124
1335
|
#{ASCIIDOC_BLANK_HDR}
|
1125
1336
|
[bibliography]
|
1126
1337
|
== Normative References
|
@@ -1128,6 +1339,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1128
1339
|
* [[[iso123,XYZ 123:1066 (all parts)]]] _Standard_
|
1129
1340
|
* [[[iso124,(1)XYZ 123:1066 (all parts)]]] _Standard_
|
1130
1341
|
INPUT
|
1342
|
+
output = <<~OUTPUT
|
1131
1343
|
#{BLANK_HDR}
|
1132
1344
|
<sections>
|
1133
1345
|
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
@@ -1152,10 +1364,12 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1152
1364
|
</bibliography>
|
1153
1365
|
</standard-document>
|
1154
1366
|
OUTPUT
|
1367
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1368
|
+
.to be_equivalent_to xmlpp(output)
|
1155
1369
|
end
|
1156
1370
|
|
1157
1371
|
it "processes non-ISO reference in Bibliography" do
|
1158
|
-
|
1372
|
+
input = <<~INPUT
|
1159
1373
|
#{ASCIIDOC_BLANK_HDR}
|
1160
1374
|
[bibliography]
|
1161
1375
|
== Bibliography
|
@@ -1166,6 +1380,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1166
1380
|
* [[[iso126,(A1)]]] _Standard_
|
1167
1381
|
* [[[iso127,(4)XYZ 123:1066 (all parts)]]] _Standard_
|
1168
1382
|
INPUT
|
1383
|
+
output = <<~OUTPUT
|
1169
1384
|
#{BLANK_HDR}
|
1170
1385
|
<sections>
|
1171
1386
|
</sections>
|
@@ -1203,13 +1418,15 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1203
1418
|
</bibliography>
|
1204
1419
|
</standard-document>
|
1205
1420
|
OUTPUT
|
1421
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1422
|
+
.to be_equivalent_to xmlpp(output)
|
1206
1423
|
end
|
1207
1424
|
|
1208
1425
|
it "process ISO reference without an Internet connection" do
|
1209
1426
|
expect(RelatonIso::IsoBibliography).to receive(:search).with("ISO 123") do
|
1210
1427
|
raise RelatonBib::RequestError.new "getaddrinfo"
|
1211
1428
|
end.at_least :once
|
1212
|
-
|
1429
|
+
input = <<~INPUT
|
1213
1430
|
#{ISOBIB_BLANK_HDR}
|
1214
1431
|
[bibliography]
|
1215
1432
|
== Normative References
|
@@ -1217,6 +1434,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1217
1434
|
* [[[iso123,ISO 123]]] _Standard_
|
1218
1435
|
* [[[iso124,(1)ISO 123]]] _Standard_
|
1219
1436
|
INPUT
|
1437
|
+
output = <<~OUTPUT
|
1220
1438
|
<?xml version="1.0" encoding="UTF-8"?>
|
1221
1439
|
<standard-document xmlns="https://www.metanorma.org/ns/standoc" type="semantic" version="#{Metanorma::Standoc::VERSION}">
|
1222
1440
|
<bibdata type="standard">
|
@@ -1261,10 +1479,12 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1261
1479
|
</references></bibliography>
|
1262
1480
|
</standard-document>
|
1263
1481
|
OUTPUT
|
1482
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1483
|
+
.to be_equivalent_to xmlpp(output)
|
1264
1484
|
end
|
1265
1485
|
|
1266
1486
|
it "processes repository reference" do
|
1267
|
-
|
1487
|
+
input = <<~INPUT
|
1268
1488
|
#{ISOBIB_BLANK_HDR}
|
1269
1489
|
== Scope
|
1270
1490
|
|
@@ -1279,6 +1499,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1279
1499
|
* [[[iso123,repo:(ab/ISO 123)]]] _Standard_
|
1280
1500
|
* [[[iso124,repo:(ab/ISO 124,id)]]] _Standard_
|
1281
1501
|
INPUT
|
1502
|
+
output = <<~OUTPUT
|
1282
1503
|
#{BLANK_HDR}
|
1283
1504
|
<sections>
|
1284
1505
|
<clause id='_' type='scope' inline-header='false' obligation='normative'>
|
@@ -1332,10 +1553,12 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1332
1553
|
</bibliography>
|
1333
1554
|
</standard-document>
|
1334
1555
|
OUTPUT
|
1556
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1557
|
+
.to be_equivalent_to xmlpp(output)
|
1335
1558
|
end
|
1336
1559
|
|
1337
1560
|
it "processes hyperlink reference, ingest RXL or XML if available" do
|
1338
|
-
|
1561
|
+
input = <<~INPUT
|
1339
1562
|
#{ISOBIB_BLANK_HDR}
|
1340
1563
|
== Scope
|
1341
1564
|
|
@@ -1353,6 +1576,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1353
1576
|
* [[[iso123,path:(spec/assets/iso123,ISO 123)]]] _Standard_
|
1354
1577
|
* [[[iso124,path:(a/b.adoc,ISO 124)]]] _Standard_
|
1355
1578
|
INPUT
|
1579
|
+
output = <<~OUTPUT
|
1356
1580
|
#{BLANK_HDR}
|
1357
1581
|
<sections>
|
1358
1582
|
<clause id='_' type="scope" inline-header='false' obligation='normative'>
|
@@ -1403,7 +1627,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1403
1627
|
amendments) applies.
|
1404
1628
|
</p>
|
1405
1629
|
<bibitem id='iso123' type='standard'>
|
1406
|
-
<fetched
|
1630
|
+
<fetched/>
|
1407
1631
|
<title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
|
1408
1632
|
<title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
|
1409
1633
|
<title type='main' format='text/plain' language='en' script='Latn'>Rubber latex – Sampling</title>
|
@@ -1450,7 +1674,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1450
1674
|
</relation>
|
1451
1675
|
<relation type='instance'>
|
1452
1676
|
<bibitem type='standard'>
|
1453
|
-
<fetched
|
1677
|
+
<fetched/>
|
1454
1678
|
<title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
|
1455
1679
|
<title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
|
1456
1680
|
<title type='main' format='text/plain' language='en' script='Latn'>Rubber latex – Sampling</title>
|
@@ -1522,141 +1746,290 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1522
1746
|
</bibliography>
|
1523
1747
|
</standard-document>
|
1524
1748
|
OUTPUT
|
1749
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1750
|
+
.to be_equivalent_to xmlpp(output)
|
1525
1751
|
end
|
1526
1752
|
|
1527
1753
|
it "overrides normative status of bibliographies" do
|
1528
|
-
mock_isobib_get_123_no_docid(1)
|
1529
|
-
mock_isobib_get_123_no_docid_lbl(1)
|
1530
|
-
|
1531
|
-
|
1532
|
-
|
1533
|
-
== Normative References
|
1754
|
+
# mock_isobib_get_123_no_docid(1)
|
1755
|
+
# mock_isobib_get_123_no_docid_lbl(1)
|
1756
|
+
VCR.use_cassette "isobib_get_123_1" do
|
1757
|
+
input = <<~INPUT
|
1758
|
+
#{ISOBIB_BLANK_HDR}
|
1534
1759
|
|
1535
|
-
|
1760
|
+
[bibliography,normative=false]
|
1761
|
+
== Normative References
|
1536
1762
|
|
1537
|
-
|
1538
|
-
== Bibliography
|
1763
|
+
* [[[iso123,ISO 123]]] _Standard_
|
1539
1764
|
|
1540
|
-
|
1541
|
-
|
1542
|
-
|
1543
|
-
|
1544
|
-
|
1545
|
-
|
1546
|
-
|
1547
|
-
|
1548
|
-
|
1549
|
-
|
1550
|
-
|
1551
|
-
|
1552
|
-
|
1553
|
-
|
1554
|
-
|
1555
|
-
|
1556
|
-
|
1557
|
-
|
1558
|
-
|
1559
|
-
|
1560
|
-
|
1561
|
-
|
1562
|
-
|
1563
|
-
|
1564
|
-
|
1565
|
-
|
1566
|
-
|
1567
|
-
|
1568
|
-
|
1569
|
-
|
1570
|
-
|
1571
|
-
|
1572
|
-
|
1573
|
-
|
1574
|
-
|
1575
|
-
|
1576
|
-
|
1577
|
-
|
1578
|
-
|
1579
|
-
|
1580
|
-
|
1581
|
-
|
1582
|
-
|
1583
|
-
|
1584
|
-
|
1585
|
-
|
1586
|
-
|
1587
|
-
|
1588
|
-
|
1589
|
-
|
1590
|
-
|
1591
|
-
|
1592
|
-
|
1593
|
-
|
1594
|
-
|
1595
|
-
|
1596
|
-
|
1597
|
-
|
1598
|
-
|
1599
|
-
|
1600
|
-
|
1601
|
-
|
1602
|
-
|
1603
|
-
|
1604
|
-
|
1605
|
-
|
1606
|
-
|
1607
|
-
|
1608
|
-
|
1609
|
-
|
1610
|
-
|
1611
|
-
|
1612
|
-
|
1613
|
-
|
1614
|
-
|
1615
|
-
|
1616
|
-
|
1617
|
-
|
1618
|
-
|
1619
|
-
|
1620
|
-
|
1621
|
-
|
1622
|
-
|
1623
|
-
|
1624
|
-
|
1625
|
-
|
1626
|
-
|
1627
|
-
|
1628
|
-
|
1629
|
-
|
1630
|
-
|
1631
|
-
|
1632
|
-
|
1633
|
-
|
1634
|
-
|
1635
|
-
|
1636
|
-
|
1637
|
-
|
1638
|
-
|
1639
|
-
|
1640
|
-
|
1641
|
-
|
1642
|
-
|
1643
|
-
|
1644
|
-
|
1645
|
-
|
1646
|
-
|
1647
|
-
|
1648
|
-
|
1649
|
-
|
1650
|
-
|
1651
|
-
|
1652
|
-
|
1653
|
-
|
1765
|
+
[bibliography,normative=true]
|
1766
|
+
== Bibliography
|
1767
|
+
|
1768
|
+
* [[[iso124,(1)ISO 123]]] _Standard_
|
1769
|
+
INPUT
|
1770
|
+
output = <<~OUTPUT
|
1771
|
+
#{BLANK_HDR}
|
1772
|
+
<sections> </sections>
|
1773
|
+
<bibliography>
|
1774
|
+
<references id='_' normative='false' obligation='informative'>
|
1775
|
+
<title>Bibliography</title>
|
1776
|
+
<bibitem id='iso123' type='standard'>
|
1777
|
+
<fetched/>
|
1778
|
+
<title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
|
1779
|
+
<title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
|
1780
|
+
<title type='main' format='text/plain' language='en' script='Latn'>Rubber latex — Sampling</title>
|
1781
|
+
<uri type='src'>https://www.iso.org/standard/23281.html</uri>
|
1782
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
1783
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
1784
|
+
<docidentifier type='ISO'>ISO 123</docidentifier>
|
1785
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:en</docidentifier>
|
1786
|
+
<docnumber>123</docnumber>
|
1787
|
+
<contributor>
|
1788
|
+
<role type='publisher'/>
|
1789
|
+
<organization>
|
1790
|
+
<name>International Organization for Standardization</name>
|
1791
|
+
<abbreviation>ISO</abbreviation>
|
1792
|
+
<uri>www.iso.org</uri>
|
1793
|
+
</organization>
|
1794
|
+
</contributor>
|
1795
|
+
<edition>3</edition>
|
1796
|
+
<language>en</language>
|
1797
|
+
<script>Latn</script>
|
1798
|
+
<status>
|
1799
|
+
<stage>90</stage>
|
1800
|
+
<substage>93</substage>
|
1801
|
+
</status>
|
1802
|
+
<copyright>
|
1803
|
+
<from>2001</from>
|
1804
|
+
<owner>
|
1805
|
+
<organization>
|
1806
|
+
<name>ISO</name>
|
1807
|
+
</organization>
|
1808
|
+
</owner>
|
1809
|
+
</copyright>
|
1810
|
+
<relation type='obsoletes'>
|
1811
|
+
<bibitem type='standard'>
|
1812
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
1813
|
+
</bibitem>
|
1814
|
+
</relation>
|
1815
|
+
<relation type='instance'>
|
1816
|
+
<bibitem type='standard'>
|
1817
|
+
<fetched/>
|
1818
|
+
<title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
|
1819
|
+
<title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
|
1820
|
+
<title type='main' format='text/plain' language='en' script='Latn'>Rubber latex — Sampling</title>
|
1821
|
+
<uri type='src'>https://www.iso.org/standard/23281.html</uri>
|
1822
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
1823
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
1824
|
+
<docidentifier type='ISO'>ISO 123:2001</docidentifier>
|
1825
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:en</docidentifier>
|
1826
|
+
<docnumber>123</docnumber>
|
1827
|
+
<date type='published'>
|
1828
|
+
<on>2001-05</on>
|
1829
|
+
</date>
|
1830
|
+
<contributor>
|
1831
|
+
<role type='publisher'/>
|
1832
|
+
<organization>
|
1833
|
+
<name>International Organization for Standardization</name>
|
1834
|
+
<abbreviation>ISO</abbreviation>
|
1835
|
+
<uri>www.iso.org</uri>
|
1836
|
+
</organization>
|
1837
|
+
</contributor>
|
1838
|
+
<edition>3</edition>
|
1839
|
+
<language>en</language>
|
1840
|
+
<script>Latn</script>
|
1841
|
+
<abstract format='text/plain' language='en' script='Latn'>
|
1842
|
+
This International Standard specifies procedures for sampling
|
1843
|
+
natural rubber latex concentrate and for sampling synthetic rubber
|
1844
|
+
latices and artificial latices. It is also suitable for sampling
|
1845
|
+
rubber latex contained in drums, tank cars or tanks. The
|
1846
|
+
procedures may also be used for sampling plastics dispersions.
|
1847
|
+
</abstract>
|
1848
|
+
<status>
|
1849
|
+
<stage>90</stage>
|
1850
|
+
<substage>93</substage>
|
1851
|
+
</status>
|
1852
|
+
<copyright>
|
1853
|
+
<from>2001</from>
|
1854
|
+
<owner>
|
1855
|
+
<organization>
|
1856
|
+
<name>ISO</name>
|
1857
|
+
</organization>
|
1858
|
+
</owner>
|
1859
|
+
</copyright>
|
1860
|
+
<relation type='obsoletes'>
|
1861
|
+
<bibitem type='standard'>
|
1862
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
1863
|
+
</bibitem>
|
1864
|
+
</relation>
|
1865
|
+
<place>Geneva</place>
|
1866
|
+
</bibitem>
|
1867
|
+
</relation>
|
1868
|
+
<place>Geneva</place>
|
1869
|
+
</bibitem>
|
1870
|
+
</references>
|
1871
|
+
<references id='_' normative='true' obligation='informative'>
|
1872
|
+
<title>Normative references</title>
|
1873
|
+
<p id='_'>
|
1874
|
+
The following documents are referred to in the text in such a way that
|
1875
|
+
some or all of their content constitutes requirements of this document.
|
1876
|
+
For dated references, only the edition cited applies. For undated
|
1877
|
+
references, the latest edition of the referenced document (including any
|
1878
|
+
amendments) applies.
|
1879
|
+
</p>
|
1880
|
+
<bibitem id='iso124' type='standard'>
|
1881
|
+
<fetched/>
|
1882
|
+
<title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
|
1883
|
+
<title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
|
1884
|
+
<title type='main' format='text/plain' language='en' script='Latn'>Rubber latex — Sampling</title>
|
1885
|
+
<uri type='src'>https://www.iso.org/standard/23281.html</uri>
|
1886
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
1887
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
1888
|
+
<docidentifier type='ISO'>ISO 123</docidentifier>
|
1889
|
+
<docidentifier type='metanorma'>[1]</docidentifier>
|
1890
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:en</docidentifier>
|
1891
|
+
<docnumber>123</docnumber>
|
1892
|
+
<contributor>
|
1893
|
+
<role type='publisher'/>
|
1894
|
+
<organization>
|
1895
|
+
<name>International Organization for Standardization</name>
|
1896
|
+
<abbreviation>ISO</abbreviation>
|
1897
|
+
<uri>www.iso.org</uri>
|
1898
|
+
</organization>
|
1899
|
+
</contributor>
|
1900
|
+
<edition>3</edition>
|
1901
|
+
<language>en</language>
|
1902
|
+
<script>Latn</script>
|
1903
|
+
<status>
|
1904
|
+
<stage>90</stage>
|
1905
|
+
<substage>93</substage>
|
1906
|
+
</status>
|
1907
|
+
<copyright>
|
1908
|
+
<from>2001</from>
|
1909
|
+
<owner>
|
1910
|
+
<organization>
|
1911
|
+
<name>ISO</name>
|
1912
|
+
</organization>
|
1913
|
+
</owner>
|
1914
|
+
</copyright>
|
1915
|
+
<relation type='obsoletes'>
|
1916
|
+
<bibitem type='standard'>
|
1917
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
1918
|
+
</bibitem>
|
1919
|
+
</relation>
|
1920
|
+
<relation type='instance'>
|
1921
|
+
<bibitem type='standard'>
|
1922
|
+
<fetched/>
|
1923
|
+
<title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
|
1924
|
+
<title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
|
1925
|
+
<title type='main' format='text/plain' language='en' script='Latn'>Rubber latex — Sampling</title>
|
1926
|
+
<uri type='src'>https://www.iso.org/standard/23281.html</uri>
|
1927
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
1928
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
1929
|
+
<docidentifier type='ISO'>ISO 123:2001</docidentifier>
|
1930
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:en</docidentifier>
|
1931
|
+
<docnumber>123</docnumber>
|
1932
|
+
<date type='published'>
|
1933
|
+
<on>2001-05</on>
|
1934
|
+
</date>
|
1935
|
+
<contributor>
|
1936
|
+
<role type='publisher'/>
|
1937
|
+
<organization>
|
1938
|
+
<name>International Organization for Standardization</name>
|
1939
|
+
<abbreviation>ISO</abbreviation>
|
1940
|
+
<uri>www.iso.org</uri>
|
1941
|
+
</organization>
|
1942
|
+
</contributor>
|
1943
|
+
<edition>3</edition>
|
1944
|
+
<language>en</language>
|
1945
|
+
<script>Latn</script>
|
1946
|
+
<abstract format='text/plain' language='en' script='Latn'>
|
1947
|
+
This International Standard specifies procedures for sampling
|
1948
|
+
natural rubber latex concentrate and for sampling synthetic rubber
|
1949
|
+
latices and artificial latices. It is also suitable for sampling
|
1950
|
+
rubber latex contained in drums, tank cars or tanks. The
|
1951
|
+
procedures may also be used for sampling plastics dispersions.
|
1952
|
+
</abstract>
|
1953
|
+
<status>
|
1954
|
+
<stage>90</stage>
|
1955
|
+
<substage>93</substage>
|
1956
|
+
</status>
|
1957
|
+
<copyright>
|
1958
|
+
<from>2001</from>
|
1959
|
+
<owner>
|
1960
|
+
<organization>
|
1961
|
+
<name>ISO</name>
|
1962
|
+
</organization>
|
1963
|
+
</owner>
|
1964
|
+
</copyright>
|
1965
|
+
<relation type='obsoletes'>
|
1966
|
+
<bibitem type='standard'>
|
1967
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
1968
|
+
</bibitem>
|
1969
|
+
</relation>
|
1970
|
+
<place>Geneva</place>
|
1971
|
+
</bibitem>
|
1972
|
+
</relation>
|
1973
|
+
<place>Geneva</place>
|
1974
|
+
</bibitem>
|
1975
|
+
</references>
|
1976
|
+
</bibliography>
|
1977
|
+
</standard-document>
|
1978
|
+
OUTPUT
|
1979
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1980
|
+
.to be_equivalent_to xmlpp(output)
|
1981
|
+
end
|
1982
|
+
end
|
1983
|
+
|
1984
|
+
it "processes formatting within bibliographic references" do
|
1985
|
+
VCR.use_cassette "isobib_get_123_1" do
|
1986
|
+
input = <<~INPUT
|
1987
|
+
#{ISOBIB_BLANK_HDR}
|
1988
|
+
[bibliography]
|
1989
|
+
== Normative References
|
1990
|
+
|
1991
|
+
* [[[reference,ISO 123]]] _Standard_
|
1992
|
+
|
1993
|
+
== Section
|
1994
|
+
|
1995
|
+
<<reference,_reference_>>
|
1996
|
+
<<reference,_**reference**_>>
|
1997
|
+
<<reference,_A_ stem:[x^2]>>
|
1998
|
+
<<reference,_A_ footnote:[_B_]>>
|
1999
|
+
<<reference,clause=3.4.2, ISO 9000:2005 footnote:[Superseded by ISO 9000:2015.]>>
|
2000
|
+
|
2001
|
+
INPUT
|
2002
|
+
output = <<~OUTPUT
|
2003
|
+
#{BLANK_HDR}
|
2004
|
+
<sections>
|
2005
|
+
<clause id="_" inline-header="false" obligation="normative">
|
2006
|
+
<title>Section</title>
|
2007
|
+
<p id="_"><eref type="inline" bibitemid="reference" citeas="ISO 123"><em>reference</em></eref>
|
2008
|
+
<eref type="inline" bibitemid="reference" citeas="ISO 123"><em><strong>reference</strong></em></eref>
|
2009
|
+
<eref type="inline" bibitemid="reference" citeas="ISO 123"><em>A</em> <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mrow><mi>x</mi></mrow><mrow><mn>2</mn></mrow></msup></math></stem></eref>
|
2010
|
+
<eref type="inline" bibitemid="reference" citeas="ISO 123"><em>A</em><fn reference="1"><p id="_"><em>B</em></p></fn></eref>
|
2011
|
+
<eref type="inline" bibitemid="reference" citeas="ISO 123"><localityStack><locality type="clause"><referenceFrom>3.4.2</referenceFrom></locality></localityStack>ISO 9000:2005<fn reference="2"><p id="_">Superseded by ISO 9000:2015.</p></fn></eref></p>
|
2012
|
+
</clause></sections>
|
2013
|
+
</standard-document>
|
2014
|
+
OUTPUT
|
2015
|
+
a = Nokogiri::XML(Asciidoctor.convert(input, *OPTIONS))
|
2016
|
+
a.at("//xmlns:bibliography").remove
|
2017
|
+
expect((strip_guid(a.to_xml))).to be_equivalent_to(output)
|
2018
|
+
end
|
1654
2019
|
end
|
1655
2020
|
|
1656
2021
|
private
|
1657
2022
|
|
1658
2023
|
def mock_isobib_get_123
|
1659
|
-
expect(RelatonIso::IsoBibliography).to receive(:get)
|
2024
|
+
expect(RelatonIso::IsoBibliography).to receive(:get)
|
2025
|
+
.with("ISO 123", nil, { code: "ISO 123",
|
2026
|
+
lang: "en",
|
2027
|
+
match: anything,
|
2028
|
+
process: 1,
|
2029
|
+
ord: anything,
|
2030
|
+
title: "<em>Standard</em>",
|
2031
|
+
usrlbl: nil,
|
2032
|
+
year: nil }) do
|
1660
2033
|
IsoBibItem::XMLParser.from_xml(<<~"OUTPUT")
|
1661
2034
|
<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>
|
1662
2035
|
OUTPUT
|
@@ -1664,7 +2037,15 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1664
2037
|
end
|
1665
2038
|
|
1666
2039
|
def mock_isobib_get_123_no_docid(n)
|
1667
|
-
expect(RelatonIso::IsoBibliography).to receive(:get)
|
2040
|
+
expect(RelatonIso::IsoBibliography).to receive(:get)
|
2041
|
+
.with("ISO 123", nil, { code: "ISO 123",
|
2042
|
+
lang: "en",
|
2043
|
+
match: anything,
|
2044
|
+
process: 1,
|
2045
|
+
ord: anything,
|
2046
|
+
title: "<em>Standard</em>",
|
2047
|
+
usrlbl: nil,
|
2048
|
+
year: nil }) do
|
1668
2049
|
RelatonBib::XMLParser.from_xml(<<~"OUTPUT")
|
1669
2050
|
<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>
|
1670
2051
|
OUTPUT
|
@@ -1672,7 +2053,15 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1672
2053
|
end
|
1673
2054
|
|
1674
2055
|
def mock_isobib_get_123_no_docid_lbl(n)
|
1675
|
-
expect(RelatonIso::IsoBibliography).to receive(:get)
|
2056
|
+
expect(RelatonIso::IsoBibliography).to receive(:get)
|
2057
|
+
.with("ISO 123", nil, { code: "ISO 123",
|
2058
|
+
lang: "en",
|
2059
|
+
match: anything,
|
2060
|
+
process: 1,
|
2061
|
+
ord: anything,
|
2062
|
+
title: "<em>Standard</em>",
|
2063
|
+
usrlbl: "(1)",
|
2064
|
+
year: nil }) do
|
1676
2065
|
RelatonBib::XMLParser.from_xml(<<~"OUTPUT")
|
1677
2066
|
<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>
|
1678
2067
|
OUTPUT
|
@@ -1680,7 +2069,9 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1680
2069
|
end
|
1681
2070
|
|
1682
2071
|
def mock_isobib_get_124
|
1683
|
-
expect(RelatonIso::IsoBibliography).to receive(:get)
|
2072
|
+
expect(RelatonIso::IsoBibliography).to receive(:get)
|
2073
|
+
.with("ISO 124",
|
2074
|
+
"2014", anything) do
|
1684
2075
|
IsoBibItem::XMLParser.from_xml(<<~"OUTPUT")
|
1685
2076
|
<bibitem type="standard" id="iso124">
|
1686
2077
|
<title format="text/plain" language="en" script="Latn">Latex, rubber -- Determination of total solids content</title>
|
@@ -1730,7 +2121,9 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1730
2121
|
end
|
1731
2122
|
|
1732
2123
|
def mock_isobib_get_iec12382
|
1733
|
-
expect(RelatonIso::IsoBibliography).to receive(:get).with(
|
2124
|
+
expect(RelatonIso::IsoBibliography).to receive(:get).with(
|
2125
|
+
"ISO/IEC TR 12382", "1992", anything
|
2126
|
+
) do
|
1734
2127
|
IsoBibItem::XMLParser.from_xml(<<~"OUTPUT")
|
1735
2128
|
<bibitem type="standard" id="iso123">
|
1736
2129
|
<title format="text/plain" language="en" script="Latn">Permuted index of the vocabulary of information technology</title>
|
@@ -1792,7 +2185,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1792
2185
|
end
|
1793
2186
|
|
1794
2187
|
def mock_rfcbib_get_rfc8341
|
1795
|
-
expect(IETFBib::RfcBibliography).to receive(:get).with("RFC 8341", nil,
|
2188
|
+
expect(IETFBib::RfcBibliography).to receive(:get).with("RFC 8341", nil,
|
2189
|
+
anything) do
|
1796
2190
|
IsoBibItem::XMLParser.from_xml(<<~"OUTPUT")
|
1797
2191
|
<bibitem id="RFC8341">
|
1798
2192
|
<title format="text/plain" language="en" script="Latn">Network Configuration Access Control Model</title>
|