metanorma-ietf 3.1.2 → 3.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7aa109dac18747b04bbbc7b429e16c79af695a2b04c0717cb302e330f813f39
4
- data.tar.gz: e25ae275c7c5de72a5917c3cf00b74a73d35d9aa302f32f45c6fac954db93f99
3
+ metadata.gz: a6684b3f6e7543eb652b530245313c23cdf5e37694caa7887f8205b701c65445
4
+ data.tar.gz: e653280e65513f5462f7e24a99d23466148a93f9baa3ee298ead13f15ddd6a1c
5
5
  SHA512:
6
- metadata.gz: f839dcd5804af5ad1513a3be1cf7c5130c6a8cdec22ab2e23738d29d589715e78dca9824385d0a9e00a0e7770df72700975838c183b7eccc4d176eecd8b09a5e
7
- data.tar.gz: 41745aeefd8fce750193618471488dbe2b1a2bbf2cafdfff70ff8b9cd9f59e04eef25ed06cdac7b6c6a12b406fdb5425014ad7e683fcbf8d31f40661030fc439
6
+ metadata.gz: 210560d5093b93d01276d4c7fc97914b7b4b46f68899262019af3491e680dda0c3155ab9daef7035a7ffc0b6fe90350d291183b6546b844155040f59877a9457
7
+ data.tar.gz: 17be8103a4b71ab1cde206fdc0429379f803d912332f4adba1a31c36d0d6834d317eb1a89e6d4b603de135570260381327a6a605cf2e79d9da5782931b102fe7
@@ -187,10 +187,10 @@ module IsoDoc
187
187
  end
188
188
 
189
189
  def aside_cleanup(docxml)
190
- docxml.xpath("//t[descendant::aside] | //table[descendant::aside] | "\
191
- "//figure[descendant::aside]").each do |p|
190
+ docxml.xpath("//*[aside]").each do |p|
191
+ %w(section).include?(p.name) and next
192
192
  insert = p
193
- p.xpath(".//aside").each do |a|
193
+ p.xpath("./aside").each do |a|
194
194
  insert.next = a.remove
195
195
  insert = insert.next_element
196
196
  end
@@ -26,7 +26,7 @@ module IsoDoc::Ietf
26
26
  def output_if_translit(text)
27
27
  return nil if text.nil?
28
28
 
29
- text.transliterate != text ? text.transliterate : nil
29
+ text.transliterate == text ? nil : text.transliterate
30
30
  end
31
31
 
32
32
  def title(_isoxml, front)
