metanorma-ietf 3.3.0 → 3.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,247 +1,248 @@
1
1
  require "sterile"
2
2
 
3
- module IsoDoc::Ietf
4
- class RfcConvert < ::IsoDoc::Convert
5
- def make_front(out, isoxml)
6
- info(isoxml, out)
7
- out.front do |front|
8
- title isoxml, front
9
- seriesinfo isoxml, front
10
- author isoxml, front
11
- date isoxml, front
12
- area isoxml, front
13
- workgroup isoxml, front
14
- keyword isoxml, front
15
- abstract isoxml, front
16
- note isoxml, front
17
- boilerplate isoxml, front
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
- def info(isoxml, out)
22
- @meta.areas isoxml, out
23
- super
24
- end
22
+ def info(isoxml, out)
23
+ @meta.areas isoxml, out
24
+ super
25
+ end
25
26
 
26
- def output_if_translit(text)
27
- return nil if text.nil?
27
+ def output_if_translit(text)
28
+ text.nil? and return nil
29
+ text.transliterate == text ? nil : text.transliterate
30
+ end
28
31
 
29
- text.transliterate == text ? nil : text.transliterate
30
- end
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
- 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
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
- 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
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
- 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
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
- 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
62
+ def id_seriesinfo(isoxml, front)
56
63
  front.seriesInfo nil,
57
- **attr_code(name: "",
58
- status: i&.at(ns("./title"))&.text,
59
- value: i&.at(ns("./number"))&.text || "")
60
- end
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
- def person_author_attrs(contrib, role)
81
- return {} if contrib.nil?
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
- full = contrib&.at(ns("./completename"))&.text
84
- init = contrib&.at(ns("./initial"))&.text ||
85
- contrib&.xpath(ns("./forename"))&.map { |n| n.text[0] }&.join(".")
86
- init = nil if init.empty?
87
- ret = attr_code(role: role, fullname: full, initials: init,
88
- surname: contrib&.at(ns("./surname"))&.text)
89
- pers_author_attrs1(ret, full, init, contrib)
90
- end
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
- def pers_author_attrs1(ret, full, init, contrib)
93
- full and ret.merge!(
94
- attr_code(
95
- asciiFullname: output_if_translit(full),
96
- asciiInitials: output_if_translit(init),
97
- asciiSurname: output_if_translit(contrib&.at(ns("./surname"))),
98
- ),
99
- )
100
- ret
101
- end
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
- def person_author(contrib, role, front)
104
- attrs = person_author_attrs(contrib.at(ns("./person/name")), role)
105
- front.author **attrs do |a|
106
- org = contrib.at(ns("./person/affiliation/organization")) and
107
- organization(org, a, contrib.document.at(ns("//showOnFrontPage")))
108
- address(contrib.xpath(ns(".//address")),
109
- contrib.at(ns(".//phone[not(@type = 'fax')]")),
110
- contrib.at(ns(".//phone[@type = 'fax']")),
111
- contrib.xpath(ns(".//email")), contrib.xpath(ns(".//uri")), a)
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
- def org_author(contrib, role, front)
116
- front.author **attr_code(role: role) do |a|
117
- organization(contrib.at(ns("./organization")), a,
118
- contrib.document.at(ns("//showOnFrontPage")))
119
- address(contrib.at(ns(".//address")),
120
- contrib.at(ns(".//phone[not(@type = 'fax')]")),
121
- contrib.at(ns(".//phone[@type = 'fax']")),
122
- contrib.at(ns(".//email")), contrib.at(ns(".//uri")), a)
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
- def organization(org, out, show)
127
- name = org.at(ns("./name"))&.text
128
- out.organization name, **attr_code(
129
- showOnFrontPage: show&.text, ascii: output_if_translit(name),
130
- asciiAbbrev: output_if_translit(org.at(ns("./abbreviation"))),
131
- abbrev: org.at(ns("./abbreviation"))
132
- )
133
- end
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
- def address(addr, phone, fax, email, uri, out)
136
- return unless addr || phone || fax || email || uri
134
+ def address(addr, phone, fax, email, uri, out)
135
+ return unless addr || phone || fax || email || uri
137
136
 
