metanorma-ietf 3.2.7 → 3.3.1
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 +20 -32
- data/lib/isodoc/ietf/cleanup.rb +16 -176
- data/lib/isodoc/ietf/cleanup_blocks.rb +174 -0
- data/lib/isodoc/ietf/front.rb +200 -199
- data/lib/isodoc/ietf/inline.rb +8 -7
- data/lib/isodoc/ietf/section.rb +48 -48
- data/lib/metanorma/ietf/basicdoc.rng +94 -8
- data/lib/metanorma/ietf/biblio-standoc.rng +44 -1
- data/lib/metanorma/ietf/biblio.rng +11 -0
- data/lib/metanorma/ietf/blocks.rb +5 -1
- data/lib/metanorma/ietf/front.rb +14 -38
- data/lib/metanorma/ietf/ietf.rng +20 -1
- data/lib/metanorma/ietf/isodoc.rng +13 -64
- data/lib/metanorma/ietf/reqt.rng +0 -16
- data/lib/metanorma/ietf/version.rb +1 -1
- data/lib/metanorma-ietf.rb +1 -0
- data/lib/relaton/render/config.yml +2 -1
- data/lib/relaton/render/parse.rb +40 -5
- data/metanorma-ietf.gemspec +2 -1
- metadata +19 -4
data/lib/isodoc/ietf/front.rb
CHANGED
@@ -1,247 +1,248 @@
|
|
1
1
|
require "sterile"
|
2
2
|
|
3
|
-
module IsoDoc
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
3
|
+
module IsoDoc
|
4
|
+
module Ietf
|
5
|
+
class RfcConvert < ::IsoDoc::Convert
|
6
|
+
def make_front(out, isoxml)
|
7
|
+
info(isoxml, out)
|
8
|
+
out.front do |front|
|
9
|
+
title isoxml, front
|
10
|
+
seriesinfo isoxml, front
|
11
|
+
author isoxml, front
|
12
|
+
date isoxml, front
|
13
|
+
area isoxml, front
|
14
|
+
workgroup isoxml, front
|
15
|
+
keyword isoxml, front
|
16
|
+
abstract isoxml, front
|
17
|
+
note isoxml, front
|
18
|
+
boilerplate isoxml, front
|
19
|
+
end
|
18
20
|
end
|
19
|
-
end
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
def info(isoxml, out)
|
23
|
+
@meta.areas isoxml, out
|
24
|
+
super
|
25
|
+
end
|
25
26
|
|
26
|
-
|
27
|
-
|
27
|
+
def output_if_translit(text)
|
28
|
+
text.nil? and return nil
|
29
|
+
text.transliterate == text ? nil : text.transliterate
|
30
|
+
end
|
28
31
|
|
29
|
-
|
30
|
-
|
32
|
+
def title(_isoxml, front)
|
33
|
+
title = @meta.get[:doctitle] or return
|
34
|
+
front.title title, **attr_code(abbrev: @meta.get[:docabbrev],
|
35
|
+
ascii: @meta.get[:docascii] ||
|
36
|
+
output_if_translit(title))
|
37
|
+
end
|
31
38
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
output_if_translit(title)))
|
37
|
-
end
|
39
|
+
def seriesinfo(isoxml, front)
|
40
|
+
rfc_seriesinfo(isoxml, front) if @meta.get[:doctype] == "Rfc"
|
41
|
+
id_seriesinfo(isoxml, front) if @meta.get[:doctype] == "Internet Draft"
|
42
|
+
end
|
38
43
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
44
|
+
def seriesinfo_attr(isoxml)
|
45
|
+
attr_code(value: @meta.get[:docnumber] || "",
|
46
|
+
asciiValue: output_if_translit(@meta.get[:docnumber]),
|
47
|
+
status: @meta.get[:stage],
|
48
|
+
stream: isoxml&.at(ns("//bibdata/series[@type = 'stream']/" \
|
49
|
+
"title"))&.text)
|
50
|
+
end
|
43
51
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
52
|
+
def rfc_seriesinfo(isoxml, front)
|
53
|
+
front.seriesInfo **seriesinfo_attr(isoxml).merge({ name: "RFC",
|
54
|
+
asciiName: "RFC" })
|
55
|
+
i = isoxml&.at(ns("//bibdata/series[@type = 'intended']")) and
|
56
|
+
front.seriesInfo nil,
|
57
|
+
**attr_code(name: "",
|
58
|
+
status: i&.at(ns("./title"))&.text,
|
59
|
+
value: i&.at(ns("./number"))&.text || "")
|
60
|
+
end
|
51
61
|
|
52
|
-
|
53
|
-
front.seriesInfo **seriesinfo_attr(isoxml).merge({ name: "RFC",
|
54
|
-
asciiName: "RFC" })
|
55
|
-
i = isoxml&.at(ns("//bibdata/series[@type = 'intended']")) and
|
62
|
+
def id_seriesinfo(isoxml, front)
|
56
63
|
front.seriesInfo nil,
|
57
|
-
**
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
def id_seriesinfo(isoxml, front)
|
63
|
-
front.seriesInfo nil,
|
64
|
-
**seriesinfo_attr(isoxml)
|
65
|
-
.merge({ name: "Internet-Draft",
|
66
|
-
asciiName: "Internet-Draft" })
|
67
|
-
i = isoxml&.at(ns("//bibdata/series[@type = 'intended']/title"))&.text and
|
68
|
-
front.seriesInfo **attr_code(name: "", value: "", status: i)
|
69
|
-
end
|
70
|
-
|
71
|
-
def author(isoxml, front)
|
72
|
-
isoxml.xpath(("//xmlns:bibdata/xmlns:contributor[xmlns:role/@type = " \
|
73
|
-
"'author' or xmlns:role/@type = 'editor']")).each do |c|
|
74
|
-
role = c.at(ns("./role/@type")).text == "editor" ? "editor" : nil
|
75
|
-
(c.at("./organization") and org_author(c, role, front)) or
|
76
|
-
person_author(c, role, front)
|
64
|
+
**seriesinfo_attr(isoxml)
|
65
|
+
.merge({ name: "Internet-Draft",
|
66
|
+
asciiName: "Internet-Draft" })
|
67
|
+
i = isoxml&.at(ns("//bibdata/series[@type = 'intended']/title"))&.text and
|
68
|
+
front.seriesInfo **attr_code(name: "", value: "", status: i)
|
77
69
|
end
|
78
|
-
end
|
79
70
|
|
80
|
-
|
81
|
-
|
71
|
+
def author(isoxml, front)
|
72
|
+
isoxml.xpath("//xmlns:bibdata/xmlns:contributor[xmlns:role/@type = " \
|
73
|
+
"'author' or xmlns:role/@type = 'editor']").each do |c|
|
74
|
+
role = c.at(ns("./role/@type")).text == "editor" ? "editor" : nil
|
75
|
+
(c.at("./organization") and org_author(c, role, front)) or
|
76
|
+
person_author(c, role, front)
|
77
|
+
end
|
78
|
+
end
|
82
79
|
|
83
|
-
|
84
|
-
|
85
|
-
contrib
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
80
|
+
def person_author_attrs(contrib, role)
|
81
|
+
contrib.nil? and return {}
|
82
|
+
full = contrib.at(ns("./completename"))&.text
|
83
|
+
init = contrib.at(ns("./initial"))&.text ||
|
84
|
+
contrib.xpath(ns("./forename"))&.map { |n| n.text[0] }&.join(".")
|
85
|
+
init = nil if init.empty?
|
86
|
+
ret = attr_code(role: role, fullname: full, initials: init,
|
87
|
+
surname: contrib.at(ns("./surname"))&.text)
|
88
|
+
pers_author_attrs1(ret, full, init, contrib)
|
89
|
+
end
|
91
90
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
91
|
+
def pers_author_attrs1(ret, full, init, contrib)
|
92
|
+
full and ret.merge!(
|
93
|
+
attr_code(
|
94
|
+
asciiFullname: output_if_translit(full),
|
95
|
+
asciiInitials: output_if_translit(init),
|
96
|
+
asciiSurname: output_if_translit(contrib&.at(ns("./surname"))),
|
97
|
+
),
|
98
|
+
)
|
99
|
+
ret
|
100
|
+
end
|
102
101
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
102
|
+
def person_author(contrib, role, front)
|
103
|
+
attrs = person_author_attrs(contrib.at(ns("./person/name")), role)
|
104
|
+
front.author **attrs do |a|
|
105
|
+
org = contrib.at(ns("./person/affiliation/organization")) and
|
106
|
+
organization(org, a, contrib.document.at(ns("//showOnFrontPage")))
|
107
|
+
address(contrib.xpath(ns(".//address")),
|
108
|
+
contrib.at(ns(".//phone[not(@type = 'fax')]")),
|
109
|
+
contrib.at(ns(".//phone[@type = 'fax']")),
|
110
|
+
contrib.xpath(ns(".//email")), contrib.at(ns(".//uri")), a)
|
111
|
+
end
|
112
112
|
end
|
113
|
-
end
|
114
113
|
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
114
|
+
def org_author(contrib, role, front)
|
115
|
+
front.author **attr_code(role: role) do |a|
|
116
|
+
organization(contrib.at(ns("./organization")), a,
|
117
|
+
contrib.document.at(ns("//showOnFrontPage")))
|
118
|
+
address(contrib.at(ns(".//address")),
|
119
|
+
contrib.at(ns(".//phone[not(@type = 'fax')]")),
|
120
|
+
contrib.at(ns(".//phone[@type = 'fax']")),
|
121
|
+
contrib.xpath(ns(".//email")), contrib.at(ns(".//uri")), a)
|
122
|
+
end
|
123
123
|
end
|
124
|
-
end
|
125
124
|
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
125
|
+
def organization(org, out, show)
|
126
|
+
name = org.at(ns("./name"))&.text
|
127
|
+
out.organization name, **attr_code(
|
128
|
+
showOnFrontPage: show&.text, ascii: output_if_translit(name),
|
129
|
+
asciiAbbrev: output_if_translit(org.at(ns("./abbreviation"))),
|
130
|
+
abbrev: org.at(ns("./abbreviation"))
|
131
|
+
)
|
132
|
+
end
|
134
133
|
|
135
|
-
|
136
|
-
|
134
|
+
def address(addr, phone, fax, email, uri, out)
|
135
|
+
return unless addr || phone || fax || email || uri
|
137
136
|
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
137
|
+
out.address do |a|
|
138
|
+
addr and postal(addr, a)
|
139
|
+
phone and a.phone phone.text
|
140
|
+
fax and a.facsimile fax.text
|
141
|
+
email.each { |e| email(e, a) }
|
142
|
+
uri and a.uri uri.text
|
143
|
+
end
|
144
144
|
end
|
145
|
-
end
|
146
145
|
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
146
|
+
def postal(addr, out)
|
147
|
+
out.postal do |p|
|
148
|
+
if line = addr.at(ns("./formattedAddress"))
|
149
|
+
line.xpath(ns(".//br")).each { |br| br.replace("\n") }
|
150
|
+
line.text.split("\n").each do |l|
|
151
|
+
p.postalLine l, **attr_code(ascii: l.transliterate)
|
152
|
+
end
|
153
|
+
else
|
154
|
+
postal_detailed(addr, p)
|
153
155
|
end
|
154
|
-
else
|
155
|
-
postal_detailed(addr, p)
|
156
156
|
end
|
157
157
|
end
|
158
|
-
end
|
159
158
|
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
159
|
+
def postal_detailed(addr, out)
|
160
|
+
addr.xpath(ns("./street")).each do |s|
|
161
|
+
out.street s.text, **attr_code(ascii: s.text.transliterate)
|
162
|
+
end
|
163
|
+
s = addr.at(ns("./city")) and
|
164
|
+
out.city s.text, **attr_code(ascii: s.text.transliterate)
|
165
|
+
s = addr.at(ns("./state")) and
|
166
|
+
out.region s.text, **attr_code(ascii: s.text.transliterate)
|
167
|
+
s = addr.at(ns("./country")) and
|
168
|
+
out.country s.text, **attr_code(ascii: s.text.transliterate)
|
169
|
+
s = addr.at(ns("./postcode")) and
|
170
|
+
out.code s.text, **attr_code(ascii: s.text.transliterate)
|
171
|
+
end
|
173
172
|
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
173
|
+
def email(email, out)
|
174
|
+
ascii = email.text.transliterate
|
175
|
+
out.email email.text,
|
176
|
+
**attr_code(ascii: ascii == email.text ? nil : ascii)
|
177
|
+
end
|
179
178
|
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
179
|
+
def date(_isoxml, front)
|
180
|
+
date = @meta.get[:publisheddate] || @meta.get[:circulateddate] || return
|
181
|
+
date = date.gsub(/T.*$/, "")
|
182
|
+
attr = date_attr(date) || return
|
183
|
+
front.date **attr_code(attr)
|
184
|
+
end
|
186
185
|
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
186
|
+
def date_attr(date)
|
187
|
+
date.nil? and return nil
|
188
|
+
if date.length == 4 && date =~ /^\d\d\d\d$/ then { year: date }
|
189
|
+
elsif /^\d\d\d\d-?\d\d$/.match?(date)
|
190
|
+
m = /^(?<year>\d\d\d\d)-(?<month>\d\d)$/.match date
|
191
|
+
{ month: Date::MONTHNAMES[(m[:month]).to_i], year: m[:year] }
|
192
|
+
else
|
193
|
+
begin
|
194
|
+
d = Date.iso8601 date
|
195
|
+
{ day: d.day.to_s.gsub(/^0/, ""), year: d.year,
|
196
|
+
month: Date::MONTHNAMES[d.month] }
|
197
|
+
rescue StandardError
|
198
|
+
nil
|
199
|
+
end
|
201
200
|
end
|
202
201
|
end
|
203
|
-
end
|
204
202
|
|
205
|
-
|
206
|
-
|
207
|
-
|
203
|
+
def area(_isoxml, front)
|
204
|
+
@meta.get[:areas].each do |w|
|
205
|
+
front.area w
|
206
|
+
end
|
208
207
|
end
|
209
|
-
end
|
210
208
|
|
211
|
-
|
212
|
-
|
213
|
-
|
209
|
+
def workgroup(_isoxml, front)
|
210
|
+
@meta.get[:wg].each do |w|
|
211
|
+
front.workgroup w
|
212
|
+
end
|
214
213
|
end
|
215
|
-
end
|
216
214
|
|
217
|
-
|
218
|
-
|
219
|
-
|
215
|
+
def keyword(_isoxml, front)
|
216
|
+
@meta.get[:keywords].each do |kw|
|
217
|
+
front.keyword kw
|
218
|
+
end
|
220
219
|
end
|
221
|
-
end
|
222
220
|
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
221
|
+
def abstract(isoxml, front)
|
222
|
+
a = isoxml.at(ns("//preface/abstract | //preface/foreword")) || return
|
223
|
+
front.abstract **attr_code(anchor: a["id"]) do |abs|
|
224
|
+
a.children.reject do |c1|
|
225
|
+
%w(title note).include? c1.name
|
226
|
+
end.each do |c1|
|
227
|
+
parse(c1, abs)
|
228
|
+
end
|
228
229
|
end
|
229
230
|
end
|
230
|
-
end
|
231
231
|
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
232
|
+
def note(isoxml, front)
|
233
|
+
a = isoxml.at(ns("//preface/abstract/note | //preface/foreword/note")) or
|
234
|
+
return
|
235
|
+
front.note **attr_code(removeInRFC: a["removeInRFC"]) do |n|
|
236
|
+
title = a.at(ns("./name")) and n.name do |t|
|
237
|
+
title.children.each { |tt| parse(tt, t) }
|
238
|
+
end
|
239
|
+
a.children.reject { |c1| c1.name == "name" }.each do |c1|
|
240
|
+
parse(c1, n)
|
241
|
+
end
|
241
242
|
end
|
242
243
|
end
|
243
|
-
end
|
244
244
|
|
245
|
-
|
245
|
+
def boilerplate(isoxml, front); end
|
246
|
+
end
|
246
247
|
end
|
247
248
|
end
|
data/lib/isodoc/ietf/inline.rb
CHANGED
@@ -76,7 +76,8 @@ module IsoDoc
|
|
76
76
|
def hr_parse(node, out); end
|
77
77
|
|
78
78
|
def link_parse(node, out)
|
79
|
-
out.eref **attr_code(target: node["target"]
|
79
|
+
out.eref **attr_code(target: node["target"],
|
80
|
+
brackets: node["style"]) do |l|
|
80
81
|
node.children.each { |n| parse(n, l) }
|
81
82
|
end
|
82
83
|
end
|
@@ -133,12 +134,12 @@ module IsoDoc
|
|
133
134
|
%w{locality localityStack}.include? c.name
|
134
135
|
end
|
135
136
|
# section = "" unless relative.empty?
|
136
|
-
out.
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
137
|
+
out.xref **attr_code(target: node["bibitemid"],
|
138
|
+
section: eref_section(node),
|
139
|
+
relative: eref_relative(node),
|
140
|
+
sectionFormat: node["displayFormat"]) do |l|
|
141
|
+
linkend.each { |n| parse(n, l) }
|
142
|
+
end
|
142
143
|
end
|
143
144
|
|
144
145
|
def eref_relative(node)
|
data/lib/isodoc/ietf/section.rb
CHANGED
@@ -3,41 +3,41 @@ module IsoDoc
|
|
3
3
|
class RfcConvert < ::IsoDoc::Convert
|
4
4
|
def common_rfc_pis(node)
|
5
5
|
rfc_pis = {
|
6
|
-
artworkdelimiter: node
|
7
|
-
artworklines: node
|
8
|
-
authorship: node
|
9
|
-
autobreaks: node
|
10
|
-
background: node
|
11
|
-
colonspace: node
|
12
|
-
comments: node
|
13
|
-
docmapping: node
|
14
|
-
editing: node
|
15
|
-
emoticonic: node
|
16
|
-
footer: node
|
17
|
-
header: node
|
18
|
-
inline: node
|
19
|
-
iprnotified: node
|
20
|
-
linkmailto: node
|
21
|
-
linefile: node
|
22
|
-
notedraftinprogress: node
|
23
|
-
private: node
|
24
|
-
refparent: node
|
25
|
-
rfcedstyle: node
|
26
|
-
slides: node
|
27
|
-
"text-list-symbols": node
|
28
|
-
tocappendix: node
|
29
|
-
tocindent: node
|
30
|
-
tocnarrow: node
|
31
|
-
tocompact: node
|
32
|
-
topblock: node
|
33
|
-
useobject: node
|
34
|
-
strict: node
|
35
|
-
compact: node
|
36
|
-
subcompact: node
|
37
|
-
toc: node
|
38
|
-
tocdepth: node
|
39
|
-
symrefs: node
|
40
|
-
sortrefs: node
|
6
|
+
artworkdelimiter: node.at(ns("//pi/artworkdelimiter"))&.text,
|
7
|
+
artworklines: node.at(ns("//pi/artworklines"))&.text,
|
8
|
+
authorship: node.at(ns("//pi/authorship"))&.text,
|
9
|
+
autobreaks: node.at(ns("//pi/autobreaks"))&.text,
|
10
|
+
background: node.at(ns("//pi/background"))&.text,
|
11
|
+
colonspace: node.at(ns("//pi/colonspace"))&.text,
|
12
|
+
comments: node.at(ns("//pi/comments"))&.text,
|
13
|
+
docmapping: node.at(ns("//pi/docmapping"))&.text,
|
14
|
+
editing: node.at(ns("//pi/editing"))&.text,
|
15
|
+
emoticonic: node.at(ns("//pi/emoticonic"))&.text,
|
16
|
+
footer: node.at(ns("//pi/footer"))&.text,
|
17
|
+
header: node.at(ns("//pi/header"))&.text,
|
18
|
+
inline: node.at(ns("//pi/inline"))&.text,
|
19
|
+
iprnotified: node.at(ns("//pi/iprnotified"))&.text,
|
20
|
+
linkmailto: node.at(ns("//pi/linkmailto"))&.text,
|
21
|
+
linefile: node.at(ns("//pi/linefile"))&.text,
|
22
|
+
notedraftinprogress: node.at(ns("//pi/notedraftinprogress"))&.text,
|
23
|
+
private: node.at(ns("//pi/private"))&.text,
|
24
|
+
refparent: node.at(ns("//pi/refparent"))&.text,
|
25
|
+
rfcedstyle: node.at(ns("//pi/rfcedstyle"))&.text,
|
26
|
+
slides: node.at(ns("//pi/slides"))&.text,
|
27
|
+
"text-list-symbols": node.at(ns("//pi/text-list-symbols"))&.text,
|
28
|
+
tocappendix: node.at(ns("//pi/tocappendix"))&.text,
|
29
|
+
tocindent: node.at(ns("//pi/tocindent"))&.text,
|
30
|
+
tocnarrow: node.at(ns("//pi/tocnarrow"))&.text,
|
31
|
+
tocompact: node.at(ns("//pi/tocompact"))&.text,
|
32
|
+
topblock: node.at(ns("//pi/topblock"))&.text,
|
33
|
+
useobject: node.at(ns("//pi/useobject"))&.text,
|
34
|
+
strict: node.at(ns("//pi/strict"))&.text || "yes",
|
35
|
+
compact: node.at(ns("//pi/compact"))&.text || "yes",
|
36
|
+
subcompact: node.at(ns("//pi/subcompact"))&.text || "no",
|
37
|
+
toc: node.at(ns("//pi/tocinclude"))&.text,
|
38
|
+
tocdepth: node.at(ns("//pi/toc-depth"))&.text || "4",
|
39
|
+
symrefs: node.at(ns("//pi/sym-refs"))&.text || "yes",
|
40
|
+
sortrefs: node.at(ns("//pi/sort-refs"))&.text || "yes",
|
41
41
|
}
|
42
42
|
attr_code(rfc_pis)
|
43
43
|
end
|
@@ -62,22 +62,22 @@ module IsoDoc
|
|
62
62
|
docName: @meta.get[:doctype] == "Internet Draft" ? @meta.get[:docnumber] : nil,
|
63
63
|
number: @meta.get[:doctype].casecmp?("rfc") ? @meta.get[:docnumber] : nil,
|
64
64
|
category: series2category(
|
65
|
-
docxml
|
65
|
+
docxml.at(ns("//bibdata/series[@type = 'intended']/title"))&.text,
|
66
66
|
),
|
67
|
-
ipr: docxml
|
68
|
-
consensus: docxml
|
67
|
+
ipr: docxml.at(ns("//bibdata/ext/ipr"))&.text,
|
68
|
+
consensus: docxml.at(ns("//bibdata/ext/consensus"))&.text,
|
69
69
|
obsoletes: obs,
|
70
70
|
updates: upd,
|
71
|
-
indexInclude: docxml
|
72
|
-
iprExtract: docxml
|
73
|
-
sortRefs: docxml
|
74
|
-
symRefs: docxml
|
75
|
-
tocInclude: docxml
|
76
|
-
tocDepth: docxml
|
77
|
-
submissionType: docxml
|
78
|
-
|
79
|
-
|
80
|
-
"xml:lang": docxml
|
71
|
+
indexInclude: docxml.at(ns("//bibdata/ext/indexInclude"))&.text,
|
72
|
+
iprExtract: docxml.at(ns("//bibdata/ext/iprExtract"))&.text,
|
73
|
+
sortRefs: docxml.at(ns("//bibdata/ext/sortRefs"))&.text,
|
74
|
+
symRefs: docxml.at(ns("//bibdata/ext/symRefs"))&.text,
|
75
|
+
tocInclude: docxml.at(ns("//bibdata/ext/tocInclude"))&.text,
|
76
|
+
tocDepth: docxml.at(ns("//bibdata/ext/tocDepth"))&.text,
|
77
|
+
submissionType: docxml.at(ns(
|
78
|
+
"//bibdata/series[@type = 'stream']/title",
|
79
|
+
))&.text || "IETF",
|
80
|
+
"xml:lang": docxml.at(ns("//bibdata/language"))&.text,
|
81
81
|
version: "3",
|
82
82
|
"xmlns:xi": "http://www.w3.org/2001/XInclude",
|
83
83
|
}
|