metanorma-ietf 2.2.5 → 2.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/ietf/basicdoc.rng +50 -3
- data/lib/asciidoctor/ietf/converter.rb +7 -0
- data/lib/asciidoctor/ietf/isodoc.rng +22 -0
- data/lib/isodoc/ietf/i18n-en.yaml +5 -0
- data/lib/isodoc/ietf/i18n.rb +14 -0
- data/lib/isodoc/ietf/init.rb +16 -0
- data/lib/isodoc/ietf/inline.rb +2 -2
- data/lib/isodoc/ietf/rfc_convert.rb +3 -0
- data/lib/metanorma/ietf/version.rb +1 -1
- data/metanorma-ietf.gemspec +2 -2
- metadata +9 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8247cbf94f350b91d6489fb85f79488a4cdad584badf37d6c82ffa0593aef09c
|
4
|
+
data.tar.gz: ba450b02e8e6209f00bdbc1fbe38c507ed50b03caf0acd1cec0d5de9a15965a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 994cab64f80f8e1f238c1be2a560cdd576cc76b1fff424af31d0ad5883fa6eecdddde74d54a17bddd8eaeea297d0d601d07654bb2c499bc325f93dcb04b71427
|
7
|
+
data.tar.gz: d691df321718fa175898cf5ce872b5db913b6d256abe8b72af350653f55c632ef6eff2bb0760f5e73af19b11446cb3709ced34e83d9cbf9a500eb25a1afb5cee
|
@@ -596,6 +596,7 @@
|
|
596
596
|
<ref name="bookmark"/>
|
597
597
|
<ref name="image"/>
|
598
598
|
<ref name="index"/>
|
599
|
+
<ref name="index-xref"/>
|
599
600
|
</choice>
|
600
601
|
</define>
|
601
602
|
<define name="PureTextElement">
|
@@ -728,15 +729,61 @@
|
|
728
729
|
</define>
|
729
730
|
<define name="index">
|
730
731
|
<element name="index">
|
731
|
-
<attribute name="
|
732
|
+
<attribute name="to">
|
733
|
+
<data type="IDREF"/>
|
734
|
+
</attribute>
|
735
|
+
<element name="primary">
|
736
|
+
<oneOrMore>
|
737
|
+
<ref name="PureTextElement"/>
|
738
|
+
</oneOrMore>
|
739
|
+
</element>
|
732
740
|
<optional>
|
733
|
-
<
|
741
|
+
<element name="secondary">
|
742
|
+
<oneOrMore>
|
743
|
+
<ref name="PureTextElement"/>
|
744
|
+
</oneOrMore>
|
745
|
+
</element>
|
734
746
|
</optional>
|
735
747
|
<optional>
|
736
|
-
<
|
748
|
+
<element name="tertiary">
|
749
|
+
<oneOrMore>
|
750
|
+
<ref name="PureTextElement"/>
|
751
|
+
</oneOrMore>
|
752
|
+
</element>
|
737
753
|
</optional>
|
738
754
|
</element>
|
739
755
|
</define>
|
756
|
+
<define name="index-xref">
|
757
|
+
<element name="index-xref">
|
758
|
+
<attribute name="also">
|
759
|
+
<data type="boolean"/>
|
760
|
+
</attribute>
|
761
|
+
<element name="primary">
|
762
|
+
<oneOrMore>
|
763
|
+
<ref name="PureTextElement"/>
|
764
|
+
</oneOrMore>
|
765
|
+
</element>
|
766
|
+
<optional>
|
767
|
+
<element name="secondary">
|
768
|
+
<oneOrMore>
|
769
|
+
<ref name="PureTextElement"/>
|
770
|
+
</oneOrMore>
|
771
|
+
</element>
|
772
|
+
</optional>
|
773
|
+
<optional>
|
774
|
+
<element name="tertiary">
|
775
|
+
<oneOrMore>
|
776
|
+
<ref name="PureTextElement"/>
|
777
|
+
</oneOrMore>
|
778
|
+
</element>
|
779
|
+
</optional>
|
780
|
+
<element name="target">
|
781
|
+
<oneOrMore>
|
782
|
+
<ref name="PureTextElement"/>
|
783
|
+
</oneOrMore>
|
784
|
+
</element>
|
785
|
+
</element>
|
786
|
+
</define>
|
740
787
|
<!-- bare ID element, used for referencing arbitrary spans of text -->
|
741
788
|
<define name="bookmark">
|
742
789
|
<element name="bookmark">
|
@@ -211,6 +211,13 @@ module Asciidoctor
|
|
211
211
|
def rfc_converter(node)
|
212
212
|
IsoDoc::Ietf::RfcConvert.new(html_extract_attributes(node))
|
213
213
|
end
|
214
|
+
|
215
|
+
def isodoc(lang, script, i18nyaml = nil)
|
216
|
+
conv = rfc_converter(EmptyAttr.new)
|
217
|
+
i18n = conv.i18n_init(lang, script, i18nyaml)
|
218
|
+
conv.metadata_init(lang, script, i18n)
|
219
|
+
conv
|
220
|
+
end
|
214
221
|
end
|
215
222
|
end
|
216
223
|
end
|
@@ -55,6 +55,13 @@
|
|
55
55
|
<param name="pattern">\i\c*|\c+#\c+</param>
|
56
56
|
</data>
|
57
57
|
</attribute>
|
58
|
+
<optional>
|
59
|
+
<attribute name="to">
|
60
|
+
<data type="string">
|
61
|
+
<param name="pattern">\i\c*|\c+#\c+</param>
|
62
|
+
</data>
|
63
|
+
</attribute>
|
64
|
+
</optional>
|
58
65
|
<optional>
|
59
66
|
<attribute name="type">
|
60
67
|
<ref name="ReferenceFormat"/>
|
@@ -246,6 +253,9 @@
|
|
246
253
|
<data type="boolean"/>
|
247
254
|
</attribute>
|
248
255
|
</optional>
|
256
|
+
<optional>
|
257
|
+
<ref name="colgroup"/>
|
258
|
+
</optional>
|
249
259
|
<optional>
|
250
260
|
<ref name="tname"/>
|
251
261
|
</optional>
|
@@ -764,6 +774,18 @@
|
|
764
774
|
</define>
|
765
775
|
</include>
|
766
776
|
<!-- end overrides -->
|
777
|
+
<define name="colgroup">
|
778
|
+
<element name="colgroup">
|
779
|
+
<oneOrMore>
|
780
|
+
<ref name="col"/>
|
781
|
+
</oneOrMore>
|
782
|
+
</element>
|
783
|
+
</define>
|
784
|
+
<define name="col">
|
785
|
+
<element name="col">
|
786
|
+
<attribute name="width"/>
|
787
|
+
</element>
|
788
|
+
</define>
|
767
789
|
<define name="TextElement" combine="choice">
|
768
790
|
<ref name="concept"/>
|
769
791
|
</define>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module IsoDoc
|
2
|
+
module Ietf
|
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.merge(y)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require "isodoc"
|
2
|
+
require_relative "i18n"
|
3
|
+
|
4
|
+
module IsoDoc
|
5
|
+
module Ietf
|
6
|
+
module Init
|
7
|
+
def i18n_init(lang, script, i18nyaml = nil)
|
8
|
+
@i18n = I18n.new(lang, script, i18nyaml || @i18nyaml)
|
9
|
+
end
|
10
|
+
|
11
|
+
def fileloc(loc)
|
12
|
+
File.join(File.dirname(__FILE__), loc)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/isodoc/ietf/inline.rb
CHANGED
@@ -156,8 +156,8 @@ module IsoDoc::Ietf
|
|
156
156
|
end
|
157
157
|
|
158
158
|
def index_parse(node, out)
|
159
|
-
out.iref nil, **attr_code(item: node
|
160
|
-
subitem: node
|
159
|
+
out.iref nil, **attr_code(item: node.at(ns("./primary")).text,
|
160
|
+
subitem: node&.at(ns("./secondary"))&.text)
|
161
161
|
end
|
162
162
|
|
163
163
|
def bookmark_parse(node, out)
|
@@ -11,6 +11,7 @@ require_relative "./references"
|
|
11
11
|
require_relative "./section"
|
12
12
|
require_relative "./validation"
|
13
13
|
require_relative "./xref"
|
14
|
+
require_relative "./init"
|
14
15
|
|
15
16
|
module IsoDoc::Ietf
|
16
17
|
class RfcConvert < ::IsoDoc::Convert
|
@@ -81,5 +82,7 @@ module IsoDoc::Ietf
|
|
81
82
|
@format = :rfc
|
82
83
|
@suffix = "rfc.xml"
|
83
84
|
end
|
85
|
+
|
86
|
+
include ::IsoDoc::Ietf::Init
|
84
87
|
end
|
85
88
|
end
|
data/metanorma-ietf.gemspec
CHANGED
@@ -35,8 +35,8 @@ Gem::Specification.new do |spec|
|
|
35
35
|
spec.require_paths = ["lib"]
|
36
36
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
|
37
37
|
|
38
|
-
spec.add_dependency "metanorma-standoc", "~> 1.
|
39
|
-
spec.add_dependency "isodoc", "~> 1.
|
38
|
+
spec.add_dependency "metanorma-standoc", "~> 1.7.0"
|
39
|
+
spec.add_dependency "isodoc", "~> 1.4.0"
|
40
40
|
spec.add_dependency "mathml2asciimath"
|
41
41
|
|
42
42
|
spec.add_development_dependency "byebug"
|
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.2.
|
4
|
+
version: 2.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: 2020-
|
11
|
+
date: 2020-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
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.
|
26
|
+
version: 1.7.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: isodoc
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.4.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: 1.
|
40
|
+
version: 1.4.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: mathml2asciimath
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -260,6 +260,9 @@ files:
|
|
260
260
|
- lib/isodoc/ietf/cleanup.rb
|
261
261
|
- lib/isodoc/ietf/footnotes.rb
|
262
262
|
- lib/isodoc/ietf/front.rb
|
263
|
+
- lib/isodoc/ietf/i18n-en.yaml
|
264
|
+
- lib/isodoc/ietf/i18n.rb
|
265
|
+
- lib/isodoc/ietf/init.rb
|
263
266
|
- lib/isodoc/ietf/inline.rb
|
264
267
|
- lib/isodoc/ietf/metadata.rb
|
265
268
|
- lib/isodoc/ietf/references.rb
|