metanorma-standoc 1.10.4.1 → 1.10.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/lib/asciidoctor/standoc/base.rb +2 -0
  3. data/lib/asciidoctor/standoc/blocks.rb +2 -0
  4. data/lib/asciidoctor/standoc/cleanup.rb +12 -70
  5. data/lib/asciidoctor/standoc/cleanup_maths.rb +113 -21
  6. data/lib/asciidoctor/standoc/cleanup_reqt.rb +1 -0
  7. data/lib/asciidoctor/standoc/cleanup_section.rb +1 -0
  8. data/lib/asciidoctor/standoc/cleanup_section_names.rb +31 -14
  9. data/lib/asciidoctor/standoc/cleanup_text.rb +70 -0
  10. data/lib/asciidoctor/standoc/isodoc.rng +23 -9
  11. data/lib/asciidoctor/standoc/table.rb +22 -20
  12. data/lib/metanorma/standoc/version.rb +1 -1
  13. data/metanorma-standoc.gemspec +1 -1
  14. data/spec/asciidoctor/cleanup_sections_spec.rb +66 -0
  15. data/spec/asciidoctor/cleanup_spec.rb +28 -1
  16. data/spec/asciidoctor/isobib_cache_spec.rb +8 -8
  17. data/spec/asciidoctor/macros_spec.rb +5 -1
  18. data/spec/asciidoctor/refs_dl_spec.rb +1 -1
  19. data/spec/asciidoctor/refs_spec.rb +218 -442
  20. data/spec/asciidoctor/section_spec.rb +1 -1
  21. data/spec/fixtures/datamodel_description_sections_tree.xml +326 -327
  22. data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +227 -139
  23. data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec1.yml +152 -0
  24. data/spec/vcr_cassettes/isobib_get_123.yml +50 -34
  25. data/spec/vcr_cassettes/isobib_get_123_1.yml +102 -70
  26. data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +107 -75
  27. data/spec/vcr_cassettes/isobib_get_123_2001.yml +50 -34
  28. data/spec/vcr_cassettes/isobib_get_124.yml +51 -35
  29. data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +14 -14
  30. data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +47 -45
  31. metadata +6 -4
@@ -32,6 +32,18 @@
32
32
  <ref name="DocumentType"/>
33
33
  </element>
34
34
  </define>
35
+ <define name="section-title">
36
+ <element name="title">
37
+ <zeroOrMore>
38
+ <ref name="TextElement"/>
39
+ </zeroOrMore>
40
+ </element>
41
+ <zeroOrMore>
42
+ <element name="variant-title">
43
+ <ref name="TypedTitleString"/>
44
+ </element>
45
+ </zeroOrMore>
46
+ </define>
35
47
  <define name="hyperlink">
36
48
  <element name="link">
37
49
  <attribute name="target">
@@ -158,15 +170,17 @@
158
170
  <data type="boolean"/>
159
171
  </attribute>
160
172
  </optional>
161
- <attribute name="type">
162
- <choice>
163
- <value>roman</value>
164
- <value>alphabet</value>
165
- <value>arabic</value>
166
- <value>roman_upper</value>
167
- <value>alphabet_upper</value>
168
- </choice>
169
- </attribute>
173
+ <optional>
174
+ <attribute name="type">
175
+ <choice>
176
+ <value>roman</value>
177
+ <value>alphabet</value>
178
+ <value>arabic</value>
179
+ <value>roman_upper</value>
180
+ <value>alphabet_upper</value>
181
+ </choice>
182
+ </attribute>
183
+ </optional>
170
184
  <oneOrMore>
171
185
  <ref name="li"/>
172
186
  </oneOrMore>
@@ -2,15 +2,15 @@ module Asciidoctor
2
2
  module Standoc
3
3
  module Table
4
4
  def table_attrs(node)
5
- keep_attrs(node).merge( id: Metanorma::Utils::anchor_or_uuid(node),
6
- headerrows: node.attr("headerrows"),
7
- unnumbered: node.option?("unnumbered") ? "true" : nil,
8
- number: node.attr("number"),
9
- subsequence: node.attr("subsequence"),
10
- alt: node.attr("alt"),
11
- summary: node.attr("summary"),
12
- width: node.attr("width"),
13
- )
5
+ keep_attrs(node)
6
+ .merge(id: Metanorma::Utils::anchor_or_uuid(node),
7
+ headerrows: node.attr("headerrows"),
8
+ unnumbered: node.option?("unnumbered") ? "true" : nil,
9
+ number: node.attr("number"),
10
+ subsequence: node.attr("subsequence"),
11
+ alt: node.attr("alt"),
12
+ summary: node.attr("summary"),
13
+ width: node.attr("width"))
14
14
  end
15
15
 
16
16
  def table(node)
@@ -31,8 +31,10 @@ module Asciidoctor
31
31
 
32
32
  def colgroup(node, xml_table)
33
33
  return if node.option? "autowidth"
34
+
34
35
  cols = node&.attr("cols")&.split(/,/) or return
35
- return unless cols.size > 1 and cols.all? { |c| /\d/.match(c) }
36
+ return unless (cols.size > 1) && cols.all? { |c| /\d/.match(c) }
37
+
36
38
  xml_table.colgroup do |cg|
37
39
  node.columns.each do |col|
38
40
  cg.col **{ width: "#{col.attr 'colpcwidth'}%" }
@@ -49,21 +51,21 @@ module Asciidoctor
49
51
  end
50
52
 
51
53
  def table_cell1(cell, thd)
