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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a4d0bbd3e456f5931f3ed658e68543d2026df26a3a09c6b30d8a5e79e7111070
4
- data.tar.gz: 0f494d74e351587cc0927be2eefd7c749f36d73572317b1ca294c04c3c80ec2f
3
+ metadata.gz: f7aa109dac18747b04bbbc7b429e16c79af695a2b04c0717cb302e330f813f39
4
+ data.tar.gz: e25ae275c7c5de72a5917c3cf00b74a73d35d9aa302f32f45c6fac954db93f99
5
5
  SHA512:
6
- metadata.gz: 4e9c9d9fea112a2a1d82720a98a3dbb945d9ba478429c09a319316e6fb93654c7cdcc8b58274916ae55834f7a799c3e959d9dfbb4ef8806820d29b681a7b565b
7
- data.tar.gz: ba76888850b0540bc9674f5ce5881926227299f7277c807c1d4d46af319029f98eb51a563e21f0f04c1b81748cc10e2e1bc29fac6283c3cd5d08ce5ece2e242e
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 /.match?(ident.text)
75
- out.seriesInfo nil, **attr_code(value: ident.text.sub(/^RFC 0*/, ""),
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 do |i|
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
- return unless date
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
 
@@ -1,43 +1,45 @@
1
- module IsoDoc::Ietf
2
- class RfcConvert < ::IsoDoc::Convert
3
- def table_attrs(node)
4
- attr_code(anchor: node["id"], align: node["align"])
5
- end
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
- def table_parse(node, out)
8
- @in_table = true
9
- out.table **table_attrs(node) do |t|
10
- table_title_parse(node, out)
11
- thead_parse(node, t)
12
- tbody_parse(node, t)
13
- tfoot_parse(node, t)
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
- def table_title_parse(node, out)
21
- name = node.at(ns("./name")) || return
22
- out.name do |p|
23
- name.children.each { |n| parse(n, p) }
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
- def tr_parse(node, out, ord, totalrows, header)
28
- out.tr do |r|
29
- node.elements.each do |td|
30
- attrs = make_tr_attr(td, ord, totalrows - 1, header)
31
- r.send td.name, **attrs do |entry|
32
- td.children.each { |n| parse(n, entry) }
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
- def make_tr_attr(td, row, totalrows, header)
39
- attr_code(rowspan: td["rowspan"], colspan: td["colspan"],
40
- align: td["align"] )
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>complements</value>
1319
+ <value>hasComplement</value>
1320
1320
  <value>complementOf</value>
1321
1321
  <value>obsoletes</value>
1322
1322
  <value>obsoletedBy</value>
@@ -1580,7 +1580,7 @@
1580
1580
  </element>
1581
1581
  </define>
1582
1582
  <define name="misccontainer">
1583
- <element name="misc-container">
1583
+ <element name="metanorma-extension">
1584
1584
  <oneOrMore>
1585
1585
  <ref name="AnyElement"/>
1586
1586
  </oneOrMore>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ietf
3
- VERSION = "3.1.1".freeze
3
+ VERSION = "3.1.2".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.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: 2022-12-19 00:00:00.000000000 Z
11
+ date: 2023-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mathml2asciimath