metanorma-ietf 3.2.4 → 3.2.6

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: 15679fd3c253726b9f401c099a73c02f242a946eb358b4c7dc025f13d5aa0ed8
4
- data.tar.gz: c2fef641bba26aff816757f36a6f61642190f0120874c2a01165a2513b5bb5db
3
+ metadata.gz: 95d5287b8cd085af79c232c2b9d5c744410758658044d1130f5e14ace554c53b
4
+ data.tar.gz: b710815a5b73c58b5e665482069dc7b467da91cddea0649fcd4fe6ac0e3895d5
5
5
  SHA512:
6
- metadata.gz: 25c51c60d9b85a0693db8c21f3159b4875fbb0cb430a0cdbf17b33d527d1ace7106bc118d9dde7f0b607953c1c459b43688c4121e110379ef7420336822d0861
7
- data.tar.gz: ca609bafe3ade87598fd0b87de4de63e6649a2c1e976f0f94768e778c98c0163561eac55a2d20d6872e8b48cb46ac5c0791ee2590827047e83c4b018521a0557
6
+ metadata.gz: bfa939e6c06245506aad5551ed30413e1c13639d83c65ed6342b83c9798543a019e20e209d414d6a0f21ac2adaf2ac48e5dc699391e7d205797e691e724a0d62
7
+ data.tar.gz: 6ee134a2450f7a1c0a8f4061b33c2ebfc23e5e0dfa72a0816e4b5f960079d340d59be038e3dab53a6c5be7a0c0c513c499b78dccdae9577c6533cd433bfc55f5
data/Gemfile CHANGED
@@ -4,10 +4,12 @@ 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
- gemspec
7
+ group :development, :test do
8
+ gem "rspec"
9
+ end
8
10
 
9
- if File.exist? 'Gemfile.devel'
10
- eval File.read('Gemfile.devel'), nil, 'Gemfile.devel' # rubocop:disable Security/Eval
11
+ if File.exist? "Gemfile.devel"
12
+ eval File.read("Gemfile.devel"), nil, "Gemfile.devel" # rubocop:disable Security/Eval
11
13
  end
12
14
 
13
- #gem "metanorma-cli"
15
+ gemspec
@@ -1,13 +1,14 @@
1
1
  module IsoDoc
2
2
  module Ietf
3
3
  class I18n < IsoDoc::I18n
4
- def load_yaml1(lang, script)
5
- y = if lang == "en"
6
- YAML.load_file(File.join(File.dirname(__FILE__), "i18n-en.yaml"))
7
- else
8
- YAML.load_file(File.join(File.dirname(__FILE__), "i18n-en.yaml"))
9
- end
10
- super.deep_merge(y)
4
+ def load_file(fname)
5
+ f = File.join(File.dirname(__FILE__), fname)
6
+ File.exist?(f) ? YAML.load_file(f) : {}
7
+ end
8
+
9
+ def load_yaml1(lang, script)
10
+ y = load_file("i18n-#{yaml_lang(lang, script)}.yaml")
11
+ y.empty? ? load_file("i18n-en.yaml").merge(super) : super.deep_merge(y)
11
12
  end
12
13
  end
13
14
  end
@@ -65,7 +65,12 @@ module IsoDoc
65
65
  bib1 = bib.clone
66
66
  @isodoc.prep_for_rendering(bib1)
67
67
  bib1.namespace = nil
68
- ref << @bibrenderer.render(bib1.to_xml, embedded: true)
68
+ ret = @bibrenderer.render(bib1.to_xml, embedded: true)
69
+ ref << if bib1.at(ns("./formattedref")) && !bib1.at(ns("./title"))
70
+ "<front><title>#{ret}</title></front>"
71
+ else
72
+ ret
73
+ end
69
74
  end
70
75
  end
71
76
  end
@@ -374,6 +374,16 @@
374
374
  <ref name="image"/>
375
375
  </element>
376
376
  </define>
377
+ <define name="depiction">
378
+ <element name="depiction">
379
+ <optional>
380
+ <attribute name="scope"/>
381
+ </optional>
382
+ <zeroOrMore>
383
+ <ref name="image"/>
384
+ </zeroOrMore>
385
+ </element>
386
+ </define>
377
387
  <define name="NameWithVariants">