52
- if cell.style == :asciidoc
53
- thd << cell.content
54
- else
55
- thd << cell.text
56
- end
54
+ thd << if cell.style == :asciidoc
55
+ cell.content
56
+ else
57
+ cell.text
58
+ end
57
59
  end
58
60
 
59
- def table_cell(c, xml_tr, tblsec)
61
+ def table_cell(node, xml_tr, tblsec)
60
62
  cell_attributes =
61
- { id: c.id, colspan: c.colspan, valign: c.attr("valign"),
62
- rowspan: c.rowspan, align: c.attr("halign") }
63
+ { id: node.id, colspan: node.colspan, valign: node.attr("valign"),
64
+ rowspan: node.rowspan, align: node.attr("halign") }
63
65
  cell_tag = "td"
64
- cell_tag = "th" if tblsec == :head || c.style == :header
66
+ cell_tag = "th" if tblsec == :head || node.style == :header
65
67
  xml_tr.send cell_tag, **attr_code(cell_attributes) do |thd|
66
- table_cell1(c, thd)
68
+ table_cell1(node, thd)
67
69
  end
68
70
  end
69
71
 
@@ -19,6 +19,6 @@ module Metanorma
19
19
  end
20
20
 
21
21
  module Standoc
22
- VERSION = "1.10.4.1".freeze
22
+ VERSION = "1.10.5".freeze
23
23
  end
24
24
  end
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
38
38
  spec.add_dependency "latexmath"
39
39
  spec.add_dependency "mathml2asciimath"
40
40
  spec.add_dependency "metanorma-utils", "~> 1.2.0"
41
- spec.add_dependency "relaton-cli", "~> 1.8.0"
41
+ spec.add_dependency "relaton-cli", "~> 1.9.0"
42
42
  spec.add_dependency "relaton-iev", "~> 1.1.0"
43
43
  spec.add_dependency "unicode2latex", "~> 0.0.1"
44
44
 
@@ -1588,4 +1588,70 @@ RSpec.describe Asciidoctor::Standoc do
1588
1588
  expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
1589
1589
  .to be_equivalent_to xmlpp(output)
1590
1590
  end
1591
+
1592
+ it "adds variant titles" do
1593
+ input = <<~INPUT
1594
+ #{ASCIIDOC_BLANK_HDR}
1595
+
1596
+ == Clause
1597
+ Text
1598
+
1599
+ === Subclause
1600
+
1601
+ [.variant-title,type=toc]
1602
+ Clause _A_ stem:[x]
1603
+
1604
+ [.variant-title,type=sub]
1605
+ "A" 'B'
1606
+
1607
+ Text
1608
+
1609
+ [appendix]
1610
+ == Clause
1611
+
1612
+ [.variant-title,type=toc]
1613
+ Clause _A_ stem:[x]
1614
+
1615
+ Text
1616
+ INPUT
1617
+ output = <<~OUTPUT
1618
+ #{BLANK_HDR}
1619
+ <sections>
1620
+ <clause id='_' inline-header='false' obligation='normative'>
1621
+ <title>Clause</title>
1622
+ <p id='_'>Text</p>
1623
+ <clause id='_' inline-header='false' obligation='normative'>
1624
+ <title>Subclause</title>
1625
+ <variant-title variant_title='true' type='sub'>&#8220;A&#8221; &#8216;B&#8217;</variant-title>
1626
+ <variant-title variant_title='true' type='toc'>
1627
+ Clause
1628
+ <em>A</em>
1629
+ <stem type='MathML'>
1630
+ <math xmlns='http://www.w3.org/1998/Math/MathML'>
1631
+ <mi>x</mi>
1632
+ </math>
1633
+ </stem>
1634
+ </variant-title>
1635
+ <p id='_'>Text</p>
1636
+ </clause>
1637
+ </clause>
1638
+ </sections>
1639
+ <annex id='_' inline-header='false' obligation='normative'>
1640
+ <title>Clause</title>
1641
+ <variant-title variant_title='true' type='toc'>
1642
+ Clause
1643
+ <em>A</em>
1644
+ <stem type='MathML'>
1645
+ <math xmlns='http://www.w3.org/1998/Math/MathML'>
1646
+ <mi>x</mi>
1647
+ </math>
1648
+ </stem>
1649
+ </variant-title>
1650
+ <p id='_'>Text</p>
1651
+ </annex>
1652
+ </standard-document>
1653
+ OUTPUT
1654
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
1655
+ .to be_equivalent_to xmlpp(output)
1656
+ end
1591
1657
  end
@@ -1539,7 +1539,7 @@ RSpec.describe Asciidoctor::Standoc do
1539
1539
  <abstract format="text/plain" language="en" script="Latn">IEC 60050-103:2009 gives the terminology relative to functions of one or more variables. Together with IEC 60050-102, it covers the mathematical terminology used in the fields of electricity, electronics and telecommunications. It maintains a clear distinction between mathematical concepts and physical concepts, even if some terms are used in both cases. Mathematical symbols are generally in accordance with IEC 60027-1 and ISO 80000-2. This standard cancels and replaces Sections 101-13, 101-14 and 101-15 of International Standard IEC 60050-101:1998. It has the status of a horizontal standard in accordance with IEC Guide 108.</abstract>
1540
1540
  <status>
1541
1541
  <stage>60</stage>
1542
- <substage>60</substage>
1542
+ <substage>00</substage>
1543
1543
  </status>
1544
1544
  <copyright>
1545
1545
  <from>2009</from>
