metanorma-ietf 3.4.0 → 3.4.2

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: 002c1dbf3082b89ae330b047a9a044f6cea91437c49f1524b495c0c44117910e
4
- data.tar.gz: 3cecbf7bcba03f86289b7edfbfa8c34b2645b739d7bd70785a0cac17b91650ba
3
+ metadata.gz: 83a0728840ef2d5d5a7ace72f4bc2dfff97a85b6213e73511e15fd303313440f
4
+ data.tar.gz: 600e41fd0c3559f1b53ed072e6dc54905c049c3a41655ca2355af9451d0573d3
5
5
  SHA512:
6
- metadata.gz: 6c1193cb258edcae562cbfe66023db98a438c4ad70a1dc8f1f0c71577cdf6d335fed24ed39e223f190098168fd3c3147d6d6bbebc60352473b9341da78cca621
7
- data.tar.gz: b944d99efa37b7616c35d624753da963a344f534c822baa0acacd3f1365c14a1b70e8dd1308e9dff89225008bfd99e8d6077e13a99c30ff6cd1ead676f5d3cf4
6
+ metadata.gz: 92d3d375108c3d6f441c9070a9c1bd454d8471f92b3fb6fddaaeff9c4f8f15b2fc06cdd46c907ff9fbf2d619632a9551c8d75dac8ad2866fb0994f79841edde7
7
+ data.tar.gz: f6740373061b304cbda897852a632686eb7675394d179d6ee05ad9bca4b0d1031b0cb45e0a371f5a41490e820b63079dedca33e318ae94d5ede1ca2ea34259d5
@@ -77,6 +77,15 @@ module IsoDoc
77
77
  end
78
78
  end
79
79
 
80
+ def dl_parse1(dlist, dterm, ddef)
81
+ dlist.dt **attr_code(anchor: dterm["id"]) do |term|
82
+ dt_parse(dterm, term)
83
+ end
84
+ dlist.dd **attr_code(anchor: ddef["id"]) do |listitem|
85
+ ddef.children.each { |n| parse(n, listitem) }
86
+ end
87
+ end
88
+
80
89
  def note_label(node)
81
90
  n = @xrefs.get[node["id"]]
82
91
  n.nil? || n[:label].nil? || n[:label].empty? and
@@ -166,9 +175,11 @@ module IsoDoc
166
175
  def formula_parse1(node, out)
167
176
  out.t **attr_code(anchor: node["id"]) do |p|
168
177
  parse(node.at(ns("./stem")), p)
169
- lbl = @xrefs.anchor(node["id"], :label, false)
170
- lbl.nil? or
171
- p << " (#{lbl})"
178
+ if lbl = @xrefs.anchor(node["id"], :label, false)
179
+ lbl.gsub!(%r{</?span[^>]*>}, "")
180
+ /^\(.+?\)$/.match?(lbl) or lbl = "(#{lbl})"
181
+ p << " #{lbl}"
182
+ end
172
183
  end
173
184
  end
174
185
 
@@ -3,11 +3,11 @@ module IsoDoc
3
3
  class RfcConvert < ::IsoDoc::Convert
4
4
  def u_cleanup(xmldoc)
5
5
  xmldoc.traverse do |n|
6
- next unless n.text?
7
- next unless %w(t blockquote li dd preamble td th annotation)
8
- .include? n.parent.name
9
-
10
- n.replace(n.text.gsub(/[\u0080-\uffff]/, "<u>\\0</u>"))
6
+ n.text? or next
7
+ %w(t blockquote li dd preamble td th annotation)
8
+ .include? n.parent.name or next
9
+ n.replace(@c.encode(n.text, :basic).gsub(/[\u0080-\uffff]/,
10
+ "<u>\\0</u>"))
11
11
  end
12
12
  end
13
13
 
@@ -138,7 +138,8 @@ module IsoDoc
138
138
  section: eref_section(node),
139
139
  relative: eref_relative(node),
140
140
  sectionFormat: node["displayFormat"]) do |l|
141
- linkend.each { |n| parse(n, l) }
141
+ linkend.map(&:text).join.strip.empty? or
142
+ linkend.each { |n| parse(n, l) }
142
143
  end
143
144
  end
144
145
 
@@ -148,10 +149,11 @@ module IsoDoc
148
149
  end
149
150
 
150
151
  def eref_section(node)
151
- @isodoc.eref_localities(
152
+ ret = @isodoc.eref_localities(
152
153
  node.xpath(ns("./locality | ./localityStack")), nil, node
153
- )&.sub(/^,/, "")&.sub(/^\s*(Sections?|Clauses?)/, "")&.strip
154
- &.sub(/,$/, "") || ""
154
+ ) or return ""
155
+ ret.gsub(%r{</?span[^>]*>}, "").sub(/^,/, "")
156
+ .sub(/^\s*(Sections?|Clauses?)/, "").strip.sub(/,$/, "")
155
157
  end
156
158
 
157
159
  def origin_parse(node, out)
@@ -171,6 +173,10 @@ module IsoDoc
171
173
  def bookmark_parse(node, out)
172
174
  out.bookmark nil, **attr_code(anchor: node["id"])
173
175
  end
176
+
177
+ def span_parse(node, out)
178
+ children_parse(node, out)
179
+ end
174
180
  end
175
181
  end
176
182
  end
@@ -12,9 +12,9 @@ module IsoDoc
12
12
  end
13
13
 
14
14
  def recommendation_parse1(node, out)
