metanorma-ietf 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/Gemfile.lock +10 -12
- data/appveyor.yml +1 -0
- data/lib/asciidoctor/rfc/common/base.rb +1 -3
- data/lib/asciidoctor/rfc/{v2 → common}/validate.rb +3 -4
- data/lib/asciidoctor/rfc/v2/base.rb +5 -4
- data/lib/asciidoctor/rfc/v2/converter.rb +2 -2
- data/lib/asciidoctor/rfc/v2/{validate2.rng → validate.rng} +0 -0
- data/lib/asciidoctor/rfc/v3/base.rb +3 -2
- data/lib/asciidoctor/rfc/v3/converter.rb +2 -2
- data/lib/metanorma/ietf.rb +1 -1
- data/lib/metanorma/ietf/version.rb +1 -1
- data/rfc2629.dtd +22 -6
- metadata +4 -5
- data/lib/asciidoctor/rfc/v3/validate.rb +0 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0fc28799710a52d0a1805a16ba85b5251273304eaf9a655c33c64a615a03c87
|
4
|
+
data.tar.gz: 17154f46bab07624012ca917480a7192ff2fee773609483ff8a55291d0640b85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a20ec752e022cf8cc3c0850e3ed4219225cc391c2ea1a6bfb3c966f9cfca16f1c11375178d996cc60c872adf0eff3695e15fb9ead5e0f6bd015d51bbe2542309
|
7
|
+
data.tar.gz: 00f4fe37f85e2de3e2d52ba7c7e8d336cb8dac788f1e0b239310bf1a487451e45b1f32c4b1978b93ce2eaddd9d1cc8cdfa0473104d89ccc00b452c2f4b8ef452
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
metanorma-ietf (1.0.
|
4
|
+
metanorma-ietf (1.0.5)
|
5
5
|
isodoc (~> 0.10.0)
|
6
6
|
metanorma-standoc (~> 1.2.0)
|
7
7
|
|
@@ -57,7 +57,7 @@ GEM
|
|
57
57
|
iev (0.2.2)
|
58
58
|
nokogiri
|
59
59
|
image_size (2.0.2)
|
60
|
-
isodoc (0.10.
|
60
|
+
isodoc (0.10.3)
|
61
61
|
asciimath
|
62
62
|
html2doc (~> 0.8.11)
|
63
63
|
htmlentities (~> 4.3.4)
|
@@ -115,7 +115,7 @@ GEM
|
|
115
115
|
rb-fsevent (0.10.3)
|
116
116
|
rb-inotify (0.10.0)
|
117
117
|
ffi (~> 1.0)
|
118
|
-
relaton (0.4.
|
118
|
+
relaton (0.4.5)
|
119
119
|
algoliasearch
|
120
120
|
relaton-gb (~> 0.5.0)
|
121
121
|
relaton-iec (~> 0.3.0)
|
@@ -127,27 +127,25 @@ GEM
|
|
127
127
|
relaton-bib (0.2.4)
|
128
128
|
addressable
|
129
129
|
nokogiri (~> 1.8.4)
|
130
|
-
relaton-gb (0.5.
|
130
|
+
relaton-gb (0.5.2)
|
131
131
|
cnccs (~> 0.1.1)
|
132
132
|
gb-agencies (~> 0.0.1)
|
133
133
|
relaton-iso-bib (~> 0.2.0)
|
134
|
-
relaton-iec (0.3.
|
134
|
+
relaton-iec (0.3.2)
|
135
135
|
addressable
|
136
136
|
relaton-iso-bib (~> 0.2.0)
|
137
|
-
relaton-ietf (0.5.
|
137
|
+
relaton-ietf (0.5.5)
|
138
138
|
relaton-iso-bib (~> 0.2.0)
|
139
|
-
relaton-iso (0.5.
|
140
|
-
algoliasearch
|
139
|
+
relaton-iso (0.5.5)
|
141
140
|
relaton-iec (~> 0.3.0)
|
142
141
|
relaton-iso-bib (~> 0.2.0)
|
143
|
-
relaton-iso-bib (0.2.
|
142
|
+
relaton-iso-bib (0.2.4)
|
144
143
|
isoics (~> 0.1.6)
|
145
|
-
nokogiri (~> 1.8.4)
|
146
144
|
relaton-bib (~> 0.2.0)
|
147
145
|
ruby_deep_clone (~> 0.8.0)
|
148
|
-
relaton-itu (0.2.
|
146
|
+
relaton-itu (0.2.3)
|
149
147
|
relaton-iso-bib (~> 0.2.0)
|
150
|
-
relaton-nist (0.2.
|
148
|
+
relaton-nist (0.2.3)
|
151
149
|
relaton-bib (~> 0.2.0)
|
152
150
|
rubyzip
|
153
151
|
roman-numerals (0.3.0)
|
data/appveyor.yml
CHANGED
@@ -265,9 +265,7 @@ module Asciidoctor
|
|
265
265
|
doc.root.add_previous_sibling(pi)
|
266
266
|
end
|
267
267
|
|
268
|
-
|
269
|
-
|
270
|
-
doc.create_internal_subset("rfc", nil, dtd)
|
268
|
+
doc.create_internal_subset("rfc", nil, Metanorma::Ietf::RFC2629DTD_URL)
|
271
269
|
rfc_pis = common_rfc_pis(node)
|
272
270
|
rfc_pis.each_pair do |k, v|
|
273
271
|
pi = Nokogiri::XML::ProcessingInstruction.new(doc,
|
@@ -2,14 +2,13 @@ require "nokogiri"
|
|
2
2
|
require "jing"
|
3
3
|
|
4
4
|
module Asciidoctor
|
5
|
-
module Rfc::
|
5
|
+
module Rfc::Common
|
6
6
|
module Validate
|
7
7
|
class << self
|
8
|
-
def validate(doc)
|
9
|
-
filename = File.join(File.dirname(__FILE__), "validate2.rng")
|
8
|
+
def validate(doc, filename)
|
10
9
|
schema = Jing.new(filename)
|
11
10
|
|
12
|
-
File.
|
11
|
+
File.write(".tmp.xml", doc.to_xml)
|
13
12
|
|
14
13
|
begin
|
15
14
|
errors = schema.validate(".tmp.xml")
|
@@ -1,5 +1,8 @@
|
|
1
|
-
require "pp"
|
2
1
|
# coding: utf-8
|
2
|
+
|
3
|
+
require "pp"
|
4
|
+
require_relative "../common/validate"
|
5
|
+
|
3
6
|
module Asciidoctor
|
4
7
|
module Rfc::V2
|
5
8
|
module Base
|
@@ -89,12 +92,10 @@ module Asciidoctor
|
|
89
92
|
ret = result * "\n"
|
90
93
|
ret = cleanup(ret)
|
91
94
|
ret1 = Nokogiri::XML(ret)
|
92
|
-
# Validate::validate(ret1)
|
93
95
|
ret1 = set_pis(node, ret1)
|
94
96
|
ret1 = insert_biblio(node, ret1) unless node.attr("biblio-dir").nil? || node.attr("biblio-dir").empty?
|
95
|
-
Validate::validate(ret1)
|
97
|
+
Asciidoctor::Rfc::Common::Validate::validate(ret1, File.join(File.dirname(__FILE__), "validate.rng"))
|
96
98
|
ret1 = resolve_references(node, ret1)
|
97
|
-
# Validate::validate(ret1)
|
98
99
|
ret1.to_xml
|
99
100
|
end
|
100
101
|
|
@@ -2,13 +2,13 @@ require "asciidoctor"
|
|
2
2
|
|
3
3
|
require_relative "../common/base"
|
4
4
|
require_relative "../common/front"
|
5
|
+
require_relative "../common/validate"
|
5
6
|
require_relative "base"
|
6
7
|
require_relative "blocks"
|
7
8
|
require_relative "front"
|
8
9
|
require_relative "inline_anchor"
|
9
10
|
require_relative "lists"
|
10
11
|
require_relative "table"
|
11
|
-
require_relative "validate"
|
12
12
|
|
13
13
|
module Asciidoctor
|
14
14
|
module Rfc::V2
|
@@ -23,13 +23,13 @@ module Asciidoctor
|
|
23
23
|
|
24
24
|
include ::Asciidoctor::Rfc::Common::Base
|
25
25
|
include ::Asciidoctor::Rfc::Common::Front
|
26
|
+
include ::Asciidoctor::Rfc::Common::Validate
|
26
27
|
include ::Asciidoctor::Rfc::V2::Base
|
27
28
|
include ::Asciidoctor::Rfc::V2::Blocks
|
28
29
|
include ::Asciidoctor::Rfc::V2::Front
|
29
30
|
include ::Asciidoctor::Rfc::V2::InlineAnchor
|
30
31
|
include ::Asciidoctor::Rfc::V2::Lists
|
31
32
|
include ::Asciidoctor::Rfc::V2::Table
|
32
|
-
include ::Asciidoctor::Rfc::V2::Validate
|
33
33
|
|
34
34
|
register_for "rfc2"
|
35
35
|
|
File without changes
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
|
3
|
+
require_relative "../common/validate"
|
4
|
+
|
3
5
|
module Asciidoctor
|
4
6
|
module Rfc::V3
|
5
7
|
module Base
|
@@ -86,9 +88,8 @@ module Asciidoctor
|
|
86
88
|
ret1 = Nokogiri::XML(ret)
|
87
89
|
ret1 = set_pis(node, ret1)
|
88
90
|
ret1 = insert_biblio(node, ret1) unless node.attr("biblio-dir").nil? || node.attr("biblio-dir").empty?
|
89
|
-
Validate::validate(ret1)
|
91
|
+
Asciidoctor::Rfc::Common::Validate::validate(ret1, File.join(File.dirname(__FILE__), "validate.rng"))
|
90
92
|
ret1 = resolve_references(node, ret1)
|
91
|
-
# Validate::validate(ret1)
|
92
93
|
ret1.to_xml
|
93
94
|
end
|
94
95
|
|
@@ -2,13 +2,13 @@ require "asciidoctor"
|
|
2
2
|
|
3
3
|
require_relative "../common/base"
|
4
4
|
require_relative "../common/front"
|
5
|
+
require_relative "../common/validate"
|
5
6
|
require_relative "base"
|
6
7
|
require_relative "blocks"
|
7
8
|
require_relative "front"
|
8
9
|
require_relative "inline_anchor"
|
9
10
|
require_relative "lists"
|
10
11
|
require_relative "table"
|
11
|
-
require_relative "validate"
|
12
12
|
|
13
13
|
module Asciidoctor
|
14
14
|
module Rfc::V3
|
@@ -23,13 +23,13 @@ module Asciidoctor
|
|
23
23
|
|
24
24
|
include ::Asciidoctor::Rfc::Common::Base
|
25
25
|
include ::Asciidoctor::Rfc::Common::Front
|
26
|
+
include ::Asciidoctor::Rfc::Common::Validate
|
26
27
|
include ::Asciidoctor::Rfc::V3::Base
|
27
28
|
include ::Asciidoctor::Rfc::V3::Blocks
|
28
29
|
include ::Asciidoctor::Rfc::V3::Front
|
29
30
|
include ::Asciidoctor::Rfc::V3::InlineAnchor
|
30
31
|
include ::Asciidoctor::Rfc::V3::Lists
|
31
32
|
include ::Asciidoctor::Rfc::V3::Table
|
32
|
-
include ::Asciidoctor::Rfc::V3::Validate
|
33
33
|
|
34
34
|
register_for "rfc3"
|
35
35
|
|
data/lib/metanorma/ietf.rb
CHANGED
data/rfc2629.dtd
CHANGED
@@ -83,7 +83,7 @@
|
|
83
83
|
|
84
84
|
<!ENTITY % TEXT "#PCDATA">
|
85
85
|
|
86
|
-
<!ENTITY rfc.number "
|
86
|
+
<!ENTITY rfc.number SYSTEM "internal:/rfc.number">
|
87
87
|
|
88
88
|
|
89
89
|
<!--
|
@@ -152,10 +152,18 @@
|
|
152
152
|
elements may be present -->
|
153
153
|
<!ELEMENT postal (street+,(city|region|code|country)*)>
|
154
154
|
<!ELEMENT street (%CTEXT;)>
|
155
|
+
<!ATTLIST street
|
156
|
+
ascii %ATEXT; #IMPLIED>
|
155
157
|
<!ELEMENT city (%CTEXT;)>
|
158
|
+
<!ATTLIST city
|
159
|
+
ascii %ATEXT; #IMPLIED>
|
156
160
|
<!ELEMENT region (%CTEXT;)>
|
161
|
+
<!ATTLIST region
|
162
|
+
ascii %ATEXT; #IMPLIED>
|
157
163
|
<!ELEMENT code (%CTEXT;)>
|
158
164
|
<!ELEMENT country (%CTEXT;)>
|
165
|
+
<!ATTLIST country
|
166
|
+
ascii %ATEXT; #IMPLIED>
|
159
167
|
<!ELEMENT phone (%CTEXT;)>
|
160
168
|
<!ELEMENT facsimile (%CTEXT;)>
|
161
169
|
<!ELEMENT email (%CTEXT;)>
|
@@ -189,6 +197,7 @@
|
|
189
197
|
<!ATTLIST section
|
190
198
|
anchor ID #IMPLIED
|
191
199
|
title %ATEXT; #REQUIRED
|
200
|
+
numbered (yes|no|true|false) "true"
|
192
201
|
toc (include|exclude|default)
|
193
202
|
"default">
|
194
203
|
|
@@ -202,7 +211,7 @@
|
|
202
211
|
-->
|
203
212
|
|
204
213
|
<!-- use of <figure/> is deprecated... -->
|
205
|
-
<!ELEMENT t (%TEXT;|list|figure|xref|eref|iref|cref|spanx|vspace)*>
|
214
|
+
<!ELEMENT t (%TEXT;|list|figure|xref|eref|iref|cref|spanx|vspace|u)*>
|
206
215
|
<!ATTLIST t
|
207
216
|
anchor ID #IMPLIED
|
208
217
|
hangText %ATEXT; #IMPLIED>
|
@@ -257,7 +266,7 @@
|
|
257
266
|
width %ATEXT; ""
|
258
267
|
height %ATEXT; "">
|
259
268
|
|
260
|
-
<!ELEMENT preamble (%TEXT;|xref|eref|iref|cref|spanx)*>
|
269
|
+
<!ELEMENT preamble (%TEXT;|xref|eref|iref|cref|spanx|u)*>
|
261
270
|
<!ELEMENT artwork (%TEXT;)*>
|
262
271
|
<!ATTLIST artwork
|
263
272
|
xml:space (default|preserve) "preserve"
|
@@ -269,7 +278,7 @@
|
|
269
278
|
width %ATEXT; ""
|
270
279
|
height %ATEXT; "">
|
271
280
|
|
272
|
-
<!ELEMENT postamble (%TEXT;|xref|eref|iref|cref|spanx)*>
|
281
|
+
<!ELEMENT postamble (%TEXT;|xref|eref|iref|cref|spanx|u)*>
|
273
282
|
|
274
283
|
<!ELEMENT texttable (preamble?,ttcol+,c*,postamble?)>
|
275
284
|
<!ATTLIST texttable
|
@@ -282,7 +291,7 @@
|
|
282
291
|
<!ATTLIST ttcol
|
283
292
|
width %ATEXT; #IMPLIED
|
284
293
|
align (left|center|right) "left">
|
285
|
-
<!ELEMENT c (%TEXT;|xref|eref|iref|cref|spanx)*>
|
294
|
+
<!ELEMENT c (%TEXT;|xref|eref|iref|cref|spanx|u)*>
|
286
295
|
|
287
296
|
|
288
297
|
<!--
|
@@ -298,7 +307,9 @@
|
|
298
307
|
title %ATEXT; "References">
|
299
308
|
<!ELEMENT reference (front,seriesInfo*,format*,annotation*)>
|
300
309
|
<!ATTLIST reference
|
310
|
+
quote-title (true|false) "true"
|
301
311
|
anchor ID #IMPLIED
|
312
|
+
xml:base %ATEXT; #IMPLIED
|
302
313
|
target %URI; #IMPLIED>
|
303
314
|
<!ELEMENT seriesInfo EMPTY>
|
304
315
|
<!ATTLIST seriesInfo
|
@@ -309,4 +320,9 @@
|
|
309
320
|
target %URI; #IMPLIED
|
310
321
|
type %ATEXT; #REQUIRED
|
311
322
|
octets %NUMBER; #IMPLIED>
|
312
|
-
<!ELEMENT annotation (%TEXT;|xref|eref|iref|cref|spanx)*>
|
323
|
+
<!ELEMENT annotation (%TEXT;|xref|eref|iref|cref|spanx|u)*>
|
324
|
+
<!ELEMENT u (%TEXT;)>
|
325
|
+
<!ATTLIST u
|
326
|
+
anchor ID #IMPLIED
|
327
|
+
ascii %ATEXT; #IMPLIED
|
328
|
+
format %ATEXT; #IMPLIED>
|
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: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-07-
|
11
|
+
date: 2019-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|
@@ -265,6 +265,7 @@ files:
|
|
265
265
|
- lib/asciidoctor/rfc.rb
|
266
266
|
- lib/asciidoctor/rfc/common/base.rb
|
267
267
|
- lib/asciidoctor/rfc/common/front.rb
|
268
|
+
- lib/asciidoctor/rfc/common/validate.rb
|
268
269
|
- lib/asciidoctor/rfc/v2/base.rb
|
269
270
|
- lib/asciidoctor/rfc/v2/blocks.rb
|
270
271
|
- lib/asciidoctor/rfc/v2/converter.rb
|
@@ -272,8 +273,7 @@ files:
|
|
272
273
|
- lib/asciidoctor/rfc/v2/inline_anchor.rb
|
273
274
|
- lib/asciidoctor/rfc/v2/lists.rb
|
274
275
|
- lib/asciidoctor/rfc/v2/table.rb
|
275
|
-
- lib/asciidoctor/rfc/v2/validate.
|
276
|
-
- lib/asciidoctor/rfc/v2/validate2.rng
|
276
|
+
- lib/asciidoctor/rfc/v2/validate.rng
|
277
277
|
- lib/asciidoctor/rfc/v3/base.rb
|
278
278
|
- lib/asciidoctor/rfc/v3/blocks.rb
|
279
279
|
- lib/asciidoctor/rfc/v3/converter.rb
|
@@ -282,7 +282,6 @@ files:
|
|
282
282
|
- lib/asciidoctor/rfc/v3/lists.rb
|
283
283
|
- lib/asciidoctor/rfc/v3/svg.rng
|
284
284
|
- lib/asciidoctor/rfc/v3/table.rb
|
285
|
-
- lib/asciidoctor/rfc/v3/validate.rb
|
286
285
|
- lib/asciidoctor/rfc/v3/validate.rng
|
287
286
|
- lib/metanorma-ietf.rb
|
288
287
|
- lib/metanorma/ietf.rb
|
@@ -1,34 +0,0 @@
|
|
1
|
-
require "nokogiri"
|
2
|
-
require "jing"
|
3
|
-
|
4
|
-
module Asciidoctor
|
5
|
-
module Rfc::V3
|
6
|
-
module Validate
|
7
|
-
class << self
|
8
|
-
def validate(doc)
|
9
|
-
# svg_location = File.join(File.dirname(__FILE__), "svg.rng")
|
10
|
-
# schema = Nokogiri::XML::RelaxNG(File.read(File.join(File.dirname(__FILE__), "validate.rng")).
|
11
|
-
# gsub(%r{<ref name="svg"/>}, "<externalRef href='#{svg_location}'/>"))
|
12
|
-
|
13
|
-
filename = File.join(File.dirname(__FILE__), "validate.rng")
|
14
|
-
schema = Jing.new(filename)
|
15
|
-
File.open(".tmp.xml", "w") { |f| f.write(doc.to_xml) }
|
16
|
-
begin
|
17
|
-
errors = schema.validate(".tmp.xml")
|
18
|
-
rescue Jing::Error => e
|
19
|
-
abort "[metanorma-ietf] Validation error: #{e}"
|
20
|
-
end
|
21
|
-
|
22
|
-
if errors.none?
|
23
|
-
warn "[metanorma-ietf] Validation passed."
|
24
|
-
else
|
25
|
-
errors.each do |error|
|
26
|
-
warn "[metanorma-ietf] #{error[:message]} @ #{error[:line]}:#{error[:column]}"
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|