@@ -1679,6 +1679,33 @@ RSpec.describe Asciidoctor::Standoc do
1679
1679
  .to be_equivalent_to xmlpp(output)
1680
1680
  end
1681
1681
 
1682
+ it "cleans up nested mathvariant instances" do
1683
+ input = <<~INPUT
1684
+ #{ASCIIDOC_BLANK_HDR}
1685
+
1686
+ stem:[sf "unitsml(cd)"]
1687
+ INPUT
1688
+ output = <<~OUTPUT
1689
+ <sections>
1690
+ <p id='_'>
1691
+ <stem type='MathML'>
1692
+ <math xmlns='http://www.w3.org/1998/Math/MathML'>
1693
+ <mstyle mathvariant='sans-serif'>
1694
+ <mrow xref='U_NISTu7'>
1695
+ <mi mathvariant='sans-serif'>cd</mi>
1696
+ </mrow>
1697
+ </mstyle>
1698
+ </math>
1699
+ </stem>
1700
+ </p>
1701
+ </sections>
1702
+ OUTPUT
1703
+ expect(xmlpp(strip_guid(Nokogiri::XML(
1704
+ Asciidoctor.convert(input, *OPTIONS),
1705
+ ).at("//xmlns:sections").to_xml)))
1706
+ .to be_equivalent_to xmlpp(output)
1707
+ end
1708
+
1682
1709
  it "removes nested bibitem IDs" do
1683
1710
  input = <<~INPUT
1684
1711
  #{BLANK_HDR}
@@ -88,14 +88,14 @@ ISO_124_DATED = <<~XML.freeze
88
88
  <ext>
89
89
  <doctype>international-standard</doctype>
90
90
  <editorialgroup>
91
- <technical-committee number="45" type="TC">ISO/TC 45/SC 3Raw materials (including latex) for use in the rubber industry</technical-committee>
91
+ <technical-committee number='45' type='TC' identifier='ISO/TC 45/SC 3'>Raw materials (including latex) for use in the rubber industry</technical-committee>
92
92
  </editorialgroup>
93
93
  <ics>
94
94
  <code>83.040.10</code>
95
95
  <text>Latex and raw rubber</text>
96
96
  </ics>
97
97
  <structuredidentifier type="ISO">
98
- <project-number>ISO 124</project-number>
98
+ <project-number part="">ISO 124</project-number>
99
99
  </structuredidentifier>
100
100
  </ext>
101
101
  </bibdata>
@@ -186,14 +186,14 @@ ISO_123_UNDATED = <<~XML.freeze
186
186
  <ext>
187
187
  <doctype>international-standard</doctype>
188
188
  <editorialgroup>
189
- <technical-committee number="45" type="TC">ISO/TC 45/SC 3Raw materials (including latex) for use in the rubber industry</technical-committee>
189
+ <technical-committee number='45' type='TC' identifier='ISO/TC 45/SC 3'>Raw materials (including latex) for use in the rubber industry</technical-committee>
190
190
  </editorialgroup>
191
191
  <ics>
192
192
  <code>83.040.10</code>
193
193
  <text>Latex and raw rubber</text>
194
194
  </ics>
195
195
  <structuredidentifier type="ISO">
196
- <project-number>ISO 123</project-number>
196
+ <project-number part="">ISO 123</project-number>
197
197
  </structuredidentifier>
198
198
  </ext>
199
199
  </bibdata>
@@ -227,9 +227,9 @@ ISO_123_DATED = <<~XML.freeze
227
227
  <script>Latn</script>
228
228
  <abstract format='text/plain' language='en' script='Latn'>
229
229
  This International Standard specifies procedures for sampling natural rubber
230
- latex concentrate and for sampling syntheticrubber latices and artificial
230
+ latex concentrate and for sampling synthetic rubber latices and artificial
231
231
  latices. It is also suitable for sampling rubber latex contained in drums,
232
- tank cars ortanks. The procedures may also be used for sampling plastics
232
+ tank cars or tanks. The procedures may also be used for sampling plastics
233
233
  dispersions.
234
234
  </abstract>
235
235
  <status>
@@ -253,14 +253,14 @@ ISO_123_DATED = <<~XML.freeze
253
253
  <ext>
254
254
  <doctype>international-standard</doctype>
255
255
  <editorialgroup>
256
- <technical-committee number="45" type="TC">ISO/TC 45/SC 3Raw materials (including latex) for use in the rubber industry</technical-committee>
256
+ <technical-committee number='45' type='TC' identifier='ISO/TC 45/SC 3'>Raw materials (including latex) for use in the rubber industry</technical-committee>
257
257
  </editorialgroup>
258
258
  <ics>
259
259
  <code>83.040.10</code>
260
260
  <text>Latex and raw rubber</text>
261
261
  </ics>
262
262
  <structuredidentifier type="ISO">
263
- <project-number>ISO 123</project-number>
263
+ <project-number part="">ISO 123</project-number>
264
264
  </structuredidentifier>
265
265
  </ext>
266
266
  </bibdata>
@@ -1147,6 +1147,9 @@ RSpec.describe Asciidoctor::Standoc do
1147
1147
  [[clause1Ab]]
1148
1148
  ==== Clause 1Ab
1149
1149
 
1150
+ [.variant-title,type=toc]
1151
+ 1Ab Clause
1152
+
1150
1153
  [[clause1B]]
1151
1154
  === Clause 1B
1152
1155
 
@@ -1173,6 +1176,7 @@ RSpec.describe Asciidoctor::Standoc do
1173
1176
  </clause>
1174
1177
  <clause id='clause1Ab' inline-header='false' obligation='normative'>
