metanorma-ietf 3.3.10 → 3.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/ietf/blocks.rb +14 -3
- data/lib/isodoc/ietf/cleanup_inline.rb +5 -5
- data/lib/isodoc/ietf/inline.rb +10 -4
- data/lib/isodoc/ietf/references.rb +4 -0
- data/lib/isodoc/ietf/reqt.rb +2 -2
- data/lib/isodoc/ietf/terms.rb +31 -8
- data/lib/isodoc/ietf/xref.rb +3 -4
- data/lib/metanorma/ietf/biblio.rng +13 -1
- data/lib/metanorma/ietf/isodoc.rng +6 -6
- data/lib/metanorma/ietf/version.rb +1 -1
- data/metanorma-ietf.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83a0728840ef2d5d5a7ace72f4bc2dfff97a85b6213e73511e15fd303313440f
|
4
|
+
data.tar.gz: 600e41fd0c3559f1b53ed072e6dc54905c049c3a41655ca2355af9451d0573d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92d3d375108c3d6f441c9070a9c1bd454d8471f92b3fb6fddaaeff9c4f8f15b2fc06cdd46c907ff9fbf2d619632a9551c8d75dac8ad2866fb0994f79841edde7
|
7
|
+
data.tar.gz: f6740373061b304cbda897852a632686eb7675394d179d6ee05ad9bca4b0d1031b0cb45e0a371f5a41490e820b63079dedca33e318ae94d5ede1ca2ea34259d5
|
data/lib/isodoc/ietf/blocks.rb
CHANGED
@@ -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
|
-
|
171
|
-
|
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
|
-
|
7
|
-
|
8
|
-
.include? n.parent.name
|
9
|
-
|
10
|
-
|
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
|
|
data/lib/isodoc/ietf/inline.rb
CHANGED
@@ -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.
|
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
|
-
)
|
154
|
-
|
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
|
@@ -23,6 +23,10 @@ module IsoDoc
|
|
23
23
|
i18nhash: @i18n.get)
|
24
24
|
end
|
25
25
|
|
26
|
+
def implicit_reference(bib)
|
27
|
+
bib["hidden"] == "true"
|
28
|
+
end
|
29
|
+
|
26
30
|
def bibliography1(node, out)
|
27
31
|
out.references **attr_code(anchor: node["id"]) do |div|
|
28
32
|
title = node.at(ns("./title")) and div.name do |name|
|
data/lib/isodoc/ietf/reqt.rb
CHANGED
@@ -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
|
|
data/lib/isodoc/ietf/terms.rb
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
module IsoDoc
|
2
2
|
module Ietf
|
3
3
|
class RfcConvert < ::IsoDoc::Convert
|
4
|
+
def set_termdomain(termdomain)
|
5
|
+
@termdomain = termdomain
|
6
|
+
end
|
7
|
+
|
4
8
|
def definition_parse(node, out)
|
5
9
|
node.children.each { |n| parse(n, out) }
|
6
10
|
end
|
@@ -27,6 +31,10 @@ module IsoDoc
|
|
27
31
|
end
|
28
32
|
|
29
33
|
def term_parse(node, out)
|
34
|
+
if domain = node.at(ns("./domain"))
|
35
|
+
set_termdomain(domain.text)
|
36
|
+
domain["hidden"] = "true"
|
37
|
+
end
|
30
38
|
name = node.at(ns(".//name"))
|
31
39
|
out.name do |p|
|
32
40
|
name.children.each { |n| parse(n, p) }
|
@@ -38,7 +46,12 @@ module IsoDoc
|
|
38
46
|
end
|
39
47
|
|
40
48
|
def termdef_parse(node, out)
|
41
|
-
|
49
|
+
if domain = node.at(ns("./domain"))
|
50
|
+
set_termdomain(domain.text)
|
51
|
+
domain["hidden"] = "true"
|
52
|
+
else
|
53
|
+
set_termdomain("")
|
54
|
+
end
|
42
55
|
node.xpath(ns("./definition")).size > 1 and
|
43
56
|
@isodoc.multidef(node)
|
44
57
|
clause_parse(node, out)
|
@@ -47,15 +60,25 @@ module IsoDoc
|
|
47
60
|
def termdocsource_parse(_node, _out); end
|
48
61
|
|
49
62
|
def concept_parse(node, out)
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
63
|
+
ref = node.at(ns("./xref | ./eref | ./termref"))
|
64
|
+
render = node.at(ns("./renderterm"))
|
65
|
+
!ref && !render and return node.children.each { |n| parse(n, out) }
|
66
|
+
!render or concept_render(render, ref, out)
|
67
|
+
ref or return
|
68
|
+
concept_ref(ref, out)
|
69
|
+
end
|
70
|
+
|
71
|
+
def concept_render(render, ref, out)
|
72
|
+
out.em do |em|
|
73
|
+
render.children.each { |n| parse(n, em) }
|
55
74
|
end
|
75
|
+
ref and out << " "
|
76
|
+
end
|
77
|
+
|
78
|
+
def concept_ref(ref, out)
|
79
|
+
ref or return
|
56
80
|
out << "[term defined in "
|
57
|
-
|
58
|
-
parse(r, out)
|
81
|
+
parse(ref, out)
|
59
82
|
out << "]"
|
60
83
|
end
|
61
84
|
|
data/lib/isodoc/ietf/xref.rb
CHANGED
@@ -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",
|
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="
|
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.
|
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>
|
data/metanorma-ietf.gemspec
CHANGED
@@ -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.
|
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
|
+
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-10
|
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.
|
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.
|
40
|
+
version: 2.10.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: relaton-render
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|