metanorma-ietf 3.2.6 → 3.3.0

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: 95d5287b8cd085af79c232c2b9d5c744410758658044d1130f5e14ace554c53b
4
- data.tar.gz: b710815a5b73c58b5e665482069dc7b467da91cddea0649fcd4fe6ac0e3895d5
3
+ metadata.gz: 109aa7a03b031de0e72dabfabbe34735c822ebf0156ce74f1f2803b2f808d358
4
+ data.tar.gz: 3cf266330db5a81e0ef4e2efd5aae8ffb68261fe47d3780396102c740cf28c66
5
5
  SHA512:
6
- metadata.gz: bfa939e6c06245506aad5551ed30413e1c13639d83c65ed6342b83c9798543a019e20e209d414d6a0f21ac2adaf2ac48e5dc699391e7d205797e691e724a0d62
7
- data.tar.gz: 6ee134a2450f7a1c0a8f4061b33c2ebfc23e5e0dfa72a0816e4b5f960079d340d59be038e3dab53a6c5be7a0c0c513c499b78dccdae9577c6533cd433bfc55f5
6
+ metadata.gz: a0b0e91046d7f9019bbfe911a3e21afbb2f5c26789e1d4de286a8898125fc607e4cdaa4d563806db6bbcaae3b4438f506d6ef46fe8272a52aba0edaf7e78e951
7
+ data.tar.gz: cd39365adb5279a71cdcddb42ba33e9a68cc54d5d1ca346128694adb58fb013da87b6b9ddaab7312ebd74eeec2b6c7e0ca72f1fc2246c99c17a39713c9ab5bac
data/Gemfile CHANGED
@@ -4,12 +4,6 @@ Encoding.default_internal = Encoding::UTF_8
4
4
  source "https://rubygems.org"
5
5
  git_source(:github) { |repo| "https://github.com/#{repo}" }
6
6
 
7
- group :development, :test do
8
- gem "rspec"
9
- end
10
-
11
- if File.exist? "Gemfile.devel"
12
- eval File.read("Gemfile.devel"), nil, "Gemfile.devel" # rubocop:disable Security/Eval
13
- end
14
-
15
7
  gemspec
8
+
9
+ eval_gemfile("Gemfile.devel") rescue nil
@@ -112,9 +112,8 @@ module IsoDoc
112
112
 
113
113
  def figure_data_uri(docxml)
114
114
  docxml.xpath("//artwork").each do |a|
115
- next unless %r{^data:image/svg\+xml;base64}.match?(a["src"])
116
-
117
- f = Metanorma::Utils::save_dataimage(a["src"])
115
+ %r{^data:image/svg\+xml;base64}.match?(a["src"]) or next
116
+ f = Vectory::Utils::save_dataimage(a["src"])
118
117
  a.delete("src")
119
118
  a.children = File.read(f).sub(%r{<\?.+\?>}, "")
120
119
  end
@@ -95,8 +95,89 @@
95
95
  <ref name="pagebreak"/>
96
96
  <ref name="hr"/>
97
97
  <ref name="bookmark"/>
98
+ <ref name="amend"/>
98
99
  </choice>
99
100
  </define>