138
- out.address do |a|
139
- addr and postal(addr, a)
140
- phone and a.phone phone.text
141
- fax and a.facsimile fax.text
142
- email and email(email, a)
143
- uri and a.uri uri.text
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
- def postal(addr, out)
148
- out.postal do |p|
149
- if line = addr.at(ns("./formattedAddress"))
150
- line.xpath(ns(".//br")).each { |br| br.replace("\n") }
151
- line.text.split("\n").each do |l|
152
- p.postalLine l, **attr_code(ascii: l.transliterate)
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
- def postal_detailed(addr, out)
161
- addr.xpath(ns("./street")).each do |s|
162
- out.street s.text, **attr_code(ascii: s.text.transliterate)
163
- end
164
- s = addr.at(ns("./city")) and
165
- out.city s.text, **attr_code(ascii: s.text.transliterate)
166
- s = addr.at(ns("./state")) and
167
- out.region s.text, **attr_code(ascii: s.text.transliterate)
168
- s = addr.at(ns("./country")) and
169
- out.country s.text, **attr_code(ascii: s.text.transliterate)
170
- s = addr.at(ns("./postcode")) and
171
- out.code s.text, **attr_code(ascii: s.text.transliterate)
172
- end
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
- def email(email, out)
175
- ascii = email.text.transliterate
176
- out.email email.text,
177
- **attr_code(ascii: ascii == email.text ? nil : ascii)
178
- end
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
- def date(_isoxml, front)
181
- date = @meta.get[:publisheddate] || @meta.get[:circulateddate] || return
182
- date = date.gsub(/T.*$/, "")
183
- attr = date_attr(date) || return
184
- front.date **attr_code(attr)
185
- end
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
- def date_attr(date)
188
- return nil if date.nil?
189
-
190
- if date.length == 4 && date =~ /^\d\d\d\d$/ then { year: date }
191
- elsif /^\d\d\d\d-?\d\d$/.match?(date)
192
- m = /^(?<year>\d\d\d\d)-(?<month>\d\d)$/.match date
193
- { month: Date::MONTHNAMES[(m[:month]).to_i], year: m[:year] }
194
- else
195
- begin
196
- d = Date.iso8601 date
197
- { day: d.day.to_s.gsub(/^0/, ""), year: d.year,
198
- month: Date::MONTHNAMES[d.month] }
199
- rescue StandardError
200
- nil
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
- def area(_isoxml, front)
206
- @meta.get[:areas].each do |w|
207
- front.area w
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
- def workgroup(_isoxml, front)
212
- @meta.get[:wg].each do |w|
213
- front.workgroup w
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
- def keyword(_isoxml, front)
218
- @meta.get[:keywords].each do |kw|
219
- front.keyword kw
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
- def abstract(isoxml, front)
224
- a = isoxml.at(ns("//preface/abstract | //preface/foreword")) || return
225
- front.abstract **attr_code(anchor: a["id"]) do |abs|
226
- a.children.reject { |c1| %w(title note).include? c1.name }.each do |c1|
227
- parse(c1, abs)
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
- 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)
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
- def boilerplate(isoxml, front); end
245
+ def boilerplate(isoxml, front); end
246
+ end
246
247
  end
247
248
  end
@@ -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"]) do |l|
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.relref **attr_code(target: node["bibitemid"],
137
- section: eref_section(node),
138
- relative: eref_relative(node),
139
- displayFormat: node["displayFormat"]) do |l|
140
- linkend.each { |n| parse(n, l) }
141
- end
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)
@@ -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&.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",
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&.at(ns("//bibdata/series[@type = 'intended']/title"))&.text,
65
+ docxml.at(ns("//bibdata/series[@type = 'intended']/title"))&.text,
66
66
  ),
67
- ipr: docxml&.at(ns("//bibdata/ext/ipr"))&.text,
68
- consensus: docxml&.at(ns("//bibdata/ext/consensus"))&.text,
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&.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,
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
  }
@@ -244,6 +244,9 @@
244
244
  <data type="ID"/>
245
245
  </attribute>
246
246
  <attribute name="reviewer"/>
247
+ <optional>
248
+ <attribute name="type"/>
249
+ </optional>
247
250
  <optional>
248
251
  <attribute name="date">
249
252
  <data type="dateTime"/>
@@ -6,12 +6,15 @@ module Metanorma
6
6
  node.attr("keep-with-next"),
7
7
  "keep-with-previous": node.attr("keepWithPrevious") ||
8
8
  node.attr("keep-with-previous"),
9
+ indent: node.attr("indent"),
9
10
  id: ::Metanorma::Utils::anchor_or_uuid(node))
10
11
  end
11
12
 
12
13
  def ul_attrs(node)
13
14
  attr_code(id: ::Metanorma::Utils::anchor_or_uuid(node),
14
- nobullet: node.attr("nobullet"),
15
+ nobullet: node.attr("nobullet") || node.attr("empty"),
16
+ indent: node.attr("indent"),
17
+ bare: node.attr("bare"),
15
18
  spacing: node.attr("spacing"))
16
19
  end
17
20
 
@@ -20,6 +23,7 @@ module Metanorma
20
23
  type: node.attr("format") || olist_style(node.style),
21
24
  group: node.attr("group"),
22
25
  spacing: node.attr("spacing"),
26
+ indent: node.attr("indent"),
23
27
  start: node.attr("start"))
24
28
  end
25
29