metanorma-ietf 3.0.6 → 3.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b48379093e4f20d35fddb174f623ff1e926c2ae65b6e473df2476d7cfd203b0b
4
- data.tar.gz: 640976bed48e7c8b9c4ac56533059a240a93c8bc814473456b8034dc1ffdb777
3
+ metadata.gz: d9f8258cd56113e10722ce8677d62aa22766c25b74676c0cca588bdce4e42974
4
+ data.tar.gz: 5353aca20fb71c85372b76d1ca7e34d3927944e69baeba30e4964fe2faa73d48
5
5
  SHA512:
6
- metadata.gz: e27578363727679af9e4c75865bf7a82caa39050fbd0e6f76c15e38ca6a24af2c492d8e127b376048d6ae2e65d3924ff6e583fcc0fe2eed9a41b2ae0b82d5fc3
7
- data.tar.gz: 74c40963d020da82e6e9c7c05b8d723f3724d4dd69c293bfd1d0a5251733f077a975f10cbe440561cfb6d9443fb2c78ce92a8792d67835c8c182168d098bca13
6
+ metadata.gz: 377cdab4b95054f519d409e5987f33d1d37aae27520f60cdbe59761a3efe6b2d4f7306657eeaba2ff4431ee18f81f7c98215de76b9cb81a87b9984a1b1126d06
7
+ data.tar.gz: 90704e85d696d404bda87daf06b710f8656d6c3867286f657ddc5b99315a5c9984b262363a19838b0d469f8f47ae3320675c9cd570de8e22d9ff10b94d6f99f6
@@ -7,7 +7,7 @@ module IsoDoc
7
7
  else
8
8
  YAML.load_file(File.join(File.dirname(__FILE__), "i18n-en.yaml"))
9
9
  end
10
- super.merge(y)
10
+ super.deep_merge(y)
11
11
  end
12
12
  end
13
13
  end
@@ -38,7 +38,6 @@ module IsoDoc
38
38
 
39
39
  i += 1 if b.name == "bibitem"
40
40
  if b.name == "note" then note_parse(b, div)
41
- elsif ietf?(b) then ietf_bibitem_entry(div, b, i)
42
41
  else
43
42
  nonstd_bibitem(div, b, i, biblio)
44
43
  end
@@ -171,18 +170,6 @@ module IsoDoc
171
170
  end
172
171
  end
173
172
  end
174
-
175
- def ietf_bibitem_entry(div, bib, _idx)
176
- url = bib&.at(ns("./uri[@type = 'xml']"))&.text
177
- div << "<xi:include href='#{url}'/>"
178
- end
179
-
180
- def ietf?(bib)
181
- return false if !@xinclude
182
-
183
- url = bib.at(ns("./uri[@type = 'xml']")) or return false
184
- /xml2rfc\.tools\.ietf\.org/.match(url)
185
- end
186
173
  end
187
174
  end
188
175
  end
@@ -614,12 +614,12 @@
614
614
  <optional>
615
615
  <ref name="fetched"/>
616
616
  </optional>
617
- <choice>
618
- <oneOrMore>
619
- <ref name="btitle"/>
620
- </oneOrMore>
617
+ <optional>
621
618
  <ref name="formattedref"/>
622
- </choice>
619
+ </optional>
620
+ <oneOrMore>
621
+ <ref name="btitle"/>
622
+ </oneOrMore>
623
623
  <zeroOrMore>
624
624
  <ref name="bsource"/>
625
625
  </zeroOrMore>
@@ -986,36 +986,34 @@
986
986
  <ref name="SeriesType"/>
987
987
  </attribute>
988
988
  </optional>
989
- <choice>
989
+ <optional>
990
990
  <ref name="formattedref"/>
