rfcxml 0.2.1 → 0.4.0
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/.github/workflows/roundtrip.yml +79 -0
- data/.gitignore +3 -0
- data/.rubocop.yml +9 -3
- data/.rubocop_todo.yml +87 -17
- data/Gemfile +4 -2
- data/README.adoc +386 -18
- data/Rakefile +55 -0
- data/lib/rfcxml/v3/abstract.rb +2 -6
- data/lib/rfcxml/v3/address.rb +2 -7
- data/lib/rfcxml/v3/annotation.rb +2 -15
- data/lib/rfcxml/v3/area.rb +1 -1
- data/lib/rfcxml/v3/artset.rb +2 -3
- data/lib/rfcxml/v3/artwork.rb +13 -10
- data/lib/rfcxml/v3/aside.rb +2 -12
- data/lib/rfcxml/v3/author.rb +16 -12
- data/lib/rfcxml/v3/back.rb +2 -5
- data/lib/rfcxml/v3/bcp14.rb +1 -1
- data/lib/rfcxml/v3/blockquote.rb +2 -26
- data/lib/rfcxml/v3/boilerplate.rb +2 -3
- data/lib/rfcxml/v3/br.rb +1 -1
- data/lib/rfcxml/v3/c.rb +2 -7
- data/lib/rfcxml/v3/city.rb +1 -1
- data/lib/rfcxml/v3/cityarea.rb +1 -1
- data/lib/rfcxml/v3/code.rb +1 -1
- data/lib/rfcxml/v3/contact.rb +2 -4
- data/lib/rfcxml/v3/country.rb +1 -1
- data/lib/rfcxml/v3/cref.rb +2 -11
- data/lib/rfcxml/v3/date.rb +4 -4
- data/lib/rfcxml/v3/dd.rb +2 -25
- data/lib/rfcxml/v3/displayreference.rb +1 -1
- data/lib/rfcxml/v3/dl.rb +2 -7
- data/lib/rfcxml/v3/dt.rb +2 -14
- data/lib/rfcxml/v3/email.rb +1 -1
- data/lib/rfcxml/v3/eref.rb +1 -1
- data/lib/rfcxml/v3/extaddr.rb +1 -1
- data/lib/rfcxml/v3/facsimile.rb +1 -1
- data/lib/rfcxml/v3/figure.rb +17 -19
- data/lib/rfcxml/v3/format.rb +1 -1
- data/lib/rfcxml/v3/front.rb +2 -13
- data/lib/rfcxml/v3/iref.rb +4 -3
- data/lib/rfcxml/v3/keyword.rb +1 -1
- data/lib/rfcxml/v3/li.rb +2 -28
- data/lib/rfcxml/v3/link.rb +1 -1
- data/lib/rfcxml/v3/list.rb +3 -4
- data/lib/rfcxml/v3/middle.rb +2 -3
- data/lib/rfcxml/v3/name.rb +2 -14
- data/lib/rfcxml/v3/note.rb +2 -7
- data/lib/rfcxml/v3/ol.rb +5 -4
- data/lib/rfcxml/v3/organization.rb +10 -5
- data/lib/rfcxml/v3/phone.rb +1 -1
- data/lib/rfcxml/v3/pobox.rb +1 -1
- data/lib/rfcxml/v3/postal.rb +2 -12
- data/lib/rfcxml/v3/postal_line.rb +1 -1
- data/lib/rfcxml/v3/postamble.rb +2 -7
- data/lib/rfcxml/v3/preamble.rb +2 -15
- data/lib/rfcxml/v3/refcontent.rb +2 -4
- data/lib/rfcxml/v3/reference.rb +7 -10
- data/lib/rfcxml/v3/referencegroup.rb +2 -3
- data/lib/rfcxml/v3/references.rb +2 -5
- data/lib/rfcxml/v3/region.rb +1 -1
- data/lib/rfcxml/v3/relref.rb +1 -1
- data/lib/rfcxml/v3/rfc.rb +62 -14
- data/lib/rfcxml/v3/section.rb +11 -21
- data/lib/rfcxml/v3/series_info.rb +5 -4
- data/lib/rfcxml/v3/sortingcode.rb +1 -1
- data/lib/rfcxml/v3/sourcecode.rb +13 -9
- data/lib/rfcxml/v3/spanx.rb +1 -1
- data/lib/rfcxml/v3/street.rb +1 -1
- data/lib/rfcxml/v3/strong.rb +6 -8
- data/lib/rfcxml/v3/sub.rb +6 -15
- data/lib/rfcxml/v3/sup.rb +2 -3
- data/lib/rfcxml/v3/table.rb +1 -7
- data/lib/rfcxml/v3/tbody.rb +1 -3
- data/lib/rfcxml/v3/td.rb +23 -26
- data/lib/rfcxml/v3/text.rb +2 -20
- data/lib/rfcxml/v3/texttable.rb +12 -12
- data/lib/rfcxml/v3/tfoot.rb +1 -3
- data/lib/rfcxml/v3/th.rb +1 -3
- data/lib/rfcxml/v3/thead.rb +1 -3
- data/lib/rfcxml/v3/title.rb +3 -4
- data/lib/rfcxml/v3/toc.rb +1 -3
- data/lib/rfcxml/v3/tr.rb +3 -4
- data/lib/rfcxml/v3/tt.rb +5 -19
- data/lib/rfcxml/v3/ttcol.rb +4 -7
- data/lib/rfcxml/v3/u.rb +1 -1
- data/lib/rfcxml/v3/ul.rb +10 -6
- data/lib/rfcxml/v3/uri.rb +1 -1
- data/lib/rfcxml/v3/vspace.rb +1 -1
- data/lib/rfcxml/v3/workgroup.rb +1 -1
- data/lib/rfcxml/v3/xref.rb +2 -3
- data/lib/rfcxml/v3/xref_text.rb +7 -16
- data/lib/rfcxml/v3.rb +100 -2
- data/lib/rfcxml/version.rb +1 -1
- data/lib/rfcxml.rb +3 -4
- data/rfcxml.gemspec +3 -2
- data/scripts/README.md +110 -0
- data/scripts/roundtrip_test.rb +361 -0
- metadata +9 -6
- data/lib/rfcxml/v3/em.rb +0 -14
data/lib/rfcxml/v3/figure.rb
CHANGED
|
@@ -2,27 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
require "lutaml/model"
|
|
4
4
|
|
|
5
|
-
require_relative "artset"
|
|
6
|
-
require_relative "artwork"
|
|
7
|
-
require_relative "iref"
|
|
8
|
-
require_relative "name"
|
|
9
|
-
require_relative "postamble"
|
|
10
|
-
require_relative "preamble"
|
|
11
|
-
require_relative "sourcecode"
|
|
12
|
-
|
|
13
5
|
module Rfcxml
|
|
14
6
|
module V3
|
|
15
7
|
class Figure < Lutaml::Model::Serializable
|
|
16
8
|
attribute :anchor, :string
|
|
17
9
|
attribute :pn, :string
|
|
18
|
-
attribute :title, :string
|
|
19
|
-
attribute :suppress_title, :string,
|
|
10
|
+
attribute :title, :string
|
|
11
|
+
attribute :suppress_title, :string,
|
|
12
|
+
values: %w[true false],
|
|
13
|
+
default: -> { "false" }
|
|
20
14
|
attribute :src, :string
|
|
21
15
|
attribute :original_src, :string
|
|
22
|
-
attribute :align, :string,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
attribute :
|
|
16
|
+
attribute :align, :string,
|
|
17
|
+
values: %w[left center right],
|
|
18
|
+
default: -> { "left" }
|
|
19
|
+
attribute :alt, :string
|
|
20
|
+
attribute :width, :string
|
|
21
|
+
attribute :height, :string
|
|
26
22
|
attribute :name, Name
|
|
27
23
|
attribute :iref, Iref, collection: true
|
|
28
24
|
attribute :preamble, Preamble
|
|
@@ -32,18 +28,20 @@ module Rfcxml
|
|
|
32
28
|
attribute :postamble, Postamble
|
|
33
29
|
|
|
34
30
|
xml do
|
|
35
|
-
|
|
31
|
+
element "figure"
|
|
32
|
+
ordered
|
|
36
33
|
|
|
37
34
|
map_attribute "anchor", to: :anchor
|
|
38
35
|
map_attribute "pn", to: :pn
|
|
39
|
-
map_attribute "title", to: :title
|
|
36
|
+
map_attribute "title", to: :title, value_map: { to: { empty: :empty } }
|
|
40
37
|
map_attribute "suppress-title", to: :suppress_title
|
|
41
38
|
map_attribute "src", to: :src
|
|
42
39
|
map_attribute "originalSrc", to: :original_src
|
|
43
40
|
map_attribute "align", to: :align
|
|
44
|
-
map_attribute "alt", to: :alt
|
|
45
|
-
map_attribute "width", to: :width
|
|
46
|
-
map_attribute "height", to: :height
|
|
41
|
+
map_attribute "alt", to: :alt, value_map: { to: { empty: :empty } }
|
|
42
|
+
map_attribute "width", to: :width, value_map: { to: { empty: :empty } }
|
|
43
|
+
map_attribute "height", to: :height,
|
|
44
|
+
value_map: { to: { empty: :empty } }
|
|
47
45
|
|
|
48
46
|
%w[name iref preamble artset artwork sourcecode
|
|
49
47
|
postamble].each do |element|
|
data/lib/rfcxml/v3/format.rb
CHANGED
data/lib/rfcxml/v3/front.rb
CHANGED
|
@@ -2,18 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
require "lutaml/model"
|
|
4
4
|
|
|
5
|
-
require_relative "abstract"
|
|
6
|
-
require_relative "area"
|
|
7
|
-
require_relative "author"
|
|
8
|
-
require_relative "boilerplate"
|
|
9
|
-
require_relative "date"
|
|
10
|
-
require_relative "keyword"
|
|
11
|
-
require_relative "note"
|
|
12
|
-
require_relative "series_info"
|
|
13
|
-
require_relative "title"
|
|
14
|
-
require_relative "toc"
|
|
15
|
-
require_relative "workgroup"
|
|
16
|
-
|
|
17
5
|
module Rfcxml
|
|
18
6
|
module V3
|
|
19
7
|
class Front < Lutaml::Model::Serializable
|
|
@@ -30,7 +18,8 @@ module Rfcxml
|
|
|
30
18
|
attribute :toc, Toc
|
|
31
19
|
|
|
32
20
|
xml do
|
|
33
|
-
|
|
21
|
+
element "front"
|
|
22
|
+
ordered
|
|
34
23
|
|
|
35
24
|
map_element "title", to: :title
|
|
36
25
|
map_element "seriesInfo", to: :series_info
|
data/lib/rfcxml/v3/iref.rb
CHANGED
|
@@ -6,15 +6,16 @@ module Rfcxml
|
|
|
6
6
|
module V3
|
|
7
7
|
class Iref < Lutaml::Model::Serializable
|
|
8
8
|
attribute :item, :string
|
|
9
|
-
attribute :subitem, :string
|
|
9
|
+
attribute :subitem, :string
|
|
10
10
|
attribute :primary, :string, default: -> { "false" }
|
|
11
11
|
attribute :pn, :string
|
|
12
12
|
|
|
13
13
|
xml do
|
|
14
|
-
|
|
14
|
+
element "iref"
|
|
15
15
|
|
|
16
16
|
map_attribute "item", to: :item
|
|
17
|
-
map_attribute "subitem", to: :subitem
|
|
17
|
+
map_attribute "subitem", to: :subitem,
|
|
18
|
+
value_map: { to: { empty: :empty } }
|
|
18
19
|
map_attribute "primary", to: :primary
|
|
19
20
|
map_attribute "pn", to: :pn
|
|
20
21
|
end
|
data/lib/rfcxml/v3/keyword.rb
CHANGED
data/lib/rfcxml/v3/li.rb
CHANGED
|
@@ -2,35 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
require "lutaml/model"
|
|
4
4
|
|
|
5
|
-
require_relative "artset"
|
|
6
|
-
require_relative "artwork"
|
|
7
|
-
require_relative "bcp14"
|
|
8
|
-
require_relative "blockquote"
|
|
9
|
-
require_relative "br"
|
|
10
|
-
require_relative "cref"
|
|
11
|
-
require_relative "dl"
|
|
12
|
-
require_relative "em"
|
|
13
|
-
require_relative "eref"
|
|
14
|
-
require_relative "figure"
|
|
15
|
-
require_relative "iref"
|
|
16
|
-
# require_relative "ol"
|
|
17
|
-
require_relative "relref"
|
|
18
|
-
require_relative "sourcecode"
|
|
19
|
-
require_relative "strong"
|
|
20
|
-
require_relative "sub"
|
|
21
|
-
require_relative "sup"
|
|
22
|
-
require_relative "text"
|
|
23
|
-
require_relative "table"
|
|
24
|
-
require_relative "tt"
|
|
25
|
-
require_relative "u"
|
|
26
|
-
# require_relative "ul"
|
|
27
|
-
require_relative "xref"
|
|
28
|
-
|
|
29
5
|
module Rfcxml
|
|
30
6
|
module V3
|
|
31
|
-
class Ul < Lutaml::Model::Serializable; end
|
|
32
|
-
class Ol < Lutaml::Model::Serializable; end
|
|
33
|
-
|
|
34
7
|
class Li < Lutaml::Model::Serializable
|
|
35
8
|
attribute :content, :string
|
|
36
9
|
attribute :anchor, :string
|
|
@@ -62,7 +35,8 @@ module Rfcxml
|
|
|
62
35
|
attribute :derived_counter, :string
|
|
63
36
|
|
|
64
37
|
xml do
|
|
65
|
-
|
|
38
|
+
element "li"
|
|
39
|
+
mixed_content
|
|
66
40
|
|
|
67
41
|
map_content to: :content
|
|
68
42
|
map_attribute "anchor", to: :anchor
|
data/lib/rfcxml/v3/link.rb
CHANGED
data/lib/rfcxml/v3/list.rb
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
require "lutaml/model"
|
|
4
4
|
|
|
5
|
-
require_relative "text"
|
|
6
|
-
|
|
7
5
|
module Rfcxml
|
|
8
6
|
module V3
|
|
9
7
|
class List < Lutaml::Model::Serializable
|
|
@@ -11,10 +9,11 @@ module Rfcxml
|
|
|
11
9
|
attribute :hang_indent, :string
|
|
12
10
|
attribute :counter, :string
|
|
13
11
|
attribute :pn, :string
|
|
14
|
-
attribute :text, Text, collection: true
|
|
12
|
+
attribute :text, "Rfcxml::V3::Text", collection: true
|
|
15
13
|
|
|
16
14
|
xml do
|
|
17
|
-
|
|
15
|
+
element "list"
|
|
16
|
+
ordered
|
|
18
17
|
|
|
19
18
|
map_attribute "style", to: :style
|
|
20
19
|
map_attribute "hangIndent", to: :hang_indent
|
data/lib/rfcxml/v3/middle.rb
CHANGED
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
require "lutaml/model"
|
|
4
4
|
|
|
5
|
-
require_relative "section"
|
|
6
|
-
|
|
7
5
|
module Rfcxml
|
|
8
6
|
module V3
|
|
9
7
|
class Middle < Lutaml::Model::Serializable
|
|
10
8
|
attribute :section, Section, collection: true
|
|
11
9
|
|
|
12
10
|
xml do
|
|
13
|
-
|
|
11
|
+
element "middle"
|
|
12
|
+
ordered
|
|
14
13
|
|
|
15
14
|
map_element "section", to: :section
|
|
16
15
|
end
|
data/lib/rfcxml/v3/name.rb
CHANGED
|
@@ -2,19 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
require "lutaml/model"
|
|
4
4
|
|
|
5
|
-
require_relative "bcp14"
|
|
6
|
-
require_relative "br"
|
|
7
|
-
require_relative "cref"
|
|
8
|
-
require_relative "em"
|
|
9
|
-
require_relative "eref"
|
|
10
|
-
require_relative "iref"
|
|
11
|
-
require_relative "relref"
|
|
12
|
-
require_relative "strong"
|
|
13
|
-
require_relative "sub"
|
|
14
|
-
require_relative "sup"
|
|
15
|
-
require_relative "tt"
|
|
16
|
-
require_relative "xref"
|
|
17
|
-
|
|
18
5
|
module Rfcxml
|
|
19
6
|
module V3
|
|
20
7
|
class Name < Lutaml::Model::Serializable
|
|
@@ -34,7 +21,8 @@ module Rfcxml
|
|
|
34
21
|
attribute :xref, Xref, collection: true
|
|
35
22
|
|
|
36
23
|
xml do
|
|
37
|
-
|
|
24
|
+
element "name"
|
|
25
|
+
mixed_content
|
|
38
26
|
|
|
39
27
|
map_content to: :content
|
|
40
28
|
map_attribute "slugifiedName", to: :slugified_name
|
data/lib/rfcxml/v3/note.rb
CHANGED
|
@@ -2,12 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
require "lutaml/model"
|
|
4
4
|
|
|
5
|
-
require_relative "dl"
|
|
6
|
-
require_relative "name"
|
|
7
|
-
require_relative "ol"
|
|
8
|
-
require_relative "text"
|
|
9
|
-
require_relative "ul"
|
|
10
|
-
|
|
11
5
|
module Rfcxml
|
|
12
6
|
module V3
|
|
13
7
|
class Note < Lutaml::Model::Serializable
|
|
@@ -21,7 +15,8 @@ module Rfcxml
|
|
|
21
15
|
attribute :ul, Ul, collection: true
|
|
22
16
|
|
|
23
17
|
xml do
|
|
24
|
-
|
|
18
|
+
element "note"
|
|
19
|
+
ordered
|
|
25
20
|
|
|
26
21
|
map_attribute "title", to: :title
|
|
27
22
|
map_attribute "pn", to: :pn
|
data/lib/rfcxml/v3/ol.rb
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
require "lutaml/model"
|
|
4
4
|
|
|
5
|
-
require_relative "li"
|
|
6
|
-
|
|
7
5
|
module Rfcxml
|
|
8
6
|
module V3
|
|
9
7
|
class Ol < Lutaml::Model::Serializable
|
|
@@ -11,13 +9,16 @@ module Rfcxml
|
|
|
11
9
|
attribute :type, :string, default: -> { "1" }
|
|
12
10
|
attribute :start, :string, default: -> { "1" }
|
|
13
11
|
attribute :group, :string
|
|
14
|
-
attribute :spacing, :string,
|
|
12
|
+
attribute :spacing, :string,
|
|
13
|
+
values: %w[normal compact],
|
|
14
|
+
default: -> { "normal" }
|
|
15
15
|
attribute :indent, :string, default: -> { "adaptive" }
|
|
16
16
|
attribute :pn, :string
|
|
17
17
|
attribute :li, Li, collection: true
|
|
18
18
|
|
|
19
19
|
xml do
|
|
20
|
-
|
|
20
|
+
element "ol"
|
|
21
|
+
ordered
|
|
21
22
|
|
|
22
23
|
map_attribute "anchor", to: :anchor
|
|
23
24
|
map_attribute "type", to: :type
|
|
@@ -9,15 +9,20 @@ module Rfcxml
|
|
|
9
9
|
attribute :abbrev, :string
|
|
10
10
|
attribute :ascii, :string
|
|
11
11
|
attribute :ascii_abbrev, :string
|
|
12
|
-
attribute :show_on_front_page, :string,
|
|
12
|
+
attribute :show_on_front_page, :string,
|
|
13
|
+
values: %w[true false],
|
|
14
|
+
default: -> { "true" }
|
|
13
15
|
|
|
14
16
|
xml do
|
|
15
|
-
|
|
17
|
+
element "organization"
|
|
18
|
+
mixed_content
|
|
16
19
|
|
|
17
20
|
map_content to: :content
|
|
18
|
-
map_attribute "abbrev", to: :abbrev
|
|
19
|
-
|
|
20
|
-
map_attribute "
|
|
21
|
+
map_attribute "abbrev", to: :abbrev,
|
|
22
|
+
value_map: { to: { empty: :empty } }
|
|
23
|
+
map_attribute "ascii", to: :ascii, value_map: { to: { empty: :empty } }
|
|
24
|
+
map_attribute "asciiAbbrev", to: :ascii_abbrev,
|
|
25
|
+
value_map: { to: { empty: :empty } }
|
|
21
26
|
map_attribute "showOnFrontPage", to: :show_on_front_page
|
|
22
27
|
end
|
|
23
28
|
end
|
data/lib/rfcxml/v3/phone.rb
CHANGED
data/lib/rfcxml/v3/pobox.rb
CHANGED
data/lib/rfcxml/v3/postal.rb
CHANGED
|
@@ -2,17 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
require "lutaml/model"
|
|
4
4
|
|
|
5
|
-
require_relative "city"
|
|
6
|
-
require_relative "cityarea"
|
|
7
|
-
require_relative "code"
|
|
8
|
-
require_relative "country"
|
|
9
|
-
require_relative "extaddr"
|
|
10
|
-
require_relative "pobox"
|
|
11
|
-
require_relative "postal_line"
|
|
12
|
-
require_relative "region"
|
|
13
|
-
require_relative "sortingcode"
|
|
14
|
-
require_relative "street"
|
|
15
|
-
|
|
16
5
|
module Rfcxml
|
|
17
6
|
module V3
|
|
18
7
|
class Postal < Lutaml::Model::Serializable
|
|
@@ -28,7 +17,8 @@ module Rfcxml
|
|
|
28
17
|
attribute :postal_line, PostalLine, collection: true
|
|
29
18
|
|
|
30
19
|
xml do
|
|
31
|
-
|
|
20
|
+
element "postal"
|
|
21
|
+
ordered
|
|
32
22
|
|
|
33
23
|
map_element "extaddr", to: :extaddr
|
|
34
24
|
map_element "street", to: :street
|
data/lib/rfcxml/v3/postamble.rb
CHANGED
|
@@ -2,12 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
require "lutaml/model"
|
|
4
4
|
|
|
5
|
-
require_relative "cref"
|
|
6
|
-
require_relative "eref"
|
|
7
|
-
require_relative "iref"
|
|
8
|
-
require_relative "spanx"
|
|
9
|
-
require_relative "xref"
|
|
10
|
-
|
|
11
5
|
module Rfcxml
|
|
12
6
|
module V3
|
|
13
7
|
class Postamble < Lutaml::Model::Serializable
|
|
@@ -19,7 +13,8 @@ module Rfcxml
|
|
|
19
13
|
attribute :xref, Xref, collection: true
|
|
20
14
|
|
|
21
15
|
xml do
|
|
22
|
-
|
|
16
|
+
element "postamble"
|
|
17
|
+
ordered
|
|
23
18
|
|
|
24
19
|
map_content to: :content
|
|
25
20
|
map_element "cref", to: :cref
|
data/lib/rfcxml/v3/preamble.rb
CHANGED
|
@@ -2,20 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
require "lutaml/model"
|
|
4
4
|
|
|
5
|
-
require_relative "bcp14"
|
|
6
|
-
require_relative "cref"
|
|
7
|
-
require_relative "em"
|
|
8
|
-
require_relative "eref"
|
|
9
|
-
require_relative "iref"
|
|
10
|
-
require_relative "relref"
|
|
11
|
-
require_relative "spanx"
|
|
12
|
-
require_relative "strong"
|
|
13
|
-
require_relative "sub"
|
|
14
|
-
require_relative "sup"
|
|
15
|
-
require_relative "tt"
|
|
16
|
-
require_relative "u"
|
|
17
|
-
require_relative "xref"
|
|
18
|
-
|
|
19
5
|
module Rfcxml
|
|
20
6
|
module V3
|
|
21
7
|
class Preamble < Lutaml::Model::Serializable
|
|
@@ -35,7 +21,8 @@ module Rfcxml
|
|
|
35
21
|
attribute :xref, Xref, collection: true
|
|
36
22
|
|
|
37
23
|
xml do
|
|
38
|
-
|
|
24
|
+
element "preamble"
|
|
25
|
+
ordered
|
|
39
26
|
|
|
40
27
|
map_content to: :content
|
|
41
28
|
map_element "bcp14", to: :bcp14
|
data/lib/rfcxml/v3/refcontent.rb
CHANGED
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
require "lutaml/model"
|
|
4
4
|
|
|
5
|
-
require_relative "bcp14"
|
|
6
|
-
require_relative "xref_text"
|
|
7
|
-
|
|
8
5
|
module Rfcxml
|
|
9
6
|
module V3
|
|
10
7
|
class Refcontent < Lutaml::Model::Serializable
|
|
@@ -13,7 +10,8 @@ module Rfcxml
|
|
|
13
10
|
include XrefText
|
|
14
11
|
|
|
15
12
|
xml do
|
|
16
|
-
|
|
13
|
+
element "refcontent"
|
|
14
|
+
ordered
|
|
17
15
|
|
|
18
16
|
map_content to: :content
|
|
19
17
|
map_element "bcp14", to: :bcp14
|
data/lib/rfcxml/v3/reference.rb
CHANGED
|
@@ -2,20 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
require "lutaml/model"
|
|
4
4
|
|
|
5
|
-
require_relative "annotation"
|
|
6
|
-
require_relative "format"
|
|
7
|
-
require_relative "front"
|
|
8
|
-
require_relative "refcontent"
|
|
9
|
-
require_relative "series_info"
|
|
10
|
-
|
|
11
5
|
module Rfcxml
|
|
12
6
|
module V3
|
|
13
7
|
class Reference < Lutaml::Model::Serializable
|
|
14
8
|
attribute :anchor, :string
|
|
15
9
|
attribute :derived_anchor, :string
|
|
16
10
|
attribute :target, :string
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
attribute :quote_title, :string,
|
|
12
|
+
values: %w[true false],
|
|
13
|
+
default: -> { "true" }
|
|
19
14
|
attribute :stream, :string
|
|
20
15
|
attribute :front, Front
|
|
21
16
|
attribute :annotation, Annotation, collection: true
|
|
@@ -24,11 +19,13 @@ module Rfcxml
|
|
|
24
19
|
attribute :series_info, SeriesInfo, collection: true
|
|
25
20
|
|
|
26
21
|
xml do
|
|
27
|
-
|
|
22
|
+
element "reference"
|
|
23
|
+
mixed_content
|
|
28
24
|
|
|
29
25
|
map_attribute "anchor", to: :anchor
|
|
30
26
|
map_attribute "derivedAnchor", to: :derived_anchor
|
|
31
|
-
map_attribute "target", to: :target
|
|
27
|
+
map_attribute "target", to: :target,
|
|
28
|
+
value_map: { to: { empty: :empty } }
|
|
32
29
|
map_attribute "quoteTitle", to: :quote_title
|
|
33
30
|
# map_attribute "quote-title", to: :quote_title
|
|
34
31
|
map_element "stream", to: :stream
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
require "lutaml/model"
|
|
4
4
|
|
|
5
|
-
require_relative "reference"
|
|
6
|
-
|
|
7
5
|
module Rfcxml
|
|
8
6
|
module V3
|
|
9
7
|
class Referencegroup < Lutaml::Model::Serializable
|
|
@@ -13,7 +11,8 @@ module Rfcxml
|
|
|
13
11
|
attribute :reference, Reference, collection: true
|
|
14
12
|
|
|
15
13
|
xml do
|
|
16
|
-
|
|
14
|
+
element "referencegroup"
|
|
15
|
+
ordered
|
|
17
16
|
|
|
18
17
|
map_attribute "anchor", to: :anchor
|
|
19
18
|
map_attribute "derivedAnchor", to: :derived_anchor
|
data/lib/rfcxml/v3/references.rb
CHANGED
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
require "lutaml/model"
|
|
4
4
|
|
|
5
|
-
require_relative "name"
|
|
6
|
-
require_relative "reference"
|
|
7
|
-
require_relative "referencegroup"
|
|
8
|
-
|
|
9
5
|
module Rfcxml
|
|
10
6
|
module V3
|
|
11
7
|
class References < Lutaml::Model::Serializable
|
|
@@ -18,7 +14,8 @@ module Rfcxml
|
|
|
18
14
|
attribute :referencegroup, Referencegroup, collection: true
|
|
19
15
|
|
|
20
16
|
xml do
|
|
21
|
-
|
|
17
|
+
element "references"
|
|
18
|
+
ordered
|
|
22
19
|
|
|
23
20
|
map_attribute "pn", to: :pn
|
|
24
21
|
map_attribute "anchor", to: :anchor
|
data/lib/rfcxml/v3/region.rb
CHANGED