metanorma-ietf 3.2.0 → 3.2.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/inline.rb +14 -16
- data/lib/isodoc/ietf/metadata.rb +1 -1
- data/lib/isodoc/ietf/section.rb +2 -2
- data/lib/metanorma/ietf/front.rb +1 -1
- data/lib/metanorma/ietf/isodoc.rng +4 -1
- data/lib/metanorma/ietf/version.rb +1 -1
- data/metanorma-ietf.gemspec +1 -2
- metadata +4 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c1762cf1c04cf88835f2e0a18c9779cff01a8a6d342241e7e72a756072ab9c8
|
4
|
+
data.tar.gz: 54954987db100a47a4d443fed697637d0fa90748fdbed6a4bcfe35ae677c22ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f989c4cbf195de5c2f2f8b4afda5611cdad02f910f9b38aa1f31c58e33ba97aa5128e09aed2cf92720578deaeebfab26479450a181955b7d0084e7700d772ab9
|
7
|
+
data.tar.gz: 4004434ec7add5c7c0084ee10f9bd6fad254edcf176fc4ba72436e8461af870b4b94ae10f66926ece58be4b4e95982e353c3cdae8a086620196ae206194bbbfb
|
data/lib/isodoc/ietf/inline.rb
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
require "mathml2asciimath"
|
2
|
-
|
3
1
|
module IsoDoc
|
4
2
|
module Ietf
|
5
3
|
class RfcConvert < ::IsoDoc::Convert
|
@@ -60,7 +58,8 @@ module IsoDoc
|
|
60
58
|
|
61
59
|
def stem_parse(node, out)
|
62
60
|
stem = case node["type"]
|
63
|
-
when "MathML" then
|
61
|
+
when "MathML" then Plurimath::Math
|
62
|
+
.parse(node.children.to_xml, "mathml").to_asciimath
|
64
63
|
else HTMLEntities.new.encode(node.text)
|
65
64
|
end
|
66
65
|
out << "#{@openmathdelim} #{stem} #{@closemathdelim}"
|
@@ -82,12 +81,15 @@ module IsoDoc
|
|
82
81
|
end
|
83
82
|
end
|
84
83
|
|
84
|
+
def image_parse_attrs(node)
|
85
|
+
{ src: node["src"], title: node["title"],
|
86
|
+
align: node["align"], name: node["filename"],
|
87
|
+
anchor: node["id"], type: "svg",
|
88
|
+
alt: node["alt"] }
|
89
|
+
end
|
90
|
+
|
85
91
|
def image_parse(node, out, caption)
|
86
|
-
|
87
|
-
align: node["align"], name: node["filename"],
|
88
|
-
anchor: node["id"], type: "svg",
|
89
|
-
alt: node["alt"] }
|
90
|
-
out.artwork **attr_code(attrs)
|
92
|
+
out.artwork **attr_code(image_parse_attrs(node))
|
91
93
|
image_title_parse(out, caption)
|
92
94
|
end
|
93
95
|
|
@@ -102,14 +104,10 @@ module IsoDoc
|
|
102
104
|
def svg_parse(node, out)
|
103
105
|
if node.parent.name == "image" then super
|
104
106
|
else
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
out.artwork **attr_code(attrs) do |x|
|
110
|
-
out = x
|
111
|
-
super
|
112
|
-
end
|
107
|
+
out.artwork **attr_code(image_parse_attrs(node)) do |x|
|
108
|
+
out = x
|
109
|
+
super
|
110
|
+
end
|
113
111
|
end
|
114
112
|
end
|
115
113
|
|
data/lib/isodoc/ietf/metadata.rb
CHANGED
data/lib/isodoc/ietf/section.rb
CHANGED
@@ -105,7 +105,7 @@ module IsoDoc
|
|
105
105
|
links = isoxml
|
106
106
|
.xpath(ns("//bibdata/relation[@type = 'includedIn' or " \
|
107
107
|
"@type = 'describedBy' or @type = 'derivedFrom' or " \
|
108
|
-
"@type = '
|
108
|
+
"@type = 'instanceOf']")) || return
|
109
109
|
links.each do |l|
|
110
110
|
out.link href: l&.at(ns("./bibitem/docidentifier"))&.text,
|
111
111
|
rel: rel2iana(l["type"])
|
@@ -117,7 +117,7 @@ module IsoDoc
|
|
117
117
|
when "includedIn" then "item"
|
118
118
|
when "describedBy" then "describedby"
|
119
119
|
when "derivedFrom" then "convertedfrom"
|
120
|
-
when "
|
120
|
+
when "instanceOf" then "alternate"
|
121
121
|
else
|
122
122
|
"alternate"
|
123
123
|
end
|
data/lib/metanorma/ietf/front.rb
CHANGED
@@ -2,7 +2,7 @@ module Metanorma
|
|
2
2
|
module Ietf
|
3
3
|
class Converter < ::Metanorma::Standoc::Converter
|
4
4
|
def relaton_relations
|
5
|
-
%w(included-in described-by derived-from instance obsoletes updates)
|
5
|
+
%w(included-in described-by derived-from instance-of obsoletes updates)
|
6
6
|
end
|
7
7
|
|
8
8
|
def metadata_author(node, xml)
|
@@ -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.2.
|
20
|
+
<!-- VERSION v1.2.4 -->
|
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">
|
@@ -2068,6 +2068,9 @@
|
|
2068
2068
|
</define>
|
2069
2069
|
<define name="termdefinition">
|
2070
2070
|
<element name="definition">
|
2071
|
+
<optional>
|
2072
|
+
<attribute name="type"/>
|
2073
|
+
</optional>
|
2071
2074
|
<choice>
|
2072
2075
|
<ref name="verbaldefinition"/>
|
2073
2076
|
<ref name="nonverbalrep"/>
|
data/metanorma-ietf.gemspec
CHANGED
@@ -36,9 +36,8 @@ Gem::Specification.new do |spec|
|
|
36
36
|
spec.require_paths = ["lib"]
|
37
37
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
38
38
|
|
39
|
-
spec.add_dependency "mathml2asciimath"
|
40
39
|
spec.add_dependency "metanorma-ietf-data"
|
41
|
-
spec.add_dependency "metanorma-standoc", "~> 2.
|
40
|
+
spec.add_dependency "metanorma-standoc", "~> 2.6.0"
|
42
41
|
|
43
42
|
spec.add_development_dependency "debug"
|
44
43
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-ietf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.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: 2023-
|
11
|
+
date: 2023-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: mathml2asciimath
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: metanorma-ietf-data
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,14 +30,14 @@ dependencies:
|
|
44
30
|
requirements:
|
45
31
|
- - "~>"
|
46
32
|
- !ruby/object:Gem::Version
|
47
|
-
version: 2.
|
33
|
+
version: 2.6.0
|
48
34
|
type: :runtime
|
49
35
|
prerelease: false
|
50
36
|
version_requirements: !ruby/object:Gem::Requirement
|
51
37
|
requirements:
|
52
38
|
- - "~>"
|
53
39
|
- !ruby/object:Gem::Version
|
54
|
-
version: 2.
|
40
|
+
version: 2.6.0
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: debug
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|