libxml-ruby 0.9.2-x86-mswin32-60 → 0.9.3-x86-mswin32-60

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. data/CHANGES +13 -0
  2. data/ext/libxml/libxml.c +885 -886
  3. data/ext/libxml/ruby_libxml.h +70 -72
  4. data/ext/libxml/ruby_xml_attr.c +76 -76
  5. data/ext/libxml/ruby_xml_attr.h +8 -8
  6. data/ext/libxml/ruby_xml_attributes.c +36 -36
  7. data/ext/libxml/ruby_xml_attributes.h +6 -6
  8. data/ext/libxml/ruby_xml_document.c +133 -220
  9. data/ext/libxml/ruby_xml_document.h +4 -7
  10. data/ext/libxml/ruby_xml_dtd.c +30 -109
  11. data/ext/libxml/ruby_xml_dtd.h +2 -11
  12. data/ext/libxml/ruby_xml_error.c +10 -10
  13. data/ext/libxml/ruby_xml_error.h +4 -4
  14. data/ext/libxml/ruby_xml_html_parser.c +28 -40
  15. data/ext/libxml/ruby_xml_html_parser.h +4 -4
  16. data/ext/libxml/ruby_xml_input.c +208 -32
  17. data/ext/libxml/ruby_xml_input.h +7 -5
  18. data/ext/libxml/ruby_xml_input_cbg.c +3 -3
  19. data/ext/libxml/ruby_xml_node.c +217 -217
  20. data/ext/libxml/ruby_xml_node.h +5 -5
  21. data/ext/libxml/ruby_xml_ns.c +26 -26
  22. data/ext/libxml/ruby_xml_ns.h +4 -4
  23. data/ext/libxml/ruby_xml_parser.c +151 -164
  24. data/ext/libxml/ruby_xml_parser.h +3 -8
  25. data/ext/libxml/ruby_xml_parser_context.c +105 -105
  26. data/ext/libxml/ruby_xml_parser_context.h +4 -4
  27. data/ext/libxml/ruby_xml_reader.c +145 -162
  28. data/ext/libxml/ruby_xml_reader.h +4 -4
  29. data/ext/libxml/ruby_xml_relaxng.c +30 -43
  30. data/ext/libxml/ruby_xml_relaxng.h +2 -7
  31. data/ext/libxml/ruby_xml_sax_parser.c +174 -228
  32. data/ext/libxml/ruby_xml_sax_parser.h +12 -20
  33. data/ext/libxml/ruby_xml_schema.c +31 -44
  34. data/ext/libxml/ruby_xml_schema.h +2 -7
  35. data/ext/libxml/ruby_xml_state.c +6 -6
  36. data/ext/libxml/ruby_xml_state.h +2 -2
  37. data/ext/libxml/ruby_xml_xinclude.c +1 -1
  38. data/ext/libxml/ruby_xml_xinclude.h +3 -3
  39. data/ext/libxml/ruby_xml_xpath.c +1 -1
  40. data/ext/libxml/ruby_xml_xpath.h +3 -12
  41. data/ext/libxml/ruby_xml_xpath_context.c +293 -294
  42. data/ext/libxml/ruby_xml_xpath_context.h +3 -7
  43. data/ext/libxml/ruby_xml_xpath_expression.c +11 -11
  44. data/ext/libxml/ruby_xml_xpath_expression.h +2 -2
  45. data/ext/libxml/ruby_xml_xpath_object.c +52 -66
  46. data/ext/libxml/ruby_xml_xpath_object.h +3 -14
  47. data/ext/libxml/ruby_xml_xpointer.c +11 -12
  48. data/ext/libxml/ruby_xml_xpointer.h +5 -7
  49. data/ext/libxml/sax_parser_callbacks.inc +53 -36
  50. data/ext/libxml/version.h +2 -2
  51. data/ext/mingw/libxml_ruby.dll.a +0 -0
  52. data/ext/mingw/libxml_ruby.so +0 -0
  53. data/ext/vc/libxml_ruby.vcproj +1 -9
  54. data/lib/libxml/html_parser.rb +5 -5
  55. data/lib/libxml/parser.rb +4 -4
  56. data/lib/libxml/sax_parser.rb +24 -0
  57. data/test/tc_document_write.rb +2 -16
  58. data/test/tc_html_parser.rb +57 -5
  59. data/test/tc_input.rb +13 -0
  60. data/test/tc_parser.rb +11 -3
  61. data/test/tc_reader.rb +53 -34
  62. data/test/tc_sax_parser.rb +30 -8
  63. data/test/test.rb +8 -0
  64. data/test/test_suite.rb +1 -1
  65. metadata +5 -6
  66. data/ext/libxml/ruby_xml_encoding.c +0 -164
  67. data/ext/libxml/ruby_xml_encoding.h +0 -13
  68. data/test/tc_encoding.rb +0 -13
