metanorma-ietf 3.0.6 → 3.0.7
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/i18n.rb +1 -1
- data/lib/isodoc/ietf/references.rb +0 -13
- data/lib/metanorma/ietf/biblio.rng +32 -34
- data/lib/metanorma/ietf/blocks.rb +16 -14
- data/lib/metanorma/ietf/cleanup.rb +0 -16
- data/lib/metanorma/ietf/converter.rb +1 -1
- data/lib/metanorma/ietf/isodoc.rng +9 -0
- data/lib/metanorma/ietf/version.rb +1 -1
- metadata +3 -6
- data/docs/installation.md +0 -21
- data/docs/navigation.md +0 -7
- data/docs/overview.md +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9f8258cd56113e10722ce8677d62aa22766c25b74676c0cca588bdce4e42974
|
4
|
+
data.tar.gz: 5353aca20fb71c85372b76d1ca7e34d3927944e69baeba30e4964fe2faa73d48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 377cdab4b95054f519d409e5987f33d1d37aae27520f60cdbe59761a3efe6b2d4f7306657eeaba2ff4431ee18f81f7c98215de76b9cb81a87b9984a1b1126d06
|
7
|
+
data.tar.gz: 90704e85d696d404bda87daf06b710f8656d6c3867286f657ddc5b99315a5c9984b262363a19838b0d469f8f47ae3320675c9cd570de8e22d9ff10b94d6f99f6
|
data/lib/isodoc/ietf/i18n.rb
CHANGED
@@ -38,7 +38,6 @@ module IsoDoc
|
|
38
38
|
|
39
39
|
i += 1 if b.name == "bibitem"
|
40
40
|
if b.name == "note" then note_parse(b, div)
|
41
|
-
elsif ietf?(b) then ietf_bibitem_entry(div, b, i)
|
42
41
|
else
|
43
42
|
nonstd_bibitem(div, b, i, biblio)
|
44
43
|
end
|
@@ -171,18 +170,6 @@ module IsoDoc
|
|
171
170
|
end
|
172
171
|
end
|
173
172
|
end
|
174
|
-
|
175
|
-
def ietf_bibitem_entry(div, bib, _idx)
|
176
|
-
url = bib&.at(ns("./uri[@type = 'xml']"))&.text
|
177
|
-
div << "<xi:include href='#{url}'/>"
|
178
|
-
end
|
179
|
-
|
180
|
-
def ietf?(bib)
|
181
|
-
return false if !@xinclude
|
182
|
-
|
183
|
-
url = bib.at(ns("./uri[@type = 'xml']")) or return false
|
184
|
-
/xml2rfc\.tools\.ietf\.org/.match(url)
|
185
|
-
end
|
186
173
|
end
|
187
174
|
end
|
188
175
|
end
|
@@ -614,12 +614,12 @@
|
|
614
614
|
<optional>
|
615
615
|
<ref name="fetched"/>
|
616
616
|
</optional>
|
617
|
-
<
|
618
|
-
<oneOrMore>
|
619
|
-
<ref name="btitle"/>
|
620
|
-
</oneOrMore>
|
617
|
+
<optional>
|
621
618
|
<ref name="formattedref"/>
|
622
|
-
</
|
619
|
+
</optional>
|
620
|
+
<oneOrMore>
|
621
|
+
<ref name="btitle"/>
|
622
|
+
</oneOrMore>
|
623
623
|
<zeroOrMore>
|
624
624
|
<ref name="bsource"/>
|
625
625
|
</zeroOrMore>
|
@@ -986,36 +986,34 @@
|
|
986
986
|
<ref name="SeriesType"/>
|
987
987
|
</attribute>
|
988
988
|
</optional>
|
989
|
-
<
|
989
|
+
<optional>
|
990
990
|
<ref name="formattedref"/>
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
</group>
|
1018
|
-
</choice>
|
991
|
+
</optional>
|
992
|
+
<ref name="btitle"/>
|
993
|
+
<optional>
|
994
|
+
<ref name="bplace"/>
|
995
|
+
</optional>
|
996
|
+
<optional>
|
997
|
+
<ref name="seriesorganization"/>
|
998
|
+
</optional>
|
999
|
+
<optional>
|
1000
|
+
<ref name="abbreviation"/>
|
1001
|
+
</optional>
|
1002
|
+
<optional>
|
1003
|
+
<ref name="seriesfrom"/>
|
1004
|
+
</optional>
|
1005
|
+
<optional>
|
1006
|
+
<ref name="seriesto"/>
|
1007
|
+
</optional>
|
1008
|
+
<optional>
|
1009
|
+
<ref name="seriesnumber"/>
|
1010
|
+
</optional>
|
1011
|
+
<optional>
|
1012
|
+
<ref name="seriespartnumber"/>
|
1013
|
+
</optional>
|
1014
|
+
<optional>
|
1015
|
+
<ref name="seriesrun"/>
|
1016
|
+
</optional>
|
1019
1017
|
</element>
|
1020
1018
|
</define>
|
1021
1019
|
<define name="SeriesType">
|
@@ -2,10 +2,10 @@ module Metanorma
|
|
2
2
|
module Ietf
|
3
3
|
class Converter < ::Metanorma::Standoc::Converter
|
4
4
|
def para_attrs(node)
|
5
|
-
attr_code(
|
5
|
+
attr_code("keep-with-next": node.attr("keepWithNext") ||
|
6
6
|
node.attr("keep-with-next"),
|
7
7
|
"keep-with-previous": node.attr("keepWithPrevious") ||
|
8
|
-
|
8
|
+
node.attr("keep-with-previous"),
|
9
9
|
id: ::Metanorma::Utils::anchor_or_uuid(node))
|
10
10
|
end
|
11
11
|
|
@@ -36,20 +36,21 @@ module Metanorma
|
|
36
36
|
|
37
37
|
def sidebar(node)
|
38
38
|
return unless draft?
|
39
|
+
|
39
40
|
noko do |xml|
|
40
|
-
xml.review **
|
41
|
+
xml.review **sidebar_attrs(node) do |r|
|
41
42
|
node.title.nil? or r.name { |name| name << node.title }
|
42
43
|
wrap_in_para(node, r)
|
43
44
|
end
|
44
45
|
end
|
45
46
|
end
|
46
47
|
|
47
|
-
def note(
|
48
|
+
def note(node)
|
48
49
|
noko do |xml|
|
49
|
-
xml.note **attr_code(id: ::Metanorma::Utils::anchor_or_uuid(
|
50
|
-
removeInRFC:
|
51
|
-
|
52
|
-
wrap_in_para(
|
50
|
+
xml.note **attr_code(id: ::Metanorma::Utils::anchor_or_uuid(nil),
|
51
|
+
removeInRFC: node.attr("remove-in-rfc")) do |c|
|
52
|
+
node.title.nil? or c.name { |name| name << node.title }
|
53
|
+
wrap_in_para(node, c)
|
53
54
|
end
|
54
55
|
end.join("\n")
|
55
56
|
end
|
@@ -59,9 +60,9 @@ module Metanorma
|
|
59
60
|
xml.figure **literal_attrs(node) do |f|
|
60
61
|
figure_title(node, f)
|
61
62
|
f.pre node.lines.join("\n"),
|
62
|
-
|
63
|
-
|
64
|
-
|
63
|
+
**attr_code(align: node.attr("align"),
|
64
|
+
id: ::Metanorma::Utils::anchor_or_uuid(nil),
|
65
|
+
alt: node.attr("alt"))
|
65
66
|
end
|
66
67
|
end
|
67
68
|
end
|
@@ -70,9 +71,10 @@ module Metanorma
|
|
70
71
|
super.merge(attr_code(align: node.attr("align")))
|
71
72
|
end
|
72
73
|
|
73
|
-
|
74
|
-
|
75
|
-
|
74
|
+
def listing_attrs(node)
|
75
|
+
super.merge(attr_code(markers: node.attr("markers"),
|
76
|
+
src: node.attr("src")))
|
77
|
+
end
|
76
78
|
end
|
77
79
|
end
|
78
80
|
end
|
@@ -5,7 +5,6 @@ module Metanorma
|
|
5
5
|
bcp14_cleanup(xmldoc)
|
6
6
|
abstract_cleanup(xmldoc)
|
7
7
|
super
|
8
|
-
rfc_anchor_cleanup(xmldoc)
|
9
8
|
cref_cleanup(xmldoc)
|
10
9
|
xmldoc
|
11
10
|
end
|
@@ -42,21 +41,6 @@ module Metanorma
|
|
42
41
|
end
|
43
42
|
end
|
44
43
|
|
45
|
-
def rfc_anchor_cleanup(xml)
|
46
|
-
map = xml.xpath("//bibitem[docidentifier[@type = 'IETF' or @type = 'RFC']"\
|
47
|
-
"[@scope = 'anchor']]").each_with_object({}) do |b, m|
|
48
|
-
next if b.at("./ancestor::bibdata | ./ancestor::bibitem")
|
49
|
-
|
50
|
-
id = b.at("./docidentifier[@type = 'IETF' or @type = 'RFC'][@scope = 'anchor']").text
|
51
|
-
m[b["id"]] = id
|
52
|
-
b["id"] = id
|
53
|
-
end
|
54
|
-
xml.xpath("//eref | //origin").each do |x|
|
55
|
-
map[x["bibitemid"]] and x["bibitemid"] = map[x["bibitemid"]]
|
56
|
-
end
|
57
|
-
xml
|
58
|
-
end
|
59
|
-
|
60
44
|
def smartquotes_cleanup(xmldoc)
|
61
45
|
xmldoc.traverse do |n|
|
62
46
|
next unless n.text?
|
@@ -282,6 +282,9 @@
|
|
282
282
|
<ref name="MultilingualRenderingType"/>
|
283
283
|
</attribute>
|
284
284
|
</optional>
|
285
|
+
<optional>
|
286
|
+
<ref name="tname"/>
|
287
|
+
</optional>
|
285
288
|
<oneOrMore>
|
286
289
|
<ref name="ul_li"/>
|
287
290
|
</oneOrMore>
|
@@ -324,6 +327,9 @@
|
|
324
327
|
</choice>
|
325
328
|
</attribute>
|
326
329
|
</optional>
|
330
|
+
<optional>
|
331
|
+
<ref name="tname"/>
|
332
|
+
</optional>
|
327
333
|
<oneOrMore>
|
328
334
|
<ref name="li"/>
|
329
335
|
</oneOrMore>
|
@@ -360,6 +366,9 @@
|
|
360
366
|
<ref name="MultilingualRenderingType"/>
|
361
367
|
</attribute>
|
362
368
|
</optional>
|
369
|
+
<optional>
|
370
|
+
<ref name="tname"/>
|
371
|
+
</optional>
|
363
372
|
<oneOrMore>
|
364
373
|
<ref name="dt"/>
|
365
374
|
<ref name="dd"/>
|
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.7
|
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-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mathml2asciimath
|
@@ -235,9 +235,6 @@ files:
|
|
235
235
|
- LICENSE
|
236
236
|
- README.adoc
|
237
237
|
- Rakefile
|
238
|
-
- docs/installation.md
|
239
|
-
- docs/navigation.md
|
240
|
-
- docs/overview.md
|
241
238
|
- lib/isodoc/ietf/SVG-1.2-RFC.rng
|
242
239
|
- lib/isodoc/ietf/blocks.rb
|
243
240
|
- lib/isodoc/ietf/cleanup.rb
|
@@ -296,7 +293,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
296
293
|
- !ruby/object:Gem::Version
|
297
294
|
version: '0'
|
298
295
|
requirements: []
|
299
|
-
rubygems_version: 3.3.
|
296
|
+
rubygems_version: 3.3.7
|
300
297
|
signing_key:
|
301
298
|
specification_version: 4
|
302
299
|
summary: metanorma-ietf lets you write IETF documents, such as Internet-Drafts and
|
data/docs/installation.md
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
---
|
2
|
-
title: Installation
|
3
|
-
---
|
4
|
-
|
5
|
-
Add this line to your application’s Gemfile:
|
6
|
-
|
7
|
-
```
|
8
|
-
gem "metanorma-ietf"
|
9
|
-
```
|
10
|
-
|
11
|
-
And then execute:
|
12
|
-
|
13
|
-
```
|
14
|
-
$ bundle
|
15
|
-
```
|
16
|
-
|
17
|
-
Or install it yourself as:
|
18
|
-
|
19
|
-
```
|
20
|
-
$ gem install metanorma-cli
|
21
|
-
```
|
data/docs/navigation.md
DELETED