libxml-ruby 0.9.8 → 0.9.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. data/CHANGES +41 -1
  2. data/LICENSE +3 -4
  3. data/README +37 -24
  4. data/Rakefile +2 -2
  5. data/ext/libxml/extconf.rb +31 -12
  6. data/ext/libxml/libxml.c +56 -858
  7. data/ext/libxml/ruby_libxml.h +93 -96
  8. data/ext/libxml/ruby_xml.c +855 -0
  9. data/ext/libxml/ruby_xml.h +9 -0
  10. data/ext/libxml/ruby_xml_attr.c +3 -9
  11. data/ext/libxml/ruby_xml_attr.h +2 -2
  12. data/ext/libxml/ruby_xml_attr_decl.c +2 -8
  13. data/ext/libxml/ruby_xml_attr_decl.h +1 -1
  14. data/ext/libxml/ruby_xml_attributes.c +6 -8
  15. data/ext/libxml/ruby_xml_attributes.h +1 -1
  16. data/ext/libxml/ruby_xml_document.c +915 -895
  17. data/ext/libxml/ruby_xml_document.h +2 -2
  18. data/ext/libxml/ruby_xml_dtd.c +257 -136
  19. data/ext/libxml/ruby_xml_dtd.h +1 -1
  20. data/ext/libxml/ruby_xml_encoding.c +55 -37
  21. data/ext/libxml/ruby_xml_encoding.h +1 -1
  22. data/ext/libxml/ruby_xml_error.c +526 -1058
  23. data/ext/libxml/ruby_xml_error.h +1 -1
  24. data/ext/libxml/ruby_xml_html_parser.c +2 -8
  25. data/ext/libxml/ruby_xml_html_parser.h +2 -2
  26. data/ext/libxml/ruby_xml_html_parser_context.c +175 -145
  27. data/ext/libxml/ruby_xml_html_parser_context.h +1 -1
  28. data/ext/libxml/ruby_xml_html_parser_options.c +12 -20
  29. data/ext/libxml/ruby_xml_html_parser_options.h +1 -1
  30. data/ext/libxml/ruby_xml_input_cbg.c +2 -8
  31. data/ext/libxml/ruby_xml_input_cbg.h +1 -1
  32. data/ext/libxml/ruby_xml_namespace.c +2 -8
  33. data/ext/libxml/ruby_xml_namespace.h +2 -2
  34. data/ext/libxml/ruby_xml_namespaces.c +1 -9
  35. data/ext/libxml/ruby_xml_namespaces.h +1 -1
  36. data/ext/libxml/ruby_xml_node.c +182 -121
  37. data/ext/libxml/ruby_xml_node.h +2 -2
  38. data/ext/libxml/ruby_xml_parser.c +2 -8
  39. data/ext/libxml/ruby_xml_parser.h +2 -2
  40. data/ext/libxml/ruby_xml_parser_context.c +952 -901
  41. data/ext/libxml/ruby_xml_parser_context.h +2 -2
  42. data/ext/libxml/ruby_xml_parser_options.c +2 -9
  43. data/ext/libxml/ruby_xml_parser_options.h +1 -1
  44. data/ext/libxml/ruby_xml_reader.c +1002 -993
  45. data/ext/libxml/ruby_xml_reader.h +1 -1
  46. data/ext/libxml/ruby_xml_relaxng.c +1 -7
  47. data/ext/libxml/ruby_xml_relaxng.h +1 -1
  48. data/ext/libxml/ruby_xml_sax2_handler.c +2 -2
  49. data/ext/libxml/ruby_xml_sax2_handler.h +1 -1
  50. data/ext/libxml/ruby_xml_sax_parser.c +2 -8
  51. data/ext/libxml/ruby_xml_sax_parser.h +2 -2
  52. data/ext/libxml/ruby_xml_schema.c +1 -7
  53. data/ext/libxml/ruby_xml_schema.h +1 -1
  54. data/ext/libxml/{version.h → ruby_xml_version.h} +2 -2
  55. data/ext/libxml/ruby_xml_xinclude.c +2 -8
  56. data/ext/libxml/ruby_xml_xinclude.h +2 -2
  57. data/ext/libxml/ruby_xml_xpath.c +17 -18
  58. data/ext/libxml/ruby_xml_xpath.h +2 -2
  59. data/ext/libxml/ruby_xml_xpath_context.c +387 -389
  60. data/ext/libxml/ruby_xml_xpath_context.h +2 -2
  61. data/ext/libxml/ruby_xml_xpath_expression.c +18 -8
  62. data/ext/libxml/ruby_xml_xpath_expression.h +1 -1
  63. data/ext/libxml/ruby_xml_xpath_object.c +19 -8
  64. data/ext/libxml/ruby_xml_xpath_object.h +1 -1
  65. data/ext/libxml/ruby_xml_xpointer.c +2 -8
  66. data/ext/libxml/ruby_xml_xpointer.h +2 -2
  67. data/ext/vc/libxml_ruby.sln +7 -1
  68. data/lib/libxml.rb +1 -12
  69. data/lib/libxml/attr.rb +0 -3
  70. data/lib/libxml/attr_decl.rb +0 -3
  71. data/lib/libxml/attributes.rb +0 -3
  72. data/lib/libxml/document.rb +31 -5
  73. data/lib/libxml/error.rb +8 -4
  74. data/lib/libxml/properties.rb +0 -5
  75. data/lib/libxml/sax_callbacks.rb +30 -19
  76. data/lib/libxml/tree.rb +0 -1
  77. data/lib/libxml/xpath_object.rb +0 -13
  78. data/test/model/definition.dtd +8 -0
  79. data/test/tc_attributes.rb +4 -1
  80. data/test/tc_document.rb +16 -0
  81. data/test/tc_dtd.rb +30 -2
  82. data/test/tc_html_parser.rb +55 -10
  83. data/test/tc_node.rb +67 -1
  84. data/test/tc_node_edit.rb +26 -6
  85. data/test/tc_node_text.rb +41 -23
  86. data/test/tc_parser.rb +50 -0
  87. data/test/tc_reader.rb +15 -0
  88. data/test/tc_relaxng.rb +1 -1
  89. data/test/tc_sax_parser.rb +37 -5
  90. data/test/tc_schema.rb +1 -1
  91. data/test/tc_xpath.rb +1 -0
  92. data/test/tc_xpath_expression.rb +4 -2
  93. metadata +6 -6
  94. data/ext/libxml/ruby_xml_state.c +0 -51
  95. data/ext/libxml/ruby_xml_state.h +0 -11
  96. data/ext/vc/libxml_ruby.vcproj +0 -460