data/test/tc_input.rb ADDED
@@ -0,0 +1,13 @@
1
+ require 'xml'
2
+ require 'test/unit'
3
+
4
+ class TestInput < Test::Unit::TestCase
5
+ def test_latin1
6
+ assert_equal(XML::Input::ISO_8859_1, 10)
7
+ end
8
+
9
+ def test_latin1_to_s
10
+ encoding_str = XML::Input.encoding_to_s(XML::Input::ISO_8859_1)
11
+ assert_equal('ISO-8859-1', encoding_str)
12
+ end
13
+ end
data/test/tc_parser.rb CHANGED
@@ -90,15 +90,23 @@ class TestParser < Test::Unit::TestCase
90
90
  assert_instance_of(XML::Parser, xp)
91
91
  assert_equal(io, xp.io)
92
92
  assert_equal(io, xp.input.io)
93
+
94
+ doc = xp.parse
95
+ assert_instance_of(XML::Document, doc)
96
+ assert_instance_of(XML::Parser::Context, xp.context)
93
97
  end
94
98
  end
95
99
 
96
100
  def test_string_io
97
101
  data = File.read(File.join(File.dirname(__FILE__), 'model/rubynet.xml'))
98
102
  string_io = StringIO.new(data)
99
- assert_raises(TypeError) do
100
- @xp.io = string_io
101
- end
103
+ @xp.io = string_io
104
+ assert_equal(string_io, @xp.io)
105
+ assert_equal(string_io, @xp.input.io)
106
+
107
+ doc = @xp.parse
108
+ assert_instance_of(XML::Document, doc)
109
+ assert_instance_of(XML::Parser::Context, @xp.context)
102
110
  end
103
111
 
104
112
  def test_fd_gc
data/test/tc_reader.rb CHANGED
@@ -5,14 +5,62 @@ class TextReader < Test::Unit::TestCase
5
5
 
6
6
  SIMPLE_XML = File.join(File.dirname(__FILE__), 'model/simple.xml')
7
7
 
8
- def test_new_file
8
+ def verify_simple(reader)
9
+ node_types = []
10
+ 19.times do
11
+ assert_equal(1, reader.read)
12
+ node_types << reader.node_type
13
+ end
14
+ assert_equal(0, reader.read)
15
+ assert_equal(node_types,
16
+ [XML::Reader::TYPE_ELEMENT,
17
+ XML::Reader::TYPE_SIGNIFICANT_WHITESPACE,
18
+ XML::Reader::TYPE_ELEMENT,
19
+ XML::Reader::TYPE_TEXT,
20
+ XML::Reader::TYPE_END_ELEMENT,
21
+ XML::Reader::TYPE_SIGNIFICANT_WHITESPACE,
22
+ XML::Reader::TYPE_ELEMENT,
23
+ XML::Reader::TYPE_SIGNIFICANT_WHITESPACE,
24
+ XML::Reader::TYPE_ELEMENT,
25
+ XML::Reader::TYPE_TEXT,
26
+ XML::Reader::TYPE_END_ELEMENT,
27
+ XML::Reader::TYPE_SIGNIFICANT_WHITESPACE,
28
+ XML::Reader::TYPE_ELEMENT,
29
+ XML::Reader::TYPE_TEXT,
30
+ XML::Reader::TYPE_END_ELEMENT,
31
+ XML::Reader::TYPE_SIGNIFICANT_WHITESPACE,
32
+ XML::Reader::TYPE_END_ELEMENT,
33
+ XML::Reader::TYPE_SIGNIFICANT_WHITESPACE,
34
+ XML::Reader::TYPE_END_ELEMENT])
35
+ end
36
+
37
+ def test_file
9
38
  reader = XML::Reader.file(SIMPLE_XML)
10
39
  verify_simple(reader)
11
- assert_raises(RuntimeError) { XML::Reader.file('/does/not/exist') }
12
40
  end
13
41
 
