metanorma-ietf 3.3.9 → 3.4.0
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/references.rb +4 -0
- data/lib/isodoc/ietf/terms.rb +31 -8
- data/lib/metanorma/ietf/basicdoc.rng +909 -464
- data/lib/metanorma/ietf/biblio-standoc.rng +100 -20
- data/lib/metanorma/ietf/biblio.rng +899 -333
- data/lib/metanorma/ietf/converter.rb +2 -2
- data/lib/metanorma/ietf/isodoc.rng +1031 -912
- data/lib/metanorma/ietf/processor.rb +1 -1
- data/lib/metanorma/ietf/relaton-ietf.rng +1 -0
- data/lib/metanorma/ietf/reqt.rng +94 -72
- data/lib/metanorma/ietf/version.rb +1 -1
- 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: 002c1dbf3082b89ae330b047a9a044f6cea91437c49f1524b495c0c44117910e
|
4
|
+
data.tar.gz: 3cecbf7bcba03f86289b7edfbfa8c34b2645b739d7bd70785a0cac17b91650ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c1193cb258edcae562cbfe66023db98a438c4ad70a1dc8f1f0c71577cdf6d335fed24ed39e223f190098168fd3c3147d6d6bbebc60352473b9341da78cca621
|
7
|
+
data.tar.gz: b944d99efa37b7616c35d624753da963a344f534c822baa0acacd3f1365c14a1b70e8dd1308e9dff89225008bfd99e8d6077e13a99c30ff6cd1ead676f5d3cf4
|
@@ -23,6 +23,10 @@ module IsoDoc
|
|
23
23
|
i18nhash: @i18n.get)
|
24
24
|
end
|
25
25
|
|
26
|
+
def implicit_reference(bib)
|
27
|
+
bib["hidden"] == "true"
|
28
|
+
end
|
29
|
+
|
26
30
|
def bibliography1(node, out)
|
27
31
|
out.references **attr_code(anchor: node["id"]) do |div|
|
28
32
|
title = node.at(ns("./title")) and div.name do |name|
|
data/lib/isodoc/ietf/terms.rb
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
module IsoDoc
|
2
2
|
module Ietf
|
3
3
|
class RfcConvert < ::IsoDoc::Convert
|
4
|
+
def set_termdomain(termdomain)
|
5
|
+
@termdomain = termdomain
|
6
|
+
end
|
7
|
+
|
4
8
|
def definition_parse(node, out)
|
5
9
|
node.children.each { |n| parse(n, out) }
|
6
10
|
end
|
@@ -27,6 +31,10 @@ module IsoDoc
|
|
27
31
|
end
|
28
32
|
|
29
33
|
def term_parse(node, out)
|
34
|
+
if domain = node.at(ns("./domain"))
|
35
|
+
set_termdomain(domain.text)
|
36
|
+
domain["hidden"] = "true"
|
37
|
+
end
|
30
38
|
name = node.at(ns(".//name"))
|
31
39
|
out.name do |p|
|
32
40
|
name.children.each { |n| parse(n, p) }
|
@@ -38,7 +46,12 @@ module IsoDoc
|
|
38
46
|
end
|
39
47
|
|
40
48
|
def termdef_parse(node, out)
|
41
|
-
|
49
|
+
if domain = node.at(ns("./domain"))
|
50
|
+
set_termdomain(domain.text)
|
51
|
+
domain["hidden"] = "true"
|
52
|
+
else
|
53
|
+
set_termdomain("")
|
54
|
+
end
|
42
55
|
node.xpath(ns("./definition")).size > 1 and
|
43
56
|
@isodoc.multidef(node)
|
44
57
|
clause_parse(node, out)
|
@@ -47,15 +60,25 @@ module IsoDoc
|
|
47
60
|
def termdocsource_parse(_node, _out); end
|
48
61
|
|
49
62
|
def concept_parse(node, out)
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
63
|
+
ref = node.at(ns("./xref | ./eref | ./termref"))
|
64
|
+
render = node.at(ns("./renderterm"))
|
65
|
+
!ref && !render and return node.children.each { |n| parse(n, out) }
|
66
|
+
!render or concept_render(render, ref, out)
|
67
|
+
ref or return
|
68
|
+
concept_ref(ref, out)
|
69
|
+
end
|
70
|
+
|
71
|
+
def concept_render(render, ref, out)
|
72
|
+
out.em do |em|
|
73
|
+
render.children.each { |n| parse(n, em) }
|
55
74
|
end
|
75
|
+
ref and out << " "
|
76
|
+
end
|
77
|
+
|
78
|
+
def concept_ref(ref, out)
|
79
|
+
ref or return
|
56
80
|
out << "[term defined in "
|
57
|
-
|
58
|
-
parse(r, out)
|
81
|
+
parse(ref, out)
|
59
82
|
out << "]"
|
60
83
|
end
|
61
84
|
|