991
- <group>
992
- <ref name="btitle"/>
993
- <optional>
994
- <ref name="bplace"/>
995
- </optional>
996
- <optional>
997
- <ref name="seriesorganization"/>
998
- </optional>
999
- <optional>
1000
- <ref name="abbreviation"/>
1001
- </optional>
1002
- <optional>
1003
- <ref name="seriesfrom"/>
1004
- </optional>
1005
- <optional>
1006
- <ref name="seriesto"/>
1007
- </optional>
1008
- <optional>
1009
- <ref name="seriesnumber"/>
1010
- </optional>
1011
- <optional>
1012
- <ref name="seriespartnumber"/>
1013
- </optional>
1014
- <optional>
1015
- <ref name="seriesrun"/>
1016
- </optional>
1017
- </group>
1018
- </choice>
991
+ </optional>
992
+ <ref name="btitle"/>
993
+ <optional>
994
+ <ref name="bplace"/>
995
+ </optional>
996
+ <optional>
997
+ <ref name="seriesorganization"/>
998
+ </optional>
999
+ <optional>
1000
+ <ref name="abbreviation"/>
1001
+ </optional>
1002
+ <optional>
1003
+ <ref name="seriesfrom"/>
1004
+ </optional>
1005
+ <optional>
1006
+ <ref name="seriesto"/>
1007
+ </optional>
1008
+ <optional>
1009
+ <ref name="seriesnumber"/>
1010
+ </optional>
1011
+ <optional>
1012
+ <ref name="seriespartnumber"/>
1013
+ </optional>
1014
+ <optional>
1015
+ <ref name="seriesrun"/>
1016
+ </optional>
1019
1017
  </element>
1020
1018
  </define>
1021
1019
  <define name="SeriesType">
@@ -2,10 +2,10 @@ module Metanorma
2
2
  module Ietf
3
3
  class Converter < ::Metanorma::Standoc::Converter
4
4
  def para_attrs(node)