14
- def test_new_data
15
- reader = XML::Reader.new(File.read(SIMPLE_XML))
42
+ def test_invalid_file
43
+ assert_raises(RuntimeError) do
44
+ XML::Reader.file('/does/not/exist')
45
+ end
46
+ end
47
+
48
+ def test_string
49
+ reader = XML::Reader.string(File.read(SIMPLE_XML))
50
+ verify_simple(reader)
51
+ end
52
+
53
+ def test_io
54
+ File.open(SIMPLE_XML, 'rb') do |io|
55
+ reader = XML::Reader.io(io)
56
+ verify_simple(reader)
57
+ end
58
+ end
59
+
60
+ def test_string_io
61
+ data = File.read(SIMPLE_XML)
62
+ string_io = StringIO.new(data)
63
+ reader = XML::Reader.io(string_io)
16
64
  verify_simple(reader)
17
65
  end
18
66
 
@@ -84,39 +132,10 @@ class TextReader < Test::Unit::TestCase
84
132
  doc.standalone?
85
133
  end
86
134
 
87
- def verify_simple(reader)
88
- node_types = []
89
- 19.times do
90
- assert_equal(1, reader.read)
91
- node_types << reader.node_type
92
- end
93
- assert_equal(0, reader.read)
94
- assert_equal(node_types,
95
- [XML::Reader::TYPE_ELEMENT,
96
- XML::Reader::TYPE_SIGNIFICANT_WHITESPACE,
97
- XML::Reader::TYPE_ELEMENT,
98
- XML::Reader::TYPE_TEXT,
99
- XML::Reader::TYPE_END_ELEMENT,
100
- XML::Reader::TYPE_SIGNIFICANT_WHITESPACE,
101
- XML::Reader::TYPE_ELEMENT,
102
- XML::Reader::TYPE_SIGNIFICANT_WHITESPACE,
103
- XML::Reader::TYPE_ELEMENT,
104
- XML::Reader::TYPE_TEXT,
105
- XML::Reader::TYPE_END_ELEMENT,
106
- XML::Reader::TYPE_SIGNIFICANT_WHITESPACE,
107
- XML::Reader::TYPE_ELEMENT,
108
- XML::Reader::TYPE_TEXT,
109
- XML::Reader::TYPE_END_ELEMENT,
110
- XML::Reader::TYPE_SIGNIFICANT_WHITESPACE,
111
- XML::Reader::TYPE_END_ELEMENT,
112
- XML::Reader::TYPE_SIGNIFICANT_WHITESPACE,
113
- XML::Reader::TYPE_END_ELEMENT])
114
- end
115
-
116
135
  def test_mode
117
136
  reader = XML::Reader.string('<xml/>')
118
137
  assert_equal(XML::Reader::MODE_INITIAL, reader.read_state)
119
138
  reader.read
120
139
  assert_equal(XML::Reader::MODE_EOF, reader.read_state)
121
140
  end
122
- end
141
+ end
@@ -59,6 +59,10 @@ class TestSaxParser < Test::Unit::TestCase
59
59
  @xp = nil
60
60
  end
61
61
 
62
+ def saxtest_file
63
+ File.join(File.dirname(__FILE__), 'model/saxtest.xml')
64
+ end
65
+
62
66
  def verify
63
67
  assert_equal [1], @xp.callbacks.test[:startdoc]
64
68
  assert_equal [[2,'test',{'uga'=>'booga','foo'=>'bar'}],[3,'fixnum',{}],[6,'fixnum',{}]],
@@ -72,26 +76,44 @@ class TestSaxParser < Test::Unit::TestCase
72
76
  assert_equal [17], @xp.callbacks.test[:enddoc]
73
77
  end
74
78
 
75
- def test_string_without_callbacks
76
- @xp.string = File.read(File.join(File.dirname(__FILE__), 'model/saxtest.xml'))
79
+ def test_string_no_callbacks
80
+ @xp.string = File.read(saxtest_file)
77
81
  assert_equal true, @xp.parse
78
82
  end
79
83
 
80
- def test_file_without_callbacks
81
- @xp.file = File.join(File.dirname(__FILE__), 'model/saxtest.xml')
84
+ def test_file_no_callbacks
85
+ @xp.file = File.join(saxtest_file)
82
86
  assert_equal true, @xp.parse
83
87
  end
84
88
 
85
- def test_string_with_callbacks
89
+ def test_string
86
90
  @xp.callbacks = TestCaseCallbacks.new
87
- @xp.string = File.read(File.join(File.dirname(__FILE__), 'model/saxtest.xml'))
91
+ @xp.string = File.read(saxtest_file)
88
92
  @xp.parse
89
93
  verify
90
94
  end
91
95
 
