metanorma-standoc 1.11.0.1 → 1.11.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7cb09afdb6668a003d8ef2b58d6260631b7b8e068d3ca16baeee26535c8186d0
4
- data.tar.gz: 76b254bc985ef940d8224c85202f001cd8660a681386b8b1e774bde626314ff5
3
+ metadata.gz: 25f4c5a4250a14fb1499512d51f25cf8ea7b1cc6dc7da44560dc442342a54773
4
+ data.tar.gz: 10dd5ba69da52963c0e9310834212fc5e74743f660a4cf533efdd721037f5f5d
5
5
  SHA512:
6
- metadata.gz: 893626c5998b7853394c39a0e4249f1a11346d0beb5cc00a9f76edc8ce129cf591ba6819ed6974b34a115f89b82c64b8acccf3c2dfcd71dcb20226c90653e62a
7
- data.tar.gz: c10c585b0274e9be19b848c9dcc175a1ef9325ee0dc875bc1b1aafb057c3fcea1c235488c986093980bc5ce6710d293c053a68d3954aae40365def0071d244e6
6
+ metadata.gz: dbc30f8112130ea49edcfabf97fedc1d3934f41a09163369fb74ba754eb5d11e861e040df17b15e2f865b7f5bb43d8513a76f859bc192eb2f30f23e4dea67232
7
+ data.tar.gz: 2ce49c90d894757b2964c4922b702bfb54c24f5e8d53a530a399692f6003042d8c9d44f5ebbc57110d6c56bc3d18fc17650e2511c8b102e38dce2a0d7b85fd41
@@ -23,35 +23,46 @@ module Asciidoctor
23
23
  split_termdefinitions(xmldoc)
24
24
  end
25
25
 
26
+ TERMDEF_BLOCKS =
27
+ "./p | ./ol | ./dl | ./ul | ./figure | ./formula | ./table".freeze
28
+
26
29
  def generate_termdefinitions(xmldoc)
27
30
  xmldoc.xpath("//term[not(definition)]").each do |d|
28
- first_child = d.at("./p | ./figure | ./formula | ./table") || next
31
+ first_child = d.at(TERMDEF_BLOCKS) || next
29
32
  t = Nokogiri::XML::Element.new("definition", xmldoc)
30
33
  first_child.replace(t)
31
34
  t << first_child.remove
32
- d.xpath("./p | ./figure | ./formula | ./table").each { |n| t << n.remove }
35
+ d.xpath(TERMDEF_BLOCKS).each do |n|
36
+ t << n.remove
37
+ end
33
38
  end
34
39
  end
35
40
 
36
41
  def split_termdefinitions(xmldoc)
37
42
  xmldoc.xpath("//definition").each do |d|
38
- n = d.children.first.add_previous_sibling("<nonverbalrepresentation/>").first
43
+ n = d.children.first
44
+ .add_previous_sibling("<nonverbalrepresentation/>").first
39
45
  v = d.children.first.add_previous_sibling("<verbaldefinition/>").first
40
46
  nonverb = false
41
47
  d.elements.each do |e|
42
- case e.name
43
- when "nonverbalrepresentation", "verbaldefinition" then next
44
- when "figure", "table", "formula"
45
- n << e.remove
46
- nonverb = true
47
- when "termsource"
48
- (nonverb ? n : v) << e.remove
49
- else v << e.remove
50
- end
48
+ nonverb = split_termdefinitions1(e, n, v, nonverb)
51
49
  end
52
50
  end
53
51
  end
54
52
 
53
+ def split_termdefinitions1(elem, nonverbal, verbal, nonverb)
54
+ case elem.name
55
+ when "nonverbalrepresentation", "verbaldefinition" then return nonverb
56
+ when "figure", "table", "formula"
57
+ nonverbal << elem.remove
58
+ nonverb = true
59
+ when "termsource"
60
+ (nonverb ? nonverbal : verbal) << elem.remove
61
+ else verbal << elem.remove
62
+ end
63
+ nonverb
64
+ end
65
+
55
66
  def termdocsource_cleanup(xmldoc)
56
67
  f = xmldoc.at("//preface | //sections")
57
68
  xmldoc.xpath("//termdocsource").each { |s| f.previous = s.remove }
@@ -60,7 +71,7 @@ module Asciidoctor
60
71
  def term_children_cleanup(xmldoc)
61
72
  xmldoc.xpath("//terms[terms]").each { |t| t.name = "clause" }
62
73
  xmldoc.xpath("//term").each do |t|
63
- %w(termnote termexample termsource).each do |w|
74
+ %w(termnote termexample termsource term).each do |w|
64
75
  t.xpath("./#{w}").each { |n| t << n.remove }
65
76
  end
66
77
  end
@@ -76,9 +87,9 @@ module Asciidoctor
76
87
 
77
88
  def termnote_example_cleanup(xmldoc)
78
89
  %w(note example).each do |w|
79
- xmldoc.xpath("//term#{w}[not(ancestor::term)]").each do |x|
80
- x.name = w
81
- end
90
+ xmldoc.xpath("//term#{w}[not(ancestor::term)]").each do |x|
91
+ x.name = w
92
+ end
82
93
  end
83
94
  end
84
95
 
@@ -28,6 +28,7 @@ module Asciidoctor
28
28
  end
29
29
 
30
30
  # "abc<tag/>", def => "abc",<tag/> def
31
+ =begin
31
32
  def uninterrupt_quotes_around_xml(xmldoc)