@@ -7,7 +7,7 @@
7
7
 
8
8
  extern VALUE eXMLError;
9
9
 
10
- void ruby_init_xml_error();
10
+ void rxml_init_error();
11
11
  VALUE rxml_error_wrap(xmlErrorPtr xerror);
12
12
  void rxml_raise(xmlErrorPtr xerror);
13
13
 
@@ -1,4 +1,4 @@
1
- /* $Id: ruby_xml_html_parser.c 737 2009-01-23 01:23:08Z walltndr $ */
1
+ /* $Id: ruby_xml_html_parser.c 758 2009-01-25 20:36:03Z cfis $ */
2
2
 
3
3
  /* Please see the LICENSE file for copyright and distribution information */
4
4
 
@@ -77,13 +77,7 @@ static VALUE rxml_html_parser_parse(VALUE self)
77
77
  return rxml_document_wrap(ctxt->myDoc);
78
78
  }
79
79
 
80
- // Rdoc needs to know
81
- #ifdef RDOC_NEVER_DEFINED
82
- mLibXML = rb_define_module("LibXML");
83
- mXML = rb_define_module_under(mLibXML, "XML");
84
- #endif
85
-
86
- void ruby_init_html_parser(void)
80
+ void rxml_init_html_parser(void)
87
81
  {
88
82
  CONTEXT_ATTR = rb_intern("@context");
89
83
 
@@ -1,4 +1,4 @@
1
- /* $Id: ruby_xml_html_parser.h 711 2009-01-20 07:17:15Z cfis $ */
1
+ /* $Id: ruby_xml_html_parser.h 758 2009-01-25 20:36:03Z cfis $ */
2
2
 
3
3
  /* Please see the LICENSE file for copyright and distribution information */
4
4
 
@@ -7,6 +7,6 @@
7
7
 
8
8
  extern VALUE cXMLHtmlParser;
9
9
 
10
- void ruby_init_html_parser(void);
10
+ void rxml_init_html_parser(void);
11
11
 
12
12
  #endif
@@ -1,145 +1,175 @@
1
- /* $Id: ruby_xml_parser_context.c 710 2009-01-20 05:30:51Z cfis $ */
2
-
3
- /* Please see the LICENSE file for copyright and distribution information */
4
-
5
- #include "ruby_libxml.h"
6
- #include "ruby_xml_html_parser_context.h"
7
-
8
- /*
9
- * Document-class: LibXML::XML::HTMLParser::Context
10
- *
11
- * The XML::HTMLParser::Context class provides in-depth control over how
12
- * a document is parsed.
13
- */
14
-
15
- VALUE cXMLHtmlParserContext;
16
-
17
- static void rxml_html_parser_context_free(xmlParserCtxtPtr ctxt)
18
- {
19
- xmlFreeParserCtxt(ctxt);
20
- }
21
-
22
- static VALUE rxml_html_parser_context_wrap(xmlParserCtxtPtr ctxt)
23
- {
24
- return Data_Wrap_Struct(cXMLHtmlParserContext, NULL, rxml_html_parser_context_free, ctxt);
25
- }
26
-
27
- /* call-seq:
28
- * XML::HTMLParser::Context.file(file) -> XML::HTMLParser::Context
29
- *
30
- * Creates a new parser context based on the specified file or uri.
31
- *
32
- * Parameters:
33
- *
34
- * file - A filename or uri.
35
- */
36
- static VALUE rxml_html_parser_context_file(VALUE klass, VALUE file)
37
- {
38
- xmlParserCtxtPtr ctxt = htmlCreateFileParserCtxt(StringValuePtr(file), NULL);
39
- return rxml_html_parser_context_wrap(ctxt);
40
- }
41
-
42
- /* call-seq:
43
- * XML::HTMLParser::Context.io(io) -> XML::HTMLParser::Context
44
- *
45
- * Creates a new parser context based on the specified io object.
46
- *
47
- * Parameters:
48
- *
49
- * io - A ruby IO object.
50
- */
51
- static VALUE rxml_html_parser_context_io(VALUE klass, VALUE io)
52
- {
53
- htmlParserCtxtPtr ctxt;
54
- xmlParserInputBufferPtr input;
55
- xmlParserInputPtr stream;
56
-
57
- input = xmlParserInputBufferCreateIO((xmlInputReadCallback) rxml_read_callback, NULL,
58
- (void*)io, XML_CHAR_ENCODING_NONE);
59
-
60
- ctxt = htmlNewParserCtxt();
61
- if (!ctxt)
62
- {
63
- xmlFreeParserInputBuffer(input);
64
- rxml_raise(&xmlLastError);
65
- }
66
-
67
- stream = xmlNewIOInputStream(ctxt, input, XML_CHAR_ENCODING_NONE);
68
-
69
- if (!stream)
70
- {
71
- xmlFreeParserInputBuffer(input);
72
- xmlFreeParserCtxt(ctxt);
73
- rxml_raise(&xmlLastError);
74
- }
75
- inputPush(ctxt, stream);
76
-
77
- return rxml_html_parser_context_wrap(ctxt);
78
- }
79
-
80
- /* call-seq:
81
- * XML::HTMLParser::Context.string(string) -> XML::HTMLParser::Context
82
- *
83
- * Creates a new parser context based on the specified string.
84
- *
85
- * Parameters:
86
- *
87
- * string - A string that contains the data to parse.
88
- */
89
- static VALUE rxml_html_parser_context_string(VALUE klass, VALUE string)
90
- {
91
- xmlParserCtxtPtr ctxt;
92
- Check_Type(string, T_STRING);
93
-
94
- if (RSTRING_LEN(string) == 0)
95
- rb_raise(rb_eArgError, "Must specify a string with one or more characters");
96
-
97
- ctxt = xmlCreateMemoryParserCtxt(StringValuePtr(string),
98
- RSTRING_LEN(string));
99
- if (!ctxt)
100
- rxml_raise(&xmlLastError);
101
-
102
- htmlDefaultSAXHandlerInit();
103
- if (ctxt->sax != NULL)
104
- memcpy(ctxt->sax, &htmlDefaultSAXHandler, sizeof(xmlSAXHandlerV1));
105
-
106
- return rxml_html_parser_context_wrap(ctxt);
107
- }
108
-
109
- /*
110
- * call-seq:
111
- * context.options = XML::Parser::Options::NOENT |
112
- XML::Parser::Options::NOCDATA
113
- *
114
- * Provides control over the execution of a parser. Valid values
115
- * are the constants defined on XML::Parser::Options. Multiple
116
- * options can be combined by using Bitwise OR (|).
117
- */
118
- static VALUE rxml_html_parser_context_options_set(VALUE self, VALUE options)
119
- {
120
- int result;
121
- xmlParserCtxtPtr ctxt;
122
- Check_Type(options, T_FIXNUM);
123
-
124
- Data_Get_Struct(self, xmlParserCtxt, ctxt);
125
- result = htmlCtxtUseOptions(ctxt, NUM2INT(options));
126
-
127
- return self;
128
- }
129
-
130
- // Rdoc needs to know
131
- #ifdef RDOC_NEVER_DEFINED
132
- mLibXML = rb_define_module("LibXML");
133
- mXML = rb_define_module_under(mLibXML, "XML");
134
- cXMLHtmlParser = rb_define_class_under(mXML, "HTMLParser", rb_cObject);
135
- #endif
136
-
137
- void ruby_init_html_parser_context(void)
138
- {
139
- cXMLHtmlParserContext = rb_define_class_under(cXMLHtmlParser, "Context", cXMLParserContext);
140
-
141
- rb_define_singleton_method(cXMLHtmlParserContext, "file", rxml_html_parser_context_file, 1);
142
- rb_define_singleton_method(cXMLHtmlParserContext, "io", rxml_html_parser_context_io, 1);
143
- rb_define_singleton_method(cXMLHtmlParserContext, "string", rxml_html_parser_context_string, 1);
144
- rb_define_method(cXMLHtmlParserContext, "options=", rxml_html_parser_context_options_set, 1);
145
- }
1
+ /* $Id: ruby_xml_parser_context.c 710 2009-01-20 05:30:51Z cfis $ */
2
+
3
+ /* Please see the LICENSE file for copyright and distribution information */
4
+
5
+ #include "ruby_libxml.h"
6
+ #include "ruby_xml_html_parser_context.h"
7
+
8
+ /*
9
+ * Document-class: LibXML::XML::HTMLParser::Context
10
+ *
11
+ * The XML::HTMLParser::Context class provides in-depth control over how
12
+ * a document is parsed.
13
+ */
14
+
15
+ VALUE cXMLHtmlParserContext;
16
+ ID IO_ATTR;
17
+
18
+ static void rxml_html_parser_context_free(xmlParserCtxtPtr ctxt)
19
+ {
20
+ xmlFreeParserCtxt(ctxt);
21
+ }
22
+
23
+ static VALUE rxml_html_parser_context_wrap(xmlParserCtxtPtr ctxt)
24
+ {
25
+ return Data_Wrap_Struct(cXMLHtmlParserContext, NULL, rxml_html_parser_context_free, ctxt);
26
+ }
27
+
28
+ /* call-seq:
29
+ * XML::HTMLParser::Context.file(file) -> XML::HTMLParser::Context
30
+ *
31
+ * Creates a new parser context based on the specified file or uri.
32
+ *
33
+ * Parameters:
34
+ *
35
+ * file - A filename or uri.
36
+ */
37
+ static VALUE rxml_html_parser_context_file(VALUE klass, VALUE file)
38
+ {
39
+ xmlParserCtxtPtr ctxt = htmlCreateFileParserCtxt(StringValuePtr(file), NULL);
40
+ if (!ctxt)
41
+ rxml_raise(&xmlLastError);
42
+
43
+ return rxml_html_parser_context_wrap(ctxt);
44
+ }
45
+
46
+ /* call-seq:
47
+ * XML::HTMLParser::Context.io(io) -> XML::HTMLParser::Context
48
+ *
49
+ * Creates a new parser context based on the specified io object.
50
+ *
51
+ * Parameters:
52
+ *
53
+ * io - A ruby IO object.
54
+ */
55
+ static VALUE rxml_html_parser_context_io(VALUE klass, VALUE io)
56
+ {
57
+ VALUE result;
58
+ htmlParserCtxtPtr ctxt;
59
+ xmlParserInputBufferPtr input;
60
+ xmlParserInputPtr stream;
61
+
62
+ if (NIL_P(io))
63
+ rb_raise(rb_eTypeError, "Must pass in an IO object");
64
+
65
+ input = xmlParserInputBufferCreateIO((xmlInputReadCallback) rxml_read_callback, NULL,
66
+ (void*)io, XML_CHAR_ENCODING_NONE);
67
+
68
+ ctxt = htmlNewParserCtxt();
69
+ if (!ctxt)
70
+ {
71
+ xmlFreeParserInputBuffer(input);
72
+ rxml_raise(&xmlLastError);
73
+ }
74
+
75
+ stream = xmlNewIOInputStream(ctxt, input, XML_CHAR_ENCODING_NONE);
76
+
77
+ if (!stream)
78
+ {
79
+ xmlFreeParserInputBuffer(input);
80
+ xmlFreeParserCtxt(ctxt);
81
+ rxml_raise(&xmlLastError);
82
+ }
83
+ inputPush(ctxt, stream);
84
+ result = rxml_html_parser_context_wrap(ctxt);
85
+
86
+ /* Attach io object to parser so it won't get freed.*/
87
+ rb_ivar_set(result, IO_ATTR, io);
88
+
89
+ return result;
90
+ }
91
+
92
+ /* call-seq:
93
+ * XML::HTMLParser::Context.string(string) -> XML::HTMLParser::Context
94
+ *
95
+ * Creates a new parser context based on the specified string.
96
+ *
97
+ * Parameters:
98
+ *
99
+ * string - A string that contains the data to parse.
100
+ */
101
+ static VALUE rxml_html_parser_context_string(VALUE klass, VALUE string)
102
+ {
103
+ xmlParserCtxtPtr ctxt;
104
+ Check_Type(string, T_STRING);
105
+
106
+ if (RSTRING_LEN(string) == 0)
107
+ rb_raise(rb_eArgError, "Must specify a string with one or more characters");
108
+
109
+ ctxt = xmlCreateMemoryParserCtxt(StringValuePtr(string),
110
+ RSTRING_LEN(string));
111
+ if (!ctxt)
112
+ rxml_raise(&xmlLastError);
113
+
114
+ htmlDefaultSAXHandlerInit();
115
+ if (ctxt->sax != NULL)
116
+ memcpy(ctxt->sax, &htmlDefaultSAXHandler, sizeof(xmlSAXHandlerV1));
117
+
118
+ return rxml_html_parser_context_wrap(ctxt);
119
+ }
120
+
121
+ /*
122
+ * call-seq:
123
+ * context.disable_cdata = (true|false)
124
+ *
125
+ * Control whether the CDATA nodes will be created in this context.
126
+ */
127
+ static VALUE rxml_html_parser_context_disable_cdata_set(VALUE self, VALUE bool)
128
+ {
129
+ xmlParserCtxtPtr ctxt;
130
+ Data_Get_Struct(self, xmlParserCtxt, ctxt);
131
+
132
+ if (ctxt->sax == NULL)
133
+ rb_raise(rb_eRuntimeError, "Sax handler is not yet set");
134
+
135
+ /* LibXML controls this internally with the default SAX handler. */
136
+ if (bool)
137
+ ctxt->sax->cdataBlock = NULL;
138
+ else
139
+ ctxt->sax->cdataBlock = htmlDefaultSAXHandler.cdataBlock;
140
+
141
+ return bool;
142
+ }
143
+
144
+ /*
145
+ * call-seq:
146
+ * context.options = XML::Parser::Options::NOENT |
147
+ XML::Parser::Options::NOCDATA
148
+ *
149
+ * Provides control over the execution of a parser. Valid values
150
+ * are the constants defined on XML::Parser::Options. Multiple
151
+ * options can be combined by using Bitwise OR (|).
152
+ */
153
+ static VALUE rxml_html_parser_context_options_set(VALUE self, VALUE options)
154
+ {
155
+ int result;
156
+ xmlParserCtxtPtr ctxt;
157
+ Check_Type(options, T_FIXNUM);
158
+
159
+ Data_Get_Struct(self, xmlParserCtxt, ctxt);
160
+ result = htmlCtxtUseOptions(ctxt, NUM2INT(options));
161
+
162
+ return self;
163
+ }
164
+
165
+ void rxml_init_html_parser_context(void)
166
+ {
167
+ IO_ATTR = ID2SYM(rb_intern("@io"));
168
+ cXMLHtmlParserContext = rb_define_class_under(cXMLHtmlParser, "Context", cXMLParserContext);
169
+
170
+ rb_define_singleton_method(cXMLHtmlParserContext, "file", rxml_html_parser_context_file, 1);
171
+ rb_define_singleton_method(cXMLHtmlParserContext, "io", rxml_html_parser_context_io, 1);
172
+ rb_define_singleton_method(cXMLHtmlParserContext, "string", rxml_html_parser_context_string, 1);
173
+ rb_define_method(cXMLHtmlParserContext, "disable_cdata=", rxml_html_parser_context_disable_cdata_set, 1);
174
+ rb_define_method(cXMLHtmlParserContext, "options=", rxml_html_parser_context_options_set, 1);
175
+ }
@@ -7,6 +7,6 @@
7
7
 
8
8
  extern VALUE cXMLHtmlParserContext;
9
9
 
10
- void ruby_init_html_parser_context(void);
10
+ void rxml_init_html_parser_context(void);
11
11
 
12
12
  #endif
@@ -4,45 +4,37 @@
4
4
 
5
5
  #include "ruby_libxml.h"
6
6
 
7
-
8
- /* Document-class: LibXML::XML::HTMLParserOptions
7
+ /* Document-class: LibXML::XML::HTMLParser::Options
9
8
  *
10
- * Options that control the operation of the HTMLParser. The easiest
11
- * way to set a parser's options is to use the methods
9
+ * Options to control the operation of the HTMLParser. The easiest
10
+ * way to set a parser's options is via the methods
12
11
  * XML::HTMLParser.file, XML::HTMLParser.io or XML::HTMLParser.string.
13
12
  * For additional control, see XML::HTMLParser::Context#options=.
14
13
  */
15
14
 
16
15
  VALUE mXMLHtmlParserOptions;
17
16
 
18
-
19
- // Rdoc needs to know
20
- #ifdef RDOC_NEVER_DEFINED
21
- mLibXML = rb_define_module("LibXML");
22
- mXML = rb_define_module_under(mLibXML, "XML");
23
- cXMLHtmlParser = rb_define_class_under(mXML, "HTMLParser", rb_cObject);
24
- #endif
25
-
26
- void ruby_init_html_parser_options(void)
17
+ void rxml_init_html_parser_options(void)
27
18
  {
28
19
  mXMLHtmlParserOptions = rb_define_module_under(cXMLHtmlParser, "Options");
29
20
 
21
+
30
22
  #if LIBXML_VERSION >= 20621
31
- /* Relaxed parsing */
23
+ /* 1: Relax parsing. */
32
24
  rb_define_const(mXMLHtmlParserOptions, "RECOVER", INT2NUM(HTML_PARSE_RECOVER));
33
25
  #endif
34
- /* suppress error reports */
26
+ /* 32: Suppress error reports. */
35
27
  rb_define_const(mXMLHtmlParserOptions, "NOERROR", INT2NUM(HTML_PARSE_NOERROR));
36
- /* suppress warning reports */
28
+ /* 64: Suppress warning reports. */
37
29
  rb_define_const(mXMLHtmlParserOptions, "NOWARNING", INT2NUM(HTML_PARSE_NOWARNING));
38
- /* pedantic error reporting */
30
+ /* 128: Enable pedantic error reporting. */
39
31
  rb_define_const(mXMLHtmlParserOptions, "PEDANTIC", INT2NUM(HTML_PARSE_PEDANTIC));
40
- /* remove blank nodes */
32
+ /* 256: Remove blank nodes. */
41
33
  rb_define_const(mXMLHtmlParserOptions, "NOBLANKS", INT2NUM(HTML_PARSE_NOBLANKS));
42
34
  #if LIBXML_VERSION >= 20621
43
- /* Forbid network access */
35
+ /* 2048: Forbid network access. */
44
36
  rb_define_const(mXMLHtmlParserOptions, "NONET", INT2NUM(HTML_PARSE_NONET));
45
- /* compact small text nodes */
37
+ /* 65536: Compact small text nodes. */
46
38
  rb_define_const(mXMLHtmlParserOptions, "COMPACT", INT2NUM(HTML_PARSE_COMPACT));
47
39
  #endif
48
40
  }
@@ -7,6 +7,6 @@
7
7
 
8
8
  extern VALUE mXMLHtmlParserOptions;
9
9
 
10
- void ruby_init_html_parser_options(void);
10
+ void rxml_init_html_parser_options(void);
11
11
 
12
12
  #endif
@@ -3,7 +3,7 @@
3
3
  #include "ruby_libxml.h"
4
4
  #include "ruby_xml_input_cbg.h"
5
5
 
6
- /* Document-class: LibXML::XML::EncodingCallbacks
6
+ /* Document-class: LibXML::XML::InputCallbacks
7
7
  *
8
8
  * Support for adding custom scheme handlers. */
9
9
 
@@ -176,13 +176,7 @@ static VALUE input_callbacks_remove_scheme(VALUE self, VALUE scheme_name)
176
176
  return Qfalse;
177
177
  }
178
178
 
179
- // Rdoc needs to know
180
- #ifdef RDOC_NEVER_DEFINED
181
- mLibXML = rb_define_module("LibXML");
182
- mXML = rb_define_module_under(mLibXML, "XML");
183
- #endif
184
-
185
- void ruby_init_input_callbacks(void)
179
+ void rxml_init_input_callbacks(void)
186
180
  {
187
181
  VALUE cInputCallbacks;
188
182
  cInputCallbacks = rb_define_class_under(mXML, "InputCallbacks", rb_cObject);