101
+ <define name="amend">
102
+ <element name="amend">
103
+ <ref name="AmendType"/>
104
+ </element>
105
+ </define>
106
+ <define name="AmendType">
107
+ <optional>
108
+ <attribute name="id">
109
+ <data type="ID"/>
110
+ </attribute>
111
+ </optional>
112
+ <attribute name="change">
113
+ <choice>
114
+ <value>add</value>
115
+ <value>modify</value>
116
+ <value>delete</value>
117
+ <value>replace</value>
118
+ </choice>
119
+ </attribute>
120
+ <optional>
121
+ <attribute name="path"/>
122
+ </optional>
123
+ <optional>
124
+ <attribute name="path_end"/>
125
+ </optional>
126
+ <optional>
127
+ <attribute name="title"/>
128
+ </optional>
129
+ <optional>
130
+ <element name="location">
131
+ <zeroOrMore>
132
+ <choice>
133
+ <ref name="locality"/>
134
+ <ref name="localityStack"/>
135
+ </choice>
136
+ </zeroOrMore>
137
+ </element>
138
+ </optional>
139
+ <optional>
140
+ <element name="description">
141
+ <zeroOrMore>
142
+ <ref name="BasicBlock"/>
143
+ </zeroOrMore>
144
+ </element>
145
+ </optional>
146
+ <optional>
147
+ <element name="newcontent">
148
+ <optional>
149
+ <attribute name="id">
150
+ <data type="ID"/>
151
+ </attribute>
152
+ </optional>
153
+ <zeroOrMore>
154
+ <ref name="BasicBlock"/>
155
+ </zeroOrMore>
156
+ </element>
157
+ </optional>
158
+ <zeroOrMore>
159
+ <ref name="classification"/>
160
+ </zeroOrMore>
161
+ <zeroOrMore>
162
+ <ref name="contributor"/>
163
+ </zeroOrMore>
164
+ </define>
165
+ <define name="classification">
166
+ <element name="classification">
167
+ <ref name="classification_tag"/>
168
+ <ref name="classification_value"/>
169
+ </element>
170
+ </define>
171
+ <define name="classification_tag">
172
+ <element name="tag">
173
+ <text/>
174
+ </element>
175
+ </define>
176
+ <define name="classification_value">
177
+ <element name="value">
178
+ <text/>
179
+ </element>
180
+ </define>
100
181
  <define name="paragraph">
101
182
  <element name="p">
102
183
  <ref name="ParagraphType"/>
@@ -715,27 +796,36 @@
715
796
  </define>
716
797
  <define name="ruby">
717
798
  <element name="ruby">
718
- <zeroOrMore>
719
- <choice>
720
- <ref name="PureTextElement"/>
721
- <ref name="rp"/>
722
- <ref name="rt"/>
723
- </choice>
724
- </zeroOrMore>
799
+ <choice>
800
+ <ref name="ruby_pronunciation"/>
801
+ <ref name="ruby_annotation"/>
802
+ </choice>
803
+ <choice>
804
+ <text/>
805
+ <ref name="ruby"/>
806
+ </choice>
725
807
  </element>
726
808
  </define>
727
- <define name="rp">
728
- <element name="rp">
729
- <zeroOrMore>
730
- <ref name="PureTextElement"/>
731
- </zeroOrMore>
809
+ <define name="ruby_pronunciation">
810
+ <element name="pronunciation">
811
+ <attribute name="value"/>
812
+ <optional>
813
+ <attribute name="script"/>
814
+ </optional>
815
+ <optional>
816
+ <attribute name="lang"/>
817
+ </optional>
732
818
  </element>
733
819
  </define>
734
- <define name="rt">
735
- <element name="rt">
736
- <zeroOrMore>
737
- <ref name="PureTextElement"/>
738
- </zeroOrMore>
820
+ <define name="ruby_annotation">
821
+ <element name="annotation">
822
+ <attribute name="value"/>
823
+ <optional>
824
+ <attribute name="script"/>
825
+ </optional>
826
+ <optional>
827
+ <attribute name="lang"/>
828
+ </optional>
739
829
  </element>
740
830
  </define>
741
831
  <define name="br">
@@ -930,18 +1020,12 @@
930
1020
  </optional>
931
1021
  <optional>
932
1022
  <attribute name="width">
933
- <choice>
934
- <data type="int"/>
935
- <value>auto</value>
936
- </choice>
1023
+ <ref name="ImageSize"/>
937
1024
  </attribute>
938
1025
  </optional>
939
1026
  <optional>
940
1027
  <attribute name="height">
941
- <choice>
942
- <data type="int"/>
943
- <value>auto</value>
944
- </choice>
1028
+ <ref name="ImageSize"/>
945
1029
  </attribute>
946
1030
  </optional>
947
1031
  <optional>
@@ -956,6 +1040,14 @@
956
1040
  </attribute>
957
1041
  </optional>