5
- attr_code( "keep-with-next": node.attr("keepWithNext") ||
5
+ attr_code("keep-with-next": node.attr("keepWithNext") ||
6
6
  node.attr("keep-with-next"),
7
7
  "keep-with-previous": node.attr("keepWithPrevious") ||
8
- node.attr("keep-with-previous"),
8
+ node.attr("keep-with-previous"),
9
9
  id: ::Metanorma::Utils::anchor_or_uuid(node))
10
10
  end
11
11
 
@@ -36,20 +36,21 @@ module Metanorma
36
36
 
37
37
  def sidebar(node)
38
38
  return unless draft?
39
+
39
40
  noko do |xml|
40
- xml.review **(sidebar_attrs(node)) do |r|
41
+ xml.review **sidebar_attrs(node) do |r|
41
42
  node.title.nil? or r.name { |name| name << node.title }
42
43
  wrap_in_para(node, r)
43
44
  end
44
45
  end
45
46
  end
46
47
 
47
- def note(n)
48
+ def note(node)
48
49
  noko do |xml|
49
- xml.note **attr_code(id: ::Metanorma::Utils::anchor_or_uuid(n),
50
- removeInRFC: n.attr("remove-in-rfc")) do |c|
51
- n.title.nil? or c.name { |name| name << n.title }
52
- wrap_in_para(n, c)
50
+ xml.note **attr_code(id: ::Metanorma::Utils::anchor_or_uuid(nil),
51
+ removeInRFC: node.attr("remove-in-rfc")) do |c|
52
+ node.title.nil? or c.name { |name| name << node.title }
53
+ wrap_in_para(node, c)
53
54
  end
54
55
  end.join("\n")
55
56
  end
@@ -59,9 +60,9 @@ module Metanorma
59
60
  xml.figure **literal_attrs(node) do |f|
60
61
  figure_title(node, f)
61
62
  f.pre node.lines.join("\n"),
62
- **attr_code(align: node.attr("align"),
63
- id: ::Metanorma::Utils::anchor_or_uuid(nil),
64
- alt: node.attr("alt"))
63
+ **attr_code(align: node.attr("align"),
64
+ id: ::Metanorma::Utils::anchor_or_uuid(nil),
65
+ alt: node.attr("alt"))
65
66
  end
66
67
  end
67
68
  end
@@ -70,9 +71,10 @@ module Metanorma
70
71
  super.merge(attr_code(align: node.attr("align")))
71
72
  end
72
73
 
73
- def listing_attrs(node)
74
- super.merge(attr_code(markers: node.attr("markers"), src: node.attr("src")))
75
- end
74
+ def listing_attrs(node)
75
+ super.merge(attr_code(markers: node.attr("markers"),
76
+ src: node.attr("src")))
77
+ end
76
78
  end
77
79
  end
78
80
  end
@@ -5,7 +5,6 @@ module Metanorma
5
5
  bcp14_cleanup(xmldoc)
6
6
  abstract_cleanup(xmldoc)
7
7
  super
8
- rfc_anchor_cleanup(xmldoc)
9
8
  cref_cleanup(xmldoc)
10
9
  xmldoc
11
10
  end
@@ -42,21 +41,6 @@ module Metanorma
42
41
  end
43
42
  end
44
43
 
45
- def rfc_anchor_cleanup(xml)
46
- map = xml.xpath("//bibitem[docidentifier[@type = 'IETF' or @type = 'RFC']"\
47
- "[@scope = 'anchor']]").each_with_object({}) do |b, m|
48
- next if b.at("./ancestor::bibdata | ./ancestor::bibitem")
49
-
50
- id = b.at("./docidentifier[@type = 'IETF' or @type = 'RFC'][@scope = 'anchor']").text
51
- m[b["id"]] = id
52
- b["id"] = id
53
- end
54
- xml.xpath("//eref | //origin").each do |x|
55
- map[x["bibitemid"]] and x["bibitemid"] = map[x["bibitemid"]]
56
- end
57
- xml
58
- end
59
-
60
44
  def smartquotes_cleanup(xmldoc)
61
45
  xmldoc.traverse do |n|
62
46
  next unless n.text?
@@ -38,7 +38,7 @@ module Metanorma
38
38
  end
39
39
 
40
40
  def doctype(node)
41
- ret = super
41
+ ret = node.attr("doctype")&.gsub(/\s+/, "-")&.downcase || "internet-draft"
42
42
  ret = "internet-draft" if ret == "article"
43
43
  ret
44
44
  end
@@ -282,6 +282,9 @@
282
282
  <ref name="MultilingualRenderingType"/>
283
283
  </attribute>
284
284
  </optional>
285
+ <optional>
286
+ <ref name="tname"/>
287
+ </optional>
285
288
  <oneOrMore>
286
289
  <ref name="ul_li"/>
287
290
  </oneOrMore>
@@ -324,6 +327,9 @@
324
327
  </choice>
325
328
  </attribute>
326
329
  </optional>
330
+ <optional>
331
+ <ref name="tname"/>
332
+ </optional>
327
333
  <oneOrMore>
328
334
  <ref name="li"/>
329
335
  </oneOrMore>
@@ -360,6 +366,9 @@
360
366
  <ref name="MultilingualRenderingType"/>
361
367
  </attribute>
362
368
  </optional>
369
+ <optional>
370
+ <ref name="tname"/>
371
+ </optional>
363
372
  <oneOrMore>
364
373
  <ref name="dt"/>
365
374
  <ref name="dd"/>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ietf
3
- VERSION = "3.0.6".freeze
3
+ VERSION = "3.0.7".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.0.6
4
+ version: 3.0.7
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-05-09 00:00:00.000000000 Z
11
+ date: 2022-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mathml2asciimath
@@ -235,9 +235,6 @@ files:
235
235
  - LICENSE
236
236
  - README.adoc
237
237
  - Rakefile
238
- - docs/installation.md
239
- - docs/navigation.md
240
- - docs/overview.md
241
238
  - lib/isodoc/ietf/SVG-1.2-RFC.rng
242
239
  - lib/isodoc/ietf/blocks.rb
243
240
  - lib/isodoc/ietf/cleanup.rb
@@ -296,7 +293,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
296
293
  - !ruby/object:Gem::Version
297
294
  version: '0'
298
295
  requirements: []
299
- rubygems_version: 3.3.9
296
+ rubygems_version: 3.3.7
300
297
  signing_key:
301
298
  specification_version: 4
302
299
  summary: metanorma-ietf lets you write IETF documents, such as Internet-Drafts and
data/docs/installation.md DELETED
@@ -1,21 +0,0 @@
1
- ---
2
- title: Installation
3
- ---
4
-
5
- Add this line to your application’s Gemfile:
6
-
7
- ```
8
- gem "metanorma-ietf"
9
- ```
10
-
11
- And then execute:
12
-
13
- ```
14
- $ bundle
15
- ```
16
-
17
- Or install it yourself as:
18
-
19
- ```
20
- $ gem install metanorma-cli
21
- ```
data/docs/navigation.md DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- items:
3
- - title: Introduction
4
- items:
5
- - { title: Overview, path: overview/ }
6
- - { title: Installation, path: installation/ }
7
- ---
data/docs/overview.md DELETED
@@ -1,5 +0,0 @@
1
- ---
2
- title: Overview
3
- ---
4
-
5
- metanorma-ietf lets you write Internet-Drafts and RFCs using the Metanorma publishing toolchain.