hyperlang 0.1.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 +7 -0
- data/.github/workflows/rake.yml +19 -0
- data/.github/workflows/release.yml +28 -0
- data/.gitignore +8 -0
- data/.rspec +3 -0
- data/.rubocop.yml +19 -0
- data/.rubocop_todo.yml +45 -0
- data/Gemfile +15 -0
- data/README.adoc +176 -0
- data/Rakefile +12 -0
- data/hyperlang.gemspec +36 -0
- data/lib/hyperlang/version.rb +5 -0
- data/lib/hyperlang/xhtml/a.rb +44 -0
- data/lib/hyperlang/xhtml/abbr.rb +22 -0
- data/lib/hyperlang/xhtml/acronym.rb +22 -0
- data/lib/hyperlang/xhtml/address.rb +26 -0
- data/lib/hyperlang/xhtml/applet.rb +42 -0
- data/lib/hyperlang/xhtml/area.rb +29 -0
- data/lib/hyperlang/xhtml/b.rb +22 -0
- data/lib/hyperlang/xhtml/base.rb +17 -0
- data/lib/hyperlang/xhtml/basefont.rb +21 -0
- data/lib/hyperlang/xhtml/bdo.rb +22 -0
- data/lib/hyperlang/xhtml/big.rb +22 -0
- data/lib/hyperlang/xhtml/blockquote.rb +44 -0
- data/lib/hyperlang/xhtml/body.rb +54 -0
- data/lib/hyperlang/xhtml/br.rb +12 -0
- data/lib/hyperlang/xhtml/button.rb +42 -0
- data/lib/hyperlang/xhtml/caption.rb +20 -0
- data/lib/hyperlang/xhtml/center.rb +48 -0
- data/lib/hyperlang/xhtml/cite.rb +20 -0
- data/lib/hyperlang/xhtml/code.rb +22 -0
- data/lib/hyperlang/xhtml/col.rb +29 -0
- data/lib/hyperlang/xhtml/colgroup.rb +31 -0
- data/lib/hyperlang/xhtml/dd.rb +40 -0
- data/lib/hyperlang/xhtml/del.rb +38 -0
- data/lib/hyperlang/xhtml/dfn.rb +20 -0
- data/lib/hyperlang/xhtml/dir.rb +21 -0
- data/lib/hyperlang/xhtml/div.rb +64 -0
- data/lib/hyperlang/xhtml/dl.rb +21 -0
- data/lib/hyperlang/xhtml/dt.rb +30 -0
- data/lib/hyperlang/xhtml/em.rb +22 -0
- data/lib/hyperlang/xhtml/fieldset.rb +34 -0
- data/lib/hyperlang/xhtml/font.rb +26 -0
- data/lib/hyperlang/xhtml/form.rb +40 -0
- data/lib/hyperlang/xhtml/frame.rb +31 -0
- data/lib/hyperlang/xhtml/frameset.rb +25 -0
- data/lib/hyperlang/xhtml/h1.rb +34 -0
- data/lib/hyperlang/xhtml/h2.rb +34 -0
- data/lib/hyperlang/xhtml/h3.rb +34 -0
- data/lib/hyperlang/xhtml/h4.rb +34 -0
- data/lib/hyperlang/xhtml/h5.rb +34 -0
- data/lib/hyperlang/xhtml/h6.rb +34 -0
- data/lib/hyperlang/xhtml/head.rb +27 -0
- data/lib/hyperlang/xhtml/hr.rb +17 -0
- data/lib/hyperlang/xhtml/html.rb +17 -0
- data/lib/hyperlang/xhtml/i.rb +22 -0
- data/lib/hyperlang/xhtml/iframe.rb +40 -0
- data/lib/hyperlang/xhtml/img.rb +35 -0
- data/lib/hyperlang/xhtml/input.rb +55 -0
- data/lib/hyperlang/xhtml/ins.rb +38 -0
- data/lib/hyperlang/xhtml/isindex.rb +19 -0
- data/lib/hyperlang/xhtml/kbd.rb +20 -0
- data/lib/hyperlang/xhtml/label.rb +24 -0
- data/lib/hyperlang/xhtml/legend.rb +22 -0
- data/lib/hyperlang/xhtml/li.rb +42 -0
- data/lib/hyperlang/xhtml/link.rb +31 -0
- data/lib/hyperlang/xhtml/map.rb +35 -0
- data/lib/hyperlang/xhtml/menu.rb +21 -0
- data/lib/hyperlang/xhtml/meta.rb +23 -0
- data/lib/hyperlang/xhtml/namespace.rb +10 -0
- data/lib/hyperlang/xhtml/noframes.rb +46 -0
- data/lib/hyperlang/xhtml/noscript.rb +42 -0
- data/lib/hyperlang/xhtml/object.rb +48 -0
- data/lib/hyperlang/xhtml/ol.rb +25 -0
- data/lib/hyperlang/xhtml/optgroup.rb +23 -0
- data/lib/hyperlang/xhtml/option.rb +25 -0
- data/lib/hyperlang/xhtml/p.rb +36 -0
- data/lib/hyperlang/xhtml/param.rb +23 -0
- data/lib/hyperlang/xhtml/pre.rb +32 -0
- data/lib/hyperlang/xhtml/q.rb +22 -0
- data/lib/hyperlang/xhtml/rb.rb +20 -0
- data/lib/hyperlang/xhtml/rbc.rb +19 -0
- data/lib/hyperlang/xhtml/rp.rb +19 -0
- data/lib/hyperlang/xhtml/rt.rb +22 -0
- data/lib/hyperlang/xhtml/rtc.rb +23 -0
- data/lib/hyperlang/xhtml/ruby.rb +27 -0
- data/lib/hyperlang/xhtml/s.rb +20 -0
- data/lib/hyperlang/xhtml/samp.rb +20 -0
- data/lib/hyperlang/xhtml/script.rb +25 -0
- data/lib/hyperlang/xhtml/select.rb +37 -0
- data/lib/hyperlang/xhtml/small.rb +22 -0
- data/lib/hyperlang/xhtml/span.rb +24 -0
- data/lib/hyperlang/xhtml/strike.rb +20 -0
- data/lib/hyperlang/xhtml/strong.rb +22 -0
- data/lib/hyperlang/xhtml/style.rb +23 -0
- data/lib/hyperlang/xhtml/sub.rb +20 -0
- data/lib/hyperlang/xhtml/sup.rb +20 -0
- data/lib/hyperlang/xhtml/table.rb +43 -0
- data/lib/hyperlang/xhtml/tbody.rb +27 -0
- data/lib/hyperlang/xhtml/td.rb +42 -0
- data/lib/hyperlang/xhtml/textarea.rb +41 -0
- data/lib/hyperlang/xhtml/tfoot.rb +27 -0
- data/lib/hyperlang/xhtml/th.rb +42 -0
- data/lib/hyperlang/xhtml/thead.rb +27 -0
- data/lib/hyperlang/xhtml/title.rb +15 -0
- data/lib/hyperlang/xhtml/tr.rb +29 -0
- data/lib/hyperlang/xhtml/tt.rb +20 -0
- data/lib/hyperlang/xhtml/u.rb +20 -0
- data/lib/hyperlang/xhtml/ul.rb +23 -0
- data/lib/hyperlang/xhtml/var.rb +20 -0
- data/lib/hyperlang/xhtml/xhtml.rb +147 -0
- data/lib/hyperlang.rb +16 -0
- data/spec/hyperlang/round_trip_spec.rb +86 -0
- data/spec/hyperlang/xhtml/block_spec.rb +56 -0
- data/spec/hyperlang/xhtml/inline_spec.rb +60 -0
- data/spec/spec_helper.rb +17 -0
- metadata +173 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Hyperlang
|
|
4
|
+
module Xhtml
|
|
5
|
+
class Form < Lutaml::Model::Serializable
|
|
6
|
+
attribute :content, :string
|
|
7
|
+
# fieldset omitted: creates circular dependency form↔fieldset
|
|
8
|
+
attribute :p, Hyperlang::Xhtml::P, collection: true
|
|
9
|
+
attribute :div, Hyperlang::Xhtml::Div, collection: true
|
|
10
|
+
attribute :action, :string
|
|
11
|
+
attribute :method, :string
|
|
12
|
+
attribute :enctype, :string
|
|
13
|
+
attribute :accept_charset, :string
|
|
14
|
+
attribute :accept, :string
|
|
15
|
+
attribute :onsubmit, :string
|
|
16
|
+
attribute :onreset, :string
|
|
17
|
+
attribute :id, :string
|
|
18
|
+
attribute :klass, :string
|
|
19
|
+
|
|
20
|
+
xml do
|
|
21
|
+
element "form"
|
|
22
|
+
namespace Hyperlang::Xhtml::Namespace
|
|
23
|
+
mixed_content
|
|
24
|
+
map_content to: :content
|
|
25
|
+
# fieldset omitted: creates circular form↔fieldset
|
|
26
|
+
map_element "p", to: :p
|
|
27
|
+
map_element "div", to: :div
|
|
28
|
+
map_attribute "action", to: :action
|
|
29
|
+
map_attribute "method", to: :method
|
|
30
|
+
map_attribute "enctype", to: :enctype
|
|
31
|
+
map_attribute "accept-charset", to: :accept_charset
|
|
32
|
+
map_attribute "accept", to: :accept
|
|
33
|
+
map_attribute "onsubmit", to: :onsubmit
|
|
34
|
+
map_attribute "onreset", to: :onreset
|
|
35
|
+
map_attribute "id", to: :id
|
|
36
|
+
map_attribute "class", to: :klass
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Hyperlang
|
|
4
|
+
module Xhtml
|
|
5
|
+
class Frame < Lutaml::Model::Serializable
|
|
6
|
+
attribute :longdesc, :string
|
|
7
|
+
attribute :name, :string
|
|
8
|
+
attribute :src, :string
|
|
9
|
+
attribute :frameborder, :string
|
|
10
|
+
attribute :marginwidth, :string
|
|
11
|
+
attribute :marginheight, :string
|
|
12
|
+
attribute :noresize, :string
|
|
13
|
+
attribute :scrolling, :string
|
|
14
|
+
attribute :id, :string
|
|
15
|
+
|
|
16
|
+
xml do
|
|
17
|
+
element "frame"
|
|
18
|
+
namespace Hyperlang::Xhtml::Namespace
|
|
19
|
+
map_attribute "longdesc", to: :longdesc
|
|
20
|
+
map_attribute "name", to: :name
|
|
21
|
+
map_attribute "src", to: :src
|
|
22
|
+
map_attribute "frameborder", to: :frameborder
|
|
23
|
+
map_attribute "marginwidth", to: :marginwidth
|
|
24
|
+
map_attribute "marginheight", to: :marginheight
|
|
25
|
+
map_attribute "noresize", to: :noresize
|
|
26
|
+
map_attribute "scrolling", to: :scrolling
|
|
27
|
+
map_attribute "id", to: :id
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Hyperlang
|
|
4
|
+
module Xhtml
|
|
5
|
+
class Frameset < Lutaml::Model::Serializable
|
|
6
|
+
attribute :frame, Hyperlang::Xhtml::Frame, collection: true
|
|
7
|
+
# nested frameset omitted: self-reference creates circular dependency
|
|
8
|
+
attribute :noframes, Hyperlang::Xhtml::Noframes
|
|
9
|
+
attribute :rows, :string
|
|
10
|
+
attribute :cols, :string
|
|
11
|
+
attribute :id, :string
|
|
12
|
+
|
|
13
|
+
xml do
|
|
14
|
+
element "frameset"
|
|
15
|
+
namespace Hyperlang::Xhtml::Namespace
|
|
16
|
+
map_element "frame", to: :frame
|
|
17
|
+
# nested frameset omitted: self-reference creates circular dependency
|
|
18
|
+
map_element "noframes", to: :noframes
|
|
19
|
+
map_attribute "rows", to: :rows
|
|
20
|
+
map_attribute "cols", to: :cols
|
|
21
|
+
map_attribute "id", to: :id
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Hyperlang
|
|
4
|
+
module Xhtml
|
|
5
|
+
class H1 < Lutaml::Model::Serializable
|
|
6
|
+
attribute :content, :string
|
|
7
|
+
attribute :span, Hyperlang::Xhtml::Span, collection: true
|
|
8
|
+
attribute :a, Hyperlang::Xhtml::A, collection: true
|
|
9
|
+
attribute :strong, Hyperlang::Xhtml::Strong, collection: true
|
|
10
|
+
attribute :em, Hyperlang::Xhtml::Em, collection: true
|
|
11
|
+
attribute :br, Hyperlang::Xhtml::Br, collection: true
|
|
12
|
+
attribute :img, Hyperlang::Xhtml::Img, collection: true
|
|
13
|
+
attribute :klass, :string
|
|
14
|
+
attribute :style, :string
|
|
15
|
+
attribute :id, :string
|
|
16
|
+
|
|
17
|
+
xml do
|
|
18
|
+
element "h1"
|
|
19
|
+
namespace Hyperlang::Xhtml::Namespace
|
|
20
|
+
mixed_content
|
|
21
|
+
map_content to: :content
|
|
22
|
+
map_element "span", to: :span
|
|
23
|
+
map_element "a", to: :a
|
|
24
|
+
map_element "strong", to: :strong
|
|
25
|
+
map_element "em", to: :em
|
|
26
|
+
map_element "br", to: :br
|
|
27
|
+
map_element "img", to: :img
|
|
28
|
+
map_attribute "class", to: :klass
|
|
29
|
+
map_attribute "style", to: :style
|
|
30
|
+
map_attribute "id", to: :id
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Hyperlang
|
|
4
|
+
module Xhtml
|
|
5
|
+
class H2 < Lutaml::Model::Serializable
|
|
6
|
+
attribute :content, :string
|
|
7
|
+
attribute :span, Hyperlang::Xhtml::Span, collection: true
|
|
8
|
+
attribute :a, Hyperlang::Xhtml::A, collection: true
|
|
9
|
+
attribute :strong, Hyperlang::Xhtml::Strong, collection: true
|
|
10
|
+
attribute :em, Hyperlang::Xhtml::Em, collection: true
|
|
11
|
+
attribute :br, Hyperlang::Xhtml::Br, collection: true
|
|
12
|
+
attribute :img, Hyperlang::Xhtml::Img, collection: true
|
|
13
|
+
attribute :klass, :string
|
|
14
|
+
attribute :style, :string
|
|
15
|
+
attribute :id, :string
|
|
16
|
+
|
|
17
|
+
xml do
|
|
18
|
+
element "h2"
|
|
19
|
+
namespace Hyperlang::Xhtml::Namespace
|
|
20
|
+
mixed_content
|
|
21
|
+
map_content to: :content
|
|
22
|
+
map_element "span", to: :span
|
|
23
|
+
map_element "a", to: :a
|
|
24
|
+
map_element "strong", to: :strong
|
|
25
|
+
map_element "em", to: :em
|
|
26
|
+
map_element "br", to: :br
|
|
27
|
+
map_element "img", to: :img
|
|
28
|
+
map_attribute "class", to: :klass
|
|
29
|
+
map_attribute "style", to: :style
|
|
30
|
+
map_attribute "id", to: :id
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Hyperlang
|
|
4
|
+
module Xhtml
|
|
5
|
+
class H3 < Lutaml::Model::Serializable
|
|
6
|
+
attribute :content, :string
|
|
7
|
+
attribute :span, Hyperlang::Xhtml::Span, collection: true
|
|
8
|
+
attribute :a, Hyperlang::Xhtml::A, collection: true
|
|
9
|
+
attribute :strong, Hyperlang::Xhtml::Strong, collection: true
|
|
10
|
+
attribute :em, Hyperlang::Xhtml::Em, collection: true
|
|
11
|
+
attribute :br, Hyperlang::Xhtml::Br, collection: true
|
|
12
|
+
attribute :img, Hyperlang::Xhtml::Img, collection: true
|
|
13
|
+
attribute :klass, :string
|
|
14
|
+
attribute :style, :string
|
|
15
|
+
attribute :id, :string
|
|
16
|
+
|
|
17
|
+
xml do
|
|
18
|
+
element "h3"
|
|
19
|
+
namespace Hyperlang::Xhtml::Namespace
|
|
20
|
+
mixed_content
|
|
21
|
+
map_content to: :content
|
|
22
|
+
map_element "span", to: :span
|
|
23
|
+
map_element "a", to: :a
|
|
24
|
+
map_element "strong", to: :strong
|
|
25
|
+
map_element "em", to: :em
|
|
26
|
+
map_element "br", to: :br
|
|
27
|
+
map_element "img", to: :img
|
|
28
|
+
map_attribute "class", to: :klass
|
|
29
|
+
map_attribute "style", to: :style
|
|
30
|
+
map_attribute "id", to: :id
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Hyperlang
|
|
4
|
+
module Xhtml
|
|
5
|
+
class H4 < Lutaml::Model::Serializable
|
|
6
|
+
attribute :content, :string
|
|
7
|
+
attribute :span, Hyperlang::Xhtml::Span, collection: true
|
|
8
|
+
attribute :a, Hyperlang::Xhtml::A, collection: true
|
|
9
|
+
attribute :strong, Hyperlang::Xhtml::Strong, collection: true
|
|
10
|
+
attribute :em, Hyperlang::Xhtml::Em, collection: true
|
|
11
|
+
attribute :br, Hyperlang::Xhtml::Br, collection: true
|
|
12
|
+
attribute :img, Hyperlang::Xhtml::Img, collection: true
|
|
13
|
+
attribute :klass, :string
|
|
14
|
+
attribute :style, :string
|
|
15
|
+
attribute :id, :string
|
|
16
|
+
|
|
17
|
+
xml do
|
|
18
|
+
element "h4"
|
|
19
|
+
namespace Hyperlang::Xhtml::Namespace
|
|
20
|
+
mixed_content
|
|
21
|
+
map_content to: :content
|
|
22
|
+
map_element "span", to: :span
|
|
23
|
+
map_element "a", to: :a
|
|
24
|
+
map_element "strong", to: :strong
|
|
25
|
+
map_element "em", to: :em
|
|
26
|
+
map_element "br", to: :br
|
|
27
|
+
map_element "img", to: :img
|
|
28
|
+
map_attribute "class", to: :klass
|
|
29
|
+
map_attribute "style", to: :style
|
|
30
|
+
map_attribute "id", to: :id
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Hyperlang
|
|
4
|
+
module Xhtml
|
|
5
|
+
class H5 < Lutaml::Model::Serializable
|
|
6
|
+
attribute :content, :string
|
|
7
|
+
attribute :span, Hyperlang::Xhtml::Span, collection: true
|
|
8
|
+
attribute :a, Hyperlang::Xhtml::A, collection: true
|
|
9
|
+
attribute :strong, Hyperlang::Xhtml::Strong, collection: true
|
|
10
|
+
attribute :em, Hyperlang::Xhtml::Em, collection: true
|
|
11
|
+
attribute :br, Hyperlang::Xhtml::Br, collection: true
|
|
12
|
+
attribute :img, Hyperlang::Xhtml::Img, collection: true
|
|
13
|
+
attribute :klass, :string
|
|
14
|
+
attribute :style, :string
|
|
15
|
+
attribute :id, :string
|
|
16
|
+
|
|
17
|
+
xml do
|
|
18
|
+
element "h5"
|
|
19
|
+
namespace Hyperlang::Xhtml::Namespace
|
|
20
|
+
mixed_content
|
|
21
|
+
map_content to: :content
|
|
22
|
+
map_element "span", to: :span
|
|
23
|
+
map_element "a", to: :a
|
|
24
|
+
map_element "strong", to: :strong
|
|
25
|
+
map_element "em", to: :em
|
|
26
|
+
map_element "br", to: :br
|
|
27
|
+
map_element "img", to: :img
|
|
28
|
+
map_attribute "class", to: :klass
|
|
29
|
+
map_attribute "style", to: :style
|
|
30
|
+
map_attribute "id", to: :id
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Hyperlang
|
|
4
|
+
module Xhtml
|
|
5
|
+
class H6 < Lutaml::Model::Serializable
|
|
6
|
+
attribute :content, :string
|
|
7
|
+
attribute :span, Hyperlang::Xhtml::Span, collection: true
|
|
8
|
+
attribute :a, Hyperlang::Xhtml::A, collection: true
|
|
9
|
+
attribute :strong, Hyperlang::Xhtml::Strong, collection: true
|
|
10
|
+
attribute :em, Hyperlang::Xhtml::Em, collection: true
|
|
11
|
+
attribute :br, Hyperlang::Xhtml::Br, collection: true
|
|
12
|
+
attribute :img, Hyperlang::Xhtml::Img, collection: true
|
|
13
|
+
attribute :klass, :string
|
|
14
|
+
attribute :style, :string
|
|
15
|
+
attribute :id, :string
|
|
16
|
+
|
|
17
|
+
xml do
|
|
18
|
+
element "h6"
|
|
19
|
+
namespace Hyperlang::Xhtml::Namespace
|
|
20
|
+
mixed_content
|
|
21
|
+
map_content to: :content
|
|
22
|
+
map_element "span", to: :span
|
|
23
|
+
map_element "a", to: :a
|
|
24
|
+
map_element "strong", to: :strong
|
|
25
|
+
map_element "em", to: :em
|
|
26
|
+
map_element "br", to: :br
|
|
27
|
+
map_element "img", to: :img
|
|
28
|
+
map_attribute "class", to: :klass
|
|
29
|
+
map_attribute "style", to: :style
|
|
30
|
+
map_attribute "id", to: :id
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Hyperlang
|
|
4
|
+
module Xhtml
|
|
5
|
+
class Head < Lutaml::Model::Serializable
|
|
6
|
+
attribute :title, Hyperlang::Xhtml::Title
|
|
7
|
+
attribute :meta, Hyperlang::Xhtml::Meta, collection: true
|
|
8
|
+
attribute :link, Hyperlang::Xhtml::Link, collection: true
|
|
9
|
+
attribute :style, Hyperlang::Xhtml::Style, collection: true
|
|
10
|
+
attribute :script, Hyperlang::Xhtml::Script, collection: true
|
|
11
|
+
attribute :base, Hyperlang::Xhtml::Base
|
|
12
|
+
attribute :profile, :string
|
|
13
|
+
|
|
14
|
+
xml do
|
|
15
|
+
element "head"
|
|
16
|
+
namespace Hyperlang::Xhtml::Namespace
|
|
17
|
+
map_element "title", to: :title
|
|
18
|
+
map_element "meta", to: :meta
|
|
19
|
+
map_element "link", to: :link
|
|
20
|
+
map_element "style", to: :style
|
|
21
|
+
map_element "script", to: :script
|
|
22
|
+
map_element "base", to: :base
|
|
23
|
+
map_attribute "profile", to: :profile
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Hyperlang
|
|
4
|
+
module Xhtml
|
|
5
|
+
class Hr < Lutaml::Model::Serializable
|
|
6
|
+
attribute :id, :string
|
|
7
|
+
attribute :klass, :string
|
|
8
|
+
|
|
9
|
+
xml do
|
|
10
|
+
element "hr"
|
|
11
|
+
namespace Hyperlang::Xhtml::Namespace
|
|
12
|
+
map_attribute "id", to: :id
|
|
13
|
+
map_attribute "class", to: :klass
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Hyperlang
|
|
4
|
+
module Xhtml
|
|
5
|
+
class Html < Lutaml::Model::Serializable
|
|
6
|
+
attribute :head, Hyperlang::Xhtml::Head
|
|
7
|
+
attribute :body, Hyperlang::Xhtml::Body
|
|
8
|
+
|
|
9
|
+
xml do
|
|
10
|
+
element "html"
|
|
11
|
+
namespace Hyperlang::Xhtml::Namespace
|
|
12
|
+
map_element "head", to: :head
|
|
13
|
+
map_element "body", to: :body
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Hyperlang
|
|
4
|
+
module Xhtml
|
|
5
|
+
class I < Lutaml::Model::Serializable
|
|
6
|
+
attribute :content, :string
|
|
7
|
+
attribute :id, :string
|
|
8
|
+
attribute :klass, :string
|
|
9
|
+
attribute :style, :string
|
|
10
|
+
|
|
11
|
+
xml do
|
|
12
|
+
element "i"
|
|
13
|
+
namespace Hyperlang::Xhtml::Namespace
|
|
14
|
+
mixed_content
|
|
15
|
+
map_content to: :content
|
|
16
|
+
map_attribute "id", to: :id
|
|
17
|
+
map_attribute "class", to: :klass
|
|
18
|
+
map_attribute "style", to: :style
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Hyperlang
|
|
4
|
+
module Xhtml
|
|
5
|
+
class Iframe < Lutaml::Model::Serializable
|
|
6
|
+
attribute :content, :string
|
|
7
|
+
attribute :longdesc, :string
|
|
8
|
+
attribute :name, :string
|
|
9
|
+
attribute :src, :string
|
|
10
|
+
attribute :frameborder, :string
|
|
11
|
+
attribute :marginwidth, :string
|
|
12
|
+
attribute :marginheight, :string
|
|
13
|
+
attribute :scrolling, :string
|
|
14
|
+
attribute :align, :string
|
|
15
|
+
attribute :height, :string
|
|
16
|
+
attribute :width, :string
|
|
17
|
+
attribute :id, :string
|
|
18
|
+
attribute :klass, :string
|
|
19
|
+
|
|
20
|
+
xml do
|
|
21
|
+
element "iframe"
|
|
22
|
+
namespace Hyperlang::Xhtml::Namespace
|
|
23
|
+
mixed_content
|
|
24
|
+
map_content to: :content
|
|
25
|
+
map_attribute "longdesc", to: :longdesc
|
|
26
|
+
map_attribute "name", to: :name
|
|
27
|
+
map_attribute "src", to: :src
|
|
28
|
+
map_attribute "frameborder", to: :frameborder
|
|
29
|
+
map_attribute "marginwidth", to: :marginwidth
|
|
30
|
+
map_attribute "marginheight", to: :marginheight
|
|
31
|
+
map_attribute "scrolling", to: :scrolling
|
|
32
|
+
map_attribute "align", to: :align
|
|
33
|
+
map_attribute "height", to: :height
|
|
34
|
+
map_attribute "width", to: :width
|
|
35
|
+
map_attribute "id", to: :id
|
|
36
|
+
map_attribute "class", to: :klass
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Hyperlang
|
|
4
|
+
module Xhtml
|
|
5
|
+
class Img < Lutaml::Model::Serializable
|
|
6
|
+
attribute :src, :string
|
|
7
|
+
attribute :alt, :string
|
|
8
|
+
attribute :longdesc, :string
|
|
9
|
+
attribute :height, :string
|
|
10
|
+
attribute :width, :string
|
|
11
|
+
attribute :usemap, :string
|
|
12
|
+
attribute :ismap, :string
|
|
13
|
+
attribute :id, :string
|
|
14
|
+
attribute :klass, :string
|
|
15
|
+
attribute :style, :string
|
|
16
|
+
attribute :title, :string
|
|
17
|
+
|
|
18
|
+
xml do
|
|
19
|
+
element "img"
|
|
20
|
+
namespace Hyperlang::Xhtml::Namespace
|
|
21
|
+
map_attribute "src", to: :src
|
|
22
|
+
map_attribute "alt", to: :alt
|
|
23
|
+
map_attribute "longdesc", to: :longdesc
|
|
24
|
+
map_attribute "height", to: :height
|
|
25
|
+
map_attribute "width", to: :width
|
|
26
|
+
map_attribute "usemap", to: :usemap
|
|
27
|
+
map_attribute "ismap", to: :ismap
|
|
28
|
+
map_attribute "id", to: :id
|
|
29
|
+
map_attribute "class", to: :klass
|
|
30
|
+
map_attribute "style", to: :style
|
|
31
|
+
map_attribute "title", to: :title
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Hyperlang
|
|
4
|
+
module Xhtml
|
|
5
|
+
class Input < Lutaml::Model::Serializable
|
|
6
|
+
attribute :type, :string
|
|
7
|
+
attribute :name, :string
|
|
8
|
+
attribute :value, :string
|
|
9
|
+
attribute :checked, :string
|
|
10
|
+
attribute :disabled, :string
|
|
11
|
+
attribute :readonly, :string
|
|
12
|
+
attribute :size, :integer
|
|
13
|
+
attribute :maxlength, :integer
|
|
14
|
+
attribute :src, :string
|
|
15
|
+
attribute :alt, :string
|
|
16
|
+
attribute :usemap, :string
|
|
17
|
+
attribute :ismap, :string
|
|
18
|
+
attribute :tabindex, :integer
|
|
19
|
+
attribute :accesskey, :string
|
|
20
|
+
attribute :accept, :string
|
|
21
|
+
attribute :onfocus, :string
|
|
22
|
+
attribute :onblur, :string
|
|
23
|
+
attribute :onselect, :string
|
|
24
|
+
attribute :onchange, :string
|
|
25
|
+
attribute :id, :string
|
|
26
|
+
attribute :klass, :string
|
|
27
|
+
|
|
28
|
+
xml do
|
|
29
|
+
element "input"
|
|
30
|
+
namespace Hyperlang::Xhtml::Namespace
|
|
31
|
+
map_attribute "type", to: :type
|
|
32
|
+
map_attribute "name", to: :name
|
|
33
|
+
map_attribute "value", to: :value
|
|
34
|
+
map_attribute "checked", to: :checked
|
|
35
|
+
map_attribute "disabled", to: :disabled
|
|
36
|
+
map_attribute "readonly", to: :readonly
|
|
37
|
+
map_attribute "size", to: :size
|
|
38
|
+
map_attribute "maxlength", to: :maxlength
|
|
39
|
+
map_attribute "src", to: :src
|
|
40
|
+
map_attribute "alt", to: :alt
|
|
41
|
+
map_attribute "usemap", to: :usemap
|
|
42
|
+
map_attribute "ismap", to: :ismap
|
|
43
|
+
map_attribute "tabindex", to: :tabindex
|
|
44
|
+
map_attribute "accesskey", to: :accesskey
|
|
45
|
+
map_attribute "accept", to: :accept
|
|
46
|
+
map_attribute "onfocus", to: :onfocus
|
|
47
|
+
map_attribute "onblur", to: :onblur
|
|
48
|
+
map_attribute "onselect", to: :onselect
|
|
49
|
+
map_attribute "onchange", to: :onchange
|
|
50
|
+
map_attribute "id", to: :id
|
|
51
|
+
map_attribute "class", to: :klass
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Hyperlang
|
|
4
|
+
module Xhtml
|
|
5
|
+
class Ins < Lutaml::Model::Serializable
|
|
6
|
+
attribute :content, :string
|
|
7
|
+
attribute :cite, :string
|
|
8
|
+
attribute :datetime, :string
|
|
9
|
+
attribute :p, Hyperlang::Xhtml::P, collection: true
|
|
10
|
+
attribute :div, Hyperlang::Xhtml::Div, collection: true
|
|
11
|
+
attribute :ul, Hyperlang::Xhtml::Ul, collection: true
|
|
12
|
+
attribute :ol, Hyperlang::Xhtml::Ol, collection: true
|
|
13
|
+
attribute :li, Hyperlang::Xhtml::Li, collection: true
|
|
14
|
+
attribute :span, Hyperlang::Xhtml::Span, collection: true
|
|
15
|
+
attribute :a, Hyperlang::Xhtml::A, collection: true
|
|
16
|
+
attribute :id, :string
|
|
17
|
+
attribute :klass, :string
|
|
18
|
+
|
|
19
|
+
xml do
|
|
20
|
+
element "ins"
|
|
21
|
+
namespace Hyperlang::Xhtml::Namespace
|
|
22
|
+
mixed_content
|
|
23
|
+
map_content to: :content
|
|
24
|
+
map_attribute "cite", to: :cite
|
|
25
|
+
map_attribute "datetime", to: :datetime
|
|
26
|
+
map_element "p", to: :p
|
|
27
|
+
map_element "div", to: :div
|
|
28
|
+
map_element "ul", to: :ul
|
|
29
|
+
map_element "ol", to: :ol
|
|
30
|
+
map_element "li", to: :li
|
|
31
|
+
map_element "span", to: :span
|
|
32
|
+
map_element "a", to: :a
|
|
33
|
+
map_attribute "id", to: :id
|
|
34
|
+
map_attribute "class", to: :klass
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Hyperlang
|
|
4
|
+
module Xhtml
|
|
5
|
+
class Isindex < Lutaml::Model::Serializable
|
|
6
|
+
attribute :prompt, :string
|
|
7
|
+
attribute :action, :string
|
|
8
|
+
attribute :id, :string
|
|
9
|
+
|
|
10
|
+
xml do
|
|
11
|
+
element "isindex"
|
|
12
|
+
namespace Hyperlang::Xhtml::Namespace
|
|
13
|
+
map_attribute "prompt", to: :prompt
|
|
14
|
+
map_attribute "action", to: :action
|
|
15
|
+
map_attribute "id", to: :id
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Hyperlang
|
|
4
|
+
module Xhtml
|
|
5
|
+
class Kbd < Lutaml::Model::Serializable
|
|
6
|
+
attribute :content, :string
|
|
7
|
+
attribute :id, :string
|
|
8
|
+
attribute :klass, :string
|
|
9
|
+
|
|
10
|
+
xml do
|
|
11
|
+
element "kbd"
|
|
12
|
+
namespace Hyperlang::Xhtml::Namespace
|
|
13
|
+
mixed_content
|
|
14
|
+
map_content to: :content
|
|
15
|
+
map_attribute "id", to: :id
|
|
16
|
+
map_attribute "class", to: :klass
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Hyperlang
|
|
4
|
+
module Xhtml
|
|
5
|
+
class Label < Lutaml::Model::Serializable
|
|
6
|
+
attribute :content, :string
|
|
7
|
+
attribute :for, :string
|
|
8
|
+
attribute :accesskey, :string
|
|
9
|
+
attribute :id, :string
|
|
10
|
+
attribute :klass, :string
|
|
11
|
+
|
|
12
|
+
xml do
|
|
13
|
+
element "label"
|
|
14
|
+
namespace Hyperlang::Xhtml::Namespace
|
|
15
|
+
mixed_content
|
|
16
|
+
map_content to: :content
|
|
17
|
+
map_attribute "for", to: :for
|
|
18
|
+
map_attribute "accesskey", to: :accesskey
|
|
19
|
+
map_attribute "id", to: :id
|
|
20
|
+
map_attribute "class", to: :klass
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Hyperlang
|
|
4
|
+
module Xhtml
|
|
5
|
+
class Legend < Lutaml::Model::Serializable
|
|
6
|
+
attribute :content, :string
|
|
7
|
+
attribute :accesskey, :string
|
|
8
|
+
attribute :id, :string
|
|
9
|
+
attribute :klass, :string
|
|
10
|
+
|
|
11
|
+
xml do
|
|
12
|
+
element "legend"
|
|
13
|
+
namespace Hyperlang::Xhtml::Namespace
|
|
14
|
+
mixed_content
|
|
15
|
+
map_content to: :content
|
|
16
|
+
map_attribute "accesskey", to: :accesskey
|
|
17
|
+
map_attribute "id", to: :id
|
|
18
|
+
map_attribute "class", to: :klass
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|