meteor 0.9.12 → 0.9.14

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3102e1f48f286368f2a764f81d5d32c0d7599891e46d6404a15ec615f84df774
4
- data.tar.gz: 9511b466cef335dbfaba6522c466c6196283f00483a3877a188f322ecefdbce5
3
+ metadata.gz: 5edd4d31b61edd52eee6adb3f61784e54140d28216ada36e7ce2b0f66e02b0c1
4
+ data.tar.gz: a5e1729d16467baf211cd96d6876f8d307c03bc27e56dfc462fd7356a6a17484
5
5
  SHA512:
6
- metadata.gz: 57dc690b280ec1b278663e95452b537f1aea884f53c754bbeba667456a0075a3c8652f437f49392ea7e4b6ac16ed46ac06dc2f9b77c7510e86f7dbf20dd33841
7
- data.tar.gz: cc326eb562f22d73882351d8769f7015ff37994a1bcc98c2273e86f38de2d07ff29fe28027b74f4f0459c092e9ce655f1fe26218f27c3d15c0983804e2015871
6
+ metadata.gz: 0424f42f10572ead20fe1f1ffd368f1a001b9bac5e607af725508a2c51262bf9ca1f8be35e28ee62b70381f6422284aa504fe145c8cb913c9771ce52931ee277
7
+ data.tar.gz: 74fb101b38d37e03a30919724bd348e71c8a10c481f609bcb35055f17bccd1fe47b73cbf6acc7044b30ae7a84972075c49c1668c657bbf502e666eb33c666d0a
data/ChangeLog CHANGED
@@ -1,6 +1,14 @@
1
+ == 0.9.14 / 2026-06-17 Yasumasa Ashida <ys.ashida@gmail.com>
2
+
3
+ * Fix the content-type handling in the parsers
4
+
5
+ == 0.9.13 / 2026-05-31 Yasumasa Ashida <ys.ashida@gmail.com>
6
+
7
+ * Refactoring
8
+
1
9
  == 0.9.12 / 2026-01-20 Yasumasa Ashida <ys.ashida@gmail.com>
2
10
 
3
- * enable frozen_string_literal
11
+ * Enable frozen_string_literal
4
12
 
5
13
  == 0.9.8 / 2014-01-07 Yasumasa Ashida <ys.ashida@gmail.com>
6
14
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- meteor (0.9.9.0)
4
+ meteor (0.9.13)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -11,8 +11,8 @@ PLATFORMS
11
11
  ruby
12
12
 
13
13
  DEPENDENCIES
14
- bundler (~> 2.2)
14
+ bundler (~> 4.0.11)
15
15
  meteor!
16
16
 
17
17
  BUNDLED WITH
18
- 2.2.3
18
+ 4.0.11
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  # Meteor
3
3
 
4
4
  ==================
5
- A lightweight HTML & XML Parser
5
+ A lightweight (X)HTML & XML Parser
6
6
 
