metanorma-ietf 3.1.1 → 3.1.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/i18n-en.yaml +5 -5
- data/lib/isodoc/ietf/references.rb +14 -17
- data/lib/isodoc/ietf/table.rb +33 -31
- data/lib/metanorma/ietf/biblio.rng +1 -1
- data/lib/metanorma/ietf/isodoc.rng +1 -1
- data/lib/metanorma/ietf/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7aa109dac18747b04bbbc7b429e16c79af695a2b04c0717cb302e330f813f39
|
4
|
+
data.tar.gz: e25ae275c7c5de72a5917c3cf00b74a73d35d9aa302f32f45c6fac954db93f99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f839dcd5804af5ad1513a3be1cf7c5130c6a8cdec22ab2e23738d29d589715e78dca9824385d0a9e00a0e7770df72700975838c183b7eccc4d176eecd8b09a5e
|
7
|
+
data.tar.gz: 41745aeefd8fce750193618471488dbe2b1a2bbf2cafdfff70ff8b9cd9f59e04eef25ed06cdac7b6c6a12b406fdb5425014ad7e683fcbf8d31f40661030fc439
|
@@ -1,5 +1,5 @@
|
|
1
|
-
term_def_boilerplate:
|
2
|
-
no_terms_boilerplate:
|
3
|
-
internal_terms_boilerplate:
|
4
|
-
external_terms_boilerplate:
|
5
|
-
internal_external_terms_boilerplate:
|
1
|
+
term_def_boilerplate: ""
|
2
|
+
no_terms_boilerplate: ""
|
3
|
+
internal_terms_boilerplate: ""
|
4
|
+
external_terms_boilerplate: ""
|
5
|
+
internal_external_terms_boilerplate: ""
|
@@ -7,10 +7,10 @@ module IsoDoc
|
|
7
7
|
isoxml.xpath(ns("//references/bibitem/docidentifier")).each do |i|
|
8
8
|
i.children = docid_prefix(i["type"], i.text)
|
9
9
|
end
|
10
|
-
isoxml.xpath(ns("//bibliography/references | "\
|
11
|
-
"//bibliography/clause[.//references] | "\
|
12
|
-
"//annex/clause[.//references] | "\
|
13
|
-
"//annex/references | "\
|
10
|
+
isoxml.xpath(ns("//bibliography/references | " \
|
11
|
+
"//bibliography/clause[.//references] | " \
|
12
|
+
"//annex/clause[.//references] | " \
|
13
|
+
"//annex/references | " \
|
14
14
|
"//sections/clause[.//references]")).each do |f|
|
15
15
|
bibliography1(f, out)
|
16
16
|
end
|
@@ -64,15 +64,15 @@ module IsoDoc
|
|
64
64
|
!id[:sdo].nil? && id[:sdo] != "(NO ID)" and out.refcontent id[:sdo]
|
65
65
|
docidentifiers&.each do |u|
|
66
66
|
u["type"] == "DOI" and
|
67
|
-
out.seriesInfo nil, **attr_code(value: u.text.sub(/^DOI
|
67
|
+
out.seriesInfo nil, **attr_code(value: u.text.sub(/^DOI[ ]/, ""),
|
68
68
|
name: "DOI")
|
69
69
|
%w(IETF RFC).include?(u["type"]) and docidentifier_ietf(u, out)
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
73
73
|
def docidentifier_ietf(ident, out)
|
74
|
-
if /^RFC
|
75
|
-
out.seriesInfo nil, **attr_code(value: ident.text.sub(/^RFC
|
74
|
+
if /^RFC[ ]/.match?(ident.text)
|
75
|
+
out.seriesInfo nil, **attr_code(value: ident.text.sub(/^RFC[ ]0*/, ""),
|
76
76
|
name: "RFC")
|
77
77
|
elsif /^I-D\./.match?(ident.text)
|
78
78
|
out.seriesInfo nil, **attr_code(value: ident.text.sub(/^I-D\./, ""),
|
@@ -99,15 +99,15 @@ module IsoDoc
|
|
99
99
|
end
|
100
100
|
|
101
101
|
def relaton_to_author(bib, node)
|
102
|
-
auths = bib.xpath(ns("./contributor[xmlns:role/@type = 'author' or "\
|
102
|
+
auths = bib.xpath(ns("./contributor[xmlns:role/@type = 'author' or " \
|
103
103
|
"xmlns:role/@type = 'editor']"))
|
104
104
|
auths.empty? and
|
105
|
-
auths = bib.xpath(ns("./contributor[xmlns:role/@type = "\
|
105
|
+
auths = bib.xpath(ns("./contributor[xmlns:role/@type = " \
|
106
106
|
"'publisher']"))
|
107
107
|
auths.each do |a|
|
108
108
|
role = a.at(ns("./role[@type = 'editor']")) ? "editor" : nil
|
109
|
-
p = a&.at(ns("./person/name")) and
|
110
|
-
relaton_person_to_author(p, role, node) or
|
109
|
+
(p = a&.at(ns("./person/name")) and
|
110
|
+
relaton_person_to_author(p, role, node)) or
|
111
111
|
relaton_org_to_author(a&.at(ns("./organization")), role, node)
|
112
112
|
end
|
113
113
|
end
|
@@ -115,9 +115,7 @@ module IsoDoc
|
|
115
115
|
def relaton_person_to_author(pers, role, node)
|
116
116
|
full = pers&.at(ns("./completename"))&.text
|
117
117
|
surname = pers&.at(ns("./surname"))&.text
|
118
|
-
initials = pers&.xpath(ns("./initial"))&.map
|
119
|
-
i.text
|
120
|
-
end&.join(" ") ||
|
118
|
+
initials = pers&.xpath(ns("./initial"))&.map(&:text)&.join(" ") ||
|
121
119
|
pers&.xpath(ns("./forename"))&.map { |i| i.text[0] }&.join(" ")
|
122
120
|
initials = nil if initials.empty?
|
123
121
|
node.author nil, **attr_code(
|
@@ -143,9 +141,8 @@ module IsoDoc
|
|
143
141
|
date = bib.at(ns("./date[@type = 'published']")) ||
|
144
142
|
bib.at(ns("./date[@type = 'issued']")) ||
|
145
143
|
bib.at(ns("./date[@type = 'circulated']"))
|
146
|
-
|
147
|
-
|
148
|
-
attr = date_attr(date&.at(ns("./on | ./from"))&.text) || return
|
144
|
+
date or return
|
145
|
+
attr = date_attr(date.at(ns("./on | ./from"))&.text) or return
|
149
146
|
node.date **attr_code(attr)
|
150
147
|
end
|
151
148
|
|
data/lib/isodoc/ietf/table.rb
CHANGED
@@ -1,43 +1,45 @@
|
|
1
|
-
module IsoDoc
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
module IsoDoc
|
2
|
+
module Ietf
|
3
|
+
class RfcConvert < ::IsoDoc::Convert
|
4
|
+
def table_attrs(node)
|
5
|
+
attr_code(anchor: node["id"], align: node["align"])
|
6
|
+
end
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
8
|
+
def table_parse(node, out)
|
9
|
+
@in_table = true
|
10
|
+
out.table **table_attrs(node) do |t|
|
11
|
+
table_title_parse(node, out)
|
12
|
+
thead_parse(node, t)
|
13
|
+
tbody_parse(node, t)
|
14
|
+
tfoot_parse(node, t)
|
15
|
+
end
|
16
|
+
(dl = node.at(ns("./dl"))) && parse(dl, out)
|
17
|
+
node.xpath(ns("./note")).each { |n| parse(n, out) }
|
18
|
+
@in_table = false
|
14
19
|
end
|
15
|
-
(dl = node.at(ns("./dl"))) && parse(dl, out)
|
16
|
-
node.xpath(ns("./note")).each { |n| parse(n, out) }
|
17
|
-
@in_table = false
|
18
|
-
end
|
19
20
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
def table_title_parse(node, out)
|
22
|
+
name = node.at(ns("./name")) || return
|
23
|
+
out.name do |p|
|
24
|
+
name.children.each { |n| parse(n, p) }
|
25
|
+
end
|
24
26
|
end
|
25
|
-
end
|
26
27
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
28
|
+
def tr_parse(node, out, ord, totalrows, header)
|
29
|
+
out.tr do |r|
|
30
|
+
node.elements.each do |td|
|
31
|
+
attrs = make_tr_attr(td, ord, totalrows - 1, header)
|
32
|
+
r.send td.name, **attrs do |entry|
|
33
|
+
td.children.each { |n| parse(n, entry) }
|
34
|
+
end
|
33
35
|
end
|
34
36
|
end
|
35
37
|
end
|
36
|
-
end
|
37
38
|
|
38
|
-
|
39
|
-
|
40
|
-
|
39
|
+
def make_tr_attr(cell, _row, _totalrows, _header)
|
40
|
+
attr_code(rowspan: cell["rowspan"], colspan: cell["colspan"],
|
41
|
+
align: cell["align"])
|
42
|
+
end
|
41
43
|
end
|
42
44
|
end
|
43
45
|
end
|
@@ -1316,7 +1316,7 @@
|
|
1316
1316
|
<value>commentaryOf</value>
|
1317
1317
|
<value>hasCommentary</value>
|
1318
1318
|
<value>related</value>
|
1319
|
-
<value>
|
1319
|
+
<value>hasComplement</value>
|
1320
1320
|
<value>complementOf</value>
|
1321
1321
|
<value>obsoletes</value>
|
1322
1322
|
<value>obsoletedBy</value>
|
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.1.
|
4
|
+
version: 3.1.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:
|
11
|
+
date: 2023-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mathml2asciimath
|