958
1042
  </define>
1043
+ <define name="ImageSize">
1044
+ <choice>
1045
+ <data type="string">
1046
+ <param name="pattern">\d+([.]\d+)?(%?)</param>
1047
+ </data>
1048
+ <value>auto</value>
1049
+ </choice>
1050
+ </define>
959
1051
  <define name="video">
960
1052
  <element name="video">
961
1053
  <attribute name="id">
@@ -9,11 +9,42 @@
9
9
  -->
10
10
  <include href="biblio.rng">
11
11
  <define name="BibData">
12
- <ref name="BibliographicItem"/>
12
+ <ref name="StandardBibliographicItem"/>
13
13
  <optional>
14
14
  <ref name="ext"/>
15
15
  </optional>
16
16
  </define>
17
+ <define name="docrelation">
18
+ <element name="relation">
19
+ <attribute name="type">
20
+ <ref name="DocRelationType"/>
21
+ </attribute>
22
+ <optional>
23
+ <element name="description">
24
+ <ref name="FormattedString"/>
25
+ </element>
26
+ </optional>
27
+ <element name="bibitem">
28
+ <ref name="StandardReducedBibliographicItem"/>
29
+ </element>
30
+ <choice>
31
+ <zeroOrMore>
32
+ <ref name="locality"/>
33
+ </zeroOrMore>
34
+ <zeroOrMore>
35
+ <ref name="localityStack"/>
36
+ </zeroOrMore>
37
+ </choice>
38
+ <choice>
39
+ <zeroOrMore>
40
+ <ref name="sourceLocality"/>
41
+ </zeroOrMore>
42
+ <zeroOrMore>
43
+ <ref name="sourceLocalityStack"/>
44
+ </zeroOrMore>
45
+ </choice>
46
+ </element>
47
+ </define>
17
48
  </include>
18
49
  <define name="ext">
19
50
  <element name="ext">
@@ -161,4 +192,16 @@
161
192
  </optional>
162
193
  </element>
163
194
  </define>
195
+ <define name="StandardBibliographicItem">
196
+ <ref name="BibliographicItem"/>
197
+ <zeroOrMore>
198
+ <ref name="amend"/>
199
+ </zeroOrMore>
200
+ </define>
201
+ <define name="StandardReducedBibliographicItem">
202
+ <ref name="ReducedBibliographicItem"/>
203
+ <zeroOrMore>
204
+ <ref name="amend"/>
205
+ </zeroOrMore>
206
+ </define>
164
207
  </grammar>
@@ -241,6 +241,9 @@
241
241
  </element>
242
242
  </define>
243
243
  <define name="FullNameType">
244
+ <optional>
245
+ <ref name="name_abbreviation"/>
246
+ </optional>
244
247
  <choice>
245
248
  <group>
246
249
  <zeroOrMore>
@@ -266,6 +269,11 @@
266
269
  <ref name="variantname"/>
267
270
  </zeroOrMore>
268
271
  </define>
272
+ <define name="name_abbreviation">
273
+ <element name="abbreviation">
274
+ <ref name="LocalizedString"/>
275
+ </element>
276
+ </define>
269
277
  <define name="prefix">
270
278
  <element name="prefix">
271
279
  <ref name="LocalizedString"/>
@@ -870,6 +878,9 @@
870
878
  <optional>
871
879
  <ref name="validity"/>
872
880
  </optional>
881
+ <optional>
882
+ <ref name="depiction"/>
883
+ </optional>
873
884
  </define>
874
885
  <define name="btitle">
875
886
  <element name="title">
@@ -9,33 +9,9 @@ module Metanorma
9
9
  personal_author(node, xml)
10
10
  end
11
11
 