1175
1178
  <title>Clause 1Ab</title>
1179
+ <variant-title variant_title='true' type='toc'>1Ab Clause</variant-title>
1176
1180
  </clause>
1177
1181
  </clause>
1178
1182
  <clause id='clause1B' inline-header='false' obligation='normative'>
@@ -1196,7 +1200,7 @@ RSpec.describe Asciidoctor::Standoc do
1196
1200
  <xref target='clause1Aa'>Clause 1Aa</xref>
1197
1201
  </li>
1198
1202
  <li>
1199
- <xref target='clause1Ab'>Clause 1Ab</xref>
1203
+ <xref target='clause1Ab'>1Ab Clause</xref>
1200
1204
  </li>
1201
1205
  </ul>
1202
1206
  </li>
@@ -821,7 +821,7 @@ OUTPUT
821
821
  <title>Subsection</title>
822
822
  </clause>
823
823
  <references id='_' obligation='informative' normative="true">
824
- <title>Normative references</title>
824
+ <title>Normative References</title>
825
825
  <bibitem id='A'>
826
826
  <formattedref format='application/x-isodoc+xml'>Title</formattedref>
827
827
  <docidentifier>B</docidentifier>
@@ -239,222 +239,110 @@ RSpec.describe Asciidoctor::Standoc do
239
239
  #{NORM_REF_BOILERPLATE}
240
240
  <bibitem id='iso123' type='standard'>
241
241
  <fetched>#{Date.today}</fetched>
