rfcxml 0.2.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.
Files changed (108) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/rake.yml +18 -0
  3. data/.github/workflows/release.yml +25 -0
  4. data/.gitignore +11 -0
  5. data/.rspec +3 -0
  6. data/.rubocop.yml +11 -0
  7. data/.rubocop_todo.yml +20 -0
  8. data/CODE_OF_CONDUCT.md +84 -0
  9. data/Gemfile +12 -0
  10. data/README.adoc +75 -0
  11. data/Rakefile +12 -0
  12. data/bin/console +11 -0
  13. data/bin/setup +8 -0
  14. data/lib/rfcxml/v3/abstract.rb +32 -0
  15. data/lib/rfcxml/v3/address.rb +31 -0
  16. data/lib/rfcxml/v3/annotation.rb +57 -0
  17. data/lib/rfcxml/v3/area.rb +17 -0
  18. data/lib/rfcxml/v3/artset.rb +23 -0
  19. data/lib/rfcxml/v3/artwork.rb +37 -0
  20. data/lib/rfcxml/v3/aside.rb +50 -0
  21. data/lib/rfcxml/v3/author.rb +38 -0
  22. data/lib/rfcxml/v3/back.rb +25 -0
  23. data/lib/rfcxml/v3/bcp14.rb +17 -0
  24. data/lib/rfcxml/v3/blockquote.rb +92 -0
  25. data/lib/rfcxml/v3/boilerplate.rb +19 -0
  26. data/lib/rfcxml/v3/br.rb +13 -0
  27. data/lib/rfcxml/v3/c.rb +33 -0
  28. data/lib/rfcxml/v3/city.rb +19 -0
  29. data/lib/rfcxml/v3/cityarea.rb +19 -0
  30. data/lib/rfcxml/v3/code.rb +19 -0
  31. data/lib/rfcxml/v3/contact.rb +36 -0
  32. data/lib/rfcxml/v3/country.rb +19 -0
  33. data/lib/rfcxml/v3/cref.rb +51 -0
  34. data/lib/rfcxml/v3/date.rb +23 -0
  35. data/lib/rfcxml/v3/dd.rb +92 -0
  36. data/lib/rfcxml/v3/displayreference.rb +19 -0
  37. data/lib/rfcxml/v3/dl.rb +35 -0
  38. data/lib/rfcxml/v3/dt.rb +58 -0
  39. data/lib/rfcxml/v3/em.rb +14 -0
  40. data/lib/rfcxml/v3/email.rb +19 -0
  41. data/lib/rfcxml/v3/eref.rb +21 -0
  42. data/lib/rfcxml/v3/extaddr.rb +19 -0
  43. data/lib/rfcxml/v3/facsimile.rb +17 -0
  44. data/lib/rfcxml/v3/figure.rb +57 -0
  45. data/lib/rfcxml/v3/format.rb +21 -0
  46. data/lib/rfcxml/v3/front.rb +49 -0
  47. data/lib/rfcxml/v3/iref.rb +23 -0
  48. data/lib/rfcxml/v3/keyword.rb +17 -0
  49. data/lib/rfcxml/v3/li.rb +97 -0
  50. data/lib/rfcxml/v3/link.rb +19 -0
  51. data/lib/rfcxml/v3/list.rb +27 -0
  52. data/lib/rfcxml/v3/middle.rb +19 -0
  53. data/lib/rfcxml/v3/name.rb +56 -0
  54. data/lib/rfcxml/v3/note.rb +37 -0
  55. data/lib/rfcxml/v3/ol.rb +33 -0
  56. data/lib/rfcxml/v3/organization.rb +25 -0
  57. data/lib/rfcxml/v3/phone.rb +17 -0
  58. data/lib/rfcxml/v3/pobox.rb +19 -0
  59. data/lib/rfcxml/v3/postal.rb +46 -0
  60. data/lib/rfcxml/v3/postal_line.rb +19 -0
  61. data/lib/rfcxml/v3/postamble.rb +33 -0
  62. data/lib/rfcxml/v3/preamble.rb +57 -0
  63. data/lib/rfcxml/v3/refcontent.rb +28 -0
  64. data/lib/rfcxml/v3/reference.rb +43 -0
  65. data/lib/rfcxml/v3/referencegroup.rb +25 -0
  66. data/lib/rfcxml/v3/references.rb +33 -0
  67. data/lib/rfcxml/v3/region.rb +19 -0
  68. data/lib/rfcxml/v3/relref.rb +29 -0
  69. data/lib/rfcxml/v3/rfc.rb +70 -0
  70. data/lib/rfcxml/v3/section.rb +78 -0
  71. data/lib/rfcxml/v3/series_info.rb +27 -0
  72. data/lib/rfcxml/v3/sortingcode.rb +19 -0
  73. data/lib/rfcxml/v3/sourcecode.rb +31 -0
  74. data/lib/rfcxml/v3/spanx.rb +19 -0
  75. data/lib/rfcxml/v3/street.rb +19 -0
  76. data/lib/rfcxml/v3/strong.rb +43 -0
  77. data/lib/rfcxml/v3/sub.rb +49 -0
  78. data/lib/rfcxml/v3/sup.rb +28 -0
  79. data/lib/rfcxml/v3/table.rb +37 -0
  80. data/lib/rfcxml/v3/tbody.rb +21 -0
  81. data/lib/rfcxml/v3/td.rb +89 -0
  82. data/lib/rfcxml/v3/text.rb +82 -0
  83. data/lib/rfcxml/v3/texttable.rb +41 -0
  84. data/lib/rfcxml/v3/tfoot.rb +21 -0
  85. data/lib/rfcxml/v3/th.rb +14 -0
  86. data/lib/rfcxml/v3/thead.rb +21 -0
  87. data/lib/rfcxml/v3/title.rb +25 -0
  88. data/lib/rfcxml/v3/toc.rb +19 -0
  89. data/lib/rfcxml/v3/tr.rb +24 -0
  90. data/lib/rfcxml/v3/tt.rb +53 -0
  91. data/lib/rfcxml/v3/ttcol.rb +34 -0
  92. data/lib/rfcxml/v3/u.rb +25 -0
  93. data/lib/rfcxml/v3/ul.rb +31 -0
  94. data/lib/rfcxml/v3/uri.rb +17 -0
  95. data/lib/rfcxml/v3/vspace.rb +17 -0
  96. data/lib/rfcxml/v3/workgroup.rb +17 -0
  97. data/lib/rfcxml/v3/xref.rb +41 -0
  98. data/lib/rfcxml/v3/xref_text.rb +30 -0
  99. data/lib/rfcxml/v3.rb +8 -0
  100. data/lib/rfcxml/version.rb +5 -0
  101. data/lib/rfcxml.rb +17 -0
  102. data/reference-docs/v3-modified.rnc +1145 -0
  103. data/reference-docs/v3.rnc +1145 -0
  104. data/reference-docs/v3.xsd +1410 -0
  105. data/reference-docs/xml.xsd +19 -0
  106. data/rfcxml.gemspec +47 -0
  107. data/sig/xml2rfc.rbs +4 -0
  108. metadata +264 -0
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ require_relative "bcp14"
6
+ require_relative "xref_text"
7
+
8
+ module Rfcxml
9
+ module V3
10
+ class Refcontent < Lutaml::Model::Serializable
11
+ attribute :content, :string
12
+ attribute :bcp14, Bcp14, collection: true
13
+ include XrefText
14
+
15
+ xml do
16
+ root "refcontent"
17
+
18
+ map_content to: :content
19
+ map_element "bcp14", to: :bcp14
20
+ map_element "em", to: :em
21
+ map_element "strong", to: :strong
22
+ map_element "sub", to: :sub
23
+ map_element "sup", to: :sup
24
+ map_element "tt", to: :tt
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ require_relative "annotation"
6
+ require_relative "format"
7
+ require_relative "front"
8
+ require_relative "refcontent"
9
+ require_relative "series_info"
10
+
11
+ module Rfcxml
12
+ module V3
13
+ class Reference < Lutaml::Model::Serializable
14
+ attribute :anchor, :string
15
+ attribute :derived_anchor, :string
16
+ attribute :target, :string
17
+ # attribute :quote_title, :string, default: -> { "true" }
18
+ attribute :quote_title, :string
19
+ attribute :stream, :string
20
+ attribute :front, Front
21
+ attribute :annotation, Annotation, collection: true
22
+ attribute :format, Format, collection: true
23
+ attribute :refcontent, Refcontent, collection: true
24
+ attribute :series_info, SeriesInfo, collection: true
25
+
26
+ xml do
27
+ root "reference", mixed: true
28
+
29
+ map_attribute "anchor", to: :anchor
30
+ map_attribute "derivedAnchor", to: :derived_anchor
31
+ map_attribute "target", to: :target
32
+ map_attribute "quoteTitle", to: :quote_title
33
+ # map_attribute "quote-title", to: :quote_title
34
+ map_element "stream", to: :stream
35
+ map_element "front", to: :front
36
+ map_element "annotation", to: :annotation
37
+ map_element "format", to: :format
38
+ map_element "refcontent", to: :refcontent
39
+ map_element "seriesInfo", to: :series_info
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ require_relative "reference"
6
+
7
+ module Rfcxml
8
+ module V3
9
+ class Referencegroup < Lutaml::Model::Serializable
10
+ attribute :anchor, :string
11
+ attribute :derived_anchor, :string
12
+ attribute :target, :string
13
+ attribute :reference, Reference, collection: true
14
+
15
+ xml do
16
+ root "referencegroup"
17
+
18
+ map_attribute "anchor", to: :anchor
19
+ map_attribute "derivedAnchor", to: :derived_anchor
20
+ map_attribute "target", to: :target
21
+ map_element "reference", to: :reference
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ require_relative "name"
6
+ require_relative "reference"
7
+ require_relative "referencegroup"
8
+
9
+ module Rfcxml
10
+ module V3
11
+ class References < Lutaml::Model::Serializable
12
+ attribute :pn, :string
13
+ attribute :anchor, :string
14
+ attribute :title, :string
15
+ attribute :name, Name
16
+ attribute :references, References, collection: true
17
+ attribute :reference, Reference, collection: true
18
+ attribute :referencegroup, Referencegroup, collection: true
19
+
20
+ xml do
21
+ root "references"
22
+
23
+ map_attribute "pn", to: :pn
24
+ map_attribute "anchor", to: :anchor
25
+ map_attribute "title", to: :title
26
+ map_element "name", to: :name
27
+ map_element "references", to: :references
28
+ map_element "reference", to: :reference
29
+ map_element "referencegroup", to: :referencegroup
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ module Rfcxml
6
+ module V3
7
+ class Region < Lutaml::Model::Serializable
8
+ attribute :content, :string
9
+ attribute :ascii, :string
10
+
11
+ xml do
12
+ root "region"
13
+
14
+ map_content to: :content
15
+ map_attribute "ascii", to: :ascii
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ module Rfcxml
6
+ module V3
7
+ class Relref < Lutaml::Model::Serializable
8
+ attribute :content, :string
9
+ attribute :target, :string
10
+ attribute :display_format, :string, default: -> { "of" }
11
+ attribute :derived_content, :string
12
+ attribute :section, :string
13
+ attribute :relative, :string
14
+ attribute :derived_link, :string
15
+
16
+ xml do
17
+ root "relref"
18
+
19
+ map_content to: :content
20
+ map_attribute "target", to: :target
21
+ map_attribute "displayFormat", to: :display_format
22
+ map_attribute "derivedContent", to: :derived_content
23
+ map_attribute "section", to: :section
24
+ map_attribute "relative", to: :relative
25
+ map_attribute "derivedLink", to: :derived_link
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,70 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ require_relative "back"
6
+ require_relative "front"
7
+ require_relative "link"
8
+ require_relative "middle"
9
+
10
+ module Rfcxml
11
+ module V3
12
+ class Rfc < Lutaml::Model::Serializable
13
+ attribute :number, :string
14
+ attribute :obsoletes, :string, default: -> { "" }
15
+ attribute :updates, :string, default: -> { "" }
16
+ attribute :category, :string
17
+ attribute :mode, :string
18
+ attribute :consensus, :string, default: -> { "false" }
19
+ attribute :series_no, :string
20
+ attribute :ipr, :string
21
+ attribute :lang, :string
22
+ attribute :ipr_extract, :string
23
+ attribute :submission_type, :string, default: -> { "IETF" }
24
+ attribute :doc_name, :string
25
+ attribute :sort_refs, :string, default: -> { "false" }
26
+ attribute :sym_refs, :string, default: -> { "true" }
27
+ attribute :toc_include, :string, default: -> { "true" }
28
+ attribute :toc_depth, :string, default: -> { "3" }
29
+ attribute :prep_time, :string
30
+ attribute :index_include, :string, default: -> { "true" }
31
+ attribute :version, :string
32
+ attribute :scripts, :string, default: -> { "Common,Latin" }
33
+ attribute :expires_date, :string
34
+ attribute :link, Link, collection: true
35
+ attribute :front, Front
36
+ attribute :middle, Middle
37
+ attribute :back, Back
38
+
39
+ xml do
40
+ root "rfc"
41
+
42
+ map_attribute "number", to: :number
43
+ map_attribute "obsoletes", to: :obsoletes
44
+ map_attribute "updates", to: :updates
45
+ map_attribute "category", to: :category
46
+ map_attribute "mode", to: :mode
47
+ map_attribute "consensus", to: :consensus
48
+ map_attribute "seriesNo", to: :series_no
49
+ map_attribute "ipr", to: :ipr
50
+ map_attribute "iprExtract", to: :ipr_extract
51
+ map_attribute "submissionType", to: :submission_type
52
+ map_attribute "docName", to: :doc_name
53
+ map_attribute "sortRefs", to: :sort_refs
54
+ map_attribute "symRefs", to: :sym_refs
55
+ map_attribute "tocInclude", to: :toc_include
56
+ map_attribute "tocDepth", to: :toc_depth
57
+ map_attribute "prepTime", to: :prep_time
58
+ map_attribute "indexInclude", to: :index_include
59
+ map_attribute "version", to: :version
60
+ map_attribute "scripts", to: :scripts
61
+ map_attribute "expiresDate", to: :expires_date
62
+ map_attribute "lang", to: :lang, prefix: :xml
63
+ map_element "link", to: :link
64
+ map_element "front", to: :front
65
+ map_element "middle", to: :middle
66
+ map_element "back", to: :back
67
+ end
68
+ end
69
+ end
70
+ end
@@ -0,0 +1,78 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ require_relative "artset"
6
+ require_relative "artwork"
7
+ require_relative "aside"
8
+ require_relative "author"
9
+ require_relative "blockquote"
10
+ require_relative "contact"
11
+ require_relative "dl"
12
+ require_relative "figure"
13
+ require_relative "iref"
14
+ require_relative "name"
15
+ require_relative "ol"
16
+ require_relative "sourcecode"
17
+ require_relative "text"
18
+ require_relative "table"
19
+ require_relative "texttable"
20
+ require_relative "ul"
21
+
22
+ module Rfcxml
23
+ module V3
24
+ class Section < Lutaml::Model::Serializable
25
+ attribute :anchor, :string
26
+ attribute :pn, :string
27
+ attribute :title, :string
28
+ attribute :numbered, :string, default: -> { "true" }
29
+ attribute :toc, :string, default: -> { "default" }
30
+ attribute :remove_in_rfc, :string, default: -> { "false" }
31
+ attribute :name, Name
32
+ attribute :artset, Artset, collection: true
33
+ attribute :artwork, Artwork, collection: true
34
+ attribute :aside, Aside, collection: true
35
+ attribute :author, Author, collection: true
36
+ attribute :blockquote, Blockquote, collection: true
37
+ attribute :contact, Contact, collection: true
38
+ attribute :dl, Dl, collection: true
39
+ attribute :figure, Figure, collection: true
40
+ attribute :iref, Iref, collection: true
41
+ attribute :ol, Ol, collection: true
42
+ attribute :sourcecode, Sourcecode, collection: true
43
+ attribute :t, Text, collection: true
44
+ attribute :table, Table, collection: true
45
+ attribute :texttable, Texttable, collection: true
46
+ attribute :ul, Ul, collection: true
47
+ attribute :section, Section, collection: true
48
+
49
+ xml do
50
+ root "section", mixed: true
51
+
52
+ map_attribute "anchor", to: :anchor
53
+ map_attribute "pn", to: :pn
54
+ map_attribute "title", to: :title
55
+ map_attribute "numbered", to: :numbered
56
+ map_attribute "toc", to: :toc
57
+ map_attribute "removeInRFC", to: :remove_in_rfc
58
+ map_element "name", to: :name
59
+ map_element "artset", to: :artset
60
+ map_element "artwork", to: :artwork
61
+ map_element "aside", to: :aside
62
+ map_element "author", to: :author
63
+ map_element "blockquote", to: :blockquote
64
+ map_element "contact", to: :contact
65
+ map_element "dl", to: :dl
66
+ map_element "figure", to: :figure
67
+ map_element "iref", to: :iref
68
+ map_element "ol", to: :ol
69
+ map_element "sourcecode", to: :sourcecode
70
+ map_element "t", to: :t
71
+ map_element "table", to: :table
72
+ map_element "texttable", to: :texttable
73
+ map_element "ul", to: :ul
74
+ map_element "section", to: :section
75
+ end
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ module Rfcxml
6
+ module V3
7
+ class SeriesInfo < Lutaml::Model::Serializable
8
+ attribute :name, :string
9
+ attribute :value, :string
10
+ attribute :ascii_name, :string
11
+ attribute :ascii_value, :string
12
+ attribute :status, :string
13
+ attribute :stream, :string
14
+
15
+ xml do
16
+ root "seriesInfo"
17
+
18
+ map_attribute "name", to: :name
19
+ map_attribute "value", to: :value
20
+ map_attribute "asciiName", to: :ascii_name
21
+ map_attribute "asciiValue", to: :ascii_value
22
+ map_attribute "status", to: :status
23
+ map_attribute "stream", to: :stream
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ module Rfcxml
6
+ module V3
7
+ class Sortingcode < Lutaml::Model::Serializable
8
+ attribute :content, :string
9
+ attribute :ascii, :string
10
+
11
+ xml do
12
+ root "sortingcode"
13
+
14
+ map_content to: :content
15
+ map_attribute "ascii", to: :ascii
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ module Rfcxml
6
+ module V3
7
+ class Sourcecode < Lutaml::Model::Serializable
8
+ attribute :content, :string
9
+ attribute :anchor, :string
10
+ attribute :pn, :string
11
+ attribute :name, :string, default: -> { "" }
12
+ attribute :type, :string, default: -> { "" }
13
+ attribute :markers, :string, default: -> { "false" }
14
+ attribute :src, :string
15
+ attribute :original_src, :string
16
+
17
+ xml do
18
+ root "sourcecode"
19
+
20
+ map_content to: :content
21
+ map_attribute "anchor", to: :anchor
22
+ map_attribute "pn", to: :pn
23
+ map_attribute "name", to: :name
24
+ map_attribute "type", to: :type
25
+ map_attribute "markers", to: :markers
26
+ map_attribute "src", to: :src
27
+ map_attribute "originalSrc", to: :original_src
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ module Rfcxml
6
+ module V3
7
+ class Spanx < Lutaml::Model::Serializable
8
+ attribute :content, :string
9
+ attribute :style, :string, default: -> { "emph" }
10
+
11
+ xml do
12
+ root "spanx"
13
+
14
+ map_content to: :content
15
+ map_attribute "style", to: :style
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ module Rfcxml
6
+ module V3
7
+ class Street < Lutaml::Model::Serializable
8
+ attribute :content, :string
9
+ attribute :ascii, :string
10
+
11
+ xml do
12
+ root "street"
13
+
14
+ map_content to: :content
15
+ map_attribute "ascii", to: :ascii
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+ require_relative "br"
5
+ require_relative "sup"
6
+
7
+ module Rfcxml
8
+ module V3
9
+ class Strong < Lutaml::Model::Serializable
10
+ attribute :content, :string
11
+ attribute :bcp14, Bcp14, collection: true
12
+ attribute :br, Br, collection: true
13
+ attribute :cref, Cref, collection: true
14
+ attribute :em, Em, collection: true
15
+ attribute :eref, Eref, collection: true
16
+ attribute :iref, Iref, collection: true
17
+ attribute :relref, Relref, collection: true
18
+ attribute :sub, Sub, collection: true
19
+ attribute :sup, Sup, collection: true
20
+ attribute :tt, Tt, collection: true
21
+ attribute :xref, Xref, collection: true
22
+
23
+ xml do
24
+ root "strong"
25
+
26
+ map_content to: :content
27
+ map_element "bcp14", to: :bcp14
28
+ map_element "br", to: :br
29
+ map_element "cref", to: :cref
30
+ map_element "em", to: :em
31
+ map_element "eref", to: :eref
32
+ map_element "iref", to: :iref
33
+ map_element "relref", to: :relref
34
+ map_element "sub", to: :sub
35
+ map_element "sup", to: :sup
36
+ map_element "tt", to: :tt
37
+ map_element "xref", to: :xref
38
+ end
39
+ end
40
+
41
+ class Em < Strong; end
42
+ end
43
+ end
@@ -0,0 +1,49 @@
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 "strong"
12
+ require_relative "tt"
13
+ require_relative "xref"
14
+
15
+ module Rfcxml
16
+ module V3
17
+ class Sub < Lutaml::Model::Serializable
18
+ attribute :content, :string
19
+ attribute :bcp14, Bcp14, collection: true
20
+ attribute :cref, Cref, collection: true
21
+ attribute :em, Em, collection: true
22
+ attribute :eref, Eref, collection: true
23
+ attribute :iref, Iref, collection: true
24
+ attribute :relref, Relref, collection: true
25
+ attribute :strong, Strong, collection: true
26
+ attribute :sub, Sub, collection: true
27
+ attribute :sup, Sup, collection: true
28
+ attribute :tt, Tt, collection: true
29
+ attribute :xref, Xref, collection: true
30
+
31
+ xml do
32
+ root "sub"
33
+
34
+ map_content to: :content
35
+ map_element "bcp14", to: :bcp14
36
+ map_element "cref", to: :cref
37
+ map_element "em", to: :em
38
+ map_element "eref", to: :eref
39
+ map_element "iref", to: :iref
40
+ map_element "relref", to: :relref
41
+ map_element "strong", to: :strong
42
+ map_element "sub", to: :sub
43
+ map_element "sup", to: :sup
44
+ map_element "tt", to: :tt
45
+ map_element "xref", to: :xref
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ require_relative "sub"
6
+
7
+ module Rfcxml
8
+ module V3
9
+ class Sup < Sub
10
+ xml do
11
+ root "sup"
12
+
13
+ map_content to: :content
14
+ map_element "bcp14", to: :bcp14
15
+ map_element "cref", to: :cref
16
+ map_element "em", to: :em
17
+ map_element "eref", to: :eref
18
+ map_element "iref", to: :iref
19
+ map_element "relref", to: :relref
20
+ map_element "strong", to: :strong
21
+ map_element "sub", to: :sub
22
+ map_element "sup", to: :sup
23
+ map_element "tt", to: :tt
24
+ map_element "xref", to: :xref
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ require_relative "iref"
6
+ require_relative "name"
7
+ require_relative "tbody"
8
+ require_relative "tfoot"
9
+ require_relative "thead"
10
+
11
+ module Rfcxml
12
+ module V3
13
+ class Table < Lutaml::Model::Serializable
14
+ attribute :align, :string, default: -> { "center" }
15
+ attribute :anchor, :string
16
+ attribute :pn, :string
17
+ attribute :name, Name
18
+ attribute :iref, Iref, collection: true
19
+ attribute :thead, Thead
20
+ attribute :tbody, Tbody, collection: true
21
+ attribute :tfoot, Tfoot
22
+
23
+ xml do
24
+ root "table"
25
+
26
+ map_attribute "align", to: :align
27
+ map_attribute "anchor", to: :anchor
28
+ map_attribute "pn", to: :pn
29
+ map_element "name", to: :name
30
+ map_element "iref", to: :iref
31
+ map_element "thead", to: :thead
32
+ map_element "tbody", to: :tbody
33
+ map_element "tfoot", to: :tfoot
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ require_relative "tr"
6
+
7
+ module Rfcxml
8
+ module V3
9
+ class Tbody < Lutaml::Model::Serializable
10
+ attribute :anchor, :string
11
+ attribute :tr, Tr, collection: true
12
+
13
+ xml do
14
+ root "tbody"
15
+
16
+ map_attribute "anchor", to: :anchor
17
+ map_element "tr", to: :tr
18
+ end
19
+ end
20
+ end
21
+ end