32
33
  xmldoc.xpath("//*[following::text()[1]"\
33
34
  "[starts-with(., '\"') or starts-with(., \"'\")]]")
@@ -37,6 +38,28 @@ module Asciidoctor
37
38
  uninterrupt_quotes_around_xml1(x)
38
39
  end
39
40
  end
41
+ =end
42
+ =begin
43
+ def uninterrupt_quotes_around_xml(xmldoc)
44
+ xmldoc.traverse do |n|
45
+ next unless n.element? && n&.next&.text? &&
46
+ n.ancestors("pre, tt, sourcecode, stem, figure").empty?
47
+ next unless /^['"]/.match?(n.next.text)
48
+
49
+ uninterrupt_quotes_around_xml1(n)
50
+ end
51
+ end
52
+ =end
53
+ def uninterrupt_quotes_around_xml(xmldoc)
54
+ xmldoc.traverse do |n|
55
+ next unless n.text? && n&.previous&.element?
56
+ next unless /^['"]/.match?(n.text)
57
+ next unless n.previous.ancestors("pre, tt, sourcecode, stem, figure")
58
+ .empty?
59
+
60
+ uninterrupt_quotes_around_xml1(n.previous)
61
+ end
62
+ end
40
63
 
41
64
  def uninterrupt_quotes_around_xml1(elem)
42
65
  prev = elem.at(".//preceding::text()[1]") or return
@@ -2063,7 +2063,12 @@
2063
2063
  <define name="verbaldefinition">
2064
2064
  <element name="verbaldefinition">
2065
2065
  <oneOrMore>
2066
- <ref name="paragraph"/>
2066
+ <choice>
2067
+ <ref name="paragraph"/>
2068
+ <ref name="dl"/>
2069
+ <ref name="ol"/>
2070
+ <ref name="ul"/>
2071
+ </choice>
2067
2072
  </oneOrMore>
2068
2073
  <zeroOrMore>
2069
2074
  <ref name="termsource"/>
@@ -2163,6 +2168,12 @@
2163
2168
  <value>modified</value>
2164
2169
  </choice>
2165
2170
  </attribute>
2171
+ <attribute name="type">
2172
+ <choice>
2173
+ <value>authoritative</value>
2174
+ <value>lineage</value>
2175
+ </choice>
2176
+ </attribute>
2166
2177
  <ref name="origin"/>
2167
2178
  <optional>
2168
2179
  <ref name="modification"/>
@@ -14,11 +14,9 @@ module Asciidoctor
14
14
 
15
15
  def ul_li(xml_ul, item)
16
16
  xml_ul.li **ul_li_attrs(item) do |xml_li|
17
+ xml_li.p(**attr_code(id_attr(item))) { |t| t << item.text }
17
18
  if item.blocks?
18
- xml_li.p(**attr_code(id_attr(item))) { |t| t << item.text }
19
19
  xml_li << item.content
20
- else
21
- xml_li.p(**attr_code(id_attr(item))) { |p| p << item.text }
22
20
  end
23
21
  end
24
22
  end
@@ -161,7 +161,7 @@ module Asciidoctor
161
161
 
162
162
  def refitem1(xml, _item, match)
163
163
  code = analyse_ref_code(match[:code])
164
- unless code[:id] && code[:numeric] || code[:nofetch]
164
+ unless (code[:id] && code[:numeric]) || code[:nofetch]
165
165
  ref = fetch_ref(xml, code[:id],
166
166
  match.names.include?("year") ? match[:year] : nil,
167
167
  title: match[:text],
@@ -18,7 +18,7 @@ module Asciidoctor
18
18
  def sectiontype(node, level = true)
19
19
  ret = sectiontype1(node)
20
20
  ret1 = sectiontype_streamline(ret)
21
- return ret1 if "symbols and abbreviated terms" == ret1
21
+ return ret1 if ret1 == "symbols and abbreviated terms"
22
22
  return nil unless !level || node.level == 1
23
23
  return nil if @seen_headers.include? ret
24
24
 
@@ -49,7 +49,8 @@ module Asciidoctor
49
49
  script: node.attributes["script"],
50
50
  number: node.attributes["number"],
51
51
  type: node.attributes["type"],
52
- annex: (if (node.attr("style") == "appendix" || node.role == "appendix") &&
52
+ annex: (if (node.attr("style") == "appendix" ||
53
+ node.role == "appendix") &&
53
54
  node.level == 1
54
55
  true
55
56
  end),
@@ -84,13 +85,11 @@ module Asciidoctor
84
85
  else
85
86
  if @term_def then term_def_subclause_parse(a, xml, node)
86
87
  elsif @definitions then symbols_parse(a, xml, node)
87
- elsif @norm_ref then norm_ref_parse(a, xml, node)
88
- elsif @biblio then bibliography_parse(a, xml, node)
89
- elsif node.attr("style") == "bibliography" && sectiontype(node, false) == "normative references"
88
+ elsif @norm_ref ||
89
+ (node.attr("style") == "bibliography" &&
90
+ sectiontype(node, false) == "normative references")
90
91
  norm_ref_parse(a, xml, node)
91
- elsif node.attr("style") == "bibliography" && sectiontype(node, false) == "bibliography"
92
- bibliography_parse(a, xml, node)
93
- elsif node.attr("style") == "bibliography"
92
+ elsif @biblio || node.attr("style") == "bibliography"
94
93
  bibliography_parse(a, xml, node)
95
94
  elsif node.attr("style") == "abstract"
96
95
  abstract_parse(a, xml, node)
@@ -118,7 +117,9 @@ module Asciidoctor
118
117
  def preamble(node)
119
118
  noko do |xml|
120
119
  xml.foreword **attr_code(section_attributes(node)) do |xml_abstract|
121
- xml_abstract.title { |t| t << (node.blocks[0].title || @i18n.foreword) }
120
+ xml_abstract.title do |t|
121
+ t << (node.blocks[0].title || @i18n.foreword)
122
+ end
122
123
  content = node.content
123
124
  xml_abstract << content
124
125
  end
@@ -143,7 +144,7 @@ module Asciidoctor
143
144
  end
144
145
 
145
146
  def clause_parse(attrs, xml, node)
146
- attrs["inline-header".to_sym] = node.option? "inline-header"
147
+ attrs[:"inline-header"] = node.option? "inline-header"
147
148
  attrs[:bibitem] = true if node.option? "bibitem"
148
149
  attrs[:level] = node.attr("level")
149
150
  set_obligation(attrs, node)
@@ -154,7 +155,7 @@ module Asciidoctor
154
155
  end
155
156
 
156
157
  def annex_parse(attrs, xml, node)
157
- attrs["inline-header".to_sym] = node.option? "inline-header"
158
+ attrs[:"inline-header"] = node.option? "inline-header"
158
159
  set_obligation(attrs, node)
159
160
  xml.annex **attr_code(attrs) do |xml_section|
160
161
  xml_section.title { |name| name << node.title }
@@ -180,7 +181,7 @@ module Asciidoctor
180
181
 
181
182
  def acknowledgements_parse(attrs, xml, node)
182
183
  xml.acknowledgements **attr_code(attrs) do |xml_section|
183
- xml_section.title { |t| t << node.title || @i18n.acknowledgements }
184
+ xml_section.title { |t| (t << node.title) || @i18n.acknowledgements }
184
185
  content = node.content
185
186
  xml_section << content
186
187
  end
@@ -19,6 +19,6 @@ module Metanorma
19
19
  end
20
20
 
21
21
  module Standoc
22
- VERSION = "1.11.0.1".freeze
22
+ VERSION = "1.11.1".freeze
23
23
  end
24
24
  end
@@ -514,6 +514,59 @@ RSpec.describe Asciidoctor::Standoc do
514
514
  .to be_equivalent_to xmlpp(output)
515
515
  end
516
516
 
517
+ it "processes nested terms" do
518
+ input = <<~INPUT
519
+ #{ASCIIDOC_BLANK_HDR}
520
+ == Terms and Definitions
521
+
522
+ [.term]
523
+ === Term1
524
+
525
+ definition
526
+
527
+ NOTE: Note 1
528
+
529
+ ==== Term11
530
+ definition2
531
+
532
+ NOTE: Note 2
533
+ INPUT
534
+ output = <<~OUTPUT
535
+ #{BLANK_HDR}
536
+ <sections>
537
+ <clause id='_' obligation='normative'>
538
+ <title>Terms and definitions</title>
539
+ <p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
540
+ <terms id='_' obligation='normative'>
541
+ <title>Term1</title>
542
+ <p id='_'>definition</p>
543
+ <note id='_'>
544
+ <p id='_'>Note 1</p>
545
+ </note>
546
+ <term id='term-term11'>
547
+ <preferred>
548
+ <expression>
549
+ <name>Term11</name>
550
+ </expression>
551
+ </preferred>
552
+ <definition>
553
+ <verbaldefinition>
554
+ <p id='_'>definition2</p>
555
+ </verbaldefinition>
556
+ </definition>
557
+ <termnote id='_'>
558
+ <p id='_'>Note 2</p>
559
+ </termnote>
560
+ </term>
561
+ </terms>
562
+ </clause>
563
+ </sections>
564
+ </standard-document>
565
+ OUTPUT
566
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
567
+ .to be_equivalent_to xmlpp(output)
568
+ end
569
+
517
570
  it "processes notes" do
518
571
  input = <<~INPUT
519
572
  #{ASCIIDOC_BLANK_HDR}
@@ -579,7 +579,7 @@ RSpec.describe Asciidoctor::Standoc do
579
579
  <title>Normative references</title>
580
580
  #{NORM_REF_BOILERPLATE}
581
581
  <bibitem type="standard" id="IEC60050-102">
582
- <fetched>#{Date.today}</fetched>
582
+ <fetched/>
583
583
  <title type="title-main" format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary (IEV)</title>
584
584
  <title type="title-part" format="text/plain" language="en" script="Latn">Part 102: Mathematics — General concepts and linear algebra</title>
585
585
  <title type='main' format='text/plain' language='en' script='Latn'>International Electrotechnical Vocabulary (IEV) — Part 102: Mathematics — General concepts and linear algebra</title>
@@ -618,7 +618,7 @@ RSpec.describe Asciidoctor::Standoc do
618
618
  </copyright>
619
619
  <place>Geneva</place>
620
620
  </bibitem><bibitem type="standard" id="IEC60050-103">
621
- <fetched>#{Date.today}</fetched>
621
+ <fetched/>
622
622
  <title type="title-main" format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary (IEV)</title>
623
623
  <title type="title-part" format="text/plain" language="en" script="Latn">Part 103: Mathematics — Functions</title>
624
624
  <title type="main" format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary (IEV) — Part 103: Mathematics — Functions</title>
@@ -759,6 +759,17 @@ RSpec.describe Asciidoctor::Standoc do
759
759
  ++++
760
760
 
761
761
  This paragraph is extraneous
762
+
763
+ * This is a list
764
+
765
+ []
766
+ . This too is a list
767
+
768
+ []
769
+ This is:: another list
770
+
771
+
772
+ This is a concluding paragraph
762
773
  INPUT
763
774
  output = <<~OUTPUT
764
775
  #{BLANK_HDR}
@@ -775,7 +786,26 @@ RSpec.describe Asciidoctor::Standoc do
775
786
  </mrow>
776
787
  </msub></math></stem></name></letter-symbol></preferred>
777
788
  <definition>
778
- <verbaldefinition><p id="_">This paragraph is extraneous</p></verbaldefinition>
789
+ <verbaldefinition>
790
+ <p id="_">This paragraph is extraneous</p>
791
+ <ul id='_'>
792
+ <li>
793
+ <p id='_'>This is a list</p>
794
+ </li>
795
+ </ul>
796
+ <ol id='_' type='arabic'>
797
+ <li>
798
+ <p id='_'>This too is a list</p>
799
+ </li>
800
+ </ol>
801
+ <dl id='_'>
802
+ <dt>This is</dt>
803
+ <dd>
804
+ <p id='_'>another list</p>
805
+ </dd>
806
+ </dl>
807
+ <p id='_'>This is a concluding paragraph</p>
808
+ </verbaldefinition>
779
809
  <nonverbalrepresentation><formula id="_">
780
810
  <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub>
781
811
  <mrow>
@@ -42,7 +42,7 @@ RSpec.describe Asciidoctor::Standoc do
42
42
  <title>Normative references</title>
43
43
  #{NORM_REF_BOILERPLATE}
44
44
  <bibitem id="iso123" type="standard">
45
- <fetched>#{Date.today}</fetched>
45
+ <fetched/>
46
46
  <title type='title-main' format='text/plain'>Standard</title>
47
47
  <title type='main' format='text/plain'>Standard</title>
48
48
  <docidentifier type="ISO">ISO 123</docidentifier>
@@ -304,7 +304,7 @@ formattedref::
304
304
  <title>Normative references</title>
305
305
  #{NORM_REF_BOILERPLATE}
306
306
  <bibitem id="ISOTC211" type="standard">
307
- <fetched>2019-06-30</fetched>
307
+ <fetched/>
308
308
  <title type="main" format="text/plain">Geographic information</title>
309
309
  <title type="subtitle" format="text/plain" language="en" script="Latn">Geographic information subtitle</title>
310
310
  <title type='title-main' format='text/plain'>Other Title</title>
@@ -624,7 +624,7 @@ series.formattedref.script:: Latn
624
624
  <title>Normative references</title>
625
625
  #{NORM_REF_BOILERPLATE}
626
626
  <bibitem id="ISOTC211" type="standard">
627
- <fetched>2019-06-30</fetched>
627
+ <fetched/>
628
628
  <title type="main" format="text/plain">Geographic information</title>
629
629
  <title type="subtitle" format="text/plain" language="en" script="Latn">Geographic information subtitle</title>
630
630
  <uri type="src">https://www.iso.org/standard/53798.html</uri>
@@ -827,7 +827,7 @@ OUTPUT
827
827
  <docidentifier>B</docidentifier>
828
828
  </bibitem>
829
829
  <bibitem id='iso123' type='standard'>
830
- <fetched>#{Date.today.to_s}</fetched>
830
+ <fetched/>
831
831
  <title type='title-main' format='text/plain'>Standard</title>
832
832
  <title type='main' format='text/plain'>Standard</title>
833
833
  <docidentifier type='ISO'>ISO 123</docidentifier>
@@ -237,20 +237,17 @@ RSpec.describe Asciidoctor::Standoc do
237
237
 
238
238
  </sections><bibliography><references id="_" obligation="informative" normative="true"><title>Normative references</title>
239
239
  #{NORM_REF_BOILERPLATE}
240
- <bibitem id='iso123' type='standard'>
241
- <fetched>#{Date.today}</fetched>
242
- <title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
240
+ <bibitem id='iso123' type='standard'>
241
+ <fetched/>
242
+ <title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
243
243
  <title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
244
244
  <title type='main' format='text/plain' language='en' script='Latn'>Rubber latex&#8201;&#8212;&#8201;Sampling</title>
245
245
  <uri type='src'>https://www.iso.org/standard/23281.html</uri>
246
246
  <uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
247
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>
248
+ <docidentifier type='ISO'>ISO 123</docidentifier>
249
249
  <docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:en</docidentifier>
250
250
  <docnumber>123</docnumber>
251
- <date type='published'>
252
- <on>2001-05</on>
253
- </date>
254
251
  <contributor>
255
252
  <role type='publisher'/>
256
253
  <organization>
@@ -262,13 +259,6 @@ RSpec.describe Asciidoctor::Standoc do
262
259
  <edition>3</edition>
263
260
  <language>en</language>
264
261
  <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
262
  <status>
273
263
  <stage>90</stage>
274
264
  <substage>93</substage>
@@ -286,23 +276,73 @@ RSpec.describe Asciidoctor::Standoc do
286
276
  <formattedref format='text/plain'>ISO 123:1985</formattedref>
287
277
  </bibitem>
288
278
  </relation>
279
+ <relation type='instance'>
280
+ <bibitem type='standard'>
281
+ <fetched/>
282
+ <title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
283
+ <title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
284
+ <title type='main' format='text/plain' language='en' script='Latn'>Rubber latex&#8201;&#8212;&#8201;Sampling</title>
285
+ <uri type='src'>https://www.iso.org/standard/23281.html</uri>
286
+ <uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
287
+ <uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
288
+ <docidentifier type='ISO'>ISO 123:2001</docidentifier>
289
+ <docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:en</docidentifier>
290
+ <docnumber>123</docnumber>
291
+ <date type='published'>
292
+ <on>2001-05</on>
293
+ </date>
294
+ <contributor>
295
+ <role type='publisher'/>
296
+ <organization>
297
+ <name>International Organization for Standardization</name>
298
+ <abbreviation>ISO</abbreviation>
299
+ <uri>www.iso.org</uri>
300
+ </organization>
301
+ </contributor>
302
+ <edition>3</edition>
303
+ <language>en</language>
304
+ <script>Latn</script>
305
+ <abstract format='text/plain' language='en' script='Latn'>
306
+ This International Standard specifies procedures for sampling
307
+ natural rubber latex concentrate and for sampling synthetic rubber
308
+ latices and artificial latices. It is also suitable for sampling
309
+ rubber latex contained in drums, tank cars or tanks. The
310
+ procedures may also be used for sampling plastics dispersions.
311
+ </abstract>
312
+ <status>
313
+ <stage>90</stage>
314
+ <substage>93</substage>
315
+ </status>
316
+ <copyright>
317
+ <from>2001</from>
318
+ <owner>
319
+ <organization>
320
+ <name>ISO</name>
321
+ </organization>
322
+ </owner>
323
+ </copyright>
324
+ <relation type='obsoletes'>
325
+ <bibitem type='standard'>
326
+ <formattedref format='text/plain'>ISO 123:1985</formattedref>
327
+ </bibitem>
328
+ </relation>
329
+ <place>Geneva</place>
330
+ </bibitem>
331
+ </relation>
289
332
  <place>Geneva</place>
290
333
  </bibitem>
291
334
  <bibitem id='iso124' type='standard'>
292
- <fetched>#{Date.today}</fetched>
335
+ <fetched/>
293
336
  <title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
294
337
  <title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
295
338
  <title type='main' format='text/plain' language='en' script='Latn'>Rubber latex&#8201;&#8212;&#8201;Sampling</title>
296
339
  <uri type='src'>https://www.iso.org/standard/23281.html</uri>
297
340
  <uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
298
341
  <uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
299
- <docidentifier type='ISO'>ISO 123:2001</docidentifier>
342
+ <docidentifier type='ISO'>ISO 123</docidentifier>
300
343
  <docidentifier type='metanorma'>[1]</docidentifier>
301
344
  <docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:en</docidentifier>
302
345
  <docnumber>123</docnumber>
303
- <date type='published'>
304
- <on>2001-05</on>
305
- </date>
306
346
  <contributor>
307
347
  <role type='publisher'/>
308
348
  <organization>
@@ -314,13 +354,6 @@ RSpec.describe Asciidoctor::Standoc do
314
354
  <edition>3</edition>
315
355
  <language>en</language>
316
356
  <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
357
  <status>
325
358
  <stage>90</stage>
326
359
  <substage>93</substage>
@@ -338,6 +371,59 @@ RSpec.describe Asciidoctor::Standoc do
338
371
  <formattedref format='text/plain'>ISO 123:1985</formattedref>
339
372
  </bibitem>
340
373
  </relation>
374
+ <relation type='instance'>
375
+ <bibitem type='standard'>
376
+ <fetched/>
377
+ <title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
378
+ <title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
379
+ <title type='main' format='text/plain' language='en' script='Latn'>Rubber latex&#8201;&#8212;&#8201;Sampling</title>
380
+ <uri type='src'>https://www.iso.org/standard/23281.html</uri>
381
+ <uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
382
+ <uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
383
+ <docidentifier type='ISO'>ISO 123:2001</docidentifier>
384
+ <docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:en</docidentifier>
385
+ <docnumber>123</docnumber>
386
+ <date type='published'>
387
+ <on>2001-05</on>
388
+ </date>
389
+ <contributor>
390
+ <role type='publisher'/>
391
+ <organization>
392
+ <name>International Organization for Standardization</name>
393
+ <abbreviation>ISO</abbreviation>
394
+ <uri>www.iso.org</uri>
395
+ </organization>
396
+ </contributor>
397
+ <edition>3</edition>
398
+ <language>en</language>
399
+ <script>Latn</script>
400
+ <abstract format='text/plain' language='en' script='Latn'>
401
+ This International Standard specifies procedures for sampling
402
+ natural rubber latex concentrate and for sampling synthetic rubber
403
+ latices and artificial latices. It is also suitable for sampling
404
+ rubber latex contained in drums, tank cars or tanks. The
405
+ procedures may also be used for sampling plastics dispersions.
406
+ </abstract>
407
+ <status>
408
+ <stage>90</stage>
409
+ <substage>93</substage>
410
+ </status>
411
+ <copyright>
412
+ <from>2001</from>
413
+ <owner>
414
+ <organization>
415
+ <name>ISO</name>
416
+ </organization>
417
+ </owner>
418
+ </copyright>
419
+ <relation type='obsoletes'>
420
+ <bibitem type='standard'>
421
+ <formattedref format='text/plain'>ISO 123:1985</formattedref>
422
+ </bibitem>
423
+ </relation>
424
+ <place>Geneva</place>
425
+ </bibitem>
426
+ </relation>
341
427
  <place>Geneva</place>
342
428
  </bibitem>
343
429
  </references>
@@ -365,31 +451,30 @@ RSpec.describe Asciidoctor::Standoc do
365
451
  * [[[iso124,(1)ISO 123]]] _Standard_
366
452
  INPUT
367
453
  #{BLANK_HDR.sub(%r{<language>en</language>}, '<language>fr</language>')}
368
- <sections>
369
- </sections><bibliography>
370
- <references id='_' normative='true' obligation='informative'>
371
- <title>Références normatives</title>
372
- <p id='_'>
373
- Les documents suivants cités dans le texte constituent, pour tout ou
374
- partie de leur contenu, des exigences du présent document. Pour les
375
- références datées, seule l’édition citée s’applique. Pour les références
376
- non datées, la dernière édition du document de référence s’applique (y
377
- compris les éventuels amendements).
378
- </p>
379
- <bibitem id='iso123' type='standard'>
380
- <fetched>#{Date.today}</fetched>
381
- <title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc</title>
454
+ <sections> </sections>
455
+ <bibliography>
456
+ <references id='_' normative='true' obligation='informative'>
457
+ <title>R&#233;f&#233;rences normatives</title>
458
+ <p id='_'>
459
+ Les documents suivants cit&#233;s dans le texte constituent, pour tout
460
+ ou partie de leur contenu, des exigences du pr&#233;sent document. Pour
461
+ les r&#233;f&#233;rences dat&#233;es, seule l&#8217;&#233;dition
462
+ cit&#233;e s&#8217;applique. Pour les r&#233;f&#233;rences non
463
+ dat&#233;es, la derni&#232;re &#233;dition du document de
464
+ r&#233;f&#233;rence s&#8217;applique (y compris les &#233;ventuels
465
+ amendements).
466
+ </p>
467
+ <bibitem id='iso123' type='standard'>
468
+ <fetched/>
469
+ <title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc</title>
382
470
  <title type='title-main' format='text/plain' language='fr' script='Latn'>&#201;chantillonnage</title>
383
471
  <title type='main' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc&#8201;&#8212;&#8201;&#201;chantillonnage</title>
384
472
  <uri type='src'>https://www.iso.org/standard/23281.html</uri>
385
473
  <uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
386
474
  <uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
387
- <docidentifier type='ISO'>ISO 123:2001</docidentifier>
475
+ <docidentifier type='ISO'>ISO 123</docidentifier>
388
476
  <docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:fr</docidentifier>
389
477
  <docnumber>123</docnumber>
390
- <date type='published'>
391
- <on>2001-05</on>
392
- </date>
393
478
  <contributor>
394
479
  <role type='publisher'/>
395
480
  <organization>
@@ -402,16 +487,6 @@ RSpec.describe Asciidoctor::Standoc do
402
487
  <language>en</language>
403
488
  <language>fr</language>
404
489
  <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
490
  <status>
416
491
  <stage>90</stage>
417
492
  <substage>93</substage>
@@ -429,23 +504,78 @@ RSpec.describe Asciidoctor::Standoc do
429
504
  <formattedref format='text/plain'>ISO 123:1985</formattedref>
430
505
  </bibitem>
431
506
  </relation>
507
+ <relation type='instance'>
508
+ <bibitem type='standard'>
509
+ <fetched/>
510
+ <title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc</title>
511
+ <title type='title-main' format='text/plain' language='fr' script='Latn'>&#201;chantillonnage</title>
512
+ <title type='main' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc&#8201;&#8212;&#8201;&#201;chantillonnage</title>
513
+ <uri type='src'>https://www.iso.org/standard/23281.html</uri>
514
+ <uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
515
+ <uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
516
+ <docidentifier type='ISO'>ISO 123:2001</docidentifier>
517
+ <docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:fr</docidentifier>
518
+ <docnumber>123</docnumber>
519
+ <date type='published'>
520
+ <on>2001-05</on>
521
+ </date>
522
+ <contributor>
523
+ <role type='publisher'/>
524
+ <organization>
525
+ <name>International Organization for Standardization</name>
526
+ <abbreviation>ISO</abbreviation>
527
+ <uri>www.iso.org</uri>
528
+ </organization>
529
+ </contributor>
530
+ <edition>3</edition>
531
+ <language>en</language>
532
+ <language>fr</language>
533
+ <script>Latn</script>
534
+ <abstract format='text/plain' language='fr' script='Latn'>
535
+ La pr&#233;sente Norme internationale sp&#233;cifie des
536
+ m&#233;thodes d&#8217;&#233;chantillonnage pour des
537
+ concentr&#233;s de latex de caoutchouc naturel et pour
538
+ &#233;chantillonner des latex de caoutchouc synth&#233;tique et
539
+ des latex artificiels. Elle s&#8217;applique &#233;galement &#224;
540
+ l&#8217;&#233;chantillonnage de latex de caoutchouc contenus dans
541
+ des f&#251;ts, citernes routi&#232;res ou de stockage. Le mode
542
+ op&#233;ratoire peut aussi &#234;tre utilis&#233; pour
543
+ l&#8217;&#233;chantillonnage de dispersions de plastiques.
544
+ </abstract>
545
+ <status>
546
+ <stage>90</stage>
547
+ <substage>93</substage>
548
+ </status>
549
+ <copyright>
550
+ <from>2001</from>
551
+ <owner>
552
+ <organization>
553
+ <name>ISO</name>
554
+ </organization>
555
+ </owner>
556
+ </copyright>
557
+ <relation type='obsoletes'>
558
+ <bibitem type='standard'>
559
+ <formattedref format='text/plain'>ISO 123:1985</formattedref>
560
+ </bibitem>
561
+ </relation>
562
+ <place>Geneva</place>
563
+ </bibitem>
564
+ </relation>
432
565
  <place>Geneva</place>
433
566
  </bibitem>
434
567
  <bibitem id='iso124' type='standard'>
435
- <fetched>#{Date.today}</fetched>
568
+ <fetched/>
436
569
  <title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc</title>
437
570
  <title type='title-main' format='text/plain' language='fr' script='Latn'>&#201;chantillonnage</title>
438
571
  <title type='main' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc&#8201;&#8212;&#8201;&#201;chantillonnage</title>
439
572
  <uri type='src'>https://www.iso.org/standard/23281.html</uri>
440
573
  <uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
441
574
  <uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
442
- <docidentifier type='ISO'>ISO 123:2001</docidentifier>
575
+ <docidentifier type='ISO'>ISO 123</docidentifier>
443
576
  <docidentifier type='metanorma'>[1]</docidentifier>
444
577
  <docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:fr</docidentifier>
445
578
  <docnumber>123</docnumber>
446
- <date type='published'>
447
- <on>2001-05</on>
448
- </date>
449
579
  <contributor>
450
580
  <role type='publisher'/>
451
581
  <organization>
@@ -458,16 +588,6 @@ RSpec.describe Asciidoctor::Standoc do
458
588
  <language>en</language>
459
589
  <language>fr</language>
460
590
  <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
591
  <status>
472
592
  <stage>90</stage>
473
593
  <substage>93</substage>
@@ -485,6 +605,64 @@ RSpec.describe Asciidoctor::Standoc do
485
605
  <formattedref format='text/plain'>ISO 123:1985</formattedref>
486
606
  </bibitem>
487
607
  </relation>
608
+ <relation type='instance'>
609
+ <bibitem type='standard'>
610
+ <fetched/>
611
+ <title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc</title>
612
+ <title type='title-main' format='text/plain' language='fr' script='Latn'>&#201;chantillonnage</title>
613
+ <title type='main' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc&#8201;&#8212;&#8201;&#201;chantillonnage</title>
614
+ <uri type='src'>https://www.iso.org/standard/23281.html</uri>
615
+ <uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
616
+ <uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
617
+ <docidentifier type='ISO'>ISO 123:2001</docidentifier>
618
+ <docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:fr</docidentifier>
619
+ <docnumber>123</docnumber>
620
+ <date type='published'>
621
+ <on>2001-05</on>
622
+ </date>
623
+ <contributor>
624
+ <role type='publisher'/>
625
+ <organization>
626
+ <name>International Organization for Standardization</name>
627
+ <abbreviation>ISO</abbreviation>
628
+ <uri>www.iso.org</uri>
629
+ </organization>
630
+ </contributor>
631
+ <edition>3</edition>
632
+ <language>en</language>
633
+ <language>fr</language>
634
+ <script>Latn</script>
635
+ <abstract format='text/plain' language='fr' script='Latn'>
636
+ La pr&#233;sente Norme internationale sp&#233;cifie des
637
+ m&#233;thodes d&#8217;&#233;chantillonnage pour des
638
+ concentr&#233;s de latex de caoutchouc naturel et pour
639
+ &#233;chantillonner des latex de caoutchouc synth&#233;tique et
640
+ des latex artificiels. Elle s&#8217;applique &#233;galement &#224;
641
+ l&#8217;&#233;chantillonnage de latex de caoutchouc contenus dans
642
+ des f&#251;ts, citernes routi&#232;res ou de stockage. Le mode
643
+ op&#233;ratoire peut aussi &#234;tre utilis&#233; pour
644
+ l&#8217;&#233;chantillonnage de dispersions de plastiques.
645
+ </abstract>
646
+ <status>
647
+ <stage>90</stage>
648
+ <substage>93</substage>
649
+ </status>
650
+ <copyright>
651
+ <from>2001</from>
652
+ <owner>
653
+ <organization>
654
+ <name>ISO</name>
655
+ </organization>
656
+ </owner>
657
+ </copyright>
658
+ <relation type='obsoletes'>
659
+ <bibitem type='standard'>
660
+ <formattedref format='text/plain'>ISO 123:1985</formattedref>
661
+ </bibitem>
662
+ </relation>
663
+ <place>Geneva</place>
664
+ </bibitem>
665
+ </relation>
488
666
  <place>Geneva</place>
489
667
  </bibitem>
490
668
  </references>
@@ -558,7 +736,7 @@ RSpec.describe Asciidoctor::Standoc do
558
736
  <title>Normative references</title>
559
737
  #{NORM_REF_BOILERPLATE}
560
738
  <bibitem type="standard" id="iso123">
561
- <fetched>#{Date.today}</fetched>
739
+ <fetched/>
562
740
  <title type="title-main" format="text/plain" language="en" script="Latn">Permuted index of the vocabulary of information technology</title>
563
741
  <title type="main" format="text/plain" language="en" script="Latn">Permuted index of the vocabulary of information technology</title>
564
742
  <uri type="src">https://www.iso.org/standard/21071.html</uri>
@@ -605,7 +783,7 @@ RSpec.describe Asciidoctor::Standoc do
605
783
  <place>Geneva</place>
606
784
  </bibitem>
607
785
  <bibitem id="iso124" type="standard">
608
- <fetched>#{Date.today}</fetched>
786
+ <fetched/>
609
787
  <title type="title-intro" format="text/plain" language="en" script="Latn">Latex, rubber</title>
610
788
  <title type="title-main" format="text/plain" language="en" script="Latn">Determination of total solids content</title>
611
789
  <title type='main' format='text/plain' language='en' script='Latn'>Latex, rubber — Determination of total solids content</title>
@@ -650,7 +828,7 @@ RSpec.describe Asciidoctor::Standoc do
650
828
  <place>Geneva</place>
651
829
  </bibitem>
652
830
  <bibitem id="iso125" type="standard">
653
- <fetched>#{Date.today}</fetched>
831
+ <fetched/>
654
832
  <title type="title-main" format="text/plain" language="en" script="Latn">Permuted index of the vocabulary of information technology</title>
655
833
  <title type='main' format='text/plain' language='en' script='Latn'>Permuted index of the vocabulary of information technology</title>
656
834
  <uri type="src">https://www.iso.org/standard/21071.html</uri>
@@ -698,7 +876,7 @@ RSpec.describe Asciidoctor::Standoc do
698
876
  <place>Geneva</place>
699
877
  </bibitem>
700
878
  <bibitem id="iso126" type="standard">
701
- <fetched>#{Date.today}</fetched>
879
+ <fetched/>
702
880
  <title type="title-intro" format="text/plain" language="en" script="Latn">Latex, rubber</title>
703
881
  <title type="title-main" format="text/plain" language="en" script="Latn">Determination of total solids content</title>
704
882
  <title type='main' format='text/plain' language='en' script='Latn'>Latex, rubber — Determination of total solids content</title>
@@ -774,7 +952,7 @@ RSpec.describe Asciidoctor::Standoc do
774
952
  <docnumber>12382:1992</docnumber>
775
953
  </bibitem>
776
954
  <bibitem id='iso124' type='standard'>
777
- <fetched>#{Date.today}</fetched>
955
+ <fetched/>
778
956
  <title type='title-intro' format='text/plain' language='en' script='Latn'>Latex, rubber</title>
779
957
  <title type='title-main' format='text/plain' language='en' script='Latn'>Determination of total solids content</title>
780
958
  <title type='main' format='text/plain' language='en' script='Latn'>Latex, rubber — Determination of total solids content</title>
@@ -990,7 +1168,7 @@ RSpec.describe Asciidoctor::Standoc do
990
1168
  <title>Normative references</title>
991
1169
  #{NORM_REF_BOILERPLATE}
992
1170
  <bibitem id='iso123' type='standard'>
993
- <fetched>#{Date.today}</fetched>
1171
+ <fetched/>
994
1172
  <title format='text/plain' language='en' script='Latn'>Network Configuration Access Control Model</title>
995
1173
  <uri type='xml'>
996
1174
  https://raw.githubusercontent.com/relaton/relaton-data-ietf/master/data/reference.RFC.8341.xml
@@ -1051,7 +1229,7 @@ RSpec.describe Asciidoctor::Standoc do
1051
1229
  <place>Fremont, CA</place>
1052
1230
  </bibitem>
1053
1231
  <bibitem id='iso124' type='standard'>
1054
- <fetched>#{Date.today}</fetched>
1232
+ <fetched/>
1055
1233
  <title format='text/plain' language='en' script='Latn'>Network Configuration Access Control Model</title>
1056
1234
  <uri type='xml'>
1057
1235
  https://raw.githubusercontent.com/relaton/relaton-data-ietf/master/data/reference.RFC.8341.xml
@@ -1403,7 +1581,7 @@ RSpec.describe Asciidoctor::Standoc do
1403
1581
  amendments) applies.
1404
1582
  </p>
1405
1583
  <bibitem id='iso123' type='standard'>
1406
- <fetched>2020-06-12</fetched>
1584
+ <fetched/>
1407
1585
  <title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
1408
1586
  <title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
1409
1587
  <title type='main' format='text/plain' language='en' script='Latn'>Rubber latex – Sampling</title>
@@ -1450,7 +1628,7 @@ RSpec.describe Asciidoctor::Standoc do
1450
1628
  </relation>
1451
1629
  <relation type='instance'>
1452
1630
  <bibitem type='standard'>
1453
- <fetched>2020-06-12</fetched>
1631
+ <fetched/>
1454
1632
  <title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
1455
1633
  <title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
1456
1634
  <title type='main' format='text/plain' language='en' script='Latn'>Rubber latex – Sampling</title>
data/spec/spec_helper.rb CHANGED
@@ -61,7 +61,8 @@ def xmlpp(xml)
61
61
  s = ""
62
62
  f = REXML::Formatters::Pretty.new(2)
63
63
  f.compact = true
64
- f.write(REXML::Document.new(xml), s)
64
+ f.write(REXML::Document.new(xml
65
+ .gsub(%r{<fetched>[^<]+</fetched>}, "<fetched/>")), s)
65
66
  s
66
67
  end
67
68
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-standoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.0.1
4
+ version: 1.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-26 00:00:00.000000000 Z
11
+ date: 2021-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor