libxml-ruby 4.1.1-x64-mingw-ucrt → 5.0.0-x64-mingw-ucrt

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/HISTORY +22 -0
  3. data/ext/libxml/extconf.rb +67 -61
  4. data/ext/libxml/ruby_libxml.h +43 -44
  5. data/ext/libxml/ruby_xml.c +0 -343
  6. data/ext/libxml/ruby_xml.h +9 -10
  7. data/ext/libxml/ruby_xml_attr_decl.c +154 -153
  8. data/ext/libxml/ruby_xml_attributes.c +276 -275
  9. data/ext/libxml/ruby_xml_attributes.h +2 -0
  10. data/ext/libxml/ruby_xml_document.c +6 -6
  11. data/ext/libxml/ruby_xml_document.h +11 -11
  12. data/ext/libxml/ruby_xml_dtd.c +3 -3
  13. data/ext/libxml/ruby_xml_encoding.h +20 -18
  14. data/ext/libxml/ruby_xml_error.c +9 -6
  15. data/ext/libxml/ruby_xml_error.h +2 -2
  16. data/ext/libxml/ruby_xml_html_parser_context.c +35 -21
  17. data/ext/libxml/ruby_xml_namespace.c +0 -3
  18. data/ext/libxml/ruby_xml_node.c +1394 -1398
  19. data/ext/libxml/ruby_xml_parser.h +1 -1
  20. data/ext/libxml/ruby_xml_parser_context.c +47 -39
  21. data/ext/libxml/ruby_xml_parser_options.c +9 -1
  22. data/ext/libxml/ruby_xml_parser_options.h +1 -1
  23. data/ext/libxml/ruby_xml_reader.c +1244 -1242
  24. data/ext/libxml/ruby_xml_relaxng.c +113 -112
  25. data/ext/libxml/ruby_xml_sax2_handler.c +1 -1
  26. data/ext/libxml/ruby_xml_sax_parser.c +1 -9
  27. data/ext/libxml/ruby_xml_schema.c +422 -420
  28. data/ext/libxml/ruby_xml_schema_attribute.c +108 -107
  29. data/ext/libxml/ruby_xml_schema_element.c +70 -69
  30. data/ext/libxml/ruby_xml_schema_type.c +252 -251
  31. data/ext/libxml/ruby_xml_version.h +5 -5
  32. data/ext/libxml/ruby_xml_writer.c +1138 -1137
  33. data/ext/libxml/ruby_xml_xpath.c +1 -1
  34. data/ext/libxml/ruby_xml_xpath_context.c +2 -2
  35. data/ext/libxml/ruby_xml_xpath_expression.c +81 -81
  36. data/ext/libxml/ruby_xml_xpath_object.c +340 -339
  37. data/lib/3.2/libxml_ruby.so +0 -0
  38. data/lib/3.3/libxml_ruby.so +0 -0
  39. data/lib/libxml/document.rb +13 -13
  40. data/lib/libxml/html_parser.rb +23 -23
  41. data/lib/libxml/parser.rb +26 -24
  42. data/lib/libxml/schema/element.rb +27 -19
  43. data/test/test.rb +5 -0
  44. data/test/test_document_write.rb +1 -4
  45. data/test/test_dtd.rb +1 -4
  46. data/test/test_encoding.rb +1 -4
  47. data/test/test_helper.rb +9 -2
  48. data/test/test_html_parser.rb +162 -162
  49. data/test/test_namespace.rb +1 -3
  50. data/test/test_node.rb +1 -3
  51. data/test/test_node_write.rb +1 -4
  52. data/test/test_parser.rb +26 -17
  53. data/test/test_reader.rb +4 -4
  54. data/test/test_sax_parser.rb +1 -1
  55. data/test/test_schema.rb +237 -231
  56. data/test/test_xml.rb +0 -99
  57. metadata +5 -4
  58. data/lib/3.1/libxml_ruby.so +0 -0
@@ -1,275 +1,276 @@
1
- /* Please see the LICENSE file for copyright and distribution information */
2
-
3
- /*
4
- * Document-class: LibXML::XML::Attributes
5
- *
6
- * Provides access to an element's attributes (XML::Attr).
7
- *
8
- * Basic Usage:
9
- * require 'test_helper'
10
- *
11
- * doc = XML::Document.new(<some_file>)
12
- * attributes = doc.root.attributes
13
- *
14
- * attributes.each do |attribute|
15
- * ..
16
- * end
17
- *
18
- * attributes['foo'] = 'bar'
19
- * attribute = attributes.get_attribute['foo']
20
- * attribute.value == 'foo'
21
- *
22
- * To access a namespaced attribute:
23
- *
24
- * XLINK_URI = 'http://www.w3.org/1999/xlink'
25
- *
26
- * attribute = attributes.get_attribute_ns(XLINK_URI, 'title')
27
- * attribute.value = 'My title'
28
- */
29
-
30
- #include "ruby_libxml.h"
31
- #include "ruby_xml_attributes.h"
32
-
33
- VALUE cXMLAttributes;
34
-
35
- void rxml_attributes_mark(xmlNodePtr xnode)
36
- {
37
- rxml_node_mark(xnode);
38
- }
39
-
40
- /*
41
- * Creates a new attributes instance. Not exposed to ruby.
42
- */
43
- VALUE rxml_attributes_new(xmlNodePtr xnode)
44
- {
45
- return Data_Wrap_Struct(cXMLAttributes, rxml_attributes_mark, NULL, xnode);
46
- }
47
-
48
- /*
49
- * call-seq:
50
- * attributes.node -> XML::Node
51
- *
52
- * Return the node that owns this attributes list.
53
- *
54
- * doc.root.attributes.node == doc.root
55
- */
56
- VALUE rxml_attributes_node_get(VALUE self)
57
- {
58
- xmlNodePtr xnode;
59
- Data_Get_Struct(self, xmlNode, xnode);
60
- return rxml_node_wrap(xnode);
61
- }
62
-
63
- /*
64
- * call-seq:
65
- * attributes.get_attribute("name") -> (XML::Attr | XML::AtrrDecl)
66
- *
67
- * Returns the specified attribute. If the attribute does not
68
- * exist but the document has an associated DTD that defines
69
- * a default value for the attribute, then a XML::AttrDecl is
70
- * returned.
71
- *
72
- * name: The name of the attribute, not including a namespace.
73
- *
74
- * doc.root.attributes.get_attribute("foo")
75
- */
76
- static VALUE rxml_attributes_get_attribute(VALUE self, VALUE name)
77
- {
78
- xmlNodePtr xnode;
79
- xmlAttrPtr xattr;
80
-
81
- name = rb_obj_as_string(name);
82
-
83
- Data_Get_Struct(self, xmlNode, xnode);
84
-
85
- xattr = xmlHasProp(xnode, (xmlChar*) StringValuePtr(name));
86
-
87
- if (!xattr)
88
- return Qnil;
89
- else if (xattr->type == XML_ATTRIBUTE_DECL)
90
- return rxml_attr_decl_wrap((xmlAttributePtr)xattr);
91
- else
92
- return rxml_attr_wrap(xattr);
93
- }
94
-
95
- /*
96
- * call-seq:
97
- * attributes.get_attribute_ns("namespace", "name") -> (XML::Attr | XML::AtrrDecl)
98
- *
99
- * Returns the specified attribute. If the attribute does not
100
- * exist but the document has an associated DTD that defines
101
- * a default value for the attribute, then a XML::AttrDecl is
102
- * returned.
103
- *
104
- * namespace: The URI of the attribute's namespace.
105
- * name: The name of the attribute, not including a namespace.
106
- *
107
- * doc.root.attributes.get_attribute_ns('http://www.w3.org/1999/xlink', 'href')
108
- */
109
- static VALUE rxml_attributes_get_attribute_ns(VALUE self, VALUE namespace,
110
- VALUE name)
111
- {
112
- xmlNodePtr xnode;
113
- xmlAttrPtr xattr;
114
-
115
- name = rb_obj_as_string(name);
116
-
117
- Data_Get_Struct(self, xmlNode, xnode);
118
-
119
- xattr = xmlHasNsProp(xnode, (xmlChar*) StringValuePtr(name),
120
- (xmlChar*) StringValuePtr(namespace));
121
-
122
- if (!xattr)
123
- return Qnil;
124
- else if (xattr->type == XML_ATTRIBUTE_DECL)
125
- return rxml_attr_decl_wrap((xmlAttributePtr)xattr);
126
- else
127
- return rxml_attr_wrap(xattr);
128
- }
129
-
130
- /*
131
- * call-seq:
132
- * attributes["name"] -> String
133
- *
134
- * Fetches an attribute value. If you want to access the underlying
135
- * Attribute itself use get_attribute.
136
- *
137
- * name: The name of the attribute, not including any namespaces.
138
- *
139
- * doc.root.attributes['att'] -> 'some value'
140
- */
141
- VALUE rxml_attributes_attribute_get(VALUE self, VALUE name)
142
- {
143
- VALUE xattr = rxml_attributes_get_attribute(self, name);
144
-
145
- if (NIL_P(xattr))
146
- return Qnil;
147
- else
148
- return rxml_attr_value_get(xattr);
149
- }
150
-
151
- /*
152
- * call-seq:
153
- * attributes["name"] = "value"
154
- *
155
- * Sets an attribute value. If you want to get the Attribute itself,
156
- * use get_attribute.
157
- *
158
- * name: The name of the attribute, not including any namespaces.
159
- * value: The new value of the namespace.
160
- *
161
- * doc.root.attributes['att'] = 'some value'
162
- */
163
- VALUE rxml_attributes_attribute_set(VALUE self, VALUE name, VALUE value)
164
- {
165
- VALUE xattr = rxml_attributes_get_attribute(self, name);
166
- if (NIL_P(xattr))
167
- {
168
- VALUE args[3];
169
-
170
- args[0] = rxml_attributes_node_get(self);
171
- args[1] = name;
172
- args[2] = value;
173
-
174
- return rb_class_new_instance(sizeof(args)/sizeof(VALUE), args, cXMLAttr);
175
- }
176
- else
177
- {
178
- return rxml_attr_value_set(xattr, value);
179
- }
180
- }
181
-
182
- /*
183
- * call-seq:
184
- * attributes.each {block} -> XML::Attr
185
- *
186
- * Iterates over each attribute.
187
- *
188
- * doc.root.attributes.each {|attribute| puts attribute.name}
189
- */
190
- static VALUE rxml_attributes_each(VALUE self)
191
- {
192
- xmlNodePtr xnode;
193
- xmlAttrPtr xattr;
194
- Data_Get_Struct(self, xmlNode, xnode);
195
-
196
- xattr = xnode->properties;
197
-
198
- while (xattr)
199
- {
200
- /* Get the next attribute while we still can - the user
201
- may remove the yielded attribute. */
202
- xmlAttrPtr next = xattr->next;
203
-
204
- VALUE attr = rxml_attr_wrap(xattr);
205
- rb_yield(attr);
206
- xattr = next;
207
- }
208
-
209
- return self;
210
- }
211
-
212
- /*
213
- * call-seq:
214
- * attributes.length -> Integer
215
- *
216
- * Returns the number of attributes.
217
- *
218
- * doc.root.attributes.length
219
- */
220
- static VALUE rxml_attributes_length(VALUE self)
221
- {
222
- int length = 0;
223
- xmlNodePtr xnode;
224
- xmlAttrPtr xattr;
225
- Data_Get_Struct(self, xmlNode, xnode);
226
-
227
- xattr = xnode->properties;
228
-
229
- while (xattr)
230
- {
231
- length++;
232
- xattr = xattr->next;
233
- }
234
-
235
- return INT2NUM(length);
236
- }
237
-
238
- /*
239
- * call-seq:
240
- * attributes.first -> XML::Attr
241
- *
242
- * Returns the first attribute.
243
- *
244
- * doc.root.attributes.first
245
- */
246
- static VALUE rxml_attributes_first(VALUE self)
247
- {
248
- xmlNodePtr xnode;
249
- Data_Get_Struct(self, xmlNode, xnode);
250
-
251
- if (xnode->type == XML_ELEMENT_NODE)
252
- {
253
- xmlAttrPtr xattr = xnode->properties;
254
-
255
- if (xattr)
256
- {
257
- return rxml_attr_wrap(xattr);
258
- }
259
- }
260
- return Qnil;
261
- }
262
-
263
- void rxml_init_attributes(void)
264
- {
265
- cXMLAttributes = rb_define_class_under(mXML, "Attributes", rb_cObject);
266
- rb_include_module(cXMLAttributes, rb_mEnumerable);
267
- rb_define_method(cXMLAttributes, "node", rxml_attributes_node_get, 0);
268
- rb_define_method(cXMLAttributes, "get_attribute", rxml_attributes_get_attribute, 1);
269
- rb_define_method(cXMLAttributes, "get_attribute_ns", rxml_attributes_get_attribute_ns, 2);
270
- rb_define_method(cXMLAttributes, "[]", rxml_attributes_attribute_get, 1);
271
- rb_define_method(cXMLAttributes, "[]=", rxml_attributes_attribute_set, 2);
272
- rb_define_method(cXMLAttributes, "each", rxml_attributes_each, 0);
273
- rb_define_method(cXMLAttributes, "length", rxml_attributes_length, 0);
274
- rb_define_method(cXMLAttributes, "first", rxml_attributes_first, 0);
275
- }
1
+ /* Please see the LICENSE file for copyright and distribution information */
2
+
3
+ /*
4
+ * Document-class: LibXML::XML::Attributes
5
+ *
6
+ * Provides access to an element's attributes (XML::Attr).
7
+ *
8
+ * Basic Usage:
9
+ * require 'test_helper'
10
+ *
11
+ * doc = XML::Document.new(<some_file>)
12
+ * attributes = doc.root.attributes
13
+ *
14
+ * attributes.each do |attribute|
15
+ * ..
16
+ * end
17
+ *
18
+ * attributes['foo'] = 'bar'
19
+ * attribute = attributes.get_attribute['foo']
20
+ * attribute.value == 'foo'
21
+ *
22
+ * To access a namespaced attribute:
23
+ *
24
+ * XLINK_URI = 'http://www.w3.org/1999/xlink'
25
+ *
26
+ * attribute = attributes.get_attribute_ns(XLINK_URI, 'title')
27
+ * attribute.value = 'My title'
28
+ */
29
+
30
+ #include "ruby_libxml.h"
31
+ #include "ruby_xml_attributes.h"
32
+
33
+ VALUE cXMLAttributes;
34
+
35
+ void rxml_attributes_mark(xmlNodePtr xnode)
36
+ {
37
+ rxml_node_mark(xnode);
38
+ }
39
+
40
+ /*
41
+ * Creates a new attributes instance. Not exposed to ruby.
42
+ */
43
+ VALUE rxml_attributes_new(xmlNodePtr xnode)
44
+ {
45
+ return Data_Wrap_Struct(cXMLAttributes, rxml_attributes_mark, NULL, xnode);
46
+ }
47
+
48
+ /*
49
+ * call-seq:
50
+ * attributes.node -> XML::Node
51
+ *
52
+ * Return the node that owns this attributes list.
53
+ *
54
+ * doc.root.attributes.node == doc.root
55
+ */
56
+ VALUE rxml_attributes_node_get(VALUE self)
57
+ {
58
+ xmlNodePtr xnode;
59
+ Data_Get_Struct(self, xmlNode, xnode);
60
+ return rxml_node_wrap(xnode);
61
+ }
62
+
63
+ /*
64
+ * call-seq:
65
+ * attributes.get_attribute("name") -> (XML::Attr | XML::AtrrDecl)
66
+ *
67
+ * Returns the specified attribute. If the attribute does not
68
+ * exist but the document has an associated DTD that defines
69
+ * a default value for the attribute, then a XML::AttrDecl is
70
+ * returned.
71
+ *
72
+ * name: The name of the attribute, not including a namespace.
73
+ *
74
+ * doc.root.attributes.get_attribute("foo")
75
+ */
76
+ static VALUE rxml_attributes_get_attribute(VALUE self, VALUE name)
77
+ {
78
+ xmlNodePtr xnode;
79
+ xmlAttrPtr xattr;
80
+
81
+ name = rb_obj_as_string(name);
82
+
83
+ Data_Get_Struct(self, xmlNode, xnode);
84
+
85
+ xattr = xmlHasProp(xnode, (xmlChar*) StringValuePtr(name));
86
+
87
+ if (!xattr)
88
+ return Qnil;
89
+ else if (xattr->type == XML_ATTRIBUTE_DECL)
90
+ return rxml_attr_decl_wrap((xmlAttributePtr)xattr);
91
+ else
92
+ return rxml_attr_wrap(xattr);
93
+ }
94
+
95
+ /*
96
+ * call-seq:
97
+ * attributes.get_attribute_ns("namespace", "name") -> (XML::Attr | XML::AtrrDecl)
98
+ *
99
+ * Returns the specified attribute. If the attribute does not
100
+ * exist but the document has an associated DTD that defines
101
+ * a default value for the attribute, then a XML::AttrDecl is
102
+ * returned.
103
+ *
104
+ * namespace: The URI of the attribute's namespace.
105
+ * name: The name of the attribute, not including a namespace.
106
+ *
107
+ * doc.root.attributes.get_attribute_ns('http://www.w3.org/1999/xlink', 'href')
108
+ */
109
+ static VALUE rxml_attributes_get_attribute_ns(VALUE self, VALUE namespace,
110
+ VALUE name)
111
+ {
112
+ xmlNodePtr xnode;
113
+ xmlAttrPtr xattr;
114
+
115
+ name = rb_obj_as_string(name);
116
+
117
+ Data_Get_Struct(self, xmlNode, xnode);
118
+
119
+ xattr = xmlHasNsProp(xnode, (xmlChar*) StringValuePtr(name),
120
+ (xmlChar*) StringValuePtr(namespace));
121
+
122
+ if (!xattr)
123
+ return Qnil;
124
+ else if (xattr->type == XML_ATTRIBUTE_DECL)
125
+ return rxml_attr_decl_wrap((xmlAttributePtr)xattr);
126
+ else
127
+ return rxml_attr_wrap(xattr);
128
+ }
129
+
130
+ /*
131
+ * call-seq:
132
+ * attributes["name"] -> String
133
+ *
134
+ * Fetches an attribute value. If you want to access the underlying
135
+ * Attribute itself use get_attribute.
136
+ *
137
+ * name: The name of the attribute, not including any namespaces.
138
+ *
139
+ * doc.root.attributes['att'] -> 'some value'
140
+ */
141
+ VALUE rxml_attributes_attribute_get(VALUE self, VALUE name)
142
+ {
143
+ VALUE xattr = rxml_attributes_get_attribute(self, name);
144
+
145
+ if (NIL_P(xattr))
146
+ return Qnil;
147
+ else
148
+ return rxml_attr_value_get(xattr);
149
+ }
150
+
151
+ /*
152
+ * call-seq:
153
+ * attributes["name"] = "value"
154
+ *
155
+ * Sets an attribute value. If you want to get the Attribute itself,
156
+ * use get_attribute.
157
+ *
158
+ * name: The name of the attribute, not including any namespaces.
159
+ * value: The new value of the namespace.
160
+ *
161
+ * doc.root.attributes['att'] = 'some value'
162
+ */
163
+ VALUE rxml_attributes_attribute_set(VALUE self, VALUE name, VALUE value)
164
+ {
165
+ VALUE xattr = rxml_attributes_get_attribute(self, name);
166
+ if (NIL_P(xattr))
167
+ {
168
+ VALUE args[3];
169
+
170
+ args[0] = rxml_attributes_node_get(self);
171
+ args[1] = name;
172
+ args[2] = value;
173
+
174
+ return rb_class_new_instance(sizeof(args)/sizeof(VALUE), args, cXMLAttr);
175
+ }
176
+ else
177
+ {
178
+ return rxml_attr_value_set(xattr, value);
179
+ }
180
+ }
181
+
182
+ /*
183
+ * call-seq:
184
+ * attributes.each {block} -> XML::Attr
185
+ *
186
+ * Iterates over each attribute.
187
+ *
188
+ * doc.root.attributes.each {|attribute| puts attribute.name}
189
+ */
190
+ static VALUE rxml_attributes_each(VALUE self)
191
+ {
192
+ xmlNodePtr xnode;
193
+ xmlAttrPtr xattr;
194
+ Data_Get_Struct(self, xmlNode, xnode);
195
+
196
+ xattr = xnode->properties;
197
+
198
+ while (xattr)
199
+ {
200
+ /* Get the next attribute while we still can - the user
201
+ may remove the yielded attribute. */
202
+ xmlAttrPtr next = xattr->next;
203
+
204
+ VALUE attr = rxml_attr_wrap(xattr);
205
+ rb_yield(attr);
206
+ xattr = next;
207
+ }
208
+
209
+ return self;
210
+ }
211
+
212
+ /*
213
+ * call-seq:
214
+ * attributes.length -> Integer
215
+ *
216
+ * Returns the number of attributes.
217
+ *
218
+ * doc.root.attributes.length
219
+ */
220
+ static VALUE rxml_attributes_length(VALUE self)
221
+ {
222
+ int length = 0;
223
+ xmlNodePtr xnode;
224
+ xmlAttrPtr xattr;
225
+ Data_Get_Struct(self, xmlNode, xnode);
226
+
227
+ xattr = xnode->properties;
228
+
229
+ while (xattr)
230
+ {
231
+ length++;
232
+ xattr = xattr->next;
233
+ }
234
+
235
+ return INT2NUM(length);
236
+ }
237
+
238
+ /*
239
+ * call-seq:
240
+ * attributes.first -> XML::Attr
241
+ *
242
+ * Returns the first attribute.
243
+ *
244
+ * doc.root.attributes.first
245
+ */
246
+ static VALUE rxml_attributes_first(VALUE self)
247
+ {
248
+ xmlNodePtr xnode;
249
+ Data_Get_Struct(self, xmlNode, xnode);
250
+
251
+ if (xnode->type == XML_ELEMENT_NODE)
252
+ {
253
+ xmlAttrPtr xattr = xnode->properties;
254
+
255
+ if (xattr)
256
+ {
257
+ return rxml_attr_wrap(xattr);
258
+ }
259
+ }
260
+ return Qnil;
261
+ }
262
+
263
+ void rxml_init_attributes(void)
264
+ {
265
+ cXMLAttributes = rb_define_class_under(mXML, "Attributes", rb_cObject);
266
+ rb_undef_alloc_func(cXMLAttributes);
267
+ rb_include_module(cXMLAttributes, rb_mEnumerable);
268
+ rb_define_method(cXMLAttributes, "node", rxml_attributes_node_get, 0);
269
+ rb_define_method(cXMLAttributes, "get_attribute", rxml_attributes_get_attribute, 1);
270
+ rb_define_method(cXMLAttributes, "get_attribute_ns", rxml_attributes_get_attribute_ns, 2);
271
+ rb_define_method(cXMLAttributes, "[]", rxml_attributes_attribute_get, 1);
272
+ rb_define_method(cXMLAttributes, "[]=", rxml_attributes_attribute_set, 2);
273
+ rb_define_method(cXMLAttributes, "each", rxml_attributes_each, 0);
274
+ rb_define_method(cXMLAttributes, "length", rxml_attributes_length, 0);
275
+ rb_define_method(cXMLAttributes, "first", rxml_attributes_first, 0);
276
+ }
@@ -3,6 +3,8 @@
3
3
  #ifndef __RXML_ATTRIBUTES__
4
4
  #define __RXML_ATTRIBUTES__
5
5
 
6
+ #include <libxml/tree.h>
7
+
6
8
  extern VALUE cXMLAttributesibutes;
7
9
 
8
10
  void rxml_init_attributes(void);
@@ -542,7 +542,7 @@ static VALUE rxml_document_import(VALUE self, VALUE node)
542
542
  xresult = xmlDocCopyNode(xnode, xdoc, 1);
543
543
 
544
544
  if (xresult == NULL)
545
- rxml_raise(&xmlLastError);
545
+ rxml_raise(xmlGetLastError());
546
546
 
547
547
  return rxml_node_wrap(xresult);
548
548
  }
@@ -808,7 +808,7 @@ static VALUE rxml_document_save(int argc, VALUE *argv, VALUE self)
808
808
  length = xmlSaveFormatFileEnc(xfilename, xdoc, (const char*)xencoding, indent);
809
809
 
810
810
  if (length == -1)
811
- rxml_raise(&xmlLastError);
811
+ rxml_raise(xmlGetLastError());
812
812
 
813
813
  return (INT2NUM(length));
814
814
  }
@@ -958,7 +958,7 @@ static VALUE rxml_document_xinclude(VALUE self)
958
958
  }
959
959
  else
960
960
  {
961
- rxml_raise(&xmlLastError);
961
+ rxml_raise(xmlGetLastError());
962
962
  return Qnil;
963
963
  }
964
964
  #else
@@ -1007,7 +1007,7 @@ static VALUE rxml_document_validate_schema(VALUE self, VALUE schema)
1007
1007
  xmlSchemaFreeValidCtxt(vptr);
1008
1008
  if (is_invalid)
1009
1009
  {
1010
- rxml_raise(&xmlLastError);
1010
+ rxml_raise(xmlGetLastError());
1011
1011
  return Qfalse;
1012
1012
  }
1013
1013
  else
@@ -1040,7 +1040,7 @@ static VALUE rxml_document_validate_relaxng(VALUE self, VALUE relaxng)
1040
1040
  xmlRelaxNGFreeValidCtxt(vptr);
1041
1041
  if (is_invalid)
1042
1042
  {
1043
- rxml_raise(&xmlLastError);
1043
+ rxml_raise(xmlGetLastError());
1044
1044
  return Qfalse;
1045
1045
  }
1046
1046
  else
@@ -1075,7 +1075,7 @@ static VALUE rxml_document_validate_dtd(VALUE self, VALUE dtd)
1075
1075
  }
1076
1076
  else
1077
1077
  {
1078
- rxml_raise(&xmlLastError);
1078
+ rxml_raise(xmlGetLastError());
1079
1079
  return Qfalse;
1080
1080
  }