92
- def test_file_with_callbacks
96
+ def test_file
97
+ @xp.callbacks = TestCaseCallbacks.new
98
+ @xp.file = saxtest_file
99
+ @xp.parse
100
+ verify
101
+ end
102
+
103
+ def test_io
104
+ File.open(saxtest_file) do |file|
105
+ @xp.callbacks = TestCaseCallbacks.new
106
+ @xp.io = file
107
+ @xp.parse
108
+ verify
109
+ end
110
+ end
111
+
112
+ def test_string_io
113
+ data = File.read(saxtest_file)
114
+
93
115
  @xp.callbacks = TestCaseCallbacks.new
94
- @xp.file = File.join(File.dirname(__FILE__), 'model/saxtest.xml')
116
+ @xp.io = StringIO.new(data)
95
117
  @xp.parse
96
118
  verify
97
119
  end
data/test/test.rb ADDED
@@ -0,0 +1,8 @@
1
+ require 'libxml'
2
+
3
+ x = LibXML::XML::Parser.string("<root />").parse
4
+ r1 = x.find("/root") # if you comment out this line, script will NOT segfault
5
+ puts r1.object_id
6
+ r2 = x.find("/root")#.length # segfault occurs here
7
+ puts puts r2.object_id
8
+
data/test/test_suite.rb CHANGED
@@ -3,7 +3,7 @@ require 'tc_attributes'
3
3
  require 'tc_document'
4
4
  require 'tc_document_write'
5
5
  require 'tc_dtd'
6
- require 'tc_encoding'
6
+ require 'tc_input'
7
7
  require 'tc_html_parser'
8
8
  require 'tc_node'
9
9
  require 'tc_node_attr'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libxml-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: x86-mswin32-60
6
6
  authors:
7
7
  - Charlie Savage
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-11-19 00:00:00 -07:00
12
+ date: 2008-11-22 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -40,8 +40,6 @@ files:
40
40
  - ext/libxml/ruby_xml_document.h
41
41
  - ext/libxml/ruby_xml_dtd.c
42
42
  - ext/libxml/ruby_xml_dtd.h
43
- - ext/libxml/ruby_xml_encoding.c
44
- - ext/libxml/ruby_xml_encoding.h
45
43
  - ext/libxml/ruby_xml_error.c
46
44
  - ext/libxml/ruby_xml_error.h
47
45
  - ext/libxml/ruby_xml_html_parser.c
@@ -136,9 +134,9 @@ files:
136
134
  - test/tc_document.rb
137
135
  - test/tc_document_write.rb
138
136
  - test/tc_dtd.rb
139
- - test/tc_encoding.rb
140
137
  - test/tc_error.rb
141
138
  - test/tc_html_parser.rb
139
+ - test/tc_input.rb
142
140
  - test/tc_node.rb
143
141
  - test/tc_node_attr.rb
144
142
  - test/tc_node_cdata.rb
@@ -163,6 +161,7 @@ files:
163
161
  - test/tc_xpath_context.rb
164
162
  - test/tc_xpath_expression.rb
165
163
  - test/tc_xpointer.rb
164
+ - test/test.rb
166
165
  - test/test_suite.rb
167
166
  - ext/mingw/libxml_ruby.so
168
167
  - ext/mingw/libiconv-2.dll
@@ -201,9 +200,9 @@ test_files:
201
200
  - test/tc_document.rb
202
201
  - test/tc_document_write.rb
203
202
  - test/tc_dtd.rb
204
- - test/tc_encoding.rb
205
203
  - test/tc_error.rb
206
204
  - test/tc_html_parser.rb
205
+ - test/tc_input.rb
207
206
  - test/tc_node.rb
208
207
  - test/tc_node_attr.rb
209
208
  - test/tc_node_cdata.rb