@@ -45,7 +45,7 @@ module IsoDoc::Ietf
45
45
  attr_code(value: @meta.get[:docnumber] || "",
46
46
  asciiValue: output_if_translit(@meta.get[:docnumber]),
47
47
  status: @meta.get[:stage],
48
- stream: isoxml&.at(ns("//bibdata/series[@type = 'stream']/"\
48
+ stream: isoxml&.at(ns("//bibdata/series[@type = 'stream']/" \
49
49
  "title"))&.text)
50
50
  end
51
51
 
@@ -69,10 +69,10 @@ module IsoDoc::Ietf
69
69
  end
70
70
 
71
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|
72
+ isoxml.xpath(("//xmlns:bibdata/xmlns:contributor[xmlns:role/@type = " \
73
+ "'author' or xmlns:role/@type = 'editor']")).each do |c|
74
74
  role = c.at(ns("./role/@type")).text == "editor" ? "editor" : nil
75
- c.at("./organization") and org_author(c, role, front) or
75
+ (c.at("./organization") and org_author(c, role, front)) or
76
76
  person_author(c, role, front)
77
77
  end
78
78
  end
@@ -148,7 +148,7 @@ module IsoDoc::Ietf
148
148
  out.postal do |p|
149
149
  if line = addr.at(ns("./formattedAddress"))
150
150
  line.xpath(ns(".//br")).each { |br| br.replace("\n") }
151
- line.text.split(/\n/).each do |l|
151
+ line.text.split("\n").each do |l|
152
152
  p.postalLine l, **attr_code(ascii: l.transliterate)
153
153
  end
154
154
  else
@@ -1,8 +1,6 @@
1
1
  module IsoDoc
2
2
  module Ietf
3
3
  class RfcConvert < ::IsoDoc::Convert
4
- # TODO displayreference will be implemented as combination of autofetch and user-provided citations
5
-
6
4
  def bibliography(isoxml, out)
7
5
  isoxml.xpath(ns("//references/bibitem/docidentifier")).each do |i|
8
6
  i.children = docid_prefix(i["type"], i.text)
@@ -113,10 +111,10 @@ module IsoDoc
113
111
  end
114
112
 
115
113
  def relaton_person_to_author(pers, role, node)
116
- full = pers&.at(ns("./completename"))&.text
117
- surname = pers&.at(ns("./surname"))&.text
118
- initials = pers&.xpath(ns("./initial"))&.map(&:text)&.join(" ") ||
119
- pers&.xpath(ns("./forename"))&.map { |i| i.text[0] }&.join(" ")
114
+ full = pers.at(ns("./completename"))&.text
115
+ surname = pers.at(ns("./surname"))&.text
116
+ initials = pers.xpath(ns("./initial"))&.map(&:text)&.join(" ") ||
117
+ pers.xpath(ns("./forename"))&.map { |i| i.text[0] }&.join(" ")
120
118
  initials = nil if initials.empty?
121
119
  node.author nil, **attr_code(
122
120
  fullname: full,
@@ -1,178 +1,178 @@
1
- module IsoDoc::Ietf
2
- class RfcConvert < ::IsoDoc::Convert
3
- def common_rfc_pis(node)
4
- rfc_pis = {
5
- artworkdelimiter: node&.at(ns("//pi/artworkdelimiter"))&.text,
6
- artworklines: node&.at(ns("//pi/artworklines"))&.text,
7
- authorship: node&.at(ns("//pi/authorship"))&.text,
8
- autobreaks: node&.at(ns("//pi/autobreaks"))&.text,
9
- background: node&.at(ns("//pi/background"))&.text,
10
- colonspace: node&.at(ns("//pi/colonspace"))&.text,
11
- comments: node&.at(ns("//pi/comments"))&.text,
12
- docmapping: node&.at(ns("//pi/docmapping"))&.text,
13
- editing: node&.at(ns("//pi/editing"))&.text,
14
- emoticonic: node&.at(ns("//pi/emoticonic"))&.text,
15
- footer: node&.at(ns("//pi/footer"))&.text,
16
- header: node&.at(ns("//pi/header"))&.text,
17
- inline: node&.at(ns("//pi/inline"))&.text,
18
- iprnotified: node&.at(ns("//pi/iprnotified"))&.text,
19
- linkmailto: node&.at(ns("//pi/linkmailto"))&.text,
20
- linefile: node&.at(ns("//pi/linefile"))&.text,
21
- notedraftinprogress: node&.at(ns("//pi/notedraftinprogress"))&.text,
22
- private: node&.at(ns("//pi/private"))&.text,
23
- refparent: node&.at(ns("//pi/refparent"))&.text,
24
- rfcedstyle: node&.at(ns("//pi/rfcedstyle"))&.text,
25
- slides: node&.at(ns("//pi/slides"))&.text,
26
- "text-list-symbols": node&.at(ns("//pi/text-list-symbols"))&.text,
27
- tocappendix: node&.at(ns("//pi/tocappendix"))&.text,
28
- tocindent: node&.at(ns("//pi/tocindent"))&.text,
29
- tocnarrow: node&.at(ns("//pi/tocnarrow"))&.text,
30
- tocompact: node&.at(ns("//pi/tocompact"))&.text,
31
- topblock: node&.at(ns("//pi/topblock"))&.text,
32
- useobject: node&.at(ns("//pi/useobject"))&.text,
33
- strict: node&.at(ns("//pi/strict"))&.text || "yes",
34
- compact: node&.at(ns("//pi/compact"))&.text || "yes",
35
- subcompact: node&.at(ns("//pi/subcompact"))&.text || "no",
36
- toc: node&.at(ns("//pi/tocinclude"))&.text,
37
- tocdepth: node&.at(ns("//pi/toc-depth"))&.text || "4",
38
- symrefs: node&.at(ns("//pi/sym-refs"))&.text || "yes",
39
- sortrefs: node&.at(ns("//pi/sort-refs"))&.text || "yes",
40
- }
41
- attr_code(rfc_pis)
42
- end
1
+ module IsoDoc
2
+ module Ietf
3
+ class RfcConvert < ::IsoDoc::Convert
4
+ def common_rfc_pis(node)
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",
41
+ }
42
+ attr_code(rfc_pis)
43
+ end
43
44
 
44
- def set_pis(node, doc)
45
- rfc_pis = common_rfc_pis(node)
46
- rfc_pis.each_pair do |k, v|
47
- pi = Nokogiri::XML::ProcessingInstruction.new(doc, "rfc",
48
- "#{k}=\"#{v}\"")
49
- doc.root.add_previous_sibling(pi)
45
+ def set_pis(node, doc)
46
+ rfc_pis = common_rfc_pis(node)
47
+ rfc_pis.each_pair do |k, v|
48
+ pi = Nokogiri::XML::ProcessingInstruction.new(doc, "rfc",
49
+ "#{k}=\"#{v}\"")
50
+ doc.root.add_previous_sibling(pi)
51
+ end
52
+ doc.to_xml
50
53
  end
51
- doc.to_xml
52
- end
53
54
 
54
- def rfc_attributes(docxml)
55
- t = Time.now.getutc
56
- obs = xpath_comma(docxml
57
- .xpath(ns("//bibdata/relation[@type = 'obsoletes']/bibitem/docidentifier")))
58
- upd = xpath_comma(docxml
59
- .xpath(ns("//bibdata/relation[@type = 'updates']/bibitem/docidentifier")))
60
- {
61
- docName: @meta.get[:doctype] == "Internet Draft" ? @meta.get[:docnumber] : nil,
62
- number: @meta.get[:doctype].casecmp?("rfc") ? @meta.get[:docnumber] : nil,
63
- category: series2category(
64
- docxml&.at(ns("//bibdata/series[@type = 'intended']/title"))&.text,
65
- ),
66
- ipr: docxml&.at(ns("//bibdata/ext/ipr"))&.text,
67
- consensus: docxml&.at(ns("//bibdata/ext/consensus"))&.text,
68
- obsoletes: obs,
69
- updates: upd,
70
- indexInclude: docxml&.at(ns("//bibdata/ext/indexInclude"))&.text,
71
- iprExtract: docxml&.at(ns("//bibdata/ext/iprExtract"))&.text,
72
- sortRefs: docxml&.at(ns("//bibdata/ext/sortRefs"))&.text,
73
- symRefs: docxml&.at(ns("//bibdata/ext/symRefs"))&.text,
74
- tocInclude: docxml&.at(ns("//bibdata/ext/tocInclude"))&.text,
75
- tocDepth: docxml&.at(ns("//bibdata/ext/tocDepth"))&.text,
76
- submissionType: docxml&.at(ns(
77
- "//bibdata/series[@type = 'stream']/title",
78
- ))&.text || "IETF",
79
- 'xml:lang': docxml&.at(ns("//bibdata/language"))&.text,
80
- version: "3",
81
- 'xmlns:xi': "http://www.w3.org/2001/XInclude",
82
- }
83
- end
55
+ def rfc_attributes(docxml)
56
+ # t = Time.now.getutc
57
+ obs = xpath_comma(docxml
58
+ .xpath(ns("//bibdata/relation[@type = 'obsoletes']/bibitem/docidentifier")))
59
+ upd = xpath_comma(docxml
60
+ .xpath(ns("//bibdata/relation[@type = 'updates']/bibitem/docidentifier")))
61
+ {
62
+ docName: @meta.get[:doctype] == "Internet Draft" ? @meta.get[:docnumber] : nil,
63
+ number: @meta.get[:doctype].casecmp?("rfc") ? @meta.get[:docnumber] : nil,
64
+ category: series2category(
65
+ docxml&.at(ns("//bibdata/series[@type = 'intended']/title"))&.text,
66
+ ),
67
+ ipr: docxml&.at(ns("//bibdata/ext/ipr"))&.text,
68
+ consensus: docxml&.at(ns("//bibdata/ext/consensus"))&.text,
69
+ obsoletes: obs,
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,
81
+ version: "3",
82
+ "xmlns:xi": "http://www.w3.org/2001/XInclude",
83
+ }
84
+ end
84
85
 
85
- def series2category(series)
86
- case series&.downcase
87
- when "standard", "std" then "std"
88
- when "informational", "info" then "info"
89
- when "experimental", "exp" then "exp"
90
- when "bcp" then "bcp"
91
- when "fyi" then "info"
92
- when "full-standard" then "std"
93
- when "historic" then "historic"
94
- else
95
- "std"
86
+ def series2category(series)
87
+ case series&.downcase
88
+ when "standard", "std", "full-standard" then "std"
89
+ when "informational", "info", "fyi" then "info"
90
+ when "experimental", "exp" then "exp"
91
+ when "bcp" then "bcp"
92
+ when "historic" then "historic"
93
+ else
94
+ "std"
95
+ end
96
96
  end
97
- end
98
97
 
99
- def xpath_comma(xpath)
100
- return nil if xpath.empty?
98
+ def xpath_comma(xpath)
99
+ return nil if xpath.empty?
101
100
 
102
- xpath.map(&:text).join(", ")
103
- end
101
+ xpath.map(&:text).join(", ")
102
+ end
104
103
 
105
- def make_link(out, isoxml)
106
- links = isoxml
107
- .xpath(ns("//bibdata/relation[@type = 'includedIn' or "\
108
- "@type = 'describedBy' or @type = 'derivedFrom' or "\
109
- "@type = 'instance']")) || return
110
- links.each do |l|
111
- out.link **{ href: l&.at(ns("./bibitem/docidentifier"))&.text,
112
- rel: rel2iana(l["type"]) }
104
+ def make_link(out, isoxml)
105
+ links = isoxml
106
+ .xpath(ns("//bibdata/relation[@type = 'includedIn' or " \
107
+ "@type = 'describedBy' or @type = 'derivedFrom' or " \
108
+ "@type = 'instance']")) || return
109
+ links.each do |l|
110
+ out.link href: l&.at(ns("./bibitem/docidentifier"))&.text,
111
+ rel: rel2iana(l["type"])
112
+ end
113
113
  end
114
- end
115
114
 
116
- def rel2iana(type)
117
- case type
118
- when "includedIn" then "item"
119
- when "describedBy" then "describedby"
120
- when "derivedFrom" then "convertedfrom"
121
- when "instance" then "alternate"
122
- else
123
- "alternate"
115
+ def rel2iana(type)
116
+ case type
117
+ when "includedIn" then "item"
118
+ when "describedBy" then "describedby"
119
+ when "derivedFrom" then "convertedfrom"
120
+ when "instance" then "alternate"
121
+ else
122
+ "alternate"
123
+ end
124
124
  end
125
- end
126
125
 
127
- def make_middle(out, isoxml)
128
- out.middle do |middle|
129
- clause isoxml, middle
126
+ def make_middle(out, isoxml)
127
+ out.middle do |middle|
128
+ clause isoxml, middle
129
+ end
130
130
  end
131
- end
132
131
 
133
- def make_back(out, isoxml)
134
- out.back do |back|
135
- bibliography isoxml, back
136
- annex isoxml, back
132
+ def make_back(out, isoxml)
133
+ out.back do |back|
134
+ bibliography isoxml, back
135
+ annex isoxml, back
136
+ end
137
137
  end
138
- end
139
138
 
140
- def clause_parse_title(_node, div, clause, _out, _heading_attrs = {})
141
- return unless clause
139
+ def clause_parse_title(_node, div, clause, _out, _heading_attrs = {})
140
+ return unless clause
142
141
 
143
- div.name do |n|
144
- clause&.children&.each { |c2| parse(c2, n) }
142
+ div.name do |n|
143
+ clause&.children&.each { |c2| parse(c2, n) }
144
+ end
145
145
  end
146
- end
147
146
 
148
- def clause_parse(node, out)
149
- return if node.at(ns(".//references"))
147
+ def clause_parse(node, out)
148
+ return if node.at(ns(".//references"))
150
149
 
151
- out.section **attr_code(
152
- anchor: node["id"], numbered: node["numbered"],
153
- removeInRFC: node["removeInRFC"], toc: node["toc"]
154
- ) do |div|
155
- clause_parse_title(node, div, node.at(ns("./title")), out)
156
- node.children.reject { |c1| c1.name == "title" }.each do |c1|
157
- parse(c1, div)
150
+ out.section **attr_code(
151
+ anchor: node["id"], numbered: node["numbered"],
152
+ removeInRFC: node["removeInRFC"], toc: node["toc"]
153
+ ) do |div|
154
+ clause_parse_title(node, div, node.at(ns("./title")), out)
155
+ node.children.reject { |c1| c1.name == "title" }.each do |c1|
156
+ parse(c1, div)
157
+ end
158
158
  end
159
159
  end
160
- end
161
160
 
162
- def clause(isoxml, out)
163
- isoxml.xpath("//xmlns:preface/child::*"\
164
- "[not(name() = 'abstract' or name() = 'foreword')] "\
165
- "| //xmlns:sections/child::*").each do |c|
166
- # cdup = c.dup
167
- # cdup.xpath(ns(".//references")).each { |r| r.remove }
168
- # cdup.at("./*[local-name() != 'title'][normalize-space(text()) != '']") or next
169
- clause_parse(c, out)
161
+ def clause(isoxml, out)
162
+ isoxml.xpath("//xmlns:preface/child::*" \
163
+ "[not(name() = 'abstract' or name() = 'foreword')] " \
164
+ "| //xmlns:sections/child::*").each do |c|
165
+ # cdup = c.dup
166
+ # cdup.xpath(ns(".//references")).each { |r| r.remove }
167
+ # cdup.at("./*[local-name() != 'title'][normalize-space(text()) != '']") or next
168
+ clause_parse(c, out)
169
+ end
170
170
  end
171
- end
172
171
 
173
- def annex(isoxml, out)
174
- isoxml.xpath(ns("//annex")).each do |c|
175
- clause_parse(c, out)
172
+ def annex(isoxml, out)
173
+ isoxml.xpath(ns("//annex")).each do |c|
174
+ clause_parse(c, out)
175
+ end
176
176
  end
177
177
  end
178
178
  end
@@ -522,7 +522,6 @@
522
522
  <value>tip</value>
523
523
  <value>important</value>
524
524
  <value>caution</value>
525
- <value>statement</value>
526
525
  </choice>
527
526
  </define>
528
527
  <define name="figure">
@@ -216,6 +216,9 @@
216
216
  <optional>
217
217
  <ref name="fullname"/>
218
218
  </optional>
219
+ <zeroOrMore>
220
+ <ref name="credential"/>
221
+ </zeroOrMore>
219
222
  <zeroOrMore>
220
223
  <ref name="affiliation"/>
221
224
  </zeroOrMore>
@@ -232,6 +235,11 @@
232
235
  <ref name="FullNameType"/>
233
236
  </element>
234
237
  </define>
238
+ <define name="credential">
239
+ <element name="credential">
240
+ <text/>
241
+ </element>
242
+ </define>
235
243
  <define name="FullNameType">
236
244
  <choice>
237
245
  <group>
@@ -305,7 +313,9 @@
305
313
  <zeroOrMore>
306
314
  <ref name="affiliationdescription"/>
307
315
  </zeroOrMore>
308
- <ref name="organization"/>
316
+ <optional>
317
+ <ref name="organization"/>
318
+ </optional>
309
319
  </element>
310
320
  </define>
311
321
  <define name="affiliationname">
@@ -83,6 +83,8 @@ module Metanorma
83
83
  end
84
84
 
85
85
  def section_names_refs_cleanup(xml); end
86
+
87
+ def note_cleanup(xmldoc); end
86
88
  end
87
89
  end
88
90
  end
@@ -66,6 +66,7 @@
66
66
  <value>caution</value>
67
67
  <value>statement</value>
68
68
  <value>editorial</value>
69
+ <value>box</value>
69
70
  </choice>
70
71
  </define>
71
72
  <define name="index">
@@ -1577,6 +1578,9 @@
1577
1578
  <zeroOrMore>
1578
1579
  <ref name="indexsect"/>
1579
1580
  </zeroOrMore>
1581
+ <optional>
1582
+ <ref name="colophon"/>
1583
+ </optional>
1580
1584
  </element>
1581
1585
  </define>
1582
1586
  <define name="misccontainer">
@@ -1599,6 +1603,13 @@
1599
1603
  </oneOrMore>
1600
1604
  </element>
1601
1605
  </define>
1606
+ <define name="colophon">
1607
+ <element name="colophon">
1608
+ <oneOrMore>
1609
+ <ref name="content"/>
1610
+ </oneOrMore>
1611
+ </element>
1612
+ </define>
1602
1613
  <define name="foreword">
1603
1614
  <element name="foreword">
1604
1615
  <ref name="Content-Section"/>
@@ -1,4 +1,5 @@
1
1
  require "metanorma/ietf/data/workgroups"
2
+ require "metanorma-utils"
2
3
 
3
4
  module Metanorma
4
5
  module Ietf
@@ -7,6 +8,19 @@ module Metanorma
7
8
  super
8
9
  image_validate(doc)
9
10
  workgroup_validate(doc)
11
+ submission_validate(doc)
12
+ end
13
+
14
+ def ns(path)
15
+ ::Metanorma::Utils::ns(path)
16
+ end
17
+
18
+ def submission_validate(doc)
19
+ stream = doc.at(("//bibdata/series[@type = 'stream']/title"))&.text
20
+ status = doc.at(("//bibdata/status/stage"))&.text
21
+ stream == "editorial" && status != "informational" and
22
+ @log.add("Document Attributes", nil,
23
+ "Editorial stream must have Informational status")
10
24
  end
11
25
 
12
26
  def image_validate(doc)
@@ -24,7 +38,8 @@ module Metanorma
24
38
  wg_norm = wg.text.sub(/ (Working|Research) Group$/, "")
25
39
  next if @workgroups.include?(wg_norm)
26
40
 
27
- @log.add("Document Attributes", nil, "IETF: unrecognised working group #{wg.text}")
41
+ @log.add("Document Attributes", nil,
42
+ "IETF: unrecognised working group #{wg.text}")
28
43
  end
29
44
  end
30
45
 
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ietf
3
- VERSION = "3.1.2".freeze
3
+ VERSION = "3.1.3".freeze
4
4
  end
5
5
  end
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.2
4
+ version: 3.1.3
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-01-23 00:00:00.000000000 Z
11
+ date: 2023-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mathml2asciimath