rfcxml 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/rake.yml +18 -0
- data/.github/workflows/release.yml +25 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.rubocop.yml +11 -0
- data/.rubocop_todo.yml +20 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/Gemfile +12 -0
- data/README.adoc +75 -0
- data/Rakefile +12 -0
- data/bin/console +11 -0
- data/bin/setup +8 -0
- data/lib/rfcxml/v3/abstract.rb +32 -0
- data/lib/rfcxml/v3/address.rb +31 -0
- data/lib/rfcxml/v3/annotation.rb +57 -0
- data/lib/rfcxml/v3/area.rb +17 -0
- data/lib/rfcxml/v3/artset.rb +23 -0
- data/lib/rfcxml/v3/artwork.rb +37 -0
- data/lib/rfcxml/v3/aside.rb +50 -0
- data/lib/rfcxml/v3/author.rb +38 -0
- data/lib/rfcxml/v3/back.rb +25 -0
- data/lib/rfcxml/v3/bcp14.rb +17 -0
- data/lib/rfcxml/v3/blockquote.rb +92 -0
- data/lib/rfcxml/v3/boilerplate.rb +19 -0
- data/lib/rfcxml/v3/br.rb +13 -0
- data/lib/rfcxml/v3/c.rb +33 -0
- data/lib/rfcxml/v3/city.rb +19 -0
- data/lib/rfcxml/v3/cityarea.rb +19 -0
- data/lib/rfcxml/v3/code.rb +19 -0
- data/lib/rfcxml/v3/contact.rb +36 -0
- data/lib/rfcxml/v3/country.rb +19 -0
- data/lib/rfcxml/v3/cref.rb +51 -0
- data/lib/rfcxml/v3/date.rb +23 -0
- data/lib/rfcxml/v3/dd.rb +92 -0
- data/lib/rfcxml/v3/displayreference.rb +19 -0
- data/lib/rfcxml/v3/dl.rb +35 -0
- data/lib/rfcxml/v3/dt.rb +58 -0
- data/lib/rfcxml/v3/em.rb +14 -0
- data/lib/rfcxml/v3/email.rb +19 -0
- data/lib/rfcxml/v3/eref.rb +21 -0
- data/lib/rfcxml/v3/extaddr.rb +19 -0
- data/lib/rfcxml/v3/facsimile.rb +17 -0
- data/lib/rfcxml/v3/figure.rb +57 -0
- data/lib/rfcxml/v3/format.rb +21 -0
- data/lib/rfcxml/v3/front.rb +49 -0
- data/lib/rfcxml/v3/iref.rb +23 -0
- data/lib/rfcxml/v3/keyword.rb +17 -0
- data/lib/rfcxml/v3/li.rb +97 -0
- data/lib/rfcxml/v3/link.rb +19 -0
- data/lib/rfcxml/v3/list.rb +27 -0
- data/lib/rfcxml/v3/middle.rb +19 -0
- data/lib/rfcxml/v3/name.rb +56 -0
- data/lib/rfcxml/v3/note.rb +37 -0
- data/lib/rfcxml/v3/ol.rb +33 -0
- data/lib/rfcxml/v3/organization.rb +25 -0
- data/lib/rfcxml/v3/phone.rb +17 -0
- data/lib/rfcxml/v3/pobox.rb +19 -0
- data/lib/rfcxml/v3/postal.rb +46 -0
- data/lib/rfcxml/v3/postal_line.rb +19 -0
- data/lib/rfcxml/v3/postamble.rb +33 -0
- data/lib/rfcxml/v3/preamble.rb +57 -0
- data/lib/rfcxml/v3/refcontent.rb +28 -0
- data/lib/rfcxml/v3/reference.rb +43 -0
- data/lib/rfcxml/v3/referencegroup.rb +25 -0
- data/lib/rfcxml/v3/references.rb +33 -0
- data/lib/rfcxml/v3/region.rb +19 -0
- data/lib/rfcxml/v3/relref.rb +29 -0
- data/lib/rfcxml/v3/rfc.rb +70 -0
- data/lib/rfcxml/v3/section.rb +78 -0
- data/lib/rfcxml/v3/series_info.rb +27 -0
- data/lib/rfcxml/v3/sortingcode.rb +19 -0
- data/lib/rfcxml/v3/sourcecode.rb +31 -0
- data/lib/rfcxml/v3/spanx.rb +19 -0
- data/lib/rfcxml/v3/street.rb +19 -0
- data/lib/rfcxml/v3/strong.rb +43 -0
- data/lib/rfcxml/v3/sub.rb +49 -0
- data/lib/rfcxml/v3/sup.rb +28 -0
- data/lib/rfcxml/v3/table.rb +37 -0
- data/lib/rfcxml/v3/tbody.rb +21 -0
- data/lib/rfcxml/v3/td.rb +89 -0
- data/lib/rfcxml/v3/text.rb +82 -0
- data/lib/rfcxml/v3/texttable.rb +41 -0
- data/lib/rfcxml/v3/tfoot.rb +21 -0
- data/lib/rfcxml/v3/th.rb +14 -0
- data/lib/rfcxml/v3/thead.rb +21 -0
- data/lib/rfcxml/v3/title.rb +25 -0
- data/lib/rfcxml/v3/toc.rb +19 -0
- data/lib/rfcxml/v3/tr.rb +24 -0
- data/lib/rfcxml/v3/tt.rb +53 -0
- data/lib/rfcxml/v3/ttcol.rb +34 -0
- data/lib/rfcxml/v3/u.rb +25 -0
- data/lib/rfcxml/v3/ul.rb +31 -0
- data/lib/rfcxml/v3/uri.rb +17 -0
- data/lib/rfcxml/v3/vspace.rb +17 -0
- data/lib/rfcxml/v3/workgroup.rb +17 -0
- data/lib/rfcxml/v3/xref.rb +41 -0
- data/lib/rfcxml/v3/xref_text.rb +30 -0
- data/lib/rfcxml/v3.rb +8 -0
- data/lib/rfcxml/version.rb +5 -0
- data/lib/rfcxml.rb +17 -0
- data/reference-docs/v3-modified.rnc +1145 -0
- data/reference-docs/v3.rnc +1145 -0
- data/reference-docs/v3.xsd +1410 -0
- data/reference-docs/xml.xsd +19 -0
- data/rfcxml.gemspec +47 -0
- data/sig/xml2rfc.rbs +4 -0
- metadata +264 -0
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "lutaml/model"
|
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
|
+
module Rfcxml
|
14
|
+
module V3
|
15
|
+
class Figure < Lutaml::Model::Serializable
|
16
|
+
attribute :anchor, :string
|
17
|
+
attribute :pn, :string
|
18
|
+
attribute :title, :string, default: -> { "" }
|
19
|
+
attribute :suppress_title, :string, default: -> { "false" }
|
20
|
+
attribute :src, :string
|
21
|
+
attribute :original_src, :string
|
22
|
+
attribute :align, :string, default: -> { "left" }
|
23
|
+
attribute :alt, :string, default: -> { "" }
|
24
|
+
attribute :width, :string, default: -> { "" }
|
25
|
+
attribute :height, :string, default: -> { "" }
|
26
|
+
attribute :name, Name
|
27
|
+
attribute :iref, Iref, collection: true
|
28
|
+
attribute :preamble, Preamble
|
29
|
+
attribute :artset, Artset, collection: true
|
30
|
+
attribute :artwork, Artwork, collection: true
|
31
|
+
attribute :sourcecode, Sourcecode, collection: true
|
32
|
+
attribute :postamble, Postamble
|
33
|
+
|
34
|
+
xml do
|
35
|
+
root "figure"
|
36
|
+
|
37
|
+
map_attribute "anchor", to: :anchor
|
38
|
+
map_attribute "pn", to: :pn
|
39
|
+
map_attribute "title", to: :title
|
40
|
+
map_attribute "suppress-title", to: :suppress_title
|
41
|
+
map_attribute "src", to: :src
|
42
|
+
map_attribute "originalSrc", to: :original_src
|
43
|
+
map_attribute "align", to: :align
|
44
|
+
map_attribute "alt", to: :alt
|
45
|
+
map_attribute "width", to: :width
|
46
|
+
map_attribute "height", to: :height
|
47
|
+
map_element "name", to: :name
|
48
|
+
map_element "iref", to: :iref
|
49
|
+
map_element "preamble", to: :preamble
|
50
|
+
map_element "artset", to: :artset
|
51
|
+
map_element "artwork", to: :artwork
|
52
|
+
map_element "sourcecode", to: :sourcecode
|
53
|
+
map_element "postamble", to: :postamble
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "lutaml/model"
|
4
|
+
|
5
|
+
module Rfcxml
|
6
|
+
module V3
|
7
|
+
class Format < Lutaml::Model::Serializable
|
8
|
+
attribute :target, :string
|
9
|
+
attribute :type, :string
|
10
|
+
attribute :octets, :string
|
11
|
+
|
12
|
+
xml do
|
13
|
+
root "format"
|
14
|
+
|
15
|
+
map_attribute "target", to: :target
|
16
|
+
map_attribute "type", to: :type
|
17
|
+
map_attribute "octets", to: :octets
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "lutaml/model"
|
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
|
+
module Rfcxml
|
18
|
+
module V3
|
19
|
+
class Front < Lutaml::Model::Serializable
|
20
|
+
attribute :title, Title
|
21
|
+
attribute :series_info, SeriesInfo, collection: true
|
22
|
+
attribute :author, Author, collection: true
|
23
|
+
attribute :date, Date
|
24
|
+
attribute :area, Area, collection: true
|
25
|
+
attribute :workgroup, Workgroup, collection: true
|
26
|
+
attribute :keyword, Keyword, collection: true
|
27
|
+
attribute :abstract, Abstract
|
28
|
+
attribute :note, Note, collection: true
|
29
|
+
attribute :boilerplate, Boilerplate
|
30
|
+
attribute :toc, Toc
|
31
|
+
|
32
|
+
xml do
|
33
|
+
root "front"
|
34
|
+
|
35
|
+
map_element "title", to: :title
|
36
|
+
map_element "seriesInfo", to: :series_info
|
37
|
+
map_element "author", to: :author
|
38
|
+
map_element "date", to: :date
|
39
|
+
map_element "area", to: :area
|
40
|
+
map_element "workgroup", to: :workgroup
|
41
|
+
map_element "keyword", to: :keyword
|
42
|
+
map_element "abstract", to: :abstract
|
43
|
+
map_element "note", to: :note
|
44
|
+
map_element "boilerplate", to: :boilerplate
|
45
|
+
map_element "toc", to: :toc
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "lutaml/model"
|
4
|
+
|
5
|
+
module Rfcxml
|
6
|
+
module V3
|
7
|
+
class Iref < Lutaml::Model::Serializable
|
8
|
+
attribute :item, :string
|
9
|
+
attribute :subitem, :string, default: -> { "" }
|
10
|
+
attribute :primary, :string, default: -> { "false" }
|
11
|
+
attribute :pn, :string
|
12
|
+
|
13
|
+
xml do
|
14
|
+
root "iref"
|
15
|
+
|
16
|
+
map_attribute "item", to: :item
|
17
|
+
map_attribute "subitem", to: :subitem
|
18
|
+
map_attribute "primary", to: :primary
|
19
|
+
map_attribute "pn", to: :pn
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "lutaml/model"
|
4
|
+
|
5
|
+
module Rfcxml
|
6
|
+
module V3
|
7
|
+
class Keyword < Lutaml::Model::Serializable
|
8
|
+
attribute :content, :string
|
9
|
+
|
10
|
+
xml do
|
11
|
+
root "keyword"
|
12
|
+
|
13
|
+
map_content to: :content
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/rfcxml/v3/li.rb
ADDED
@@ -0,0 +1,97 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "lutaml/model"
|
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
|
+
module Rfcxml
|
30
|
+
module V3
|
31
|
+
class Ul < Lutaml::Model::Serializable; end
|
32
|
+
class Ol < Lutaml::Model::Serializable; end
|
33
|
+
|
34
|
+
class Li < Lutaml::Model::Serializable
|
35
|
+
attribute :content, :string
|
36
|
+
attribute :anchor, :string
|
37
|
+
attribute :pn, :string
|
38
|
+
attribute :artset, Artset, collection: true
|
39
|
+
attribute :artwork, Artwork, collection: true
|
40
|
+
attribute :dl, Dl, collection: true
|
41
|
+
attribute :figure, Figure, collection: true
|
42
|
+
attribute :ol, Ol, collection: true
|
43
|
+
attribute :sourcecode, Sourcecode, collection: true
|
44
|
+
attribute :t, Text, collection: true
|
45
|
+
attribute :table, Table, collection: true
|
46
|
+
attribute :ul, Ul, collection: true
|
47
|
+
attribute :bcp14, Bcp14, collection: true
|
48
|
+
attribute :br, Br, collection: true
|
49
|
+
attribute :cref, Cref, collection: true
|
50
|
+
attribute :em, Em, collection: true
|
51
|
+
attribute :eref, Eref, collection: true
|
52
|
+
attribute :iref, Iref, collection: true
|
53
|
+
attribute :relref, Relref, collection: true
|
54
|
+
attribute :strong, Strong, collection: true
|
55
|
+
attribute :sub, Sub, collection: true
|
56
|
+
attribute :sup, Sup, collection: true
|
57
|
+
attribute :tt, Tt, collection: true
|
58
|
+
attribute :u, U, collection: true
|
59
|
+
attribute :xref, Xref, collection: true
|
60
|
+
|
61
|
+
attribute :blockquote, Blockquote, collection: true
|
62
|
+
attribute :derived_counter, :string
|
63
|
+
|
64
|
+
xml do
|
65
|
+
root "li", mixed: true
|
66
|
+
|
67
|
+
map_content to: :content
|
68
|
+
map_attribute "anchor", to: :anchor
|
69
|
+
map_attribute "derivedCounter", to: :derived_counter
|
70
|
+
map_attribute "pn", to: :pn
|
71
|
+
map_element "artset", to: :artset
|
72
|
+
map_element "artwork", to: :artwork
|
73
|
+
map_element "blockquote", to: :blockquote
|
74
|
+
map_element "dl", to: :dl
|
75
|
+
map_element "figure", to: :figure
|
76
|
+
map_element "ol", to: :ol
|
77
|
+
map_element "sourcecode", to: :sourcecode
|
78
|
+
map_element "t", to: :t
|
79
|
+
map_element "table", to: :table
|
80
|
+
map_element "ul", to: :ul
|
81
|
+
map_element "bcp14", to: :bcp14
|
82
|
+
map_element "br", to: :br
|
83
|
+
map_element "cref", to: :cref
|
84
|
+
map_element "em", to: :em
|
85
|
+
map_element "eref", to: :eref
|
86
|
+
map_element "iref", to: :iref
|
87
|
+
map_element "relref", to: :relref
|
88
|
+
map_element "strong", to: :strong
|
89
|
+
map_element "sub", to: :sub
|
90
|
+
map_element "sup", to: :sup
|
91
|
+
map_element "tt", to: :tt
|
92
|
+
map_element "u", to: :u
|
93
|
+
map_element "xref", to: :xref
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "lutaml/model"
|
4
|
+
|
5
|
+
module Rfcxml
|
6
|
+
module V3
|
7
|
+
class Link < Lutaml::Model::Serializable
|
8
|
+
attribute :href, :string
|
9
|
+
attribute :rel, :string
|
10
|
+
|
11
|
+
xml do
|
12
|
+
root "link"
|
13
|
+
|
14
|
+
map_attribute "href", to: :href
|
15
|
+
map_attribute "rel", to: :rel
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "lutaml/model"
|
4
|
+
|
5
|
+
require_relative "text"
|
6
|
+
|
7
|
+
module Rfcxml
|
8
|
+
module V3
|
9
|
+
class List < Lutaml::Model::Serializable
|
10
|
+
attribute :style, :string, default: -> { "empty" }
|
11
|
+
attribute :hang_indent, :string
|
12
|
+
attribute :counter, :string
|
13
|
+
attribute :pn, :string
|
14
|
+
attribute :text, Text, collection: true
|
15
|
+
|
16
|
+
xml do
|
17
|
+
root "list"
|
18
|
+
|
19
|
+
map_attribute "style", to: :style
|
20
|
+
map_attribute "hangIndent", to: :hang_indent
|
21
|
+
map_attribute "counter", to: :counter
|
22
|
+
map_attribute "pn", to: :pn
|
23
|
+
map_element "t", to: :text
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "lutaml/model"
|
4
|
+
|
5
|
+
require_relative "section"
|
6
|
+
|
7
|
+
module Rfcxml
|
8
|
+
module V3
|
9
|
+
class Middle < Lutaml::Model::Serializable
|
10
|
+
attribute :section, Section, collection: true
|
11
|
+
|
12
|
+
xml do
|
13
|
+
root "middle"
|
14
|
+
|
15
|
+
map_element "section", to: :section
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "lutaml/model"
|
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
|
+
module Rfcxml
|
19
|
+
module V3
|
20
|
+
class Name < Lutaml::Model::Serializable
|
21
|
+
attribute :content, :string
|
22
|
+
attribute :slugified_name, :string
|
23
|
+
attribute :bcp14, Bcp14, collection: true
|
24
|
+
attribute :br, Br, collection: true
|
25
|
+
attribute :cref, Cref, collection: true
|
26
|
+
attribute :em, Em, collection: true
|
27
|
+
attribute :eref, Eref, collection: true
|
28
|
+
attribute :iref, Iref, collection: true
|
29
|
+
attribute :relref, Relref, collection: true
|
30
|
+
attribute :strong, Strong, collection: true
|
31
|
+
attribute :sub, Sub, collection: true
|
32
|
+
attribute :sup, Sup, collection: true
|
33
|
+
attribute :tt, Tt, collection: true
|
34
|
+
attribute :xref, Xref, collection: true
|
35
|
+
|
36
|
+
xml do
|
37
|
+
root "name"
|
38
|
+
|
39
|
+
map_content to: :content
|
40
|
+
map_attribute "slugifiedName", to: :slugified_name
|
41
|
+
map_element "bcp14", to: :bcp14
|
42
|
+
map_element "br", to: :br
|
43
|
+
map_element "cref", to: :cref
|
44
|
+
map_element "em", to: :em
|
45
|
+
map_element "eref", to: :eref
|
46
|
+
map_element "iref", to: :iref
|
47
|
+
map_element "relref", to: :relref
|
48
|
+
map_element "strong", to: :strong
|
49
|
+
map_element "sub", to: :sub
|
50
|
+
map_element "sup", to: :sup
|
51
|
+
map_element "tt", to: :tt
|
52
|
+
map_element "xref", to: :xref
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "lutaml/model"
|
4
|
+
|
5
|
+
require_relative "dl"
|
6
|
+
require_relative "name"
|
7
|
+
require_relative "ol"
|
8
|
+
require_relative "text"
|
9
|
+
require_relative "ul"
|
10
|
+
|
11
|
+
module Rfcxml
|
12
|
+
module V3
|
13
|
+
class Note < Lutaml::Model::Serializable
|
14
|
+
attribute :title, :string
|
15
|
+
attribute :pn, :string
|
16
|
+
attribute :remove_in_rfc, :string, default: -> { "false" }
|
17
|
+
attribute :name, Name
|
18
|
+
attribute :dl, Dl, collection: true
|
19
|
+
attribute :ol, Ol, collection: true
|
20
|
+
attribute :t, Text, collection: true
|
21
|
+
attribute :ul, Ul, collection: true
|
22
|
+
|
23
|
+
xml do
|
24
|
+
root "note"
|
25
|
+
|
26
|
+
map_attribute "title", to: :title
|
27
|
+
map_attribute "pn", to: :pn
|
28
|
+
map_attribute "removeInRFC", to: :remove_in_rfc
|
29
|
+
map_element "name", to: :name
|
30
|
+
map_element "dl", to: :dl
|
31
|
+
map_element "ol", to: :ol
|
32
|
+
map_element "t", to: :t
|
33
|
+
map_element "ul", to: :ul
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
data/lib/rfcxml/v3/ol.rb
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "lutaml/model"
|
4
|
+
|
5
|
+
require_relative "li"
|
6
|
+
|
7
|
+
module Rfcxml
|
8
|
+
module V3
|
9
|
+
class Ol < Lutaml::Model::Serializable
|
10
|
+
attribute :anchor, :string
|
11
|
+
attribute :type, :string, default: -> { "1" }
|
12
|
+
attribute :start, :string, default: -> { "1" }
|
13
|
+
attribute :group, :string
|
14
|
+
attribute :spacing, :string, default: -> { "normal" }
|
15
|
+
attribute :indent, :string, default: -> { "adaptive" }
|
16
|
+
attribute :pn, :string
|
17
|
+
attribute :li, Li, collection: true
|
18
|
+
|
19
|
+
xml do
|
20
|
+
root "ol"
|
21
|
+
|
22
|
+
map_attribute "anchor", to: :anchor
|
23
|
+
map_attribute "type", to: :type
|
24
|
+
map_attribute "start", to: :start
|
25
|
+
map_attribute "group", to: :group
|
26
|
+
map_attribute "spacing", to: :spacing
|
27
|
+
map_attribute "indent", to: :indent
|
28
|
+
map_attribute "pn", to: :pn
|
29
|
+
map_element "li", to: :li
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "lutaml/model"
|
4
|
+
|
5
|
+
module Rfcxml
|
6
|
+
module V3
|
7
|
+
class Organization < Lutaml::Model::Serializable
|
8
|
+
attribute :content, :string
|
9
|
+
attribute :abbrev, :string
|
10
|
+
attribute :ascii, :string
|
11
|
+
attribute :ascii_abbrev, :string
|
12
|
+
attribute :show_on_front_page, :string, default: -> { "true" }
|
13
|
+
|
14
|
+
xml do
|
15
|
+
root "organization"
|
16
|
+
|
17
|
+
map_content to: :content
|
18
|
+
map_attribute "abbrev", to: :abbrev
|
19
|
+
map_attribute "ascii", to: :ascii
|
20
|
+
map_attribute "asciiAbbrev", to: :ascii_abbrev
|
21
|
+
map_attribute "showOnFrontPage", to: :show_on_front_page
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "lutaml/model"
|
4
|
+
|
5
|
+
module Rfcxml
|
6
|
+
module V3
|
7
|
+
class Phone < Lutaml::Model::Serializable
|
8
|
+
attribute :content, :string
|
9
|
+
|
10
|
+
xml do
|
11
|
+
root "phone"
|
12
|
+
|
13
|
+
map_content to: :content
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "lutaml/model"
|
4
|
+
|
5
|
+
module Rfcxml
|
6
|
+
module V3
|
7
|
+
class Pobox < Lutaml::Model::Serializable
|
8
|
+
attribute :content, :string
|
9
|
+
attribute :ascii, :string
|
10
|
+
|
11
|
+
xml do
|
12
|
+
root "pobox"
|
13
|
+
|
14
|
+
map_content to: :content
|
15
|
+
map_attribute "ascii", to: :ascii
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "lutaml/model"
|
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
|
+
module Rfcxml
|
17
|
+
module V3
|
18
|
+
class Postal < Lutaml::Model::Serializable
|
19
|
+
attribute :city, City, collection: true
|
20
|
+
attribute :cityarea, Cityarea, collection: true
|
21
|
+
attribute :code, Code, collection: true
|
22
|
+
attribute :country, Country, collection: true
|
23
|
+
attribute :extaddr, Extaddr, collection: true
|
24
|
+
attribute :pobox, Pobox, collection: true
|
25
|
+
attribute :region, Region, collection: true
|
26
|
+
attribute :sortingcode, Sortingcode, collection: true
|
27
|
+
attribute :street, Street, collection: true
|
28
|
+
attribute :postal_line, PostalLine, collection: true
|
29
|
+
|
30
|
+
xml do
|
31
|
+
root "postal"
|
32
|
+
|
33
|
+
map_element "extaddr", to: :extaddr
|
34
|
+
map_element "street", to: :street
|
35
|
+
map_element "city", to: :city
|
36
|
+
map_element "cityarea", to: :cityarea
|
37
|
+
map_element "region", to: :region
|
38
|
+
map_element "code", to: :code
|
39
|
+
map_element "country", to: :country
|
40
|
+
map_element "pobox", to: :pobox
|
41
|
+
map_element "sortingcode", to: :sortingcode
|
42
|
+
map_element "postalLine", to: :postal_line
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "lutaml/model"
|
4
|
+
|
5
|
+
module Rfcxml
|
6
|
+
module V3
|
7
|
+
class PostalLine < Lutaml::Model::Serializable
|
8
|
+
attribute :content, :string
|
9
|
+
attribute :ascii, :string
|
10
|
+
|
11
|
+
xml do
|
12
|
+
root "postalLine"
|
13
|
+
|
14
|
+
map_content to: :content
|
15
|
+
map_attribute "ascii", to: :ascii
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "lutaml/model"
|
4
|
+
|
5
|
+
require_relative "cref"
|
6
|
+
require_relative "eref"
|
7
|
+
require_relative "iref"
|
8
|
+
require_relative "spanx"
|
9
|
+
require_relative "xref"
|
10
|
+
|
11
|
+
module Rfcxml
|
12
|
+
module V3
|
13
|
+
class Postamble < Lutaml::Model::Serializable
|
14
|
+
attribute :content, :string
|
15
|
+
attribute :cref, Cref, collection: true
|
16
|
+
attribute :eref, Eref, collection: true
|
17
|
+
attribute :iref, Iref, collection: true
|
18
|
+
attribute :spanx, Spanx, collection: true
|
19
|
+
attribute :xref, Xref, collection: true
|
20
|
+
|
21
|
+
xml do
|
22
|
+
root "postamble"
|
23
|
+
|
24
|
+
map_content to: :content
|
25
|
+
map_element "cref", to: :cref
|
26
|
+
map_element "eref", to: :eref
|
27
|
+
map_element "iref", to: :iref
|
28
|
+
map_element "spanx", to: :spanx
|
29
|
+
map_element "xref", to: :xref
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "lutaml/model"
|
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
|
+
module Rfcxml
|
20
|
+
module V3
|
21
|
+
class Preamble < Lutaml::Model::Serializable
|
22
|
+
attribute :content, :string
|
23
|
+
attribute :bcp14, Bcp14, collection: true
|
24
|
+
attribute :cref, Cref, collection: true
|
25
|
+
attribute :em, Em, collection: true
|
26
|
+
attribute :eref, Eref, collection: true
|
27
|
+
attribute :iref, Iref, collection: true
|
28
|
+
attribute :relref, Relref, collection: true
|
29
|
+
attribute :spanx, Spanx, collection: true
|
30
|
+
attribute :strong, Strong, collection: true
|
31
|
+
attribute :sub, Sub, collection: true
|
32
|
+
attribute :sup, Sup, collection: true
|
33
|
+
attribute :tt, Tt, collection: true
|
34
|
+
attribute :u, U, collection: true
|
35
|
+
attribute :xref, Xref, collection: true
|
36
|
+
|
37
|
+
xml do
|
38
|
+
root "preamble"
|
39
|
+
|
40
|
+
map_content to: :content
|
41
|
+
map_element "bcp14", to: :bcp14
|
42
|
+
map_element "cref", to: :cref
|
43
|
+
map_element "em", to: :em
|
44
|
+
map_element "eref", to: :eref
|
45
|
+
map_element "iref", to: :iref
|
46
|
+
map_element "relref", to: :relref
|
47
|
+
map_element "spanx", to: :spanx
|
48
|
+
map_element "strong", to: :strong
|
49
|
+
map_element "sub", to: :sub
|
50
|
+
map_element "sup", to: :sup
|
51
|
+
map_element "tt", to: :tt
|
52
|
+
map_element "u", to: :u
|
53
|
+
map_element "xref", to: :xref
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|