378
388
  <element name="primary">
379
389
  <ref name="LocalizedString"/>
@@ -760,6 +770,9 @@
760
770
  <optional>
761
771
  <ref name="validity"/>
762
772
  </optional>
773
+ <optional>
774
+ <ref name="depiction"/>
775
+ </optional>
763
776
  </define>
764
777
  <define name="ReducedBibliographicItem">
765
778
  <optional>
@@ -22,7 +22,7 @@ module Metanorma
22
22
  r.replace(c.remove)
23
23
  else
24
24
  @log.add("Crossrefences", r,
25
- "No matching review for cref:[#{r.text}]")
25
+ "No matching review for cref:[#{r.text}]", severity: 1)
26
26
  end
27
27
  end
28
28
  end
@@ -9,6 +9,7 @@ module Metanorma
9
9
  personal_author(node, xml)
10
10
  end
11
11
 
12
+ =begin
12
13
  def metadata_publisher(node, xml)
13
14
  publishers = node.attr("publisher") || "IETF"
14
15
  csv_split(publishers)&.each do |p|
@@ -30,6 +31,11 @@ module Metanorma
30
31
  end
31
32
  end
32
33
  end
34
+ =end
35
+
36
+ def default_publisher
37
+ "IETF"
38
+ end
33
39
 
34
40
  def org_abbrev
35
41
  { "Internet Engineering Task Force" => "IETF" }
@@ -17,7 +17,7 @@
17
17
  these elements; we just want one namespace for any child grammars
18
18
  of this.
19
19
  -->
20
- <!-- VERSION v1.2.8 -->
20
+ <!-- VERSION v1.2.9 -->
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">
@@ -1958,6 +1958,16 @@
1958
1958
  <data type="boolean"/>
1959
1959
  </attribute>
1960
1960
  </optional>
1961
+ <optional>
1962
+ <attribute name="type">
1963
+ <choice>
1964
+ <value>letter</value>
1965
+ <value>symbol</value>
1966
+ <value>formula</value>
1967
+ <value>equation</value>
1968
+ </choice>
1969
+ </attribute>
1970
+ </optional>
1961
1971
  <element name="name">
1962
1972
  <oneOrMore>
1963
1973
  <choice>
@@ -25,9 +25,9 @@ module Metanorma
25
25
 
26
26
  def image_validate(doc)
27
27
  doc.xpath("//image").each do |i|
28
- next if i["mimetype"] == "image/svg+xml"
29
-
30
- @log.add("MIME", i, "image #{i['src'][0, 40]} is not SVG!")
28
+ i["mimetype"] == "image/svg+xml" and next
29
+ @log.add("MIME", i, "image #{i['src'][0, 40]} is not SVG!",
30
+ severity: 1)
31
31
  end
32
32
  end
33
33
 
@@ -36,10 +36,10 @@ module Metanorma
36
36
 
37
37
  doc.xpath("//bibdata/ext/editorialgroup/workgroup").each do |wg|
38
38
  wg_norm = wg.text.sub(/ (Working|Research) Group$/, "")
39
- next if @workgroups.include?(wg_norm)
40
-
39
+ @workgroups.include?(wg_norm) and next
41
40
  @log.add("Document Attributes", nil,
42
- "IETF: unrecognised working group #{wg.text}")
41
+ "IETF: unrecognised working group #{wg.text}",
42
+ severity: 1)
43
43
  end
44
44
  end
45
45
 
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ietf
3
- VERSION = "3.2.4".freeze
3
+ VERSION = "3.2.6".freeze
4
4
  end
5
5
  end
@@ -37,7 +37,7 @@ 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.6.3"
40
+ spec.add_dependency "metanorma-standoc", "~> 2.7.0"
41
41
  spec.add_dependency "relaton-render"
42
42
 
43
43
  spec.add_development_dependency "debug"
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.4
4
+ version: 3.2.6
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-11-20 00:00:00.000000000 Z
11
+ date: 2023-12-10 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.6.3
33
+ version: 2.7.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.6.3
40
+ version: 2.7.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: relaton-render
43
43
  requirement: !ruby/object:Gem::Requirement