12
- =begin
13
- def metadata_publisher(node, xml)
14
- publishers = node.attr("publisher") || "IETF"
15
- csv_split(publishers)&.each do |p|
16
- xml.contributor do |c|
17
- c.role **{ type: "publisher" }
18
- c.organization { |a| organization(a, p, true) }
19
- end
20
- end
21
- end
22
-
23
- def metadata_copyright(node, xml)
24
- publishers = node.attr("copyright-holder") || node.attr("publisher") || "IETF"
25
- csv_split(publishers)&.each do |p|
26
- xml.copyright do |c|
27
- c.from (node.attr("copyright-year") || Date.today.year)
28
- c.owner do |owner|
29
- owner.organization { |o| organization(o, p, true) }
30
- end
31
- end
32
- end
12
+ def default_publisher
13
+ "IETF"
33
14
  end
34
- =end
35
-
36
- def default_publisher
37
- "IETF"
38
- end
39
15
 
40
16
  def org_abbrev
41
17
  { "Internet Engineering Task Force" => "IETF" }
@@ -47,10 +23,10 @@ end
47
23
  end
48
24
  a = node.attr("intended-series") and
49
25
  xml.series **{ type: "intended" } do |s|
50
- parts = a.split(/ /)
51
- s.title parts[0]
52
- s.number parts[1..-1].join(" ") if parts.size > 1
53
- end
26
+ parts = a.split(/ /)
27
+ s.title parts[0]
28
+ s.number parts[1..-1].join(" ") if parts.size > 1
29
+ end
54
30
  end
55
31
 
56
32
  def title(node, xml)
@@ -69,7 +45,7 @@ end
69
45
  end
70
46
 
71
47
  def metadata_committee(node, xml)
72
- return unless node.attr("workgroup")
48
+ node.attr("workgroup") or return
73
49
  xml.editorialgroup do |a|
74
50
  committee_component("workgroup", node, a)
75
51
  end
@@ -81,14 +57,14 @@ end
81
57
  xml.area a
82
58
  end
83
59
  xml.ipr (node.attr("ipr") || "trust200902")
84
- x = node.attr("consensus") and xml.consensus x
85
- x = node.attr("index-include") and xml.indexInclude x
60
+ x = node.attr("consensus") and xml.consensus (x != "false")
61
+ x = node.attr("index-include") and xml.indexInclude (x != "false")
86
62
  x = node.attr("ipr-extract") and xml.iprExtract x
87
- x = node.attr("sort-refs") and xml.sortRefs x
88
- x = node.attr("sym-refs") and xml.symRefs x
89
- x = node.attr("toc-include") and xml.tocInclude x
63
+ x = node.attr("sort-refs") and xml.sortRefs (x != "false")
64
+ x = node.attr("sym-refs") and xml.symRefs (x != "false")
65
+ x = node.attr("toc-include") and xml.tocInclude (x != "false")
90
66
  x = node.attr("toc-depth") and xml.tocDepth x
91
- x = node.attr("show-on-front-page") and xml.showOnFrontPage x
67
+ x = node.attr("show-on-front-page") and xml.showOnFrontPage (x != "false")
92
68
  xml.pi { |pi| set_pi(node, pi) }
93
69
  end
94
70
 
@@ -135,7 +111,7 @@ end
135
111
 
136
112
  def pi_code(rfc_pis, pi)
137
113
  rfc_pis.each_pair do |k, v|
138
- next if v.nil?
114
+ v.nil? and next
139
115
  pi.send k.to_s, v
140
116
  end
141
117
  end
@@ -17,10 +17,19 @@
17
17
  these elements; we just want one namespace for any child grammars
18
18
  of this.
19
19
  -->
20
- <!-- VERSION v1.2.9 -->
20
+ <!-- VERSION v1.2.12 -->
21
21
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
22
22
  <include href="reqt.rng"/>
23
23
  <include href="basicdoc.rng">
24
+ <define name="amend">
25
+ <element name="amend">
26
+ <ref name="BlockAttributes"/>
27
+ <ref name="AmendType"/>
28
+ <zeroOrMore>
29
+ <ref name="autonumber"/>
30
+ </zeroOrMore>
31
+ </element>
32
+ </define>
24
33
  <define name="admonition">
25
34
  <element name="admonition">
26
35
  <attribute name="type">
