metanorma-ietf 3.1.0 → 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: 43f207305bf9db4f24f830dca4e8b4eddc49ccc550704c65f091111225339a5b
4
- data.tar.gz: fa78827c2391a0c0b4a2b788771da05bed92fae965f8b4a0a944b51a525a1fa2
3
+ metadata.gz: f7aa109dac18747b04bbbc7b429e16c79af695a2b04c0717cb302e330f813f39
4
+ data.tar.gz: e25ae275c7c5de72a5917c3cf00b74a73d35d9aa302f32f45c6fac954db93f99
5
5
  SHA512:
6
- metadata.gz: dbb040f4b685c29ee35bccff130f061fdb5665542425ca18aeb366e09afdf39dd645edf0b8bbac2eaa4ffd88f09d27fa65578002d08f13ff52d084b5fe3b81ff
7
- data.tar.gz: 0221363b8c7b38fb0ba2765ebfaec2312e2868a7c75c59508049bc0d8191e34a226cbb7ec229e066283d20ddb3aefcef69c776ef7095599619431955ecbdd6f7
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>
@@ -571,6 +571,11 @@
571
571
  <ref name="MultilingualRenderingType"/>
572
572
  </attribute>
573
573
  </optional>
574
+ <optional>
575
+ <attribute name="linenums">
576
+ <data type="boolean"/>
577
+ </attribute>
578
+ </optional>
574
579
  <optional>
575
580
  <ref name="tname"/>
576
581
  </optional>
@@ -1238,6 +1243,11 @@
1238
1243
  </define>
1239
1244
  <define name="concept">
1240
1245
  <element name="concept">
1246
+ <optional>
1247
+ <attribute name="bold">
1248
+ <data type="boolean"/>
1249
+ </attribute>
1250
+ </optional>
1241
1251
  <optional>
1242
1252
  <attribute name="ital">
1243
1253
  <data type="boolean"/>
@@ -1570,7 +1580,7 @@
1570
1580
  </element>
1571
1581
  </define>
1572
1582
  <define name="misccontainer">
1573
- <element name="misc-container">
1583
+ <element name="metanorma-extension">
1574
1584
  <oneOrMore>
1575
1585
  <ref name="AnyElement"/>
1576
1586
  </oneOrMore>
@@ -2653,7 +2663,7 @@
2653
2663
  <value>full</value>
2654
2664
  <value>short</value>
2655
2665
  <value>id</value>
2656
- <value>modspec</value>
2666
+ <text/>
2657
2667
  </choice>
2658
2668
  </define>
2659
2669
  <define name="erefTypeWithConnective">
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ietf
3
- VERSION = "3.1.0".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.0
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-05 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