242
- <title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
243
- <title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
244
- <title type='main' format='text/plain' language='en' script='Latn'>Rubber latexSampling</title>
245
- <uri type='src'>https://www.iso.org/standard/23281.html</uri>
246
- <uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
247
- <uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
248
- <docidentifier type='ISO'>ISO 123 (all parts)</docidentifier>
249
- <docidentifier type='URN'>urn:iso:std:iso:123</docidentifier>
250
- <docnumber>123</docnumber>
251
- <date type='published'>
252
- <on>2001-05</on>
253
- </date>
254
- <contributor>
255
- <role type='publisher'/>
256
- <organization>
257
- <name>International Organization for Standardization</name>
258
- <abbreviation>ISO</abbreviation>
259
- <uri>www.iso.org</uri>
260
- </organization>
261
- </contributor>
262
- <edition>3</edition>
263
- <language>en</language>
264
- <script>Latn</script>
265
- <status>
266
- <stage>90</stage>
267
- <substage>93</substage>
268
- </status>
269
- <copyright>
270
- <from>2001</from>
271
- <owner>
272
- <organization>
273
- <name>ISO</name>
274
- </organization>
275
- </owner>
276
- </copyright>
277
- <relation type='obsoletes'>
278
- <bibitem type='standard'>
279
- <formattedref format='text/plain'>ISO 123:1985</formattedref>
280
- </bibitem>
281
- </relation>
282
- <relation type='instance'>
283
- <bibitem type='standard'>
284
- <fetched>#{Date.today}</fetched>
285
- <title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
286
- <title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
287
- <title type='main' format='text/plain' language='en' script='Latn'>Rubber latex — Sampling</title>
288
- <uri type='src'>https://www.iso.org/standard/23281.html</uri>
289
- <uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
290
- <uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
291
- <docidentifier type='ISO'>ISO 123:2001</docidentifier>
292
- <docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:en</docidentifier>
293
- <docnumber>123</docnumber>
294
- <date type='published'>
295
- <on>2001-05</on>
296
- </date>
297
- <contributor>
298
- <role type='publisher'/>
299
- <organization>
300
- <name>International Organization for Standardization</name>
301
- <abbreviation>ISO</abbreviation>
302
- <uri>www.iso.org</uri>
303
- </organization>
304
- </contributor>
305
- <edition>3</edition>
306
- <language>en</language>
307
- <script>Latn</script>
308
- <abstract format='text/plain' language='en' script='Latn'>
309
- This International Standard specifies procedures for sampling
310
- natural rubber latex concentrate and for sampling syntheticrubber
311
- latices and artificial latices. It is also suitable for sampling
312
- rubber latex contained in drums, tank cars ortanks. The procedures
313
- may also be used for sampling plastics dispersions.
314
- </abstract>
315
- <status>
316
- <stage>90</stage>
317
- <substage>93</substage>
318
- </status>
319
- <copyright>
320
- <from>2001</from>
321
- <owner>
322
- <organization>
323
- <name>ISO</name>
324
- </organization>
325
- </owner>
326
- </copyright>
327
- <relation type='obsoletes'>
328
- <bibitem type='standard'>
329
- <formattedref format='text/plain'>ISO 123:1985</formattedref>
330
- </bibitem>
331
- </relation>
332
- <place>Geneva</place>
333
- </bibitem>
334
- </relation>
335
- <relation type='instance'>
336
- <bibitem type='standard'>
337
- <formattedref format='text/plain'>ISO 123:1985</formattedref>
338
- </bibitem>
339
- </relation>
340
- <relation type='instance'>
341
- <bibitem type='standard'>
342
- <formattedref format='text/plain'>ISO 123:1974</formattedref>
343
- </bibitem>
344
- </relation>
345
- <place>Geneva</place>
346
- </bibitem>
347
- <bibitem id='iso124' type='standard'>
348
- <fetched>#{Date.today}</fetched>
349
- <title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
350
- <title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
351
- <title type='main' format='text/plain' language='en' script='Latn'>Rubber latex – Sampling</title>
352
- <uri type='src'>https://www.iso.org/standard/23281.html</uri>
353
- <uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
354
- <uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
355
- <docidentifier type='ISO'>ISO 123 (all parts)</docidentifier>
356
- <docidentifier type='metanorma'>[1]</docidentifier>
357
- <docidentifier type='URN'>urn:iso:std:iso:123</docidentifier>
358
- <docnumber>123</docnumber>
359
- <date type='published'>
360
- <on>2001-05</on>
361
- </date>
362
- <contributor>
363
- <role type='publisher'/>
364
- <organization>
365
- <name>International Organization for Standardization</name>
366
- <abbreviation>ISO</abbreviation>
367
- <uri>www.iso.org</uri>
368
- </organization>
369
- </contributor>
370
- <edition>3</edition>
371
- <language>en</language>
372
- <script>Latn</script>
373
- <status>
374
- <stage>90</stage>
375
- <substage>93</substage>
376
- </status>
377
- <copyright>
378
- <from>2001</from>
379
- <owner>
380
- <organization>
381
- <name>ISO</name>
382
- </organization>
383
- </owner>
384
- </copyright>
385
- <relation type='obsoletes'>
386
- <bibitem type='standard'>
387
- <formattedref format='text/plain'>ISO 123:1985</formattedref>
388
- </bibitem>
389
- </relation>
390
- <relation type='instance'>
391
- <bibitem type='standard'>
392
- <fetched>#{Date.today}</fetched>
393
- <title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
394
- <title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
395
- <title type='main' format='text/plain' language='en' script='Latn'>Rubber latex — Sampling</title>
396
- <uri type='src'>https://www.iso.org/standard/23281.html</uri>
397
- <uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
398
- <uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
399
- <docidentifier type='ISO'>ISO 123:2001</docidentifier>
400
- <docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:en</docidentifier>
401
- <docnumber>123</docnumber>
402
- <date type='published'>
403
- <on>2001-05</on>
404
- </date>
405
- <contributor>
406
- <role type='publisher'/>
407
- <organization>
408
- <name>International Organization for Standardization</name>
409
- <abbreviation>ISO</abbreviation>
410
- <uri>www.iso.org</uri>
411
- </organization>
412
- </contributor>
413
- <edition>3</edition>
414
- <language>en</language>
415
- <script>Latn</script>
416
- <abstract format='text/plain' language='en' script='Latn'>
417
- This International Standard specifies procedures for sampling
418
- natural rubber latex concentrate and for sampling syntheticrubber
419
- latices and artificial latices. It is also suitable for sampling
420
- rubber latex contained in drums, tank cars ortanks. The procedures
421
- may also be used for sampling plastics dispersions.
422
- </abstract>
423
- <status>
424
- <stage>90</stage>
425
- <substage>93</substage>
426
- </status>
427
- <copyright>
428
- <from>2001</from>
429
- <owner>
430
- <organization>
431
- <name>ISO</name>
432
- </organization>
433
- </owner>
434
- </copyright>
435
- <relation type='obsoletes'>
436
- <bibitem type='standard'>
437
- <formattedref format='text/plain'>ISO 123:1985</formattedref>
438
- </bibitem>
439
- </relation>
440
- <place>Geneva</place>
441
- </bibitem>
442
- </relation>
443
- <relation type='instance'>
444
- <bibitem type='standard'>
445
- <formattedref format='text/plain'>ISO 123:1985</formattedref>
446
- </bibitem>
447
- </relation>
448
- <relation type='instance'>
449
- <bibitem type='standard'>
450
- <formattedref format='text/plain'>ISO 123:1974</formattedref>
451
- </bibitem>
452
- </relation>
453
- <place>Geneva</place>
454
- </bibitem>
455
- </references>
456
- </bibliography>
457
- </standard-document>
242
+ <title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
243
+ <title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
244
+ <title type='main' format='text/plain' language='en' script='Latn'>Rubber latex&#8201;&#8212;&#8201;Sampling</title>
245
+ <uri type='src'>https://www.iso.org/standard/23281.html</uri>
246
+ <uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
247
+ <uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
248
+ <docidentifier type='ISO'>ISO 123:2001</docidentifier>
249
+ <docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:en</docidentifier>
250
+ <docnumber>123</docnumber>
251
+ <date type='published'>
252
+ <on>2001-05</on>
253
+ </date>
254
+ <contributor>
255
+ <role type='publisher'/>
256
+ <organization>
257
+ <name>International Organization for Standardization</name>
258
+ <abbreviation>ISO</abbreviation>
259
+ <uri>www.iso.org</uri>
260
+ </organization>
261
+ </contributor>
262
+ <edition>3</edition>
263
+ <language>en</language>
264
+ <script>Latn</script>
265
+ <abstract format='text/plain' language='en' script='Latn'>
266
+ This International Standard specifies procedures for sampling natural
267
+ rubber latex concentrate and for sampling synthetic rubber latices and
268
+ artificial latices. It is also suitable for sampling rubber latex
269
+ contained in drums, tank cars or tanks. The procedures may also be
270
+ used for sampling plastics dispersions.
271
+ </abstract>
272
+ <status>
273
+ <stage>90</stage>
274
+ <substage>93</substage>
275
+ </status>
276
+ <copyright>
277
+ <from>2001</from>
278
+ <owner>
279
+ <organization>
280
+ <name>ISO</name>
281
+ </organization>
282
+ </owner>
283
+ </copyright>
284
+ <relation type='obsoletes'>
285
+ <bibitem type='standard'>
286
+ <formattedref format='text/plain'>ISO 123:1985</formattedref>
287
+ </bibitem>
288
+ </relation>
289
+ <place>Geneva</place>
290
+ </bibitem>
291
+ <bibitem id='iso124' type='standard'>
292
+ <fetched>#{Date.today}</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&#8201;&#8212;&#8201;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='metanorma'>[1]</docidentifier>
301
+ <docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:en</docidentifier>
302
+ <docnumber>123</docnumber>
303
+ <date type='published'>
304
+ <on>2001-05</on>
305
+ </date>
306
+ <contributor>
307
+ <role type='publisher'/>
308
+ <organization>
309
+ <name>International Organization for Standardization</name>
310
+ <abbreviation>ISO</abbreviation>
311
+ <uri>www.iso.org</uri>
312
+ </organization>
313
+ </contributor>
314
+ <edition>3</edition>
315
+ <language>en</language>
316
+ <script>Latn</script>
317
+ <abstract format='text/plain' language='en' script='Latn'>
318
+ This International Standard specifies procedures for sampling natural
319
+ rubber latex concentrate and for sampling synthetic rubber latices and
320
+ artificial latices. It is also suitable for sampling rubber latex
321
+ contained in drums, tank cars or tanks. The procedures may also be
322
+ used for sampling plastics dispersions.
323
+ </abstract>
324
+ <status>
325
+ <stage>90</stage>
326
+ <substage>93</substage>
327
+ </status>
328
+ <copyright>
329
+ <from>2001</from>
330
+ <owner>
331
+ <organization>
332
+ <name>ISO</name>
333
+ </organization>
334
+ </owner>
335
+ </copyright>
336
+ <relation type='obsoletes'>
337
+ <bibitem type='standard'>
338
+ <formattedref format='text/plain'>ISO 123:1985</formattedref>
339
+ </bibitem>
340
+ </relation>
341
+ <place>Geneva</place>
342
+ </bibitem>
343
+ </references>
344
+ </bibliography>
345
+ </standard-document>
458
346
  OUTPUT