@@ -2319,69 +2328,6 @@
2319
2328
  <ref name="CitationType"/>
2320
2329
  </element>
2321
2330
  </define>
2322
- <define name="amend">
2323
- <element name="amend">
2324
- <optional>
2325
- <attribute name="id">
2326
- <data type="ID"/>
2327
- </attribute>
2328
- </optional>
2329
- <attribute name="change">
2330
- <choice>
2331
- <value>add</value>
2332
- <value>modify</value>
2333
- <value>delete</value>
2334
- <value>replace</value>
2335
- </choice>
2336
- </attribute>
2337
- <optional>
2338
- <attribute name="path"/>
2339
- </optional>
2340
- <optional>
2341
- <attribute name="path_end"/>
2342
- </optional>
2343
- <optional>
2344
- <attribute name="title"/>
2345
- </optional>
2346
- <ref name="BlockAttributes"/>
2347
- <optional>
2348
- <element name="location">
2349
- <zeroOrMore>
2350
- <ref name="locality"/>
2351
- </zeroOrMore>
2352
- </element>
2353
- </optional>
2354
- <zeroOrMore>
2355
- <ref name="autonumber"/>
2356
- </zeroOrMore>
2357
- <optional>
2358
- <element name="description">
2359
- <zeroOrMore>
2360
- <ref name="BasicBlock"/>
2361
- </zeroOrMore>
2362
- </element>
2363
- </optional>
2364
- <optional>
2365
- <element name="newcontent">
2366
- <optional>
2367
- <attribute name="id">
2368
- <data type="ID"/>
2369
- </attribute>
2370
- </optional>
2371
- <zeroOrMore>
2372
- <ref name="BasicBlock"/>
2373
- </zeroOrMore>
2374
- </element>
2375
- </optional>
2376
- <optional>
2377
- <element name="description">
2378
- <zeroOrMore>
2379
- <ref name="BasicBlock"/>
2380
- </zeroOrMore>
2381
- </element>
2382
- </optional>
2383
- </element>
2384
- </define>
2385
2331
  <define name="autonumber">
2386
2332
  <element name="autonumber">
2387
2333
  <attribute name="type">
@@ -207,20 +207,4 @@
207
207
  <value>permission</value>
208
208
  </choice>
209
209
  </define>
210
- <define name="classification">
211
- <element name="classification">
212
- <ref name="classification_tag"/>
213
- <ref name="classification_value"/>
214
- </element>
215
- </define>
216
- <define name="classification_tag">
217
- <element name="tag">
218
- <text/>
219
- </element>
220
- </define>
221
- <define name="classification_value">
222
- <element name="value">
223
- <text/>
224
- </element>
225
- </define>
226
210
  </grammar>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ietf
3
- VERSION = "3.2.6".freeze
3
+ VERSION = "3.3.0".freeze
4
4
  end
5
5
  end
@@ -1,5 +1,6 @@
1
1
  require "asciidoctor" unless defined? Asciidoctor::Converter
2
2
  require "metanorma"
3
+ require "vectory"
3
4
 
4
5
  require_relative "metanorma/ietf"
5
6
  require_relative "metanorma/ietf/converter"
@@ -37,8 +37,9 @@ Gem::Specification.new do |spec|
37
37
  spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
38
38
 
39
39
  spec.add_dependency "metanorma-ietf-data"
40
- spec.add_dependency "metanorma-standoc", "~> 2.7.0"
40
+ spec.add_dependency "metanorma-standoc", "~> 2.8.0"
41
41
  spec.add_dependency "relaton-render"
42
+ spec.add_dependency "vectory", "~> 0.6"
42
43
 
43
44
  spec.add_development_dependency "debug"
44
45
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
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.2.6
4
+ version: 3.3.0
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-12-10 00:00:00.000000000 Z
11
+ date: 2024-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-ietf-data
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 2.7.0
33
+ version: 2.8.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 2.7.0
40
+ version: 2.8.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: relaton-render
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: vectory
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.6'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.6'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: debug
57
71
  requirement: !ruby/object:Gem::Requirement