7
7
  ```shell
8
8
  gem install meteor #gem installation
@@ -58,7 +58,9 @@ https://github.com/asip/meteor/tree/master/demo
58
58
  Licensed under the LGPL V2.1.
59
59
 
60
60
  ## Author
61
- Yasumasa Ashida (ys.ashida@gmail.com)
61
+
62
+ Yasumasa Ashida (<ys.ashida@gmail.com>)
62
63
 
63
64
  ## Copyright
64
- (c) 2008-2023 Yasumasa Ashida
65
+
66
+ (c) 2008-present, Yasumasa Ashida
data/demo/html.rb CHANGED
@@ -2,79 +2,89 @@
2
2
  # -* coding: UTF-8 -*-
3
3
  # frozen_string_literal: true
4
4
 
5
- #require 'rubygems'
6
- require 'meteor'
5
+ # require 'rubygems'
6
+ require "meteor"
7
7
 
8
- Meteor::ElementFactory.link(:html,"ml/sample_html.html", 'UTF-8')
9
- root = Meteor::ElementFactory.element('/ml/sample_html')
8
+ Meteor::ElementFactory.link(:html, "ml/sample_html.html", "UTF-8")
9
+ root = Meteor::ElementFactory.element("/ml/sample_html")
10
10
 
11
11
  start_time = Time.new.to_f
12
12
 
13
- elm_hello = root.element(id: 'hello')
14
- elm_hello['class'] = 'red' #elm_hello.attr(class: 'red')
15
- #elm_hello['class'] = nil #elm_hello.remove_attr('class')
16
-
17
- elm_hello2 = root.element(id: 'hello2')
18
- elm_hello2.content = 'Hello,Tester' #elm_hello2.content('Hello,Tester')
19
-
20
- elm_text1 = root.element(id: 'text1')
21
- elm_text1['value'] = 'めも' #elm_text1.attr(value: めも')
22
- elm_text1['disabled'] = true #elm_text1.attr(disabled: true)
23
- elm_text1['required'] = true #elm_text1.attr(required: true)
24
-
25
- #elm_text1['disabled'] = nil #elm_text1.remove_attr('disabled')
26
- #map = elm_text1.attr_map
27
- #map.names.each { |item|
28
- # puts item
29
- # puts map.fetch(item)
30
- #}
31
-
32
- #elm_radio1 = root.element('input', id: 'radio1', type: 'radio')
33
- #elm_radio1['checked'] = true #elm_radio1.attr(checked: true)
34
- #puts elm_radio1.document
35
-
36
- #elm_select1 = root.element('select', id: 'select1')
37
- #elm_select1 = root.element('select')
38
- #elm_select1['multiple'] = true #elm_select1.attr(multiple: true)
39
- #puts elm_select1['multiple'] #puts elm_select1.attr('multiple')
40
-
41
- #elm_option1 = root.element('option', id: 'option1')
42
- #elm_option1['selected'] = true #elm_option1.attr(selected: true)
43
- #elm_option1['selected'] = nil #elm_option1.remove_attr('selected')
44
- #puts elm_option1['selected'] #puts elm_option1.attr('selected')
45
- #puts elm_text1['readonly'] #puts elm_text1.attr('readonly')
46
-
47
- elm_select2 = root.element('select',id: 'select2')
48
- elm_select2['multiple'] = true
49
- elm_option2 = elm_select2.element('option',id: 'option2')
50
- co_elm = elm_option2.element()
13
+ elm_hello = root.element(id: "hello")
14
+ # elm_hello.attr(class: 'red')
15
+ elm_hello["class"] = "red"
16
+ # elm_hello['class'] = nil # elm_hello.remove_attr('class')
17
+
18
+ elm_hello2 = root.element(id: "hello2")
19
+ # elm_hello2.content('Hello,Tester')
20
+ elm_hello2.content = "Hello,Tester"
21
+
22
+ elm_text1 = root.element(id: "text1")
23
+ # elm_text1.attr(value: めも')
24
+ elm_text1["value"] = "めも"
25
+ # elm_text1.attr(disabled: true)
26
+ elm_text1["disabled"] = true
27
+ # elm_text1.attr(required: true)
28
+ elm_text1["required"] = true
29
+
30
+ # elm_text1['disabled'] = nil # elm_text1.remove_attr('disabled')
31
+ # map = elm_text1.attr_map
32
+ # map.names.each { |item|
33
+ # puts item
34
+ # puts map.fetch(item)
35
+ # }
36
+
37
+ # elm_radio1 = root.element('input', id: 'radio1', type: 'radio')
38
+ # elm_radio1['checked'] = true # elm_radio1.attr(checked: true)
39
+ # puts elm_radio1.document
40
+
41
+ # elm_select1 = root.element('select', id: 'select1')
42
+ # elm_select1 = root.element('select')
43
+ # elm_select1['multiple'] = true # elm_select1.attr(multiple: true)
44
+ # puts elm_select1['multiple'] # puts elm_select1.attr('multiple')
45
+
46
+ # elm_option1 = root.element('option', id: 'option1')
47
+ # elm_option1['selected'] = true # elm_option1.attr(selected: true)
48
+ # elm_option1['selected'] = nil # elm_option1.remove_attr('selected')
49
+ # puts elm_option1['selected'] # puts elm_option1.attr('selected')
50
+ # puts elm_text1['readonly'] # puts elm_text1.attr('readonly')
51
+
52
+ elm_select2 = root.element("select", id: "select2")
53
+ elm_select2["multiple"] = true
54
+ elm_option2 = elm_select2.element("option", id: "option2")
55
+ co_elm = elm_option2.element
51
56
  10.times { |i|
52
- co_elm['value'] = i #co_elm.attr(value: i)
53
- #'<' +
54
- if i == 1 then
55
- co_elm['selected'] = true #co_elm.attr(selected: true)
57
+ # co_elm.attr(value: i)
58
+ co_elm["value"] = i
59
+ # '<' +
60
+ if i == 1
61
+ # co_elm.attr(selected: true)
62
+ co_elm["selected"] = true
56
63
  else
57
- co_elm['selected'] = false #co_elm.attr(selected: false)
64
+ # co_elm.attr(selected: false)
65
+ co_elm["selected"] = false
58
66
  end
59
- co_elm.content = i #co_elm.content(i)
60
- co_elm['id'] = nil #co_elm.remove_attr('id')
67
+ # co_elm.content(i)
68
+ co_elm.content = i
69
+ # co_elm.remove_attr('id')
70
+ co_elm["id"] = nil
61
71
  co_elm.flash
62
72
  }
63
73
 
64
- elm_tr1 = root.element('tr',id: 'loop')
74
+ elm_tr1 = root.element("tr", id: "loop")
65
75
  elm_ = root.element(elm_tr1)
66
- elm_dt1_ = elm_.element(id: 'aa')
67
- elm_dt2_ = elm_.element(id: 'bb')
68
- elm_dt3_ = elm_.element(id: 'cc')
76
+ elm_dt1_ = elm_.element(id: "aa")
77
+ elm_dt2_ = elm_.element(id: "bb")
78
+ elm_dt3_ = elm_.element(id: "cc")
69
79
  10.times do |i|
70
- elm_['loop'] = i
80
+ elm_["loop"] = i
71
81
  elm_dt1 = elm_dt1_.clone
72
82
  elm_dt2 = elm_dt2_.clone
73
83
  elm_dt3 = elm_dt3_.clone
74
84
  elm_dt1.content = i
75
85
  elm_dt2.content = i
76
86
  elm_dt3.content = i
77
- #"< \n" +
87
+ # "< \n" +
78
88
  elm_.flash
79
89
  end
80
90
 
@@ -82,19 +92,22 @@ root.flash
82
92
 
83
93
  end_time = Time.new.to_f
84
94
 
85
- puts root.document
86
-
87
- elms = root.elements('tr', id: 'loop')
88
- #elms = root.elements('input', id: 'radio1', type: 'radio')
89
- #elms = root.css('input[id=radio1][type=radio]')
90
- elms.each{|elm|
91
- puts '-------'
92
- puts 'doc----'
93
- puts elm.document
94
- puts 'attrs--'
95
- puts elm.attributes
96
- puts 'mixed--'
97
- puts elm.mixed_content
95
+ puts(root.document)
96
+
97
+ elms = root.elements("tr", id: "loop")
98
+ # elms = root.elements('input', id: 'radio1', type: 'radio')
99
+ # elms = root.css('input[id=radio1][type=radio]')
100
+ elms.each { |elm|
101
+ puts("-------")
102
+ puts("doc----")
103
+ puts(elm.document)
104
+ puts("attrs--")
105
+ puts(elm.attributes)
106
+ puts("mixed--")
107
+ puts(elm.mixed_content)
98
108
  }
99
109
 
100
- puts '' + (end_time - start_time).to_s + ' sec'
110
+ puts("charset:#{root.charset}")
111
+ puts("content-type:#{root.content_type}")
112
+
113
+ puts("" + (end_time - start_time).to_s + " sec")
data/demo/html4.rb CHANGED
@@ -2,110 +2,120 @@
2
2
  # -* coding: UTF-8 -*-
3
3
  # frozen_string_literal: true
4
4
 
5
- #require 'rubygems'
6
- require 'meteor'
5
+ # require 'rubygems'
6
+ require "meteor"
7
7
 
8
- #Meteor::ElementFactory.link(:html4,'ml/sample_4.html', 'UTF-8')
9
- Meteor::ElementFactory.options= {type: :html4}
10
- Meteor::ElementFactory.link('ml/sample_html4.html')
8
+ # Meteor::ElementFactory.link(:html4,'ml/sample_4.html', 'UTF-8')
9
+ Meteor::ElementFactory.options = {type: :html4}
10
+ Meteor::ElementFactory.link("ml/sample_html4.html")
11
11
 
12
- root = Meteor::ElementFactory.element('/ml/sample_html4')
12
+ root = Meteor::ElementFactory.element("/ml/sample_html4")
13
13
 
14
14
  start_time = Time.new.to_f
15
15
 
16
- elm_hello = root.element(id: 'hello')
17
- elm_hello['class'] = 'red' #elm_hello.attr(class: 'red')
18
- #elm_hello['class'] = nil #elm_hello.remove_attr('class')
19
-
20
- elm_hello2 = root.element(id: 'hello2')
21
- elm_hello2.content = 'Hello,Tester' #elm_hello2.content('Hello,Tester')
22
-
23
- #elm_hello3 = root.cxtag('hello3')
24
- #elm_hello3.content = "Hello,Hello\ntt" #elm_hello3.content = "Hello,Hello"
25
- #puts elm_hello3.pattern
26
- #puts elm_hello3.mixed_content
27
- #puts elm_hello3.document
28
- #puts elm_hello3.content
29
- #puts elm_hello3.mixed_content
30
-
31
- elm_text1 = root.element('input', id: 'text1')
32
- #elm_text1['value'] = 'めも' #elm_text1.attr(value: 'めも')
33
- #elm_text1.attr = {value: 'メモ'}
34
- #elm_text1['disabled'] = true #elm_text1.attr(disabled: true)
35
- elm_text1.attrs = {value: 'メモ', disabled: true, readonly: true}
36
- #puts elm_text1.attrs
37
- #elm_text1['disabled'] = nil #elm_text1.remove_attr('disabled')
38
- #map = elm_text1.attr_map
39
- #map.names.each { |item|
40
- # puts item
41
- # puts map.fetch(item)
42
- #}
43
-
44
- #elm_radio1 = root.element('input', id: 'radio1', type: 'radio')
45
- ##elm_radio1 = root.css('input[id=radio1][type=radio]')
46
- ##elm_radio1 = root.css('#radio1') #elm_radio1 = root.css('input#radio1')
47
- ##elm_radio1 = root.css('.test') #elm_radio1 = root.css('input.test')
48
- ##elm_radio1 = root.css('[id=radio1][type=radio]')
49
- #elm_radio1['checked'] = true #elm_radio1.attr(checked: true)
50
- #puts elm_radio1.document
51
-
52
- #elm_select1 = root.element('select', id: 'select1')
53
- #elm_select1 = root.element('select')
54
- #elm_select1['multiple'] = true #elm_select1.attr('multiple',true)
55
- #puts elm_select1['multiple'] #puts elm_select1.attr('multiple')
56
-
57
- #elm_option1 = root.element('option', id: 'option1')
58
- #elm_option1['selected'] = true #elm_option1.attr(selected: true)
59
- #elm_option1['selected'] = nil #elm_option1.remove_attr('selected')
60
- #puts elm_option1['selected'] #puts elm_option1.attr('selected')
61
- #puts elm_text1['readonly'] #puts elm_text1.attr('readonly')
62
-
63
-
64
- elm_select2 = root.element('select', id: 'select2')
65
- elm_select2['multiple'] = true
66
- elm_option2 = elm_select2.element('option',id: 'option2')
67
- co_elm = elm_option2.element()
16
+ elm_hello = root.element(id: "hello")
17
+ # elm_hello.attr(class: 'red')
18
+ elm_hello["class"] = "red"
19
+ # elm_hello['class'] = nil # elm_hello.remove_attr('class')
20
+
21
+ elm_hello2 = root.element(id: "hello2")
22
+ # elm_hello2.content('Hello,Tester')
23
+ elm_hello2.content = "Hello,Tester"
24
+
25
+ # elm_hello3 = root.cxtag('hello3')
26
+ # elm_hello3.content = "Hello,Hello\ntt" # elm_hello3.content = "Hello,Hello"
27
+ # puts elm_hello3.pattern
28
+ # puts elm_hello3.mixed_content
29
+ # puts elm_hello3.document
30
+ # puts elm_hello3.content
31
+ # puts elm_hello3.mixed_content
32
+
33
+ elm_text1 = root.element("input", id: "text1")
34
+ # elm_text1['value'] = 'めも' # elm_text1.attr(value: 'めも')
35
+ # elm_text1.attr = {value: 'メモ'}
36
+ # elm_text1['disabled'] = true # elm_text1.attr(disabled: true)
37
+ elm_text1.attrs = {value: "メモ", disabled: true, readonly: true}
38
+ # puts elm_text1.attrs
39
+ # elm_text1['disabled'] = nil # elm_text1.remove_attr('disabled')
40
+ # map = elm_text1.attr_map
41
+ # map.names.each { |item|
42
+ # puts item
43
+ # puts map.fetch(item)
44
+ # }
45
+
46
+ # elm_radio1 = root.element('input', id: 'radio1', type: 'radio')
47
+ ## elm_radio1 = root.css('input[id=radio1][type=radio]')
48
+ ## elm_radio1 = root.css('# radio1') # elm_radio1 = root.css('input# radio1')
49
+ ## elm_radio1 = root.css('.test') # elm_radio1 = root.css('input.test')
50
+ ## elm_radio1 = root.css('[id=radio1][type=radio]')
51
+ # elm_radio1['checked'] = true # elm_radio1.attr(checked: true)
52
+ # puts elm_radio1.document
53
+
54
+ # elm_select1 = root.element('select', id: 'select1')
55
+ # elm_select1 = root.element('select')
56
+ # elm_select1['multiple'] = true # elm_select1.attr('multiple',true)
57
+ # puts elm_select1['multiple'] # puts elm_select1.attr('multiple')
58
+
59
+ # elm_option1 = root.element('option', id: 'option1')
60
+ # elm_option1['selected'] = true # elm_option1.attr(selected: true)
61
+ # elm_option1['selected'] = nil # elm_option1.remove_attr('selected')
62
+ # puts elm_option1['selected'] # puts elm_option1.attr('selected')
63
+ # puts elm_text1['readonly'] # puts elm_text1.attr('readonly')
64
+
65
+ elm_select2 = root.element("select", id: "select2")
66
+ elm_select2["multiple"] = true
67
+ elm_option2 = elm_select2.element("option", id: "option2")
68
+ co_elm = elm_option2.element
68
69
  10.times { |i|
69
- co_elm['value'] = i #co_elm.attr(value: i)
70
- #'<' +
71
- if i == 1 then
72
- co_elm['selected'] = true #co_elm.attr(selected: 'true')
70
+ # co_elm.attr(value: i)
71
+ co_elm["value"] = i
72
+ # '<' +
73
+ if i == 1
74
+ # co_elm.attr(selected: 'true')
75
+ co_elm["selected"] = true
73
76
  else
74
- co_elm['selected'] = false #co_elm.attr(selected: 'false')
77
+ # co_elm.attr(selected: 'false')
78
+ co_elm["selected"] = false
75
79
  end
76
- co_elm.content = i #co_elm.content(i)
77
- co_elm['id'] = nil #co_elm.remove_attr('id')
80
+ # co_elm.content(i)
81
+ co_elm.content = i
82
+ # co_elm.remove_attr('id')
83
+ co_elm["id"] = nil
78
84
  co_elm.flash
79
85
  }
80
86
 
81
- elm_tr1 = root.element('tr',id: 'loop') #elm_tr1 = root.css('tr[id=loop]')
87
+ # elm_tr1 = root.css('tr[id=loop]')
88
+ elm_tr1 = root.element("tr", id: "loop")
82
89
  elm_ = root.element(elm_tr1)
83
- elm_dt1_ = elm_.element(id: 'aa')
84
- elm_dt2_ = elm_.element(id: 'bb')
85
- elm_dt3_ = elm_.element(id: 'cc')
90
+ elm_dt1_ = elm_.element(id: "aa")
91
+ elm_dt2_ = elm_.element(id: "bb")
92
+ elm_dt3_ = elm_.element(id: "cc")
86
93
  10.times do |i|
87
- elm_['loop'] = i
94
+ elm_["loop"] = i
88
95
  elm_dt1 = elm_dt1_.clone
89
96
  elm_dt2 = elm_dt2_.clone
90
97
  elm_dt3 = elm_dt3_.clone
91
98
  elm_dt1.content = i
92
99
  elm_dt2.content = i
93
100
  elm_dt3.content = i
94
- #"< \n" +
101
+ # "< \n" +
95
102
  elm_.flash
96
103
  end
97
104
 
98
- elms = root.elements(id: 'sample')
99
- #elms = root.css('div') #elms = root.css('div[class=test]')
105
+ elms = root.elements(id: "sample")
106
+ # elms = root.css('div') # elms = root.css('div[class=test]')
100
107
 
101
- elms.each_with_index{ |elm_,i|
102
- elm_['style'] = i.to_s
108
+ elms.each_with_index { |elm_, i|
109
+ elm_["style"] = i.to_s
103
110
  }
104
111
 
105
112
  root.flash
106
113
 
107
114
  end_time = Time.new.to_f
108
115
 
109
- puts root.document
116
+ puts(root.document)
110
117
 
111
- puts '' + (end_time - start_time).to_s + ' sec'
118
+ puts("charset:#{root.charset}")
119
+ puts("content-type:#{root.content_type}")
120
+
121
+ puts("" + (end_time - start_time).to_s + " sec")
data/demo/ml/sample.xml CHANGED
@@ -9,42 +9,40 @@
9
9
  -->
10
10
 
11
11
  <root>
12
-
13
- <test1 manbo="mango" />
14
-
15
- <test manbo="manbo">
16
- <tech mono="mono">こまねち</tech>
17
- </test>
18
- <test manbo="mbo">
19
- <tech mono="mono">komaneti</tech>
20
- </test>
21
- <test manbo="mbo">
22
- <tech mono="mono2">komaneti</tech>
23
- </test>
24
- <!-- @quark id="mono" --><!-- /@quark -->
25
- <!-- @quark id="moti" --><!-- /@quark -->
26
- <momo>komaneti</momo>
27
- <kobe momo="mono">komaneti</kobe>
28
- <teo a="aa" b="bb"/>
29
- <mink>komaneti</mink>
30
-
31
- <potato id="aa" lc="/cc">
32
- <potato id="/bb"></potato>
33
- </potato>
34
-
35
- <potato id="aa" id2="bb" lc="/cc">
36
- <potato id="/bb"><test></test></potato>
37
- </potato>
38
-
39
- <potato2 id="aa" id2="bb" lc="/cc"/>
40
-
41
- <hamachi id="aa" id2="bb" lc="/cc">
42
- test
43
- </hamachi>
44
-
45
- <hamachi id="aa" id2="bb" />
46
-
47
- <kobe momo="momo" value="komaneti" />
48
- <!-- @pp id="cs" -->テスト<!-- /@pp -->
49
-
12
+ <test1 manbo="mango" />
13
+
14
+ <test manbo="manbo">
15
+ <tech mono="mono">こまねち</tech>
16
+ </test>
17
+ <test manbo="mbo">
18
+ <tech mono="mono">komaneti</tech>
19
+ </test>
20
+ <test manbo="mbo">
21
+ <tech mono="mono2">komaneti</tech>
22
+ </test>
23
+ <!-- @quark id="mono" --><!-- /@quark -->
24
+ <!-- @quark id="moti" --><!-- /@quark -->
25
+ <momo>komaneti</momo>
26
+ <kobe momo="mono">komaneti</kobe>
27
+ <teo a="aa" b="bb"/>
28
+ <mink>komaneti</mink>
29
+
30
+ <potato id="aa" lc="/cc">
31
+ <potato id="/bb"></potato>
32
+ </potato>
33
+
34
+ <potato id="aa" id2="bb" lc="/cc">
35
+ <potato id="/bb"><test></test></potato>
36
+ </potato>
37
+
38
+ <potato2 id="aa" id2="bb" lc="/cc"/>
39
+
40
+ <hamachi id="aa" id2="bb" lc="/cc">
41
+ test
42
+ </hamachi>
43
+
44
+ <hamachi id="aa" id2="bb" />
45
+
46
+ <kobe momo="momo" value="komaneti" />
47
+ <!-- @pp id="cs" -->テスト<!-- /@pp -->
50
48
  </root>
@@ -1,32 +1,38 @@
1
+ <!DOCTYPE html>
1
2
  <html lang="ja">
2
3
  <head>
3
4
  <title>HTMLテスト</title>
4
- <meta http-equiv="Content-Type" charset="utf-8" content="text/html; charset=UTF-8">
5
+ <meta charset="UTF-8"/>
5
6
  </head>
6
7
 
7
8
  <body>
9
+ <h1>HTMLテスト</h1>
8
10
  <div id="hello" class="black">Hello,World</div>
9
11
  <div id="hello2">Hello,World</div>
10
12
  <!-- @quark id="hello3" -->Hello,World<!-- /@quark -->
11
13
  <form>
12
- <input id="text1" name="text1" type="text">
14
+ <label for="text1">text1</label>
15
+ <input type="text" id="text1" name="text1" value="">
13
16
 
14
- <input id="radio1" type="radio">
17
+ <label for="radio1">radio1</label>
18
+ <input id="radio1" name="radio1" type="radio">
15
19
 
16
- <select name="select1">
20
+ <label for="select1">select1</label>
21
+ <select id="select1" name="select1">
17
22
  <option id="option1">オプション</option>
18
23
  </select>
19
24
 
20
- <select id="select2">
25
+ <label for="select2">select2</label>
26
+ <select id="select2" name="select2">
21
27
  <option id="option2">オプション</option>
22
28
  </select>
23
29
  </form>
24
30
 
25
31
  <table>
32
+ <caption>table1</caption>
26
33
  <tr id="loop">
27
34
  <td id="aa"></td><td id="bb"></td><td id="cc"></td>
28
35
  </tr>
29
36
  </table>
30
-
31
37
  </body>
32
38
  </html>
@@ -1,28 +1,36 @@
1
+ <!DOCTYPE html>
1
2
  <html lang="ja">
2
3
  <head>
3
- <title>HTMLテスト</title>
4
+ <title>HTML4テスト</title>
4
5
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6
+ <meta charset="UTF-8"/>
5
7
  </head>
6
8
 
7
9
  <body>
10
+ <h1>HTML4テスト</h1>
8
11
  <div id="hello" class="black">Hello,World</div>
9
12
  <div id="hello2">Hello,World</div>
10
13
  <!-- @quark id="hello3" -->Hello,World<!-- /@quark -->
11
14
  <form>
12
- <input id="text1" type="text" >
15
+ <label for="text1">text1</label>
16
+ <input id="text1" name="text1" type="text" >
13
17
 
14
- <input id="radio1" type="radio" class="test">
18
+ <label for="radio1">radio1</label>
19
+ <input id="radio1" name="radio1" type="radio" class="test">
15
20
 
16
- <select id="select1">
21
+ <label for="select1">select1</label>
22
+ <select id="select1" name="select1">
17
23
  <option id="option1">オプション</option>
18
24
  </select>
19
25
 
20
- <select id="select2">
26
+ <label for="select2">select2</label>
27
+ <select id="select2" name="select2">
21
28
  <option id="option2">オプション</option>
22
29
  </select>
23
30
  </form>
24
31
 
25
32
  <table>
33
+ <caption>table</caption>
26
34
  <tr id="loop">
27
35
  <td id="aa"></td><td id="bb"></td><td id="cc"></td>
28
36
  </tr>
@@ -35,6 +43,5 @@
35
43
  <div id="sample2" style="background-color: aliceblue;" class="test">
36
44
  <div>test</div>
37
45
  </div>
38
-
39
46
  </body>
40
47
  </html>