metanorma-ietf 3.7.0 → 3.7.2
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 +4 -4
- data/lib/isodoc/ietf/inline.rb +1 -10
- data/lib/metanorma/ietf/basicdoc.rng +5 -1
- data/lib/metanorma/ietf/biblio.rng +4 -4
- data/lib/metanorma/ietf/cleanup.rb +9 -4
- data/lib/metanorma/ietf/converter.rb +6 -6
- data/lib/metanorma/ietf/isodoc.rng +77 -28
- data/lib/metanorma/ietf/validate.rb +5 -5
- data/lib/metanorma/ietf/version.rb +1 -1
- data/lib/metanorma-ietf.rb +2 -0
- data/metanorma-ietf.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4acaa7041e3570f621487bf11a90fbb9a7ce3c61a28c9b5cf3bdd6670d13385a
|
|
4
|
+
data.tar.gz: cd4d014264eb4ece508434c80d9281f6a02499e709a5b1f440ce92fd5b697504
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 821c60fd2b044b020e08caff4042aa635c92e06cea9af3f1e8a6b5ac138672165e7aed5ba4065d1bb3448eeaac24156428c6770020d72865a70eba0a02a3a138
|
|
7
|
+
data.tar.gz: e50961575ebb2f7f45e7590aabdcb266d48d803852ddfccd823c2d2327f3c79b24c52306a382aa7c3e3a9c5e816bf4933eb94168ca911a0767eb87e16e188dfe
|
data/lib/isodoc/ietf/inline.rb
CHANGED
|
@@ -96,17 +96,8 @@ module IsoDoc
|
|
|
96
96
|
alt: node["alt"] }
|
|
97
97
|
end
|
|
98
98
|
|
|
99
|
-
def image_parse(node, out
|
|
99
|
+
def image_parse(node, out)
|
|
100
100
|
out.artwork **attr_code(image_parse_attrs(node))
|
|
101
|
-
image_title_parse(out, caption)
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
def image_title_parse(out, caption)
|
|
105
|
-
unless caption.nil?
|
|
106
|
-
out.t align: "center", keepWithPrevious: "true" do |p|
|
|
107
|
-
p << caption.to_s
|
|
108
|
-
end
|
|
109
|
-
end
|
|
110
101
|
end
|
|
111
102
|
|
|
112
103
|
def svg_parse(node, out)
|
|
@@ -208,11 +208,15 @@ Applicable to modify and delete</a:documentation>
|
|
|
208
208
|
</zeroOrMore>
|
|
209
209
|
<optional>
|
|
210
210
|
<element name="newcontent">
|
|
211
|
-
<a:documentation>New content to be added to the document; applicable to add and modify
|
|
211
|
+
<a:documentation>New content to be added to the document; applicable to add and modify.
|
|
212
|
+
Can be blocks and/or sections</a:documentation>
|
|
212
213
|
<ref name="OptionalId"/>
|
|
213
214
|
<zeroOrMore>
|
|
214
215
|
<ref name="BasicBlock"/>
|
|
215
216
|
</zeroOrMore>
|
|
217
|
+
<zeroOrMore>
|
|
218
|
+
<ref name="section"/>
|
|
219
|
+
</zeroOrMore>
|
|
216
220
|
</element>
|
|
217
221
|
</optional>
|
|
218
222
|
<zeroOrMore>
|
|
@@ -1939,10 +1939,10 @@ Detailed in https://www.relaton.org/model/relations/</a:documentation>
|
|
|
1939
1939
|
<value>hasAnnotation</value>
|
|
1940
1940
|
<value>draftOf</value>
|
|
1941
1941
|
<value>hasDraft</value>
|
|
1942
|
-
<value>
|
|
1943
|
-
<value>
|
|
1944
|
-
<value>
|
|
1945
|
-
<value>
|
|
1942
|
+
<value>predecessorDraftOf</value>
|
|
1943
|
+
<value>hasPredecessorDraft</value>
|
|
1944
|
+
<value>successorDraftOf</value>
|
|
1945
|
+
<value>hasSuccessorDraft</value>
|
|
1946
1946
|
<value>editionOf</value>
|
|
1947
1947
|
<value>hasEdition</value>
|
|
1948
1948
|
<value>updates</value>
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
module Metanorma
|
|
2
2
|
module Ietf
|
|
3
|
-
class
|
|
3
|
+
class Cleanup < ::Metanorma::Standoc::Cleanup
|
|
4
|
+
def copied_instance_variables
|
|
5
|
+
super + %i[bcp_bold]
|
|
6
|
+
end
|
|
7
|
+
|
|
4
8
|
def cleanup(xmldoc)
|
|
5
9
|
bcp14_cleanup(xmldoc)
|
|
6
10
|
abstract_cleanup(xmldoc)
|
|
@@ -12,9 +16,8 @@ module Metanorma
|
|
|
12
16
|
|
|
13
17
|
def boilerplate_isodoc(xmldoc)
|
|
14
18
|
x = xmldoc.dup
|
|
15
|
-
x.root.add_namespace(nil, xml_namespace)
|
|
16
|
-
|
|
17
|
-
@isodoc ||= isodoc(@lang, @script, @locale)
|
|
19
|
+
x.root.add_namespace(nil, @conv.xml_namespace)
|
|
20
|
+
@isodoc ||= @conv.isodoc(@lang, @script, @locale)
|
|
18
21
|
# initialise @isodoc.xrefs, for @isodoc.xrefs.info
|
|
19
22
|
@isodoc
|
|
20
23
|
end
|
|
@@ -102,6 +105,8 @@ module Metanorma
|
|
|
102
105
|
def section_names_refs_cleanup(xml); end
|
|
103
106
|
|
|
104
107
|
def note_cleanup(xmldoc); end
|
|
108
|
+
|
|
109
|
+
def norm_ref_preface(sect, isodoc); end
|
|
105
110
|
end
|
|
106
111
|
end
|
|
107
112
|
end
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
require "asciidoctor"
|
|
2
|
-
require "metanorma
|
|
2
|
+
require "metanorma-standoc"
|
|
3
3
|
require "isodoc/ietf/rfc_convert"
|
|
4
4
|
require_relative "./front"
|
|
5
5
|
require_relative "./blocks"
|
|
6
|
-
require_relative "./validate"
|
|
7
|
-
require_relative "./cleanup"
|
|
8
6
|
require_relative "./macros"
|
|
9
7
|
|
|
10
8
|
module Metanorma
|
|
@@ -31,12 +29,16 @@ module Metanorma
|
|
|
31
29
|
super
|
|
32
30
|
end
|
|
33
31
|
|
|
32
|
+
def cache_workgroup(_node)
|
|
33
|
+
Metanorma::Ietf::Data::WORKGROUPS
|
|
34
|
+
end
|
|
35
|
+
|
|
34
36
|
def outputs(node, ret)
|
|
35
37
|
File.open("#{@filename}.xml", "w:UTF-8") { |f| f.write(ret) }
|
|
36
38
|
rfc_converter(node).convert("#{@filename}.xml")
|
|
37
39
|
end
|
|
38
40
|
|
|
39
|
-
def
|
|
41
|
+
def init_metadata(node)
|
|
40
42
|
super
|
|
41
43
|
@default_doctype = "internet-draft"
|
|
42
44
|
end
|
|
@@ -121,8 +123,6 @@ module Metanorma
|
|
|
121
123
|
[t, rel]
|
|
122
124
|
end
|
|
123
125
|
|
|
124
|
-
def norm_ref_preface(sect, isodoc); end
|
|
125
|
-
|
|
126
126
|
def clause_attrs_preprocess(attrs, node)
|
|
127
127
|
attrs[:numbered] = node.attr("numbered")
|
|
128
128
|
attrs[:removeInRFC] = node.attr("removeInRFC")
|
|
@@ -641,8 +641,85 @@ This is done if the footnote reference is already presented in some other form,
|
|
|
641
641
|
</ref>
|
|
642
642
|
</zeroOrMore>
|
|
643
643
|
</define>
|
|
644
|
+
<define name="altsource">
|
|
645
|
+
<a:documentation>Alternative file to use as media</a:documentation>
|
|
646
|
+
<element name="altsource">
|
|
647
|
+
<ref name="MediaAttributes"/>
|
|
648
|
+
<optional>
|
|
649
|
+
<attribute name="tag">
|
|
650
|
+
<a:documentation>Comma-delimited tag to indicate when the alternate file is to be used,
|
|
651
|
+
at minimum allows contain `html`, `doc`, `pdf` as the main target formats of Metanorma,
|
|
652
|
+
and `default` for the fallback. The presence of an altsource tagged `default` is required</a:documentation>
|
|
653
|
+
</attribute>
|
|
654
|
+
</optional>
|
|
655
|
+
<optional>
|
|
656
|
+
<attribute name="media">
|
|
657
|
+
<a:documentation>CSS media query to indicate when the alternate file is to be used</a:documentation>
|
|
658
|
+
</attribute>
|
|
659
|
+
</optional>
|
|
660
|
+
</element>
|
|
661
|
+
</define>
|
|
662
|
+
<define name="image">
|
|
663
|
+
<a:documentation>Container for image content</a:documentation>
|
|
664
|
+
<choice>
|
|
665
|
+
<element name="image">
|
|
666
|
+
<ref name="RequiredId"/>
|
|
667
|
+
<ref name="ImageAttributes">
|
|
668
|
+
<a:documentation>When specified along with altsource, ImageAttributes give the default image to be rendered</a:documentation>
|
|
669
|
+
</ref>
|
|
670
|
+
<ref name="ImageBody"/>
|
|
671
|
+
</element>
|
|
672
|
+
<element name="svg">
|
|
673
|
+
<a:documentation>Add svg mark up to image</a:documentation>
|
|
674
|
+
<oneOrMore>
|
|
675
|
+
<choice>
|
|
676
|
+
<text/>
|
|
677
|
+
<ref name="AnyElement"/>
|
|
678
|
+
</choice>
|
|
679
|
+
</oneOrMore>
|
|
680
|
+
</element>
|
|
681
|
+
</choice>
|
|
682
|
+
</define>
|
|
683
|
+
<define name="ImageAttributes">
|
|
684
|
+
<optional>
|
|
685
|
+
<ref name="MediaAttributes">
|
|
686
|
+
<a:documentation>If the image contains altsource, the media attributes are given on each of the altsource elements instead of the root node</a:documentation>
|
|
687
|
+
</ref>
|
|
688
|
+
</optional>
|
|
689
|
+
<ref name="MediaAccessibilityAttributes"/>
|
|
690
|
+
<optional>
|
|
691
|
+
<attribute name="width">
|
|
692
|
+
<a:documentation>Height of image</a:documentation>
|
|
693
|
+
<ref name="ImageSize"/>
|
|
694
|
+
</attribute>
|
|
695
|
+
</optional>
|
|
696
|
+
<optional>
|
|
697
|
+
<attribute name="height">
|
|
698
|
+
<a:documentation>Width of image</a:documentation>
|
|
699
|
+
<ref name="ImageSize"/>
|
|
700
|
+
</attribute>
|
|
701
|
+
</optional>
|
|
702
|
+
</define>
|
|
644
703
|
</include>
|
|
645
704
|
<!-- end overrides -->
|
|
705
|
+
<define name="ImageBody">
|
|
706
|
+
<optional>
|
|
707
|
+
<element name="svg">
|
|
708
|
+
<a:documentation>image can contain SVG XML, which is used to access its identifiers within the Metanorma XML</a:documentation>
|
|
709
|
+
<oneOrMore>
|
|
710
|
+
<choice>
|
|
711
|
+
<text/>
|
|
712
|
+
<ref name="AnyElement"/>
|
|
713
|
+
</choice>
|
|
714
|
+
</oneOrMore>
|
|
715
|
+
</element>
|
|
716
|
+
</optional>
|
|
717
|
+
<zeroOrMore>
|
|
718
|
+
<ref name="altsource">
|
|
719
|
+
<a:documentation>Alternative files to use as media</a:documentation>
|
|
720
|
+
</ref>
|
|
721
|
+
</zeroOrMore>
|
|
722
|
+
</define>
|
|
646
723
|
<define name="key">
|
|
647
724
|
<a:documentation>Key to a table, figure, or formula</a:documentation>
|
|
648
725
|
<element name="key">
|
|
@@ -930,34 +1007,6 @@ titlecase, or lowercase</a:documentation>
|
|
|
930
1007
|
<ref name="ReducedBibliographicItem"/>
|
|
931
1008
|
</element>
|
|
932
1009
|
</define>
|
|
933
|
-
<define name="image" combine="choice">
|
|
934
|
-
<choice>
|
|
935
|
-
<element name="image">
|
|
936
|
-
<ref name="RequiredId"/>
|
|
937
|
-
<ref name="ImageAttributes"/>
|
|
938
|
-
<optional>
|
|
939
|
-
<element name="svg">
|
|
940
|
-
<a:documentation>Allow svg in image/svg, for consistency</a:documentation>
|
|
941
|
-
<oneOrMore>
|
|
942
|
-
<choice>
|
|
943
|
-
<text/>
|
|
944
|
-
<ref name="AnyElement"/>
|
|
945
|
-
</choice>
|
|
946
|
-
</oneOrMore>
|
|
947
|
-
</element>
|
|
948
|
-
</optional>
|
|
949
|
-
</element>
|
|
950
|
-
<element name="svg">
|
|
951
|
-
<a:documentation>Add svg mark up to image</a:documentation>
|
|
952
|
-
<oneOrMore>
|
|
953
|
-
<choice>
|
|
954
|
-
<text/>
|
|
955
|
-
<ref name="AnyElement"/>
|
|
956
|
-
</choice>
|
|
957
|
-
</oneOrMore>
|
|
958
|
-
</element>
|
|
959
|
-
</choice>
|
|
960
|
-
</define>
|
|
961
1010
|
<define name="ParagraphFnBody" combine="interleave">
|
|
962
1011
|
<ref name="BlockSource">
|
|
963
1012
|
<a:documentation>Bibliographic source for the information in the paragraph
|
|
@@ -3,7 +3,11 @@ require "metanorma-utils"
|
|
|
3
3
|
|
|
4
4
|
module Metanorma
|
|
5
5
|
module Ietf
|
|
6
|
-
class
|
|
6
|
+
class Validate < ::Metanorma::Standoc::Validate
|
|
7
|
+
def copied_instance_variables
|
|
8
|
+
super + %i[workgroups]
|
|
9
|
+
end
|
|
10
|
+
|
|
7
11
|
def content_validate(doc)
|
|
8
12
|
super
|
|
9
13
|
image_validate(doc)
|
|
@@ -42,10 +46,6 @@ module Metanorma
|
|
|
42
46
|
def schema_file
|
|
43
47
|
"ietf.rng"
|
|
44
48
|
end
|
|
45
|
-
|
|
46
|
-
def cache_workgroup(_node)
|
|
47
|
-
Metanorma::Ietf::Data::WORKGROUPS
|
|
48
|
-
end
|
|
49
49
|
end
|
|
50
50
|
end
|
|
51
51
|
end
|
data/lib/metanorma-ietf.rb
CHANGED
|
@@ -4,6 +4,8 @@ require "vectory"
|
|
|
4
4
|
|
|
5
5
|
require_relative "metanorma/ietf"
|
|
6
6
|
require_relative "metanorma/ietf/converter"
|
|
7
|
+
require_relative "metanorma/ietf/cleanup"
|
|
8
|
+
require_relative "metanorma/ietf/validate"
|
|
7
9
|
require_relative "isodoc/ietf/rfc_convert"
|
|
8
10
|
|
|
9
11
|
Metanorma::Registry.instance.register(Metanorma::Ietf::Processor)
|
data/metanorma-ietf.gemspec
CHANGED
|
@@ -37,7 +37,7 @@ Gem::Specification.new do |spec|
|
|
|
37
37
|
spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
|
|
38
38
|
|
|
39
39
|
spec.add_dependency "metanorma-ietf-data"
|
|
40
|
-
spec.add_dependency "metanorma-standoc", "~> 3.3.
|
|
40
|
+
spec.add_dependency "metanorma-standoc", "~> 3.3.1"
|
|
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.7.
|
|
4
|
+
version: 3.7.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-03-16 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: 3.3.
|
|
33
|
+
version: 3.3.1
|
|
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: 3.3.
|
|
40
|
+
version: 3.3.1
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: relaton-render
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|