metanorma-ietf 2.3.4 → 2.3.5

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: 7a12328cf063937699b9e4713e4f02ecb83baed14af90b6cb8c05e44d68361f0
4
- data.tar.gz: e89e8c1aa57a7341298ac5a3b01c17ecdab3ed746e9fcb915730dade6a8241db
3
+ metadata.gz: 7629e0ade5cff517d3fdf80296490da26a339654c338d7976d1b7f028aebb147
4
+ data.tar.gz: 3add51632aeb8f9c1f06c96ca276e3bb947d129ce704c902eb918e998331914a
5
5
  SHA512:
6
- metadata.gz: 3279c11e5298c25e7fd5d45d441416156bbf051791cd8883675c101a1b153455c01a3b14b62cd341f29fb3c2be0c58b2273eeb501dfa7dd5e1e56d7388941c19
7
- data.tar.gz: 6662f000dadd312542ba8e57023237bfd9036055df0c53c235fcc0dc7b7ac8b131023139fa4c029d27d5a4d0ea7929f0a2850dd3a1d747f57cd3b50cf2dbcd12
6
+ metadata.gz: 3519faef8dccfc5c474c0d3e4b12401aad30e98f666c50939aa1abf8736c9dddca67129dd6c50bc2cad77ce9f4589469d6ab93943462866d61d49b17fb888a3b
7
+ data.tar.gz: 490a7fddbb7c158c746445f3607b7fe5225b9e8d082b5e0f529c30b08c7db497bf0826872d904f4c95628e630b35d3048d4f4511602cc06fb3f8169dda5812f1
@@ -16,7 +16,7 @@ jobs:
16
16
  strategy:
17
17
  fail-fast: false
18
18
  matrix:
19
- ruby: [ '3.0', '2.7', '2.6', '2.5', '2.4' ]
19
+ ruby: [ '3.0', '2.7', '2.6', '2.5' ]
20
20
  os: [ ubuntu-latest, windows-latest, macos-latest ]
21
21
  experimental: [ false ]
22
22
 
@@ -955,7 +955,24 @@
955
955
  <define name="concept">
956
956
  <element name="concept">
957
957
  <optional>
958
- <attribute name="term"/>
958
+ <element name="refterm">
959
+ <zeroOrMore>
960
+ <choice>
961
+ <ref name="PureTextElement"/>
962
+ <ref name="stem"/>
963
+ </choice>
964
+ </zeroOrMore>
965
+ </element>
966
+ </optional>
967
+ <optional>
968
+ <element name="renderterm">
969
+ <zeroOrMore>
970
+ <choice>
971
+ <ref name="PureTextElement"/>
972
+ <ref name="stem"/>
973
+ </choice>
974
+ </zeroOrMore>
975
+ </element>
959
976
  </optional>
960
977
  <choice>
961
978
  <ref name="eref"/>
@@ -15,7 +15,7 @@ require_relative "./init"
15
15
 
16
16
  module IsoDoc::Ietf
17
17
  class RfcConvert < ::IsoDoc::Convert
18
- def convert1(docxml, filename, dir)
18
+ def convert1(docxml, _filename, _dir)
19
19
  @xrefs.parse docxml
20
20
  info docxml, nil
21
21
  xml = noko do |xml|
@@ -51,6 +51,7 @@ module IsoDoc::Ietf
51
51
  def error_parse(node, out)
52
52
  case node.name
53
53
  when "bcp14" then bcp14_parse(node, out)
54
+ when "concept" then concept_parse(node, out)
54
55
  else
55
56
  text = node.to_xml.gsub(/</, "&lt;").gsub(/>/, "&gt;")
56
57
  out.t { |p| p << text }
@@ -59,6 +60,7 @@ module IsoDoc::Ietf
59
60
 
60
61
  def omit_docid_prefix(prefix)
61
62
  return true if prefix == "IETF"
63
+
62
64
  super
63
65
  end
64
66
 
@@ -67,9 +69,9 @@ module IsoDoc::Ietf
67
69
  end
68
70
 
69
71
  def postprocess(result, filename, _dir)
70
- result = from_xhtml(cleanup(to_xhtml(textcleanup(result)))).
71
- sub(/<!DOCTYPE[^>]+>\n/, "").
72
- sub(/(<rfc[^<]+? )lang="[^"]+"/, "\\1")
72
+ result = from_xhtml(cleanup(to_xhtml(textcleanup(result))))
73
+ .sub(/<!DOCTYPE[^>]+>\n/, "")
74
+ .sub(/(<rfc[^<]+? )lang="[^"]+"/, "\\1")
73
75
  File.open(filename, "w:UTF-8") { |f| f.write(result) }
74
76
  schema_validate(filename)
75
77
  @files_to_delete.each { |f| FileUtils.rm_rf f }
@@ -1,6 +1,5 @@
1
1
  module IsoDoc::Ietf
2
2
  class RfcConvert < ::IsoDoc::Convert
3
-
4
3
  def definition_parse(node, out)
5
4
  node.children.each { |n| parse(n, out) }
6
5
  end
@@ -46,7 +45,19 @@ module IsoDoc::Ietf
46
45
  clause_parse(node, out)
47
46
  end
48
47
 
49
- def termdocsource_parse(_node, _out)
48
+ def termdocsource_parse(_node, _out); end
49
+
50
+ def concept_parse(node, out)
51
+ if d = node.at(ns("./renderterm"))
52
+ out.em do |em|
53
+ d.children.each { |n| parse(n, em) }
54
+ end
55
+ out << " "
56
+ end
57
+ out << "[term defined in "
58
+ r = node.at(ns("./xref | ./eref | ./termref"))
59
+ parse(r, out)
60
+ out << "]"
50
61
  end
51
62
  end
52
63
  end
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ietf
3
- VERSION = "2.3.4".freeze
3
+ VERSION = "2.3.5".freeze
4
4
  end
5
5
  end
@@ -35,9 +35,9 @@ Gem::Specification.new do |spec|
35
35
  spec.require_paths = ["lib"]
36
36
  spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
37
37
 
38
- spec.add_dependency "isodoc", "~> 1.6.0"
38
+ spec.add_dependency "isodoc", "~> 1.7.0"
39
39
  spec.add_dependency "mathml2asciimath"
40
- spec.add_dependency "metanorma-standoc", "~> 1.9.0"
40
+ spec.add_dependency "metanorma-standoc", "~> 1.10.0"
41
41
  spec.add_dependency "nokogiri", "~> 1.11.6"
42
42
  spec.add_dependency "open-uri"
43
43
 
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: 2.3.4
4
+ version: 2.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-21 00:00:00.000000000 Z
11
+ date: 2021-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: isodoc
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.6.0
19
+ version: 1.7.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.6.0
26
+ version: 1.7.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mathml2asciimath
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.9.0
47
+ version: 1.10.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.9.0
54
+ version: 1.10.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: nokogiri
57
57
  requirement: !ruby/object:Gem::Requirement