15
- recommendation_name(node.at(ns("./name")), out)
15
+ recommendation_name(node.at(ns("./fmt-name")), out)
16
16
  node.children.each do |n|
17
- parse(n, out) unless n.name == "name"
17
+ parse(n, out) unless n.name == "fmt-name"
18
18
  end
19
19
  end
20
20
 
@@ -7,12 +7,11 @@ module IsoDoc
7
7
  docxml.xpath(ns("//term[descendant::termnote]")).each do |t|
8
8
  c = IsoDoc::XrefGen::Counter.new
9
9
  notes = t.xpath(ns("./termnote"))
10
- notes.each do |n|
11
- next if n["id"].nil? || n["id"].empty?
12
-
10
+ notes.noblank.each do |n|
13
11
  idx = notes.size == 1 ? "" : " #{c.increment(n).print}"
14
12
  @anchors[n["id"]] =
15
- anchor_struct(idx, n, @labels["note_xref"], "note", false)
13
+ anchor_struct(idx, n, @labels["note_xref"], "note",
14
+ { container: true })
16
15
  end
17
16
  end
18
17
  end
@@ -1783,9 +1783,21 @@ that the `number` given for the series applies to the second iteration of number
1783
1783
  May be used to differentiate rendering of notes in bibliographies</a:documentation>
1784
1784
  </attribute>
1785
1785
  </optional>
1786
- <ref name="LocalizedMarkedUpString">
1786
+ <ref name="LocalizedStringAttributes">
1787
1787
  <a:documentation>The content of the note</a:documentation>
1788
1788
  </ref>
1789
+ <choice>
1790
+ <oneOrMore>
1791
+ <ref name="BasicBlockNoId">
1792
+ <a:documentation>Multiple blocks of content</a:documentation>
1793
+ </ref>
1794
+ </oneOrMore>
1795
+ <oneOrMore>
1796
+ <ref name="TextElement">
1797
+ <a:documentation>Single block of content</a:documentation>
1798
+ </ref>
1799
+ </oneOrMore>
1800
+ </choice>
1789
1801
  </element>
1790
1802
  </define>
1791
1803
  <define name="bibabstract">
@@ -17,7 +17,7 @@
17
17
  these elements; we just want one namespace for any child grammars
18
18
  of this.
19
19
  -->
20
- <!-- VERSION v1.4.0 -->
20
+ <!-- VERSION v1.4.1 -->
21
21
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
22
22
  <include href="reqt.rng"/>
23
23
  <include href="basicdoc.rng">
@@ -326,7 +326,7 @@ normative or informative references, some split references into sections organiz
326
326
  <a:documentation>Content of note</a:documentation>
327
327
  <oneOrMore>
328
328
  <choice>
329
- <ref name="paragraph"/>
329
+ <ref name="paragraph-with-footnote"/>
330
330
  <ref name="ul"/>
331
331
  <ref name="ol"/>
332
332
  <ref name="dl"/>
@@ -412,7 +412,7 @@ normative or informative references, some split references into sections organiz
412
412
  <element name="note">
413
413
  <ref name="OptionalId"/>
414
414
  <oneOrMore>
415
- <ref name="paragraph"/>
415
+ <ref name="paragraph-with-footnote"/>
416
416
  </oneOrMore>
417
417
  </element>
418
418
  </define>
@@ -1977,7 +1977,7 @@ used in document amendments</a:documentation>
1977
1977
  <oneOrMore>
1978
1978
  <choice>
1979
1979
  <a:documentation>Content of the verbal representation of the term</a:documentation>
1980
- <ref name="paragraph"/>
1980
+ <ref name="paragraph-with-footnote"/>
1981
1981
  <ref name="dl"/>
1982
1982
  <ref name="ol"/>
1983
1983
  <ref name="ul"/>
@@ -2015,7 +2015,7 @@ used in document amendments</a:documentation>
2015
2015
  <oneOrMore>
2016
2016
  <choice>
2017
2017
  <a:documentation>Content of the term note</a:documentation>
2018
- <ref name="paragraph"/>
2018
+ <ref name="paragraph-with-footnote"/>
2019
2019
  <ref name="ul"/>
2020
2020
  <ref name="ol"/>
2021
2021
  <ref name="dl"/>
@@ -2037,7 +2037,7 @@ used in document amendments</a:documentation>
2037
2037
  <ref name="dl"/>
2038
2038
  <ref name="quote"/>
2039
2039
  <ref name="sourcecode"/>
2040
- <ref name="paragraph"/>
2040
+ <ref name="paragraph-with-footnote"/>
2041
2041
  <ref name="figure"/>
2042
2042
  </choice>
2043
2043
  </oneOrMore>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ietf
3
- VERSION = "3.4.0".freeze
3
+ VERSION = "3.4.2".freeze
4
4
  end
5
5
  end
@@ -37,7 +37,7 @@ Gem::Specification.new do |spec|
37
37
  spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
38
38
 
39
39
  spec.add_dependency "metanorma-ietf-data"
40
- spec.add_dependency "metanorma-standoc", "~> 2.10.0"
40
+ spec.add_dependency "metanorma-standoc", "~> 2.10.2"
41
41
  spec.add_dependency "relaton-render"
42
42
 
43
43
  spec.add_development_dependency "debug"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ietf
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.0
4
+ version: 3.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-11-11 00:00:00.000000000 Z
11
+ date: 2024-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-ietf-data
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 2.10.0
33
+ version: 2.10.2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 2.10.0
40
+ version: 2.10.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: relaton-render
43
43
  requirement: !ruby/object:Gem::Requirement