@@ -1,164 +0,0 @@
1
- /* $Id: ruby_xml_ns.c 524 2008-08-20 08:59:54Z cfis $ */
2
-
3
- /* Please see the LICENSE file for copyright and distribution information */
4
-
5
- #include "ruby_libxml.h"
6
- #include "ruby_xml_encoding.h"
7
-
8
- VALUE mXMLEncoding;
9
-
10
- /*
11
- * Document-module: LibXML::XML::Encoding
12
- *
13
- * LibXML converts all data sources to UTF8 internally before
14
- * processing them. By default, LibXML will determine a data
15
- * source's encoding using the algorithm described on its
16
- * website[* http://xmlsoft.org/encoding.html].
17
- *
18
- * However, its some cases it is possible to tell LibXML
19
- * the data source's encoding via the constants defined in
20
- * the Encoding module.
21
- *
22
- * Example 1:
23
- *
24
- * parser = XML::Parser.new
25
- * parser.input.encoding = XML::Encoding::ISO_8859_1
26
- * parser.io = File.open('some_file', 'rb')
27
- * doc = parser.parse
28
- *
29
- * Example 2:
30
- *
31
- * parser = XML::HTMLParser.new
32
- * parser.encoding = XML::Encoding::ISO_8859_1
33
- * parser.file = "some_file"
34
- * doc = parser.parse
35
- *
36
- * Example 3:
37
- *
38
- * document = XML::Document.new
39
- * encoding_string = XML::Encoding.encoding_to_s(XML::Encoding::ISO_8859_1)
40
- * document.encoding = document
41
- * doc << XML::Node.new */
42
-
43
- VALUE
44
- ruby_xml_encoding_to_s(VALUE self, VALUE encoding)
45
- {
46
- char* encodingStr = NULL;
47
-
48
- switch (NUM2INT(encoding))
49
- {
50
- case XML_CHAR_ENCODING_ERROR:
51
- encodingStr = "Error";
52
- break;
53
- case XML_CHAR_ENCODING_NONE:
54
- encodingStr = "None";
55
- break;
56
- case XML_CHAR_ENCODING_UTF8:
57
- encodingStr = "UTF-8";
58
- break;
59
- case XML_CHAR_ENCODING_UTF16LE:
60
- encodingStr = "UTF-16LE";
61
- break;
62
- case XML_CHAR_ENCODING_UTF16BE:
63
- encodingStr = "UTF-16BE";
64
- break;
65
- case XML_CHAR_ENCODING_UCS4LE:
66
- encodingStr = "UCS-4LE";
67
- break;
68
- case XML_CHAR_ENCODING_UCS4BE:
69
- encodingStr = "UCS-4BE";
70
- break;
71
- case XML_CHAR_ENCODING_EBCDIC:
72
- encodingStr = "EBCDIC";
73
- break;
74
- case XML_CHAR_ENCODING_UCS4_2143:
75
- encodingStr = "UCS-4";
76
- break;
77
- case XML_CHAR_ENCODING_UCS4_3412:
78
- encodingStr = "UCS-4";
79
- break;
80
- case XML_CHAR_ENCODING_UCS2:
81
- encodingStr = "UCS-2";
82
- break;
83
- case XML_CHAR_ENCODING_8859_1:
84
- encodingStr = "ISO-8859-1";
85
- break;
86
- case XML_CHAR_ENCODING_8859_2:
87
- encodingStr = "ISO-8859-2";
88
- break;
89
- case XML_CHAR_ENCODING_8859_3:
90
- encodingStr = "ISO-8859-3";
91
- break;
92
- case XML_CHAR_ENCODING_8859_4:
93
- encodingStr = "ISO-8859-4";
94
- break;
95
- case XML_CHAR_ENCODING_8859_5:
96
- encodingStr = "ISO-8859-5";
97
- break;
98
- case XML_CHAR_ENCODING_8859_6:
99
- encodingStr = "ISO-8859-6";
100
- break;
101
- case XML_CHAR_ENCODING_8859_7:
102
- encodingStr = "ISO-8859-7";
103
- break;
104
- case XML_CHAR_ENCODING_8859_8:
105
- encodingStr = "ISO-8859-8";
106
- break;
107
- case XML_CHAR_ENCODING_8859_9:
108
- encodingStr = "ISO-8859-9";
109
- break;
110
- case XML_CHAR_ENCODING_2022_JP:
111
- encodingStr = "ISO-2022-JP";
112
- break;
113
- case XML_CHAR_ENCODING_SHIFT_JIS:
114
- encodingStr = "Shift_JIS";
115
- break;
116
- case XML_CHAR_ENCODING_EUC_JP:
117
- encodingStr = "EUC-JP";
118
- break;
119
- case XML_CHAR_ENCODING_ASCII:
120
- encodingStr = "ASCII";
121
- break;
122
- }
123
-
124
- return rb_str_new2(encodingStr);
125
- }
126
-
127
- // Rdoc needs to know
128
- #ifdef RDOC_NEVER_DEFINED
129
- mLibXML = rb_define_module("LibXML");
130
- mXML = rb_define_module_under(mLibXML, "XML");
131
- #endif
132
-
133
- void
134
- ruby_init_xml_encoding(void) {
135
- mXMLEncoding = rb_define_module_under(mXML, "Encoding");
136
-
137
- rb_define_module_function(mXMLEncoding, "encoding_to_s", ruby_xml_encoding_to_s, 1);
138
-
139
- rb_define_const(mXMLEncoding, "UNDEFINED", INT2NUM(XPATH_UNDEFINED));
140
- rb_define_const(mXMLEncoding, "ERROR", INT2NUM(XML_CHAR_ENCODING_ERROR)); /* No char encoding detected */
141
- rb_define_const(mXMLEncoding, "NONE", INT2NUM(XML_CHAR_ENCODING_NONE)); /* No char encoding detected */
142
- rb_define_const(mXMLEncoding, "UTF8", INT2NUM(XML_CHAR_ENCODING_UTF8)); /* UTF-8 */
143
- rb_define_const(mXMLEncoding, "UTF16LE", INT2NUM(XML_CHAR_ENCODING_UTF16LE)); /* UTF-16 little endian */
144
- rb_define_const(mXMLEncoding, "UTF16BE", INT2NUM(XML_CHAR_ENCODING_UTF16BE)); /* UTF-16 big endian */
145
- rb_define_const(mXMLEncoding, "UCS4LE", INT2NUM(XML_CHAR_ENCODING_UCS4LE)); /* UCS-4 little endian */
146
- rb_define_const(mXMLEncoding, "UCS4BE", INT2NUM(XML_CHAR_ENCODING_UCS4BE)); /* UCS-4 big endian */
147
- rb_define_const(mXMLEncoding, "EBCDIC", INT2NUM(XML_CHAR_ENCODING_EBCDIC)); /* EBCDIC uh! */
148
- rb_define_const(mXMLEncoding, "UCS4_2143", INT2NUM(XML_CHAR_ENCODING_UCS4_2143)); /* UCS-4 unusual ordering */
149
- rb_define_const(mXMLEncoding, "UCS4_3412", INT2NUM(XML_CHAR_ENCODING_UCS4_3412)); /* UCS-4 unusual ordering */
150
- rb_define_const(mXMLEncoding, "UCS2", INT2NUM(XML_CHAR_ENCODING_UCS2)); /* UCS-2 */
151
- rb_define_const(mXMLEncoding, "ISO_8859_1", INT2NUM(XML_CHAR_ENCODING_8859_1)); /* ISO-8859-1 ISO Latin 1 */
152
- rb_define_const(mXMLEncoding, "ISO_8859_2", INT2NUM(XML_CHAR_ENCODING_8859_2)); /* ISO-8859-2 ISO Latin 2 */
153
- rb_define_const(mXMLEncoding, "ISO_8859_3", INT2NUM(XML_CHAR_ENCODING_8859_3)); /* ISO-8859-3 */
154
- rb_define_const(mXMLEncoding, "ISO_8859_4", INT2NUM(XML_CHAR_ENCODING_8859_4)); /* ISO-8859-4 */
155
- rb_define_const(mXMLEncoding, "ISO_8859_5", INT2NUM(XML_CHAR_ENCODING_8859_5)); /* ISO-8859-5 */
156
- rb_define_const(mXMLEncoding, "ISO_8859_6", INT2NUM(XML_CHAR_ENCODING_8859_6)); /* ISO-8859-6 */
157
- rb_define_const(mXMLEncoding, "ISO_8859_7", INT2NUM(XML_CHAR_ENCODING_8859_7)); /* ISO-8859-7 */
158
- rb_define_const(mXMLEncoding, "ISO_8859_8", INT2NUM(XML_CHAR_ENCODING_8859_8)); /* ISO-8859-8 */
159
- rb_define_const(mXMLEncoding, "ISO_8859_9", INT2NUM(XML_CHAR_ENCODING_8859_9)); /* ISO-8859-9 */
160
- rb_define_const(mXMLEncoding, "ISO_2022_JP", INT2NUM(XML_CHAR_ENCODING_2022_JP)); /* ISO-2022-JP */
161
- rb_define_const(mXMLEncoding, "SHIFT_JIS", INT2NUM(XML_CHAR_ENCODING_SHIFT_JIS)); /* Shift_JIS */
162
- rb_define_const(mXMLEncoding, "EUC_JP", INT2NUM(XML_CHAR_ENCODING_EUC_JP)); /* EUC-JP */
163
- rb_define_const(mXMLEncoding, "ASCII", INT2NUM(XML_CHAR_ENCODING_ASCII)); /* pure ASCII */
164
- }