metanorma-ietf 3.0.7 → 3.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/ietf/reqt.rb +13 -60
- data/lib/isodoc/ietf/rfc_convert.rb +15 -2
- data/lib/metanorma/ietf/biblio.rng +102 -5
- data/lib/metanorma/ietf/isodoc.rng +39 -1
- data/lib/metanorma/ietf/reqt.rng +1 -1
- data/lib/metanorma/ietf/version.rb +1 -1
- data/metanorma-ietf.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c10eeb240c73eb23dc86cb68f2a74f8931b3e350f68ee763a23256a56795bae
|
4
|
+
data.tar.gz: ee6a1934c755a258adef52e1689eb462297fa34be3a8deb5923ed1da34b945b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89f9bc46f9a5d31116b36402279e8e41db7a23a012368d11acab85c9f87d6e71eb200a327a3f54b3e88e0df2efb997324462eea853996d9a46dc7e78861f09c6
|
7
|
+
data.tar.gz: fa040fe15ba9e856a3fdb5645c7d06773f288a2dd36414772e04f087ccb2acfc52dc13dfc2564025b7b4e9bc3ad0f8eba3b62c1d8a66fef699b186fd3d1e18fd
|
data/lib/isodoc/ietf/reqt.rb
CHANGED
@@ -1,81 +1,34 @@
|
|
1
1
|
module IsoDoc
|
2
2
|
module Ietf
|
3
3
|
class RfcConvert < ::IsoDoc::Convert
|
4
|
-
def
|
5
|
-
|
6
|
-
|
7
|
-
end
|
8
|
-
|
9
|
-
def recommendation_name(node, out, type)
|
10
|
-
label, title, lbl = recommendation_labels(node)
|
11
|
-
out.t **{ keepWithNext: "true" } do |b|
|
12
|
-
b << (lbl.nil? ? l10n("#{type}:") : l10n("#{type} #{lbl}:"))
|
13
|
-
end
|
14
|
-
if label || title
|
15
|
-
out.t **{ keepWithNext: "true" } do |b|
|
16
|
-
label and label.children.each { |n| parse(n, b) }
|
17
|
-
b << "#{clausedelim} " if label && title
|
18
|
-
title and title.children.each { |n| parse(n, b) }
|
19
|
-
end
|
4
|
+
def recommendation_name(node, out)
|
5
|
+
out.t **{ keepWithNext: "true" } do |p|
|
6
|
+
node.children.each { |n| parse(n, p) }
|
20
7
|
end
|
21
8
|
end
|
22
9
|
|
23
|
-
def
|
24
|
-
|
25
|
-
return if ret.empty?
|
26
|
-
|
27
|
-
out.ul do |p|
|
28
|
-
ret.each do |l|
|
29
|
-
p.li do |i|
|
30
|
-
i.em { |_e| i << l }
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
10
|
+
def recommendation_parse(node, out)
|
11
|
+
recommendation_parse1(node, out)
|
34
12
|
end
|
35
13
|
|
36
|
-
def
|
37
|
-
recommendation_name(node, out
|
38
|
-
recommendation_attributes(node, out)
|
14
|
+
def recommendation_parse1(node, out)
|
15
|
+
recommendation_name(node.at(ns("./name")), out)
|
39
16
|
node.children.each do |n|
|
40
|
-
parse(n, out) unless
|
17
|
+
parse(n, out) unless n.name == "name"
|
41
18
|
end
|
42
19
|
end
|
43
20
|
|
44
21
|
def requirement_parse(node, out)
|
45
|
-
|
46
|
-
recommendation_attributes(node, out)
|
47
|
-
node.children.each do |n|
|
48
|
-
parse(n, out) unless %w(label title).include? n.name
|
49
|
-
end
|
22
|
+
recommendation_parse1(node, out)
|
50
23
|
end
|
51
24
|
|
52
25
|
def permission_parse(node, out)
|
53
|
-
|
54
|
-
recommendation_attributes(node, out)
|
55
|
-
node.children.each do |n|
|
56
|
-
parse(n, out) unless %w(label title).include? n.name
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
def inline?(node)
|
61
|
-
return true if node.first_element_child.nil?
|
62
|
-
|
63
|
-
%w(em link eref xref strong tt sup sub strike keyword smallcap
|
64
|
-
br hr bookmark pagebreak stem origin term preferred admitted
|
65
|
-
deprecates domain termsource modification)
|
66
|
-
.include? node.first_element_child.name
|
26
|
+
recommendation_parse1(node, out)
|
67
27
|
end
|
68
28
|
|
69
|
-
def
|
70
|
-
|
71
|
-
|
72
|
-
if inline?(node)
|
73
|
-
out.t do |p|
|
74
|
-
p << "INHERIT: " if node.name == "inherit"
|
75
|
-
node.children.each { |n| parse(n, p) }
|
76
|
-
end
|
77
|
-
else
|
78
|
-
node.children.each { |n| parse(n, out) }
|
29
|
+
def div_parse(node, out)
|
30
|
+
node.children.each do |n|
|
31
|
+
parse(n, out)
|
79
32
|
end
|
80
33
|
end
|
81
34
|
end
|
@@ -17,8 +17,7 @@ module IsoDoc
|
|
17
17
|
module Ietf
|
18
18
|
class RfcConvert < ::IsoDoc::Convert
|
19
19
|
def convert1(docxml, _filename, _dir)
|
20
|
-
|
21
|
-
info docxml, nil
|
20
|
+
document_preprocess(docxml)
|
22
21
|
ret = noko do |xml|
|
23
22
|
xml.rfc **attr_code(rfc_attributes(docxml)) do |html|
|
24
23
|
make_link(html, docxml)
|
@@ -30,6 +29,20 @@ module IsoDoc
|
|
30
29
|
set_pis(docxml, Nokogiri::XML(ret))
|
31
30
|
end
|
32
31
|
|
32
|
+
def document_preprocess(docxml)
|
33
|
+
@isodoc.reqt_models = Metanorma::Requirements
|
34
|
+
.new({ default: "default", lang: @lang, script: @script,
|
35
|
+
labels: @i18n.get })
|
36
|
+
info docxml, nil
|
37
|
+
@xrefs.parse docxml
|
38
|
+
@isodoc.xrefs = @xrefs
|
39
|
+
@isodoc.permission(docxml)
|
40
|
+
@isodoc.requirement(docxml)
|
41
|
+
@isodoc.recommendation(docxml)
|
42
|
+
@isodoc.requirement_render(docxml)
|
43
|
+
@xrefs.parse docxml
|
44
|
+
end
|
45
|
+
|
33
46
|
def metadata_init(lang, script, i18n)
|
34
47
|
@meta = Metadata.new(lang, script, i18n)
|
35
48
|
end
|
@@ -623,6 +623,97 @@
|
|
623
623
|
<zeroOrMore>
|
624
624
|
<ref name="bsource"/>
|
625
625
|
</zeroOrMore>
|
626
|
+
<oneOrMore>
|
627
|
+
<ref name="docidentifier"/>
|
628
|
+
</oneOrMore>
|
629
|
+
<optional>
|
630
|
+
<ref name="docnumber"/>
|
631
|
+
</optional>
|
632
|
+
<zeroOrMore>
|
633
|
+
<ref name="bdate"/>
|
634
|
+
</zeroOrMore>
|
635
|
+
<zeroOrMore>
|
636
|
+
<ref name="contributor"/>
|
637
|
+
</zeroOrMore>
|
638
|
+
<optional>
|
639
|
+
<ref name="edition"/>
|
640
|
+
</optional>
|
641
|
+
<zeroOrMore>
|
642
|
+
<ref name="version"/>
|
643
|
+
</zeroOrMore>
|
644
|
+
<zeroOrMore>
|
645
|
+
<ref name="biblionote"/>
|
646
|
+
</zeroOrMore>
|
647
|
+
<zeroOrMore>
|
648
|
+
<ref name="language"/>
|
649
|
+
</zeroOrMore>
|
650
|
+
<zeroOrMore>
|
651
|
+
<ref name="script"/>
|
652
|
+
</zeroOrMore>
|
653
|
+
<zeroOrMore>
|
654
|
+
<ref name="bibabstract"/>
|
655
|
+
</zeroOrMore>
|
656
|
+
<optional>
|
657
|
+
<ref name="status"/>
|
658
|
+
</optional>
|
659
|
+
<zeroOrMore>
|
660
|
+
<ref name="copyright"/>
|
661
|
+
</zeroOrMore>
|
662
|
+
<zeroOrMore>
|
663
|
+
<ref name="docrelation"/>
|
664
|
+
</zeroOrMore>
|
665
|
+
<zeroOrMore>
|
666
|
+
<ref name="series"/>
|
667
|
+
</zeroOrMore>
|
668
|
+
<optional>
|
669
|
+
<ref name="medium"/>
|
670
|
+
</optional>
|
671
|
+
<zeroOrMore>
|
672
|
+
<ref name="bplace"/>
|
673
|
+
</zeroOrMore>
|
674
|
+
<zeroOrMore>
|
675
|
+
<ref name="bprice"/>
|
676
|
+
</zeroOrMore>
|
677
|
+
<zeroOrMore>
|
678
|
+
<ref name="extent"/>
|
679
|
+
</zeroOrMore>
|
680
|
+
<optional>
|
681
|
+
<ref name="bibliographic_size"/>
|
682
|
+
</optional>
|
683
|
+
<zeroOrMore>
|
684
|
+
<ref name="accesslocation"/>
|
685
|
+
</zeroOrMore>
|
686
|
+
<zeroOrMore>
|
687
|
+
<ref name="license"/>
|
688
|
+
</zeroOrMore>
|
689
|
+
<zeroOrMore>
|
690
|
+
<ref name="bclassification"/>
|
691
|
+
</zeroOrMore>
|
692
|
+
<zeroOrMore>
|
693
|
+
<ref name="bkeyword"/>
|
694
|
+
</zeroOrMore>
|
695
|
+
<optional>
|
696
|
+
<ref name="validity"/>
|
697
|
+
</optional>
|
698
|
+
</define>
|
699
|
+
<define name="ReducedBibliographicItem">
|
700
|
+
<optional>
|
701
|
+
<attribute name="type">
|
702
|
+
<ref name="BibItemType"/>
|
703
|
+
</attribute>
|
704
|
+
</optional>
|
705
|
+
<optional>
|
706
|
+
<ref name="fetched"/>
|
707
|
+
</optional>
|
708
|
+
<optional>
|
709
|
+
<ref name="formattedref"/>
|
710
|
+
</optional>
|
711
|
+
<zeroOrMore>
|
712
|
+
<ref name="btitle"/>
|
713
|
+
</zeroOrMore>
|
714
|
+
<zeroOrMore>
|
715
|
+
<ref name="bsource"/>
|
716
|
+
</zeroOrMore>
|
626
717
|
<zeroOrMore>
|
627
718
|
<ref name="docidentifier"/>
|
628
719
|
</zeroOrMore>
|
@@ -638,9 +729,9 @@
|
|
638
729
|
<optional>
|
639
730
|
<ref name="edition"/>
|
640
731
|
</optional>
|
641
|
-
<
|
732
|
+
<zeroOrMore>
|
642
733
|
<ref name="version"/>
|
643
|
-
</
|
734
|
+
</zeroOrMore>
|
644
735
|
<zeroOrMore>
|
645
736
|
<ref name="biblionote"/>
|
646
737
|
</zeroOrMore>
|
@@ -833,6 +924,12 @@
|
|
833
924
|
<data type="boolean"/>
|
834
925
|
</attribute>
|
835
926
|
</optional>
|
927
|
+
<optional>
|
928
|
+
<attribute name="language"/>
|
929
|
+
</optional>
|
930
|
+
<optional>
|
931
|
+
<attribute name="script"/>
|
932
|
+
</optional>
|
836
933
|
<text/>
|
837
934
|
</element>
|
838
935
|
</define>
|
@@ -1172,7 +1269,7 @@
|
|
1172
1269
|
</element>
|
1173
1270
|
</optional>
|
1174
1271
|
<element name="bibitem">
|
1175
|
-
<ref name="
|
1272
|
+
<ref name="ReducedBibliographicItem"/>
|
1176
1273
|
</element>
|
1177
1274
|
<choice>
|
1178
1275
|
<zeroOrMore>
|
@@ -1197,9 +1294,9 @@
|
|
1197
1294
|
<optional>
|
1198
1295
|
<ref name="revision-date"/>
|
1199
1296
|
</optional>
|
1200
|
-
<
|
1297
|
+
<optional>
|
1201
1298
|
<ref name="draft"/>
|
1202
|
-
</
|
1299
|
+
</optional>
|
1203
1300
|
</element>
|
1204
1301
|
</define>
|
1205
1302
|
<define name="vedition">
|
@@ -69,6 +69,17 @@
|
|
69
69
|
</zeroOrMore>
|
70
70
|
</element>
|
71
71
|
</define>
|
72
|
+
<define name="AdmonitionType">
|
73
|
+
<choice>
|
74
|
+
<value>warning</value>
|
75
|
+
<value>note</value>
|
76
|
+
<value>tip</value>
|
77
|
+
<value>important</value>
|
78
|
+
<value>caution</value>
|
79
|
+
<value>statement</value>
|
80
|
+
<value>editorial</value>
|
81
|
+
</choice>
|
82
|
+
</define>
|
72
83
|
<define name="index">
|
73
84
|
<element name="index">
|
74
85
|
<optional>
|
@@ -116,6 +127,11 @@
|
|
116
127
|
<data type="boolean"/>
|
117
128
|
</attribute>
|
118
129
|
</optional>
|
130
|
+
<optional>
|
131
|
+
<attribute name="suppress_identifier">
|
132
|
+
<data type="boolean"/>
|
133
|
+
</attribute>
|
134
|
+
</optional>
|
119
135
|
<ref name="BibliographicItem"/>
|
120
136
|
</element>
|
121
137
|
</define>
|
@@ -703,6 +719,9 @@
|
|
703
719
|
<optional>
|
704
720
|
<attribute name="tag"/>
|
705
721
|
</optional>
|
722
|
+
<optional>
|
723
|
+
<attribute name="type"/>
|
724
|
+
</optional>
|
706
725
|
<optional>
|
707
726
|
<attribute name="multilingual-rendering">
|
708
727
|
<ref name="MultilingualRenderingType"/>
|
@@ -738,6 +757,9 @@
|
|
738
757
|
<optional>
|
739
758
|
<attribute name="tag"/>
|
740
759
|
</optional>
|
760
|
+
<optional>
|
761
|
+
<attribute name="type"/>
|
762
|
+
</optional>
|
741
763
|
<optional>
|
742
764
|
<attribute name="multilingual-rendering">
|
743
765
|
<ref name="MultilingualRenderingType"/>
|
@@ -1263,7 +1285,12 @@
|
|
1263
1285
|
</define>
|
1264
1286
|
<define name="span">
|
1265
1287
|
<element name="span">
|
1266
|
-
<
|
1288
|
+
<optional>
|
1289
|
+
<attribute name="class"/>
|
1290
|
+
</optional>
|
1291
|
+
<optional>
|
1292
|
+
<attribute name="style"/>
|
1293
|
+
</optional>
|
1267
1294
|
<oneOrMore>
|
1268
1295
|
<ref name="TextElement"/>
|
1269
1296
|
</oneOrMore>
|
@@ -2059,6 +2086,7 @@
|
|
2059
2086
|
<value>compare</value>
|
2060
2087
|
<value>contrast</value>
|
2061
2088
|
<value>see</value>
|
2089
|
+
<value>seealso</value>
|
2062
2090
|
</choice>
|
2063
2091
|
</define>
|
2064
2092
|
<define name="deprecates">
|
@@ -2481,6 +2509,16 @@
|
|
2481
2509
|
<text/>
|
2482
2510
|
</element>
|
2483
2511
|
</optional>
|
2512
|
+
<optional>
|
2513
|
+
<element name="amendment">
|
2514
|
+
<text/>
|
2515
|
+
</element>
|
2516
|
+
</optional>
|
2517
|
+
<optional>
|
2518
|
+
<element name="corrigendum">
|
2519
|
+
<text/>
|
2520
|
+
</element>
|
2521
|
+
</optional>
|
2484
2522
|
<optional>
|
2485
2523
|
<element name="language">
|
2486
2524
|
<text/>
|
data/lib/metanorma/ietf/reqt.rng
CHANGED
data/metanorma-ietf.gemspec
CHANGED
@@ -37,7 +37,7 @@ Gem::Specification.new do |spec|
|
|
37
37
|
|
38
38
|
spec.add_dependency "mathml2asciimath"
|
39
39
|
spec.add_dependency "metanorma-ietf-data"
|
40
|
-
spec.add_dependency "metanorma-standoc", "~> 2.
|
40
|
+
spec.add_dependency "metanorma-standoc", "~> 2.2.0"
|
41
41
|
|
42
42
|
spec.add_development_dependency "debug"
|
43
43
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
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.
|
4
|
+
version: 3.0.10
|
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-
|
11
|
+
date: 2022-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mathml2asciimath
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 2.
|
47
|
+
version: 2.2.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: 2.
|
54
|
+
version: 2.2.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: debug
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -293,7 +293,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
293
293
|
- !ruby/object:Gem::Version
|
294
294
|
version: '0'
|
295
295
|
requirements: []
|
296
|
-
rubygems_version: 3.3.
|
296
|
+
rubygems_version: 3.3.16
|
297
297
|
signing_key:
|
298
298
|
specification_version: 4
|
299
299
|
summary: metanorma-ietf lets you write IETF documents, such as Internet-Drafts and
|