1081
1081
  }
@@ -1,11 +1,11 @@
1
- /* Please see the LICENSE file for copyright and distribution information */
2
-
3
- #ifndef __RXML_DOCUMENT__
4
- #define __RXML_DOCUMENT__
5
-
6
- extern VALUE cXMLDocument;
7
- void rxml_init_document();
8
- VALUE rxml_document_wrap(xmlDocPtr xnode);
9
-
10
- typedef xmlChar * xmlCharPtr;
11
- #endif
1
+ /* Please see the LICENSE file for copyright and distribution information */
2
+
3
+ #ifndef __RXML_DOCUMENT__
4
+ #define __RXML_DOCUMENT__
5
+
6
+ extern VALUE cXMLDocument;
7
+ void rxml_init_document(void);
8
+ VALUE rxml_document_wrap(xmlDocPtr xnode);
9
+
10
+ typedef xmlChar * xmlCharPtr;
11
+ #endif
@@ -181,7 +181,7 @@ static VALUE rxml_dtd_initialize(int argc, VALUE *argv, VALUE self)
181
181
  xdtd = xmlCreateIntSubset(xdoc, xname, xpublic, xsystem);
182
182
 
183
183
  if (xdtd == NULL)
184
- rxml_raise(&xmlLastError);
184
+ rxml_raise(xmlGetLastError());
185
185
 
186
186
  /* Document will free this dtd now. */
187
187
  RDATA(self)->dfree = NULL;
@@ -201,7 +201,7 @@ static VALUE rxml_dtd_initialize(int argc, VALUE *argv, VALUE self)
201
201
  (xmlChar*) StringValuePtr(system));
202
202
 
203
203
  if (xdtd == NULL)
204
- rxml_raise(&xmlLastError);
204
+ rxml_raise(xmlGetLastError());
205
205
 
206
206
  DATA_PTR(self) = xdtd;
207
207
 
@@ -221,7 +221,7 @@ static VALUE rxml_dtd_initialize(int argc, VALUE *argv, VALUE self)
221
221
  xdtd = xmlIOParseDTD(NULL, buffer, enc);
222
222
 
223
223
  if (xdtd == NULL)
224
- rxml_raise(&xmlLastError);
224
+ rxml_raise(xmlGetLastError());
225
225
 
226
226
  xmlFree(new_string);
227
227