asciidoctor-iso 0.9.3 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,24 +1,28 @@
1
1
  module Asciidoctor
2
2
  module ISO
3
3
  module Cleanup
4
- # currently references cannot contain commas!
5
4
  # extending localities to cover ISO referencing
6
5
  LOCALITY_REGEX_STR = <<~REGEXP.freeze
7
6
  ^((?<locality>section|clause|part|paragraph|chapter|page|
8
7
  table|annex|figure|example|note|formula|
9
8
  locality:[^ \\t\\n\\r:,]+)(\\s+|=)
10
- (?<ref>[^ \\t\\n,:-]+)(-(?<to>[^ \\t\\n,:-]+))?|
9
+ (?<ref>[^"][^ \\t\\n,:-]*|"[^"]+")
10
+ (-(?<to>[^"][^ \\t\\n,:-]*|"[^"]"))?|
11
11
  (?<locality2>whole|locality:[^ \\t\\n\\r:,]+))[,:]?\\s*
12
12
  (?<text>.*)$
13
13
  REGEXP
14
14
  LOCALITY_RE = Regexp.new(LOCALITY_REGEX_STR.gsub(/\s/, ""),
15
15
  Regexp::IGNORECASE | Regexp::MULTILINE)
16
16
 
17
+ def tq(x)
18
+ x.sub(/^"/, "").sub(/"$/, "")
19
+ end
20
+
17
21
  def extract_localities(x)
18
22
  text = x.children.first.remove.text
19
23
  while (m = LOCALITY_RE.match text)
20
- ref = m[:ref] ? "<referenceFrom>#{m[:ref]}</referenceFrom>" : ""
21
- refto = m[:to] ? "<referenceTo>#{m[:to]}</referenceTo>" : ""
24
+ ref = m[:ref] ? "<referenceFrom>#{tq m[:ref]}</referenceFrom>" : ""
25
+ refto = m[:to] ? "<referenceTo>#{tq m[:to]}</referenceTo>" : ""
22
26
  loc = m[:locality]&.downcase || m[:locality2]&.downcase
23
27
  x.add_child("<locality type='#{loc}'>#{ref}#{refto}</locality>")
24
28
  text = m[:text]
@@ -998,7 +998,7 @@
998
998
  <ref name="formattedref"/>
999
999
  </optional>
1000
1000
  <zeroOrMore>
1001
- <ref name="source"/>
1001
+ <ref name="bsource"/>
1002
1002
  </zeroOrMore>
1003
1003
  <zeroOrMore>
1004
1004
  <ref name="docidentifier"/>
@@ -804,7 +804,7 @@
804
804
  <data type="int"/>
805
805
  </attribute>
806
806
  </optional>
807
- <data type="int"/>
807
+ <text/>
808
808
  </element>
809
809
  </define>
810
810
  <define name="tc-documentnumber">
@@ -1,5 +1,4 @@
1
1
  require "pp"
2
- require "isobib"
3
2
 
4
3
  module Asciidoctor
5
4
  module ISO
@@ -1,5 +1,4 @@
1
1
  require "pp"
2
- require "isobib"
3
2
 
4
3
  module Asciidoctor
5
4
  module ISO
@@ -35,7 +34,7 @@ module Asciidoctor
35
34
  end
36
35
 
37
36
  def use_my_anchor(ref, id)
38
- ref.parent.children.last["id"] = id
37
+ ref.parent.elements.last["id"] = id
39
38
  ref
40
39
  end
41
40
 
@@ -67,51 +66,21 @@ module Asciidoctor
67
66
  end
68
67
 
69
68
  def isorefmatches3(xml, m)
70
- ref = fetch_ref xml, m[:code], m[:year], all_parts: true
69
+ hasyr = m.named_captures.has_key?("year")
70
+ ref = fetch_ref xml, m[:code], hasyr ? m[:year] : nil, all_parts: true
71
71
  return use_my_anchor(ref, m[:anchor]) if ref
72
72
  xml.bibitem(**attr_code(ref_attributes(m))) do |t|
73
73
  t.title(**plaintxt) { |i| i << ref_normalise(m[:text]) }
74
74
  t.docidentifier "#{m[:code]}"
75
- if m.named_captures.has_key?("year")
75
+ hasyr and
76
76
  t.date(**{ type: "published" }) { |d| set_date_range(d, m[:year]) }
77
- end
78
77
  iso_publisher(t, m[:code])
79
78
  t.allParts "true"
80
79
  end
81
80
  end
82
81
 
83
- def iso_id(code, year, all_parts)
84
- ret = code
85
- ret += ":#{year}" if year
86
- ret += " (all parts)" if all_parts
87
- ret
88
- end
89
-
90
- # => , because the hash is imported from JSON
91
- def new_bibcache_entry(code, year, opts)
92
- { "fetched" => Date.today,
93
- "bib" => Isobib::IsoBibliography.get(code, year, opts) }
94
- end
95
-
96
- # if cached reference is undated, expire it after 60 days
97
- def is_valid_bibcache_entry?(x, year)
98
- x && x.is_a?(Hash) && x&.has_key?("bib") && x&.has_key?("fetched") &&
99
- (year || Date.today - Date.iso8601(x["fetched"]) < 60)
100
- end
101
-
102
- def check_bibliocache(code, year, opts)
103
- id = iso_id(code, year, opts[:all_parts])
104
- return nil if @bibdb.nil? # signals we will not be using isobib
105
- @bibdb[id] = nil unless is_valid_bibcache_entry?(@bibdb[id], year)
106
- @bibdb[id] ||= new_bibcache_entry(code, year, opts)
107
- @local_bibdb[id] = @bibdb[id] if !@local_bibdb.nil? &&
108
- !is_valid_bibcache_entry?(@local_bibdb[id], year)
109
- return @local_bibdb[id]["bib"] unless @local_bibdb.nil?
110
- @bibdb[id]["bib"]
111
- end
112
-
113
82
  def fetch_ref(xml, code, year, **opts)
114
- hit = check_bibliocache(code, year, opts)
83
+ hit = @bibdb&.fetch(code, year, opts)
115
84
  return nil if hit.nil?
116
85
  xml.parent.add_child(hit)
117
86
  xml
@@ -199,30 +168,6 @@ module Asciidoctor
199
168
  global ? "#{Dir.home}/.relaton-bib.json" :
200
169
  "#{@filename}.relaton.json"
201
170
  end
202
-
203
- # if returns nil, then biblio caching is disabled, and so is use of isobib
204
- def open_cache_biblio(node, global)
205
- # return nil # disabling for now
206
- return nil if node.attr("no-isobib")
207
- return {} if @no_isobib_cache
208
- filename = bibliocache_name(global)
209
- system("rm -f #{filename}") if node.attr("flush-caches")
210
- biblio = {}
211
- if Pathname.new(filename).file?
212
- File.open(filename, "r") do |f|
213
- biblio = JSON.parse(f.read)
214
- end
215
- end
216
- biblio
217
- end
218
-
219
- def save_cache_biblio(biblio, global)
220
- return if biblio.nil? || @no_isobib_cache
221
- filename = bibliocache_name(global)
222
- File.open(filename, "w") do |b|
223
- b << biblio.to_json
224
- end
225
- end
226
171
  end
227
172
  end
228
173
  end
@@ -105,6 +105,8 @@ module Asciidoctor
105
105
  end
106
106
 
107
107
  def bibliography_parse(attrs, xml, node)
108
+ node.attr("style") == "bibliography" or
109
+ warn "Section not marked up as [bibliography]!"
108
110
  @biblio = true
109
111
  xml.references **attr_code(attrs) do |xml_section|
110
112
  title = node.level == 1 ? "Bibliography" : node.title
@@ -137,8 +139,8 @@ module Asciidoctor
137
139
  sub = node.find_by(context: :section) do |s|
138
140
  s.title.casecmp("symbols and abbreviated terms").zero?
139
141
  end
140
- return "Terms and Definitions" if sub.empty?
141
- "Terms, Definitions, Symbols and Abbreviated Terms"
142
+ return "Terms and definitions" if sub.empty?
143
+ "Terms, definitions, symbols and abbreviated terms"
142
144
  end
143
145
 
144
146
  def term_def_parse(attrs, xml, node, toplevel)
@@ -96,6 +96,12 @@ module Asciidoctor
96
96
  fragment.to_xml(encoding: "US-ASCII").lines.map do |l|
97
97
  l.gsub(/\s*\n/, "")
98
98
  end
99
+ =begin
100
+ f = fragment.to_xml(encoding: "US-ASCII")
101
+ byebug if @xxxxxx
102
+ @xxxxxx = false
103
+ [f]
104
+ =end
99
105
  end
100
106
 
101
107
  def attr_code(attributes)
@@ -5,6 +5,7 @@ require_relative "./validate_section.rb"
5
5
  require "nokogiri"
6
6
  require "jing"
7
7
  require "pp"
8
+ require "iev"
8
9
 
9
10
  module Asciidoctor
10
11
  module ISO
@@ -158,12 +159,26 @@ module Asciidoctor
158
159
  end
159
160
  end
160
161
 
162
+ SOURCELOCALITY = ".//locality[@type = 'clause']/referenceFrom".freeze
163
+
164
+ def iev_validate(xmldoc)
165
+ xmldoc.xpath("//term").each do |t|
166
+ /^IEV($|\s|:)/.match? t&.at(".//origin/@citeas")&.text or next
167
+ pref = t.xpath("./preferred").inject([]) { |m, x| m << x&.text&.downcase }
168
+ locality = t.xpath(SOURCELOCALITY)&.text or next
169
+ iev = Iev.get(locality, xmldoc&.at("//language")&.text || "en") or next
170
+ pref.include?(iev.downcase) or
171
+ warn %(Term "#{pref[0]}" does not match IEV #{locality} "#{iev}")
172
+ end
173
+ end
174
+
161
175
  def content_validate(doc)
162
176
  title_validate(doc.root)
163
177
  isosubgroup_validate(doc.root)
164
178
  section_validate(doc)
165
179
  onlychild_clause_validate(doc.root)
166
180
  termdef_style(doc.root)
181
+ iev_validate(doc.root)
167
182
  see_xrefs_validate(doc.root)
168
183
  see_erefs_validate(doc.root)
169
184
  end
@@ -201,6 +216,6 @@ module Asciidoctor
201
216
  schema_validate(formattedstr_strip(doc.dup),
202
217
  File.join(File.dirname(__FILE__), "isostandard.rng"))
203
218
  end
204
- end
219
+ end
205
220
  end
206
221
  end
@@ -73,15 +73,15 @@ module Asciidoctor
73
73
  msg: "Normative References must be followed by "\
74
74
  "Terms and Definitions",
75
75
  val: [
76
- { tag: "terms", title: "Terms and Definitions" },
77
- { tag: "clause", title: "Terms and Definitions" },
76
+ { tag: "terms", title: "Terms and definitions" },
77
+ { tag: "clause", title: "Terms and definitions" },
78
78
  {
79
79
  tag: "terms",
80
- title: "Terms, Definitions, Symbols and Abbreviated Terms",
80
+ title: "Terms, definitions, symbols and abbreviated terms",
81
81
  },
82
82
  {
83
83
  tag: "clause",
84
- title: "Terms, Definitions, Symbols and Abbreviated Terms",
84
+ title: "Terms, definitions, symbols and abbreviated terms",
85
85
  },
86
86
  ],
87
87
  },
@@ -89,7 +89,7 @@ module Asciidoctor
89
89
 
90
90
  SECTIONS_XPATH =
91
91
  "//foreword | //introduction | //sections/terms | .//annex | "\
92
- "//definitions | //sections/clause | //references[not(parent::clause)] | "\
92
+ "//sections/definitions | //sections/clause | //references[not(parent::clause)] | "\
93
93
  "//clause[descendant::references][not(parent::clause)]".freeze
94
94
 
95
95
  def sections_sequence_validate(root)
@@ -1,5 +1,5 @@
1
1
  module Asciidoctor
2
2
  module ISO
3
- VERSION = "0.9.3".freeze
3
+ VERSION = "0.9.5".freeze
4
4
  end
5
5
  end
@@ -115,7 +115,7 @@ RSpec.describe Asciidoctor::ISO do
115
115
  #{BLANK_HDR}
116
116
  <sections>
117
117
  <terms id="_" obligation="normative">
118
- <title>Terms and Definitions</title>
118
+ <title>Terms and definitions</title>
119
119
  <term id="_">
120
120
  <preferred>Term1</preferred>
121
121
  <termnote id="_">
@@ -223,7 +223,7 @@ RSpec.describe Asciidoctor::ISO do
223
223
  #{BLANK_HDR}
224
224
  <sections>
225
225
  <terms id="_" obligation="normative">
226
- <title>Terms and Definitions</title>
226
+ <title>Terms and definitions</title>
227
227
  <term id="_">
228
228
  <preferred>Term1</preferred>
229
229
  <termexample id="_">
@@ -406,7 +406,7 @@ RSpec.describe Asciidoctor::ISO do
406
406
  #{BLANK_HDR}
407
407
  <sections>
408
408
  <terms id="_" obligation="normative">
409
- <title>Terms and Definitions</title>
409
+ <title>Terms and definitions</title>
410
410
  <term id="_">
411
411
  <preferred>Term1</preferred>
412
412
  <termsource status="identical">
@@ -432,7 +432,7 @@ RSpec.describe Asciidoctor::ISO do
432
432
  #{BLANK_HDR}
433
433
  <sections>
434
434
  <terms id="_" obligation="normative">
435
- <title>Terms and Definitions</title>
435
+ <title>Terms and definitions</title>
436
436
  <term id="_">
437
437
  <preferred>Term1</preferred>
438
438
  <termsource status="modified">
@@ -30,7 +30,7 @@ RSpec.describe Asciidoctor::ISO do
30
30
  #{BLANK_HDR}
31
31
  <sections>
32
32
  <terms id="_" obligation="normative">
33
- <title>Terms and Definitions</title>
33
+ <title>Terms and definitions</title>
34
34
  <term id="_"><preferred><stem type="AsciiMath">t_90</stem></preferred><admitted><stem type="AsciiMath">t_91</stem></admitted>
35
35
  <definition><p id="_">Time</p></definition></term>
36
36
  </terms>
@@ -51,7 +51,7 @@ RSpec.describe Asciidoctor::ISO do
51
51
  #{BLANK_HDR}
52
52
  <sections>
53
53
  <terms id="_" obligation="normative">
54
- <title>Terms and Definitions</title>
54
+ <title>Terms and definitions</title>
55
55
  <term id="_">
56
56
  <preferred>Tempus</preferred>
57
57
  <domain>relativity</domain><definition><p id="_"> Time</p></definition>
@@ -85,7 +85,7 @@ RSpec.describe Asciidoctor::ISO do
85
85
  #{BLANK_HDR}
86
86
  <sections>
87
87
  <terms id="_" obligation="normative">
88
- <title>Terms and Definitions</title>
88
+ <title>Terms and definitions</title>
89
89
  <term id="_"><preferred><stem type="AsciiMath">t_90</stem></preferred><definition><formula id="_">
90
90
  <stem type="AsciiMath">t_A</stem>
91
91
  </formula><p id="_">This paragraph is extraneous</p></definition>
@@ -111,7 +111,7 @@ RSpec.describe Asciidoctor::ISO do
111
111
  INPUT
112
112
  #{BLANK_HDR}
113
113
  <sections>
114
- <terms id="_" obligation="normative"><title>Terms and Definitions</title>
114
+ <terms id="_" obligation="normative"><title>Terms and definitions</title>
115
115
 
116
116
  <term id="_">
117
117
  <preferred>Time</preferred>
@@ -291,7 +291,7 @@ r = 1 %</stem>
291
291
  #{BLANK_HDR}
292
292
  <sections>
293
293
  <terms id="_" obligation="normative">
294
- <title>Terms and Definitions</title>
294
+ <title>Terms and definitions</title>
295
295
  <term id="_">
296
296
  <preferred>Term1</preferred>
297
297
  <termsource status="identical">
@@ -3,7 +3,7 @@ require "spec_helper"
3
3
  RSpec.describe Asciidoctor::ISO do
4
4
 
5
5
  ISO_123_SHORT = <<~EOS
6
- <bibitem type="international-standard" id="ISO123">
6
+ <bibitem type="international-standard" id="iso123">
7
7
  <title format="text/plain" language="en" script="Latn">Rubber latex -- Sampling</title>
8
8
  <docidentifier>ISO 123</docidentifier>
9
9
  </bibitem>
@@ -17,26 +17,25 @@ EOS
17
17
  EOS
18
18
 
19
19
  ISO_124_SHORT_ALT = <<~EOS
20
- <bibitem type="international-standard" id="ISO124">
20
+ <bibitem type="international-standard" id="iso124">
21
21
  <title format="text/plain" language="en" script="Latn">Latex, rubber -- Replacement</title>
22
22
  <docidentifier>ISO 124</docidentifier>
23
23
  </bibitem>
24
24
  EOS
25
25
 
26
26
  ISOBIB_123_DATED = <<~EOS
27
- <bibitem type="international-standard" id="ISO123"> <title format="text/plain" language="en" script="Latn">Rubber latex -- Sampling</title> <title format="text/plain" language="fr" script="Latn">Latex de caoutchouc -- ?chantillonnage</title> <source type="src">https://www.iso.org/standard/23281.html</source> <source type="obp">https://www.iso.org/obp/ui/#!iso:std:23281:en</source> <source type="rss">https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</source> <docidentifier>ISO 123</docidentifier> <date type="published"> <on>2001</on> </date> <contributor> <role type="publisher"/> <organization> <name>International Organization for Standardization</name> <abbreviation>ISO</abbreviation> <uri>www.iso.org</uri> </organization> </contributor> <edition>3</edition> <language>en</language> <language>fr</language> <script>Latn</script> <status>Published</status> <copyright> <from>2001</from> <owner> <organization> <name>ISO</name> <abbreviation></abbreviation> </organization> </owner> </copyright> <relation type="obsoletes"> <bibitem> <formattedref>ISO 123:1985</formattedref> <docidentifier>ISO 123:1985</docidentifier> </bibitem> </relation> <relation type="updates"> <bibitem> <formattedref>ISO 123:2001</formattedref> <docidentifier>ISO 123:2001</docidentifier> </bibitem> </relation></bibitem>
27
+ <bibitem type="international-standard" id="ISO123"> <title format="text/plain" language="en" script="Latn">Rubber latex -- Sampling</title> <title format="text/plain" language="fr" script="Latn">Latex de caoutchouc -- ?chantillonnage</title> <uri type="src">https://www.iso.org/standard/23281.html</uri> <uri type="obp">https://www.iso.org/obp/ui/#!iso:std:23281:en</uri> <uri type="rss">https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri> <docidentifier>ISO 123</docidentifier> <date type="published"> <on>2001</on> </date> <contributor> <role type="publisher"/> <organization> <name>International Organization for Standardization</name> <abbreviation>ISO</abbreviation> <uri>www.iso.org</uri> </organization> </contributor> <edition>3</edition> <language>en</language> <language>fr</language> <script>Latn</script> <status>Published</status> <copyright> <from>2001</from> <owner> <organization> <name>ISO</name> <abbreviation></abbreviation> </organization> </owner> </copyright> <relation type="obsoletes"> <bibitem> <formattedref>ISO 123:1985</formattedref> <docidentifier>ISO 123:1985</docidentifier> </bibitem> </relation> <relation type="updates"> <bibitem> <formattedref>ISO 123:2001</formattedref> <docidentifier>ISO 123:2001</docidentifier> </bibitem> </relation></bibitem>
28
28
  EOS
29
29
 
30
30
  ISOBIB_123_UNDATED = <<~EOS
31
- <bibitem type="international-standard" id="ISO123"> <title format="text/plain" language="en" script="Latn">Rubber latex -- Sampling</title> <title format="text/plain" language="fr" script="Latn">Latex de caoutchouc -- ?chantillonnage</title> <source type="src">https://www.iso.org/standard/23281.html</source> <source type="obp">https://www.iso.org/obp/ui/#!iso:std:23281:en</source> <source type="rss">https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</source> <docidentifier>ISO 123</docidentifier> <date type="published"> <on>2001</on> </date> <contributor> <role type="publisher"/> <organization> <name>International Organization for Standardization</name> <abbreviation>ISO</abbreviation> <uri>www.iso.org</uri> </organization> </contributor> <edition>3</edition> <language>en</language> <language>fr</language> <script>Latn</script> <status>Published</status> <copyright> <from>2001</from> <owner> <organization> <name>ISO</name> <abbreviation></abbreviation> </organization> </owner> </copyright> <relation type="obsoletes"> <bibitem> <formattedref>ISO 123:1985</formattedref> <docidentifier>ISO 123:1985</docidentifier> </bibitem> </relation> <relation type="updates"> <bibitem> <formattedref>ISO 123:2001</formattedref> <docidentifier>ISO 123:2001</docidentifier> </bibitem> </relation></bibitem>
31
+ <bibitem type="international-standard" id="ISO123"> <title format="text/plain" language="en" script="Latn">Rubber latex -- Sampling</title> <title format="text/plain" language="fr" script="Latn">Latex de caoutchouc -- ?chantillonnage</title> <uri type="src">https://www.iso.org/standard/23281.html</uri> <uri type="obp">https://www.iso.org/obp/ui/#!iso:std:23281:en</uri> <uri type="rss">https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri> <docidentifier>ISO 123</docidentifier> <date type="published"> <on>2001</on> </date> <contributor> <role type="publisher"/> <organization> <name>International Organization for Standardization</name> <abbreviation>ISO</abbreviation> <uri>www.iso.org</uri> </organization> </contributor> <edition>3</edition> <language>en</language> <language>fr</language> <script>Latn</script> <status>Published</status> <copyright> <from>2001</from> <owner> <organization> <name>ISO</name> <abbreviation></abbreviation> </organization> </owner> </copyright> <relation type="obsoletes"> <bibitem> <formattedref>ISO 123:1985</formattedref> <docidentifier>ISO 123:1985</docidentifier> </bibitem> </relation> <relation type="updates"> <bibitem> <formattedref>ISO 123:2001</formattedref> <docidentifier>ISO 123:2001</docidentifier> </bibitem> </relation></bibitem>
32
32
  EOS
33
33
 
34
34
 
35
35
  ISOBIB_124_DATED = <<~EOS
36
- <bibitem type="international-standard" id="ISO124"> <title format="text/plain" language="en" script="Latn">Latex, rubber -- Determination of total solids content</title> <title format="text/plain" language="fr" script="Latn">Latex de caoutchouc -- Détermination des matières solides totales</title> <source type="src">https://www.iso.org/standard/61884.html</source> <source type="obp">https://www.iso.org/obp/ui/#!iso:std:61884:en</source> <source type="rss">https://www.iso.org/contents/data/standard/06/18/61884.detail.rss</source> <docidentifier>ISO 124</docidentifier> <date type="published"> <on>2014</on> </date> <contributor> <role type="publisher"/> <organization> <name>International Organization for Standardization</name> <abbreviation>ISO</abbreviation> <uri>www.iso.org</uri> </organization> </contributor> <edition>7</edition> <language>en</language> <language>fr</language> <script>Latn</script> <abstract format="plain" language="en" script="Latn">ISO 124:2014 specifies methods for the determination of the total solids content of natural rubber field and concentrated latices and synthetic rubber latex. These methods are not necessarily suitable for latex from natural sources other than the Hevea brasiliensis, for vulcanized latex, for compounded latex, or for artificial dispersions of rubber.</abstract> <abstract format="plain" language="fr" script="Latn">L'ISO 124:2014 spécifie des méthodes pour la détermination des matières solides totales dans le latex de plantation, le latex de concentré de caoutchouc naturel et le latex de caoutchouc synthétique. Ces méthodes ne conviennent pas nécessairement au latex d'origine naturelle autre que celui de l'Hevea brasiliensis, au latex vulcanisé, aux mélanges de latex, ou aux dispersions artificielles de caoutchouc.</abstract> <status>Published</status> <copyright> <from>2014</from> <owner> <organization> <name>ISO</name> <abbreviation></abbreviation> </organization> </owner> </copyright> <relation type="obsoletes"> <bibitem> <formattedref>ISO 124:2011</formattedref> <docidentifier>ISO 124:2011</docidentifier> </bibitem> </relation></bibitem>
36
+ <bibitem type="international-standard" id="ISO124"> <title format="text/plain" language="en" script="Latn">Latex, rubber -- Determination of total solids content</title> <title format="text/plain" language="fr" script="Latn">Latex de caoutchouc -- Détermination des matières solides totales</title> <uri type="src">https://www.iso.org/standard/61884.html</uri> <uri type="obp">https://www.iso.org/obp/ui/#!iso:std:61884:en</uri> <uri type="rss">https://www.iso.org/contents/data/standard/06/18/61884.detail.rss</uri> <docidentifier>ISO 124</docidentifier> <date type="published"> <on>2014</on> </date> <contributor> <role type="publisher"/> <organization> <name>International Organization for Standardization</name> <abbreviation>ISO</abbreviation> <uri>www.iso.org</uri> </organization> </contributor> <edition>7</edition> <language>en</language> <language>fr</language> <script>Latn</script> <abstract format="plain" language="en" script="Latn">ISO 124:2014 specifies methods for the determination of the total solids content of natural rubber field and concentrated latices and synthetic rubber latex. These methods are not necessarily suitable for latex from natural sources other than the Hevea brasiliensis, for vulcanized latex, for compounded latex, or for artificial dispersions of rubber.</abstract> <abstract format="plain" language="fr" script="Latn">L'ISO 124:2014 spécifie des méthodes pour la détermination des matières solides totales dans le latex de plantation, le latex de concentré de caoutchouc naturel et le latex de caoutchouc synthétique. Ces méthodes ne conviennent pas nécessairement au latex d'origine naturelle autre que celui de l'Hevea brasiliensis, au latex vulcanisé, aux mélanges de latex, ou aux dispersions artificielles de caoutchouc.</abstract> <status>Published</status> <copyright> <from>2014</from> <owner> <organization> <name>ISO</name> <abbreviation></abbreviation> </organization> </owner> </copyright> <relation type="obsoletes"> <bibitem> <formattedref>ISO 124:2011</formattedref> <docidentifier>ISO 124:2011</docidentifier> </bibitem> </relation></bibitem>
37
37
  EOS
38
38
 
39
-
40
39
  it "does not activate biblio caches if isobib disabled" do
41
40
  system "mv ~/.relaton-bib.json ~/.relaton-bib.json1"
42
41
  system "rm -f test.relaton.json"
@@ -54,7 +53,6 @@ EOS
54
53
  system "mv ~/.relaton-bib.json1 ~/.relaton-bib.json"
55
54
  end
56
55
 
57
-
58
56
  it "does not activate biblio caches if isobib caching disabled" do
59
57
  system "mv ~/.relaton-bib.json ~/.relaton-bib.json1"
60
58
  system "rm -f test.relaton.json"
@@ -264,11 +262,11 @@ EOS
264
262
 
265
263
  input = <<~EOS
266
264
  #{LOCAL_CACHED_ISOBIB_BLANK_HDR}
267
- [bibliography]
268
- == Normative References
265
+ [bibliography]
266
+ == Normative References
269
267
 
270
- * [[[iso123,ISO 123:2001]]] _Standard_
271
- * [[[iso124,ISO 124]]] _Standard_
268
+ * [[[iso123,ISO 123:2001]]] _Standard_
269
+ * [[[iso124,ISO 124]]] _Standard_
272
270
  EOS
273
271
 
274
272
  output = <<~EOS
@@ -77,7 +77,7 @@ RSpec.describe Asciidoctor::ISO do
77
77
  <sections>
78
78
  </sections><bibliography><references id="_" obligation="informative">
79
79
  <title>Normative References</title>
80
- <bibitem type="international-standard" id="ISO123">
80
+ <bibitem type="international-standard" id="iso123">
81
81
  <title format="text/plain" language="en" script="Latn">Rubber latex -- Sampling</title>
82
82
  <title format="text/plain" language="fr" script="Latn">Latex de caoutchouc -- ?chantillonnage</title>
83
83
  <source type="src">https://www.iso.org/standard/23281.html</source>
@@ -66,12 +66,12 @@ RSpec.describe Asciidoctor::ISO do
66
66
  </clause>
67
67
 
68
68
  <terms id="_" obligation="normative">
69
- <title>Terms and Definitions</title>
69
+ <title>Terms and definitions</title>
70
70
  <term id="_">
71
71
  <preferred>Term1</preferred>
72
72
  </term>
73
73
  </terms>
74
- <clause id="_" obligation="normative"><title>Terms, Definitions, Symbols and Abbreviated Terms</title><terms id="_" obligation="normative">
74
+ <clause id="_" obligation="normative"><title>Terms, definitions, symbols and abbreviated terms</title><terms id="_" obligation="normative">
75
75
  <title>Normal Terms</title>
76
76
  <term id="_">
77
77
  <preferred>Term2</preferred>
@@ -183,12 +183,12 @@ RSpec.describe Asciidoctor::ISO do
183
183
  </clause>
184
184
 
185
185
  <terms id="_" obligation="normative">
186
- <title>Terms and Definitions</title>
186
+ <title>Terms and definitions</title>
187
187
  <term id="_">
188
188
  <preferred>Term1</preferred>
189
189
  </term>
190
190
  </terms>
191
- <clause id="_" obligation="normative"><title>Terms and Definitions</title><terms id="_" obligation="normative">
191
+ <clause id="_" obligation="normative"><title>Terms and definitions</title><terms id="_" obligation="normative">
192
192
  <title>Normal Terms</title>
193
193
  <term id="_">
194
194
  <preferred>Term2</preferred>
@@ -322,7 +322,7 @@ RSpec.describe Asciidoctor::ISO do
322
322
  <p id="_">Foreword</p>
323
323
  </foreword></preface><sections>
324
324
  <terms id="_" obligation="normative">
325
- <title>Terms and Definitions</title>
325
+ <title>Terms and definitions</title>
326
326
 
327
327
 
328
328
  </terms></sections>