metanorma-ietf 3.4.4 → 3.5.1
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/blocks.rb +11 -83
- data/lib/isodoc/ietf/inline.rb +11 -6
- data/lib/isodoc/ietf/lists.rb +85 -0
- data/lib/isodoc/ietf/reqt.rb +1 -1
- data/lib/isodoc/ietf/rfc_convert.rb +4 -1
- data/lib/metanorma/ietf/basicdoc.rng +37 -32
- data/lib/metanorma/ietf/biblio.rng +2 -0
- data/lib/metanorma/ietf/front.rb +1 -1
- data/lib/metanorma/ietf/ietf.rng +28 -30
- data/lib/metanorma/ietf/isodoc.rng +35 -23
- data/lib/metanorma/ietf/version.rb +1 -1
- data/lib/relaton/render/parse.rb +1 -0
- data/metanorma-ietf.gemspec +3 -2
- metadata +22 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da1665019f44fcc0eb18a283049b279819b7e185818f1f0722c7933c92a226aa
|
4
|
+
data.tar.gz: 4b4defd2a8b051c5174f3f45c93035b7eee50b812448863f42f8eb435f126b0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f80bd6987bc38d3dedd539c2573bfd458cdbb9911a03370f0e7a5bc40804076c6bb28e15fa970fe90473c7827aa8f29b77aec5d66ee6533da7a1d284cda4987e
|
7
|
+
data.tar.gz: 4caff92a476ea68f7a99112c808c6f09344a3f2f2e38f9dd56dfc462ae23f948cbedce37532f2f82e02b2fbf8c2e950b7bec2882ab5c09b903f4d201fb2a0183
|
data/lib/isodoc/ietf/blocks.rb
CHANGED
@@ -19,86 +19,6 @@ module IsoDoc
|
|
19
19
|
node.xpath(ns("./note")).each { |n| parse(n, out) }
|
20
20
|
end
|
21
21
|
|
22
|
-
def ul_attrs(node)
|
23
|
-
{ anchor: node["id"], empty: node["nobullet"],
|
24
|
-
indent: node["indent"], bare: node["bare"],
|
25
|
-
spacing: node["spacing"] }
|
26
|
-
end
|
27
|
-
|
28
|
-
def ul_parse(node, out)
|
29
|
-
out.ul **attr_code(ul_attrs(node)) do |ul|
|
30
|
-
node.children.each { |n| parse(n, ul) }
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
OL_STYLE = {
|
35
|
-
arabic: "1",
|
36
|
-
roman: "i",
|
37
|
-
alphabet: "a",
|
38
|
-
roman_upper: "I",
|
39
|
-
alphabet_upper: "A",
|
40
|
-
}.freeze
|
41
|
-
|
42
|
-
def ol_style(type)
|
43
|
-
OL_STYLE[type&.to_sym] || type
|
44
|
-
end
|
45
|
-
|
46
|
-
def ol_attrs(node)
|
47
|
-
{ anchor: node["id"],
|
48
|
-
spacing: node["spacing"], indent: node["indent"],
|
49
|
-
type: ol_style(node["type"]),
|
50
|
-
group: node["group"], start: node["start"] }
|
51
|
-
end
|
52
|
-
|
53
|
-
def ol_parse(node, out)
|
54
|
-
out.ol **attr_code(ol_attrs(node)) do |ol|
|
55
|
-
node.children.each { |n| parse(n, ol) }
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
def dl_attrs(node)
|
60
|
-
attr_code(anchor: node["id"], newline: node["newline"],
|
61
|
-
indent: node["indent"], spacing: node["spacing"])
|
62
|
-
end
|
63
|
-
|
64
|
-
def dl_parse(node, out)
|
65
|
-
list_title_parse(node, out)
|
66
|
-
out.dl **dl_attrs(node) do |v|
|
67
|
-
node.elements.select { |n| dt_dd? n }.each_slice(2) do |dt, dd|
|
68
|
-
dl_parse1(v, dt, dd)
|
69
|
-
end
|
70
|
-
end
|
71
|
-
dl_parse_notes(node, out)
|
72
|
-
end
|
73
|
-
|
74
|
-
def dt_parse(dterm, term)
|
75
|
-
if dterm.elements.empty? then term << dterm.text
|
76
|
-
else dterm.children.each { |n| parse(n, term) }
|
77
|
-
end
|
78
|
-
end
|
79
|
-
|
80
|
-
def dl_parse1(dlist, dterm, ddef)
|
81
|
-
dlist.dt **attr_code(anchor: dterm["id"]) do |term|
|
82
|
-
dt_parse(dterm, term)
|
83
|
-
end
|
84
|
-
dlist.dd **attr_code(anchor: ddef["id"]) do |listitem|
|
85
|
-
ddef.children.each { |n| parse(n, listitem) }
|
86
|
-
end
|
87
|
-
end
|
88
|
-
|
89
|
-
def li_parse(node, out)
|
90
|
-
out.li **attr_code(anchor: node["id"]) do |li|
|
91
|
-
if node["uncheckedcheckbox"] == "true"
|
92
|
-
li << '<span class="zzMoveToFollowing">' \
|
93
|
-
'<input type="checkbox" checked="checked"/></span>'
|
94
|
-
elsif node["checkedcheckbox"] == "true"
|
95
|
-
li << '<span class="zzMoveToFollowing">' \
|
96
|
-
'<input type="checkbox"/></span>'
|
97
|
-
end
|
98
|
-
node.children.each { |n| parse(n, li) }
|
99
|
-
end
|
100
|
-
end
|
101
|
-
|
102
22
|
def note_label(node)
|
103
23
|
n = @xrefs.get[node["id"]]
|
104
24
|
n.nil? || n[:label].nil? || n[:label].empty? and
|
@@ -142,12 +62,12 @@ module IsoDoc
|
|
142
62
|
end
|
143
63
|
|
144
64
|
def sourcecode_parse(node, out)
|
65
|
+
b = node.at(ns("./body"))
|
145
66
|
out.sourcecode **attr_code(
|
146
67
|
anchor: node["id"], type: node["lang"], name: node["filename"],
|
147
68
|
markers: node["markers"], src: node["src"]
|
148
69
|
) do |s|
|
149
|
-
|
150
|
-
%w(name dl).include?(x.name) and next
|
70
|
+
b&.children&.each do |x|
|
151
71
|
parse(x, s)
|
152
72
|
end
|
153
73
|
end
|
@@ -261,7 +181,15 @@ module IsoDoc
|
|
261
181
|
end
|
262
182
|
|
263
183
|
def pseudocode_parse(node, out)
|
264
|
-
|
184
|
+
out.sourcecode **attr_code(
|
185
|
+
anchor: node["id"], type: node["lang"], name: node["filename"],
|
186
|
+
markers: node["markers"], src: node["src"]
|
187
|
+
) do |s|
|
188
|
+
node.children.each do |x|
|
189
|
+
%w(name dl).include?(x.name) and next
|
190
|
+
parse(x, s)
|
191
|
+
end
|
192
|
+
end
|
265
193
|
end
|
266
194
|
|
267
195
|
def figure_parse(node, out)
|
data/lib/isodoc/ietf/inline.rb
CHANGED
@@ -37,6 +37,10 @@ module IsoDoc
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
+
def display_text_parse(node, out)
|
41
|
+
node.children.each { |n| parse(n, out) }
|
42
|
+
end
|
43
|
+
|
40
44
|
def strike_parse(node, out)
|
41
45
|
node.children.each { |n| parse(n, out) }
|
42
46
|
end
|
@@ -56,7 +60,7 @@ module IsoDoc
|
|
56
60
|
out << text
|
57
61
|
end
|
58
62
|
|
59
|
-
def
|
63
|
+
def semx_stem_parse(node, out)
|
60
64
|
stem = case node["type"]
|
61
65
|
when "MathML"
|
62
66
|
a = node.at(ns("./asciimath"))&.remove
|
@@ -78,7 +82,7 @@ module IsoDoc
|
|
78
82
|
|
79
83
|
def hr_parse(node, out); end
|
80
84
|
|
81
|
-
def
|
85
|
+
def semx_link_parse(node, out)
|
82
86
|
out.eref **attr_code(target: node["target"],
|
83
87
|
brackets: node["style"]) do |l|
|
84
88
|
node.children.each { |n| parse(n, l) }
|
@@ -115,7 +119,7 @@ module IsoDoc
|
|
115
119
|
end
|
116
120
|
end
|
117
121
|
|
118
|
-
def
|
122
|
+
def semx_xref_parse(node, out)
|
119
123
|
out.xref **attr_code(target: node["target"], format: node["format"],
|
120
124
|
relative: node["relative"]) do |l|
|
121
125
|
l << get_linkend(node)
|
@@ -127,12 +131,13 @@ module IsoDoc
|
|
127
131
|
%w{locality localityStack location}.include? c.name
|
128
132
|
end
|
129
133
|
contents = no_loc_contents.select { |c| !c.text? || /\S/.match(c) }
|
134
|
+
.map { |x| x.name == "display-text" ? x.children : x }.flatten
|
130
135
|
!contents.empty? and
|
131
136
|
return to_xml(Nokogiri::XML::NodeSet.new(node.document, contents))
|
132
137
|
""
|
133
138
|
end
|
134
139
|
|
135
|
-
def
|
140
|
+
def semx_eref_parse(node, out)
|
136
141
|
linkend = node.children.reject do |c|
|
137
142
|
%w{locality localityStack}.include? c.name
|
138
143
|
end
|
@@ -159,11 +164,11 @@ module IsoDoc
|
|
159
164
|
.sub(/^\s*(Sections?|Clauses?)/, "").strip.sub(/,$/, "")
|
160
165
|
end
|
161
166
|
|
162
|
-
def
|
167
|
+
def semx_origin_parse(node, out)
|
163
168
|
if t = node.at(ns("./termref"))
|
164
169
|
termrefelem_parse(t, out)
|
165
170
|
else
|
166
|
-
|
171
|
+
semx_eref_parse(node, out)
|
167
172
|
end
|
168
173
|
end
|
169
174
|
|
@@ -0,0 +1,85 @@
|
|
1
|
+
module IsoDoc
|
2
|
+
module Ietf
|
3
|
+
class RfcConvert < ::IsoDoc::Convert
|
4
|
+
def ul_attrs(node)
|
5
|
+
{ anchor: node["id"], empty: node["nobullet"],
|
6
|
+
indent: node["indent"], bare: node["bare"],
|
7
|
+
spacing: node["spacing"] }
|
8
|
+
end
|
9
|
+
|
10
|
+
def ul_parse(node, out)
|
11
|
+
out.ul **attr_code(ul_attrs(node)) do |ul|
|
12
|
+
node.children.each { |n| parse(n, ul) }
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
OL_STYLE = {
|
17
|
+
arabic: "1",
|
18
|
+
roman: "i",
|
19
|
+
alphabet: "a",
|
20
|
+
roman_upper: "I",
|
21
|
+
alphabet_upper: "A",
|
22
|
+
}.freeze
|
23
|
+
|
24
|
+
def ol_style(type)
|
25
|
+
OL_STYLE[type&.to_sym] || type
|
26
|
+
end
|
27
|
+
|
28
|
+
def ol_attrs(node)
|
29
|
+
{ anchor: node["id"],
|
30
|
+
spacing: node["spacing"], indent: node["indent"],
|
31
|
+
type: ol_style(node["type"]),
|
32
|
+
group: node["group"], start: node["start"] }
|
33
|
+
end
|
34
|
+
|
35
|
+
def ol_parse(node, out)
|
36
|
+
out.ol **attr_code(ol_attrs(node)) do |ol|
|
37
|
+
node.children.each { |n| parse(n, ol) }
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def dl_attrs(node)
|
42
|
+
attr_code(anchor: node["id"], newline: node["newline"],
|
43
|
+
indent: node["indent"], spacing: node["spacing"])
|
44
|
+
end
|
45
|
+
|
46
|
+
def dl_parse(node, out)
|
47
|
+
list_title_parse(node, out)
|
48
|
+
out.dl **dl_attrs(node) do |v|
|
49
|
+
node.elements.select { |n| dt_dd? n }.each_slice(2) do |dt, dd|
|
50
|
+
dl_parse1(v, dt, dd)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
dl_parse_notes(node, out)
|
54
|
+
end
|
55
|
+
|
56
|
+
def dt_parse(dterm, term)
|
57
|
+
if dterm.elements.empty? then term << dterm.text
|
58
|
+
else dterm.children.each { |n| parse(n, term) }
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
def dl_parse1(dlist, dterm, ddef)
|
63
|
+
dlist.dt **attr_code(anchor: dterm["id"]) do |term|
|
64
|
+
dt_parse(dterm, term)
|
65
|
+
end
|
66
|
+
dlist.dd **attr_code(anchor: ddef["id"]) do |listitem|
|
67
|
+
ddef.children.each { |n| parse(n, listitem) }
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
def li_parse(node, out)
|
72
|
+
out.li **attr_code(anchor: node["id"]) do |li|
|
73
|
+
if node["uncheckedcheckbox"] == "true"
|
74
|
+
li << '<span class="zzMoveToFollowing">' \
|
75
|
+
'<input type="checkbox" checked="checked"/></span>'
|
76
|
+
elsif node["checkedcheckbox"] == "true"
|
77
|
+
li << '<span class="zzMoveToFollowing">' \
|
78
|
+
'<input type="checkbox"/></span>'
|
79
|
+
end
|
80
|
+
node.children.each { |n| parse(n, li) }
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
data/lib/isodoc/ietf/reqt.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require_relative "./terms"
|
2
2
|
require_relative "./blocks"
|
3
|
+
require_relative "./lists"
|
3
4
|
require_relative "./metadata"
|
4
5
|
require_relative "./front"
|
5
6
|
require_relative "./table"
|
@@ -66,7 +67,9 @@ module IsoDoc
|
|
66
67
|
case node.name
|
67
68
|
when "bcp14" then bcp14_parse(node, out)
|
68
69
|
when "concept" then concept_parse(node, out)
|
69
|
-
when "
|
70
|
+
when "display-text" then display_text_parse(node, out)
|
71
|
+
when "verbal-definition", "non-verbal-representation",
|
72
|
+
"fmt-provision"
|
70
73
|
node.elements.each { |n| parse(n, out) }
|
71
74
|
else
|
72
75
|
text = node.to_xml.gsub(/</, "<").gsub(/>/, ">")
|
@@ -599,17 +599,9 @@ It is included for convenience, in case processing the citation to extract the a
|
|
599
599
|
<a:documentation>The caption of the block</a:documentation>
|
600
600
|
</ref>
|
601
601
|
</optional>
|
602
|
-
<
|
603
|
-
<
|
604
|
-
|
605
|
-
<a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
|
606
|
-
(The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
|
607
|
-
</text>
|
608
|
-
<ref name="callout">
|
609
|
-
<a:documentation>Zero or more cross-references; these are intended to be embedded within the content string, and link to annotations</a:documentation>
|
610
|
-
</ref>
|
611
|
-
</choice>
|
612
|
-
</oneOrMore>
|
602
|
+
<ref name="sourcecodebody">
|
603
|
+
<a:documentation>The sourcecode content</a:documentation>
|
604
|
+
</ref>
|
613
605
|
<zeroOrMore>
|
614
606
|
<ref name="annotation">
|
615
607
|
<a:documentation>Annotations to the source code; each annotation consists of zero or more paragraphs,
|
@@ -628,17 +620,9 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
628
620
|
<a:documentation>The caption of the block</a:documentation>
|
629
621
|
</ref>
|
630
622
|
</optional>
|
631
|
-
<
|
632
|
-
<
|
633
|
-
|
634
|
-
<a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
|
635
|
-
(The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
|
636
|
-
</text>
|
637
|
-
<ref name="callout">
|
638
|
-
<a:documentation>Zero or more cross-references; these are intended to be embedded within the content string, and link to annotations</a:documentation>
|
639
|
-
</ref>
|
640
|
-
</choice>
|
641
|
-
</oneOrMore>
|
623
|
+
<ref name="sourcecodebody">
|
624
|
+
<a:documentation>The sourcecode content</a:documentation>
|
625
|
+
</ref>
|
642
626
|
<zeroOrMore>
|
643
627
|
<ref name="annotation">
|
644
628
|
<a:documentation>Annotations to the source code; each annotation consists of zero or more paragraphs,
|
@@ -651,6 +635,20 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
651
635
|
</ref>
|
652
636
|
</zeroOrMore>
|
653
637
|
</define>
|
638
|
+
<define name="sourcecodebody">
|
639
|
+
<a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
|
640
|
+
(The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
|
641
|
+
<element name="body">
|
642
|
+
<oneOrMore>
|
643
|
+
<choice>
|
644
|
+
<text/>
|
645
|
+
<ref name="callout">
|
646
|
+
<a:documentation>Zero or more cross-references; these are intended to be embedded within the content string, and link to annotations</a:documentation>
|
647
|
+
</ref>
|
648
|
+
</choice>
|
649
|
+
</oneOrMore>
|
650
|
+
</element>
|
651
|
+
</define>
|
654
652
|
<define name="pre">
|
655
653
|
<a:documentation>Pre-formatted block. Wrapper for text to be rendered with fixed-width typeface, and preserving spaces including line breaks.
|
656
654
|
They are intended for a restricted number of functions, most typically ASCII Art (which is still in prominent use in some
|
@@ -1672,18 +1670,25 @@ which can be bookmarks as well as block or section references</a:documentation>
|
|
1672
1670
|
</optional>
|
1673
1671
|
</define>
|
1674
1672
|
<define name="XrefBody">
|
1675
|
-
<
|
1676
|
-
|
1677
|
-
|
1678
|
-
|
1679
|
-
|
1673
|
+
<a:documentation>The textual content of the element. The `text` is what we wish to show the link as (e.g., the "content" of `<xx>my link text</xx>`)</a:documentation>
|
1674
|
+
<optional>
|
1675
|
+
<element name="display-text">
|
1676
|
+
<oneOrMore>
|
1677
|
+
<ref name="PureTextElement"/>
|
1678
|
+
</oneOrMore>
|
1679
|
+
</element>
|
1680
|
+
</optional>
|
1680
1681
|
</define>
|
1681
1682
|
<define name="ErefBody">
|
1682
|
-
<
|
1683
|
-
<
|
1684
|
-
<
|
1685
|
-
|
1686
|
-
|
1683
|
+
<optional>
|
1684
|
+
<element name="display-text">
|
1685
|
+
<oneOrMore>
|
1686
|
+
<ref name="PureTextElement">
|
1687
|
+
<a:documentation>The textual content of the element. The `text` is what we wish to show the link as (e.g., the "content" of `<xx>my link text</xx>`)</a:documentation>
|
1688
|
+
</ref>
|
1689
|
+
</oneOrMore>
|
1690
|
+
</element>
|
1691
|
+
</optional>
|
1687
1692
|
</define>
|
1688
1693
|
<define name="fn">
|
1689
1694
|
<a:documentation>Inline reference to a paragraph or paragraphs, appearing as a footnote.
|
@@ -947,6 +947,8 @@ May be electronic (e.g. Twitter direct message, email) or voice (e.g. a remark m
|
|
947
947
|
typically cited as "personal communication")</a:documentation>
|
948
948
|
<value>conversation</value>
|
949
949
|
<a:documentation>An exchange of messages between two or more persons. May be electronic (e.g. web chat) or voice (e.g. phone call)</a:documentation>
|
950
|
+
<value>collection</value>
|
951
|
+
<a:documentation>A compound resource consisting of other resources, which are themselves presupposed to have their type specified..</a:documentation>
|
950
952
|
<value>misc</value>
|
951
953
|
<a:documentation>Bibliographic type not adequately described in the foregoing</a:documentation>
|
952
954
|
</choice>
|
data/lib/metanorma/ietf/front.rb
CHANGED
@@ -35,7 +35,7 @@ module Metanorma
|
|
35
35
|
xml.title **attr_code(at.merge(type: "main")) do |t|
|
36
36
|
t << (::Metanorma::Utils::asciidoc_sub(node.attr("title")) ||
|
37
37
|
::Metanorma::Utils::asciidoc_sub(node.attr("title-en")) ||
|
38
|
-
node.
|
38
|
+
::Metanorma::Utils::asciidoc_sub(node.attr("doctitle")))
|
39
39
|
end
|
40
40
|
a = node.attr("abbrev") and
|
41
41
|
xml.title a, **attr_code(at.merge(type: "abbrev"))
|
data/lib/metanorma/ietf/ietf.rng
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<grammar ns='https://www.metanorma.org/ns/
|
2
|
+
<grammar ns='https://www.metanorma.org/ns/standoc' xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
3
3
|
<!--
|
4
4
|
VERSION v1.2.1
|
5
5
|
Currently we inherit from a namespaced grammar, isostandard. Until we inherit from isodoc,
|
@@ -8,9 +8,6 @@
|
|
8
8
|
-->
|
9
9
|
<include href="relaton-ietf.rng"/>
|
10
10
|
<include href="isodoc.rng">
|
11
|
-
<start>
|
12
|
-
<ref name="ietf-standard"/>
|
13
|
-
</start>
|
14
11
|
<define name="ParagraphAttrs">
|
15
12
|
<optional>
|
16
13
|
<attribute name="align">
|
@@ -382,7 +379,34 @@
|
|
382
379
|
</optional>
|
383
380
|
</element>
|
384
381
|
</define>
|
382
|
+
<define name="standard-document">
|
383
|
+
<element name="metanorma">
|
384
|
+
<ref name="Root-Attributes"/>
|
385
|
+
<ref name="bibdata"/>
|
386
|
+
<zeroOrMore>
|
387
|
+
<ref name="termdocsource"/>
|
388
|
+
</zeroOrMore>
|
389
|
+
<optional>
|
390
|
+
<ref name="misccontainer"/>
|
391
|
+
</optional>
|
392
|
+
<optional>
|
393
|
+
<ref name="boilerplate"/>
|
394
|
+
</optional>
|
395
|
+
<ref name="preface"/>
|
396
|
+
<oneOrMore>
|
397
|
+
<ref name="sections"/>
|
398
|
+
</oneOrMore>
|
399
|
+
<zeroOrMore>
|
400
|
+
<ref name="annex"/>
|
401
|
+
</zeroOrMore>
|
402
|
+
<ref name="bibliography"/>
|
403
|
+
<zeroOrMore>
|
404
|
+
<ref name="indexsect"/>
|
405
|
+
</zeroOrMore>
|
406
|
+
</element>
|
407
|
+
</define>
|
385
408
|
</include>
|
409
|
+
<!-- end overrides -->
|
386
410
|
<define name="TextElement" combine="choice">
|
387
411
|
<choice>
|
388
412
|
<ref name="bcp14"/>
|
@@ -438,30 +462,4 @@
|
|
438
462
|
</optional>
|
439
463
|
<text/>
|
440
464
|
</define>
|
441
|
-
<define name="ietf-standard">
|
442
|
-
<element name="ietf-standard">
|
443
|
-
<ref name="Root-Attributes"/>
|
444
|
-
<ref name="bibdata"/>
|
445
|
-
<zeroOrMore>
|
446
|
-
<ref name="termdocsource"/>
|
447
|
-
</zeroOrMore>
|
448
|
-
<optional>
|
449
|
-
<ref name="misccontainer"/>
|
450
|
-
</optional>
|
451
|
-
<optional>
|
452
|
-
<ref name="boilerplate"/>
|
453
|
-
</optional>
|
454
|
-
<ref name="preface"/>
|
455
|
-
<oneOrMore>
|
456
|
-
<ref name="sections"/>
|
457
|
-
</oneOrMore>
|
458
|
-
<zeroOrMore>
|
459
|
-
<ref name="annex"/>
|
460
|
-
</zeroOrMore>
|
461
|
-
<ref name="bibliography"/>
|
462
|
-
<zeroOrMore>
|
463
|
-
<ref name="indexsect"/>
|
464
|
-
</zeroOrMore>
|
465
|
-
</element>
|
466
|
-
</define>
|
467
465
|
</grammar>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
these elements; we just want one namespace for any child grammars
|
18
18
|
of this.
|
19
19
|
-->
|
20
|
-
<!-- VERSION
|
20
|
+
<!-- VERSION v2.0.0 -->
|
21
21
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
22
22
|
<include href="reqt.rng"/>
|
23
23
|
<include href="basicdoc.rng">
|
@@ -245,23 +245,9 @@
|
|
245
245
|
<a:documentation>The caption of the block</a:documentation>
|
246
246
|
</ref>
|
247
247
|
</optional>
|
248
|
-
<
|
249
|
-
<
|
250
|
-
|
251
|
-
<a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
|
252
|
-
(The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
|
253
|
-
</text>
|
254
|
-
<ref name="callout">
|
255
|
-
<a:documentation>Zero or more cross-references; these are intended to be embedded within the content string, and link to annotations</a:documentation>
|
256
|
-
</ref>
|
257
|
-
<ref name="xref">
|
258
|
-
<a:documentation>Hyperlink of code segment to another part of the document</a:documentation>
|
259
|
-
</ref>
|
260
|
-
<ref name="eref">
|
261
|
-
<a:documentation>Hyperlink of code segment to external bibliographic resource</a:documentation>
|
262
|
-
</ref>
|
263
|
-
</choice>
|
264
|
-
</oneOrMore>
|
248
|
+
<ref name="sourcecodebody">
|
249
|
+
<a:documentation>The sourcecode content</a:documentation>
|
250
|
+
</ref>
|
265
251
|
<zeroOrMore>
|
266
252
|
<ref name="annotation">
|
267
253
|
<a:documentation>Annotations to the source code; each annotation consists of zero or more paragraphs,
|
@@ -277,6 +263,26 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
277
263
|
<a:documentation>A source for the block</a:documentation>
|
278
264
|
</ref>
|
279
265
|
</define>
|
266
|
+
<define name="sourcecodebody">
|
267
|
+
<a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
|
268
|
+
(The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
|
269
|
+
<element name="body">
|
270
|
+
<oneOrMore>
|
271
|
+
<choice>
|
272
|
+
<text/>
|
273
|
+
<ref name="callout">
|
274
|
+
<a:documentation>Zero or more cross-references; these are intended to be embedded within the content string, and link to annotations</a:documentation>
|
275
|
+
</ref>
|
276
|
+
<ref name="xref">
|
277
|
+
<a:documentation>Hyperlink of code segment to another part of the document</a:documentation>
|
278
|
+
</ref>
|
279
|
+
<ref name="eref">
|
280
|
+
<a:documentation>Hyperlink of code segment to external bibliographic resource</a:documentation>
|
281
|
+
</ref>
|
282
|
+
</choice>
|
283
|
+
</oneOrMore>
|
284
|
+
</element>
|
285
|
+
</define>
|
280
286
|
<define name="sections">
|
281
287
|
<element name="sections">
|
282
288
|
<oneOrMore>
|
@@ -459,11 +465,14 @@ gives an explicit page orientation</a:documentation>
|
|
459
465
|
<a:documentation>Description of location in a reference, which can be combined with other locations in a single citation</a:documentation>
|
460
466
|
</ref>
|
461
467
|
</zeroOrMore>
|
462
|
-
<
|
463
|
-
<
|
468
|
+
<optional>
|
469
|
+
<element name="display-text">
|
464
470
|
<a:documentation>The textual content of the element. The `text` is what we wish to show the link as (e.g., the "content" of `<xx>my link text</xx>`)</a:documentation>
|
465
|
-
|
466
|
-
|
471
|
+
<oneOrMore>
|
472
|
+
<ref name="PureTextElement"/>
|
473
|
+
</oneOrMore>
|
474
|
+
</element>
|
475
|
+
</optional>
|
467
476
|
</define>
|
468
477
|
</include>
|
469
478
|
<!-- end overrides -->
|
@@ -1205,10 +1214,13 @@ numbers</a:documentation>
|
|
1205
1214
|
<value>presentation</value>
|
1206
1215
|
</choice>
|
1207
1216
|
</attribute>
|
1217
|
+
<attribute name="flavor">
|
1218
|
+
<a:documentation>Metanorma flavor, indicating SDO whose requiremnts the realisation aligns to</a:documentation>
|
1219
|
+
</attribute>
|
1208
1220
|
</define>
|
1209
1221
|
<define name="standard-document">
|
1210
1222
|
<a:documentation>Representation of a standardisation document</a:documentation>
|
1211
|
-
<element name="
|
1223
|
+
<element name="metanorma">
|
1212
1224
|
<ref name="Root-Attributes"/>
|
1213
1225
|
<ref name="bibdata">
|
1214
1226
|
<a:documentation>Bibliographic description of the document itself, expressed in the Relaton model</a:documentation>
|
data/lib/relaton/render/parse.rb
CHANGED
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", "~>
|
40
|
+
spec.add_dependency "metanorma-standoc", "~> 3.0.0"
|
41
41
|
spec.add_dependency "relaton-render"
|
42
42
|
|
43
43
|
spec.add_development_dependency "debug"
|
@@ -46,7 +46,8 @@ Gem::Specification.new do |spec|
|
|
46
46
|
spec.add_development_dependency "guard-rspec", "~> 4.7"
|
47
47
|
spec.add_development_dependency "rake", "~> 13.0"
|
48
48
|
spec.add_development_dependency "rspec", "~> 3.6"
|
49
|
-
spec.add_development_dependency "rubocop", "~> 1
|
49
|
+
spec.add_development_dependency "rubocop", "~> 1"
|
50
|
+
spec.add_development_dependency "rubocop-performance"
|
50
51
|
spec.add_development_dependency "simplecov", "~> 0.15"
|
51
52
|
spec.add_development_dependency "timecop", "~> 0.9"
|
52
53
|
spec.add_development_dependency "vcr", "~> 6.1.0"
|
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.
|
4
|
+
version: 3.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-03-04 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:
|
33
|
+
version: 3.0.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:
|
40
|
+
version: 3.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: relaton-render
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,14 +142,28 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 1
|
145
|
+
version: '1'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 1
|
152
|
+
version: '1'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rubocop-performance
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
168
|
name: simplecov
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -258,6 +272,7 @@ files:
|
|
258
272
|
- lib/isodoc/ietf/i18n.rb
|
259
273
|
- lib/isodoc/ietf/init.rb
|
260
274
|
- lib/isodoc/ietf/inline.rb
|
275
|
+
- lib/isodoc/ietf/lists.rb
|
261
276
|
- lib/isodoc/ietf/metadata.rb
|
262
277
|
- lib/isodoc/ietf/references.rb
|
263
278
|
- lib/isodoc/ietf/reqt.rb
|
@@ -313,7 +328,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
313
328
|
- !ruby/object:Gem::Version
|
314
329
|
version: '0'
|
315
330
|
requirements: []
|
316
|
-
rubygems_version: 3.
|
331
|
+
rubygems_version: 3.5.22
|
317
332
|
signing_key:
|
318
333
|
specification_version: 4
|
319
334
|
summary: metanorma-ietf lets you write IETF documents, such as Internet-Drafts and
|