459
347
  end
460
348
  end
@@ -489,231 +377,119 @@ RSpec.describe Asciidoctor::Standoc do
489
377
  compris les éventuels amendements).
490
378
  </p>
491
379
  <bibitem id='iso123' type='standard'>
492
- <fetched>#{Date.today}</fetched>
493
- <title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc</title>
494
- <title type='title-main' format='text/plain' language='fr' script='Latn'chantillonnage</title>
495
- <title type='main' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc – Échantillonnage</title>
496
- <uri type='src'>https://www.iso.org/standard/23281.html</uri>
497
- <uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
498
- <uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
499
- <docidentifier type='ISO'>ISO 123 (all parts)</docidentifier>
500
- <docidentifier type='URN'>urn:iso:std:iso:123</docidentifier>
501
- <docnumber>123</docnumber>
502
- <date type='published'>
503
- <on>2001-05</on>
504
- </date>
505
- <contributor>
506
- <role type='publisher'/>
507
- <organization>
508
- <name>International Organization for Standardization</name>
509
- <abbreviation>ISO</abbreviation>
510
- <uri>www.iso.org</uri>
511
- </organization>
512
- </contributor>
513
- <edition>3</edition>
514
- <language>en</language>
515
- <language>fr</language>
516
- <script>Latn</script>
517
- <status>
518
- <stage>90</stage>
519
- <substage>93</substage>
520
- </status>
521
- <copyright>
522
- <from>2001</from>
523
- <owner>
524
- <organization>
525
- <name>ISO</name>
526
- </organization>
527
- </owner>
528
- </copyright>
529
- <relation type='obsoletes'>
530
- <bibitem type='standard'>
531
- <formattedref format='text/plain'>ISO 123:1985</formattedref>
532
- </bibitem>
533
- </relation>
534
- <relation type='instance'>
535
- <bibitem type='standard'>
536
- <fetched>#{Date.today}</fetched>
537
- <title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc</title>
538
- <title type='title-main' format='text/plain' language='fr' script='Latn'>Échantillonnage</title>
539
- <title type='main' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc — Échantillonnage</title>
540
- <uri type='src'>https://www.iso.org/standard/23281.html</uri>
541
- <uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
542
- <uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
543
- <docidentifier type='ISO'>ISO 123:2001</docidentifier>
544
- <docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:fr</docidentifier>
545
- <docnumber>123</docnumber>
546
- <date type='published'>
547
- <on>2001-05</on>
548
- </date>
549
- <contributor>
550
- <role type='publisher'/>
551
- <organization>
552
- <name>International Organization for Standardization</name>
553
- <abbreviation>ISO</abbreviation>
554
- <uri>www.iso.org</uri>
555
- </organization>
556
- </contributor>
557
- <edition>3</edition>
558
- <language>en</language>
559
- <language>fr</language>
560
- <script>Latn</script>
561
- <abstract format='text/plain' language='fr' script='Latn'>
562
- La présente Norme internationale spécifie des méthodes
563
- d’échantillonnage pour des concentrés de latex de
564
- caoutchoucnaturel et pour échantillonner des latex de caoutchouc
565
- synthétique et des latex artificiels. Elle s’applique égalementà
566
- l’échantillonnage de latex de caoutchouc contenus dans des fûts,
567
- citernes routières ou de stockage. Lemode opératoire peut aussi
568
- être utilisé pour l’échantillonnage de dispersions de plastiques.
569
- </abstract>
570
- <status>
571
- <stage>90</stage>
572
- <substage>93</substage>
573
- </status>
574
- <copyright>
575
- <from>2001</from>
576
- <owner>
577
- <organization>
578
- <name>ISO</name>
579
- </organization>
580
- </owner>
581
- </copyright>
582
- <relation type='obsoletes'>
583
- <bibitem type='standard'>
584
- <formattedref format='text/plain'>ISO 123:1985</formattedref>
585
- </bibitem>
586
- </relation>
587
- <place>Geneva</place>
588
- </bibitem>
589
- </relation>
590
- <relation type='instance'>
591
- <bibitem type='standard'>
592
- <formattedref format='text/plain'>ISO 123:1985</formattedref>
593
- </bibitem>
594
- </relation>
595
- <relation type='instance'>
596
- <bibitem type='standard'>
597
- <formattedref format='text/plain'>ISO 123:1974</formattedref>
598
- </bibitem>
599
- </relation>
600
- <place>Geneva</place>
601
- </bibitem>
602
- <bibitem id='iso124' type='standard'>
603
- <fetched>#{Date.today}</fetched>
604
- <title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc</title>
605
- <title type='title-main' format='text/plain' language='fr' script='Latn'>Échantillonnage</title>
606
- <title type='main' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc – Échantillonnage</title>
607
- <uri type='src'>https://www.iso.org/standard/23281.html</uri>
608
- <uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
609
- <uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
610
- <docidentifier type='ISO'>ISO 123 (all parts)</docidentifier>
611
- <docidentifier type='metanorma'>[1]</docidentifier>
612
- <docidentifier type='URN'>urn:iso:std:iso:123</docidentifier>
613
- <docnumber>123</docnumber>
614
- <date type='published'>
615
- <on>2001-05</on>
616
- </date>
617
- <contributor>
618
- <role type='publisher'/>
619
- <organization>
620
- <name>International Organization for Standardization</name>
621
- <abbreviation>ISO</abbreviation>
622
- <uri>www.iso.org</uri>
623
- </organization>
624
- </contributor>
625
- <edition>3</edition>
626
- <language>en</language>
627
- <language>fr</language>
628
- <script>Latn</script>
629
- <status>
630
- <stage>90</stage>
631
- <substage>93</substage>
632
- </status>
633
- <copyright>
634
- <from>2001</from>
635
- <owner>
636
- <organization>
637
- <name>ISO</name>
638
- </organization>
639
- </owner>
640
- </copyright>
641
- <relation type='obsoletes'>
642
- <bibitem type='standard'>
643
- <formattedref format='text/plain'>ISO 123:1985</formattedref>
644
- </bibitem>
645
- </relation>
646
- <relation type='instance'>
647
- <bibitem type='standard'>
648
- <fetched>#{Date.today}</fetched>
649
- <title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc</title>
650
- <title type='title-main' format='text/plain' language='fr' script='Latn'>Échantillonnage</title>
651
- <title type='main' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc — Échantillonnage</title>
652
- <uri type='src'>https://www.iso.org/standard/23281.html</uri>
653
- <uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
654
- <uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
655
- <docidentifier type='ISO'>ISO 123:2001</docidentifier>
656
- <docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:fr</docidentifier>
657
- <docnumber>123</docnumber>
658
- <date type='published'>
659
- <on>2001-05</on>
660
- </date>
661
- <contributor>
662
- <role type='publisher'/>
663
- <organization>
664
- <name>International Organization for Standardization</name>
665
- <abbreviation>ISO</abbreviation>
666
- <uri>www.iso.org</uri>
667
- </organization>
668
- </contributor>
669
- <edition>3</edition>
670
- <language>en</language>
671
- <language>fr</language>
672
- <script>Latn</script>
673
- <abstract format='text/plain' language='fr' script='Latn'>
674
- La présente Norme internationale spécifie des méthodes
675
- d’échantillonnage pour des concentrés de latex de
676
- caoutchoucnaturel et pour échantillonner des latex de caoutchouc
677
- synthétique et des latex artificiels. Elle s’applique égalementà
678
- l’échantillonnage de latex de caoutchouc contenus dans des fûts,
679
- citernes routières ou de stockage. Lemode opératoire peut aussi
680
- être utilisé pour l’échantillonnage de dispersions de plastiques.
681
- </abstract>
682
- <status>
683
- <stage>90</stage>
684
- <substage>93</substage>
685
- </status>
686
- <copyright>
687
- <from>2001</from>
688
- <owner>
689
- <organization>
690
- <name>ISO</name>
691
- </organization>
692
- </owner>
693
- </copyright>
694
- <relation type='obsoletes'>
695
- <bibitem type='standard'>
696
- <formattedref format='text/plain'>ISO 123:1985</formattedref>
697
- </bibitem>
698
- </relation>
699
- <place>Geneva</place>
700
- </bibitem>
701
- </relation>
702
- <relation type='instance'>
703
- <bibitem type='standard'>
704
- <formattedref format='text/plain'>ISO 123:1985</formattedref>
705
- </bibitem>
706
- </relation>
707
- <relation type='instance'>
708
- <bibitem type='standard'>
709
- <formattedref format='text/plain'>ISO 123:1974</formattedref>
710
- </bibitem>
711
- </relation>
712
- <place>Geneva</place>
713
- </bibitem>
714
- </references>
715
- </bibliography>
716
- </standard-document>
380
+ <fetched>#{Date.today}</fetched>
381
+ <title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc</title>
382
+ <title type='title-main' format='text/plain' language='fr' script='Latn'>&#201;chantillonnage</title>
383
+ <title type='main' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc&#8201;&#8212;&#8201;&#201;chantillonnage</title>
384
+ <uri type='src'>https://www.iso.org/standard/23281.html</uri>
385
+ <uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
386
+ <uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
387
+ <docidentifier type='ISO'>ISO 123:2001</docidentifier>
388
+ <docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:fr</docidentifier>
389
+ <docnumber>123</docnumber>
390
+ <date type='published'>
391
+ <on>2001-05</on>
392
+ </date>
393
+ <contributor>
394
+ <role type='publisher'/>
395
+ <organization>
396
+ <name>International Organization for Standardization</name>
397
+ <abbreviation>ISO</abbreviation>
398
+ <uri>www.iso.org</uri>
399
+ </organization>
400
+ </contributor>
401
+ <edition>3</edition>
402
+ <language>en</language>
403
+ <language>fr</language>
404
+ <script>Latn</script>
405
+ <abstract format='text/plain' language='fr' script='Latn'>
406
+ La pr&#233;sente Norme internationale sp&#233;cifie des m&#233;thodes
407
+ d&#8217;&#233;chantillonnage pour des concentr&#233;s de latex de
408
+ caoutchouc naturel et pour &#233;chantillonner des latex de caoutchouc
409
+ synth&#233;tique et des latex artificiels. Elle s&#8217;applique
410
+ &#233;galement &#224; l&#8217;&#233;chantillonnage de latex de
411
+ caoutchouc contenus dans des f&#251;ts, citernes routi&#232;res ou de
412
+ stockage. Le mode op&#233;ratoire peut aussi &#234;tre utilis&#233;
413
+ pour l&#8217;&#233;chantillonnage de dispersions de plastiques.
414
+ </abstract>
415
+ <status>
416
+ <stage>90</stage>
417
+ <substage>93</substage>
418
+ </status>
419
+ <copyright>
420
+ <from>2001</from>
421
+ <owner>
422
+ <organization>
423
+ <name>ISO</name>
424
+ </organization>
425
+ </owner>
426
+ </copyright>
427
+ <relation type='obsoletes'>
428
+ <bibitem type='standard'>
429
+ <formattedref format='text/plain'>ISO 123:1985</formattedref>
430
+ </bibitem>
431
+ </relation>
432
+ <place>Geneva</place>
433
+ </bibitem>
434
+ <bibitem id='iso124' type='standard'>
435
+ <fetched>#{Date.today}</fetched>
436
+ <title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc</title>
437
+ <title type='title-main' format='text/plain' language='fr' script='Latn'>&#201;chantillonnage</title>
438
+ <title type='main' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc&#8201;&#8212;&#8201;&#201;chantillonnage</title>
439
+ <uri type='src'>https://www.iso.org/standard/23281.html</uri>
440
+ <uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
441
+ <uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
442
+ <docidentifier type='ISO'>ISO 123:2001</docidentifier>
443
+ <docidentifier type='metanorma'>[1]</docidentifier>
444
+ <docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:fr</docidentifier>
445
+ <docnumber>123</docnumber>
446
+ <date type='published'>
447
+ <on>2001-05</on>
448
+ </date>
449
+ <contributor>
450
+ <role type='publisher'/>
451
+ <organization>
452
+ <name>International Organization for Standardization</name>
453
+ <abbreviation>ISO</abbreviation>
454
+ <uri>www.iso.org</uri>
455
+ </organization>
456
+ </contributor>
457
+ <edition>3</edition>
458
+ <language>en</language>
459
+ <language>fr</language>
460
+ <script>Latn</script>
461
+ <abstract format='text/plain' language='fr' script='Latn'>
462
+ La pr&#233;sente Norme internationale sp&#233;cifie des m&#233;thodes
463
+ d&#8217;&#233;chantillonnage pour des concentr&#233;s de latex de
464
+ caoutchouc naturel et pour &#233;chantillonner des latex de caoutchouc
465
+ synth&#233;tique et des latex artificiels. Elle s&#8217;applique
466
+ &#233;galement &#224; l&#8217;&#233;chantillonnage de latex de
467
+ caoutchouc contenus dans des f&#251;ts, citernes routi&#232;res ou de
468
+ stockage. Le mode op&#233;ratoire peut aussi &#234;tre utilis&#233;
469
+ pour l&#8217;&#233;chantillonnage de dispersions de plastiques.
470
+ </abstract>
471
+ <status>
472
+ <stage>90</stage>
473
+ <substage>93</substage>
474
+ </status>
475
+ <copyright>
476
+ <from>2001</from>
477
+ <owner>
478
+ <organization>
479
+ <name>ISO</name>
480
+ </organization>
481
+ </owner>
482
+ </copyright>
483
+ <relation type='obsoletes'>
484
+ <bibitem type='standard'>
485
+ <formattedref format='text/plain'>ISO 123:1985</formattedref>
486
+ </bibitem>
487
+ </relation>
488
+ <place>Geneva</place>
489
+ </bibitem>
490
+ </references>
491
+ </bibliography>
492
+ </standard-document>
717
493
  OUTPUT
718
494
  end
719
495
  end
@@ -975,7 +751,7 @@ RSpec.describe Asciidoctor::Standoc do
975
751
  end
976
752
 
977
753
  it "declines to fetch individual references" do
978
- VCR.use_cassette "dated_iso_ref_joint_iso_iec" do
754
+ VCR.use_cassette "dated_iso_ref_joint_iso_iec1" do
979
755
  expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
980
756
  #{ISOBIB_BLANK_HDR}
981
757
  [bibliography]