libxml-ruby 0.8.1-x86-mswin32-60 → 0.8.2-x86-mswin32-60

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. data/CHANGES +21 -0
  2. data/RAKEFILE +213 -0
  3. data/README +32 -11
  4. data/doc/rdoc/classes/LibXML.html +4 -0
  5. data/doc/rdoc/classes/LibXML/XML.html +7 -0
  6. data/doc/rdoc/classes/LibXML/XML/Attr.html +187 -177
  7. data/doc/rdoc/classes/LibXML/XML/Attributes.html +62 -61
  8. data/doc/rdoc/classes/LibXML/XML/Document.html +318 -254
  9. data/doc/rdoc/classes/LibXML/XML/Dtd.html +62 -8
  10. data/doc/rdoc/classes/LibXML/XML/Error.html +6 -0
  11. data/doc/rdoc/classes/LibXML/XML/HTMLParser.html +59 -41
  12. data/doc/rdoc/classes/LibXML/XML/InputCallbacks.html +12 -6
  13. data/doc/rdoc/classes/LibXML/XML/NS.html +65 -50
  14. data/doc/rdoc/classes/LibXML/XML/Node.html +671 -630
  15. data/doc/rdoc/classes/LibXML/XML/Node/FailedModify.html +12 -0
  16. data/doc/rdoc/classes/LibXML/XML/Node/Set.html +64 -60
  17. data/doc/rdoc/classes/LibXML/XML/Node/SetNamespace.html +12 -0
  18. data/doc/rdoc/classes/LibXML/XML/Node/UnknownType.html +12 -0
  19. data/doc/rdoc/classes/LibXML/XML/Parser.html +407 -383
  20. data/doc/rdoc/classes/LibXML/XML/Parser/Context.html +241 -219
  21. data/doc/rdoc/classes/LibXML/XML/Parser/ParseError.html +12 -0
  22. data/doc/rdoc/classes/LibXML/XML/Reader.html +421 -331
  23. data/doc/rdoc/classes/LibXML/XML/RelaxNG.html +237 -0
  24. data/doc/rdoc/classes/LibXML/XML/SaxParser.html +79 -60
  25. data/doc/rdoc/classes/LibXML/XML/Schema.html +109 -22
  26. data/doc/rdoc/classes/LibXML/XML/State.html +6 -0
  27. data/doc/rdoc/classes/LibXML/XML/XInclude.html +6 -0
  28. data/doc/rdoc/classes/LibXML/XML/XInclude/Error.html +6 -0
  29. data/doc/rdoc/classes/LibXML/XML/XPath.html +4 -48
  30. data/doc/rdoc/classes/LibXML/XML/XPath/Context.html +6 -5
  31. data/doc/rdoc/classes/LibXML/XML/XPath/InvalidPath.html +61 -0
  32. data/doc/rdoc/classes/LibXML/XML/XPath/Object.html +12 -8
  33. data/doc/rdoc/classes/LibXML/XML/XPointer.html +14 -8
  34. data/doc/rdoc/classes/LibXML/XML/XPointer/Context.html +6 -0
  35. data/doc/rdoc/classes/LibXML/XML/XPointer/Context/InvalidPath.html +6 -0
  36. data/doc/rdoc/classes/LibXML/XML/XPointer/InvalidExpression.html +13 -0
  37. data/doc/rdoc/created.rid +1 -1
  38. data/doc/rdoc/files/CHANGES.html +38 -10
  39. data/doc/rdoc/files/LICENSE.html +1 -1
  40. data/doc/rdoc/files/README.html +57 -23
  41. data/doc/rdoc/files/VERSION.html +1 -1
  42. data/doc/rdoc/files/ext/libxml/cbg_c.html +1 -1
  43. data/doc/rdoc/files/ext/libxml/libxml_c.html +1 -1
  44. data/doc/rdoc/files/ext/libxml/ruby_xml_attr_c.html +1 -1
  45. data/doc/rdoc/files/ext/libxml/ruby_xml_attributes_c.html +1 -1
  46. data/doc/rdoc/files/ext/libxml/ruby_xml_document_c.html +1 -1
  47. data/doc/rdoc/files/ext/libxml/ruby_xml_dtd_c.html +1 -1
  48. data/doc/rdoc/files/ext/libxml/ruby_xml_html_parser_c.html +1 -1
  49. data/doc/rdoc/files/ext/libxml/ruby_xml_input_cbg_c.html +1 -1
  50. data/doc/rdoc/files/ext/libxml/ruby_xml_node_c.html +1 -1
  51. data/doc/rdoc/files/ext/libxml/ruby_xml_node_set_c.html +1 -1
  52. data/doc/rdoc/files/ext/libxml/ruby_xml_ns_c.html +1 -1
  53. data/doc/rdoc/files/ext/libxml/ruby_xml_parser_c.html +1 -1
  54. data/doc/rdoc/files/ext/libxml/ruby_xml_parser_context_c.html +1 -1
  55. data/doc/rdoc/files/ext/libxml/ruby_xml_reader_c.html +1 -1
  56. data/doc/rdoc/{classes/XML.html → files/ext/libxml/ruby_xml_relaxng_c.html} +16 -35
  57. data/doc/rdoc/files/ext/libxml/ruby_xml_sax_parser_c.html +1 -1
  58. data/doc/rdoc/files/ext/libxml/ruby_xml_schema_c.html +1 -1
  59. data/doc/rdoc/files/ext/libxml/ruby_xml_state_c.html +1 -1
  60. data/doc/rdoc/files/ext/libxml/ruby_xml_xinclude_c.html +1 -1
  61. data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_c.html +1 -1
  62. data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_context_c.html +1 -1
  63. data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_object_c.html +1 -1
  64. data/doc/rdoc/files/ext/libxml/ruby_xml_xpointer_c.html +1 -1
  65. data/doc/rdoc/files/ext/libxml/ruby_xml_xpointer_context_c.html +1 -1
  66. data/doc/rdoc/files/lib/libxml/attr_rb.html +1 -1
  67. data/doc/rdoc/files/lib/libxml/attributes_rb.html +1 -1
  68. data/doc/rdoc/files/lib/libxml/document_rb.html +1 -1
  69. data/doc/rdoc/files/lib/libxml/node_rb.html +1 -1
  70. data/doc/rdoc/files/lib/libxml/node_set_rb.html +1 -1
  71. data/doc/rdoc/files/lib/libxml/parser_options_rb.html +1 -1
  72. data/doc/rdoc/files/lib/libxml/parser_rb.html +1 -1
  73. data/doc/rdoc/files/lib/libxml/properties_rb.html +1 -1
  74. data/doc/rdoc/files/lib/libxml/tree_rb.html +1 -1
  75. data/doc/rdoc/files/lib/libxml_rb.html +2 -2
  76. data/doc/rdoc/files/lib/xml/libxml_rb.html +12 -2
  77. data/doc/rdoc/files/lib/xml_rb.html +134 -0
  78. data/doc/rdoc/fr_class_index.html +1 -1
  79. data/doc/rdoc/fr_file_index.html +2 -0
  80. data/doc/rdoc/fr_method_index.html +349 -344
  81. data/ext/libxml/libxml.c +2 -1
  82. data/ext/libxml/ruby_libxml.h +1 -0
  83. data/ext/libxml/ruby_xml_attr.c +8 -2
  84. data/ext/libxml/ruby_xml_attributes.c +5 -5
  85. data/ext/libxml/ruby_xml_document.c +41 -2
  86. data/ext/libxml/ruby_xml_dtd.c +169 -169
  87. data/ext/libxml/ruby_xml_html_parser.c +449 -449
  88. data/ext/libxml/ruby_xml_input_cbg.c +165 -165
  89. data/ext/libxml/ruby_xml_node.c +1 -1
  90. data/ext/libxml/ruby_xml_node_set.c +172 -172
  91. data/ext/libxml/ruby_xml_ns.c +145 -145
  92. data/ext/libxml/ruby_xml_parser.c +1398 -1398
  93. data/ext/libxml/ruby_xml_parser_context.c +697 -697
  94. data/ext/libxml/ruby_xml_reader.c +44 -0
  95. data/ext/libxml/ruby_xml_reader.h +14 -14
  96. data/ext/libxml/ruby_xml_relaxng.c +97 -0
  97. data/ext/libxml/ruby_xml_relaxng.h +15 -0
  98. data/ext/libxml/ruby_xml_sax_parser.c +486 -486
  99. data/ext/libxml/ruby_xml_schema.c +1 -1
  100. data/ext/libxml/ruby_xml_state.c +4 -4
  101. data/ext/libxml/ruby_xml_xinclude.c +21 -21
  102. data/ext/libxml/ruby_xml_xpath.c +89 -89
  103. data/ext/libxml/ruby_xml_xpath_context.c +283 -283
  104. data/ext/libxml/ruby_xml_xpath_object.c +5 -5
  105. data/ext/libxml/ruby_xml_xpointer.c +104 -104
  106. data/ext/libxml/ruby_xml_xpointer_context.c +22 -22
  107. data/ext/libxml/version.h +2 -2
  108. data/ext/libxml/version.h.rej +17 -0
  109. data/ext/mingw/Rakefile +41 -0
  110. data/{mingw → lib}/libiconv-2.dll +0 -0
  111. data/lib/libxml.rb +15 -4
  112. data/lib/libxml2-2.dll +0 -0
  113. data/lib/libxml_ruby.dll.a +0 -0
  114. data/lib/libxml_ruby.so +0 -0
  115. data/lib/xml.rb +14 -0
  116. data/lib/xml/libxml.rb +4 -1
  117. data/test/etc_doc_to_s.rb +1 -1
  118. data/test/ets_copy_bug.rb +1 -1
  119. data/test/ets_copy_bug3.rb +1 -1
  120. data/test/ets_doc_file.rb +1 -1
  121. data/test/ets_doc_to_s.rb +1 -1
  122. data/test/ets_node_gc.rb +1 -1
  123. data/test/ets_tsr.rb +1 -1
  124. data/test/model/shiporder.rnc +28 -0
  125. data/test/model/shiporder.rng +86 -0
  126. data/test/{tc_xml_attributes.rb → tc_attributes.rb} +1 -10
  127. data/test/{tc_xml_document.rb → tc_document.rb} +1 -1
  128. data/test/{tc_xml_document_write.rb → tc_document_write.rb} +1 -1
  129. data/test/{tc_xml_dtd.rb → tc_dtd.rb} +1 -1
  130. data/test/{tc_xml_html_parser.rb → tc_html_parser.rb} +1 -1
  131. data/test/{tc_xml_node.rb → tc_node.rb} +1 -1
  132. data/test/{tc_xml_node_attr.rb → tc_node_attr.rb} +1 -1
  133. data/test/{tc_xml_node_cdata.rb → tc_node_cdata.rb} +24 -5
  134. data/test/{tc_xml_node_comment.rb → tc_node_comment.rb} +1 -1
  135. data/test/{tc_xml_node_copy.rb → tc_node_copy.rb} +1 -1
  136. data/test/{tc_xml_node_edit.rb → tc_node_edit.rb} +1 -1
  137. data/test/{tc_xml_node_set.rb → tc_node_set.rb} +1 -1
  138. data/test/{tc_xml_node_set2.rb → tc_node_set2.rb} +1 -1
  139. data/test/{tc_xml_node_text.rb → tc_node_text.rb} +1 -1
  140. data/test/{tc_xml_node_xlink.rb → tc_node_xlink.rb} +2 -2
  141. data/test/{tc_xml_parser.rb → tc_parser.rb} +1 -1
  142. data/test/{tc_xml_parser_context.rb → tc_parser_context.rb} +1 -1
  143. data/test/{tc_xml_properties.rb → tc_properties.rb} +1 -7
  144. data/test/{tc_xml_reader.rb → tc_reader.rb} +1 -1
  145. data/test/tc_relaxng.rb +39 -0
  146. data/test/{tc_xml_sax_parser.rb → tc_sax_parser.rb} +1 -1
  147. data/test/{tc_xml_schema.rb → tc_schema.rb} +1 -1
  148. data/test/{tc_xml_traversal.rb → tc_traversal.rb} +1 -1
  149. data/test/{tc_xml_xinclude.rb → tc_xinclude.rb} +1 -1
  150. data/test/{tc_xml_xpath.rb → tc_xpath.rb} +1 -1
  151. data/test/{tc_xml_xpath_context.rb → tc_xpath_context.rb} +1 -1
  152. data/test/{tc_xml_xpointer.rb → tc_xpointer.rb} +1 -1
  153. data/test/test_suite.rb +26 -25
  154. metadata +103 -100
  155. data/benchmark/depixelate.rb +0 -632
  156. data/benchmark/hamlet.xml +0 -9055
  157. data/benchmark/sock_entries.xml +0 -507
  158. data/benchmark/throughput.rb +0 -39
  159. data/benchmark/xml_benchmarks.rb +0 -227
  160. data/mingw/libxml2-2.dll +0 -0
  161. data/mingw/libxml_ruby.so +0 -0
  162. data/test/gc.log +0 -0
  163. data/vc/libxml_ruby.sln +0 -20
  164. data/vc/libxml_ruby.vcproj +0 -389
@@ -302,11 +302,11 @@ ruby_xml_xpath_object_debug(VALUE self) {
302
302
 
303
303
 
304
304
  // Rdoc needs to know
305
- #ifdef RDOC_NEVER_DEFINED
306
- mLibXML = rb_define_module("LibXML");
307
- mXML = rb_define_module_under(mLibXML, "XML");
308
- mXPath = rb_define_module_under(mXML, "XPath");
309
- #endif
305
+ #ifdef RDOC_NEVER_DEFINED
306
+ mLibXML = rb_define_module("LibXML");
307
+ mXML = rb_define_module_under(mLibXML, "XML");
308
+ mXPath = rb_define_module_under(mXML, "XPath");
309
+ #endif
310
310
 
311
311
  void
312
312
  ruby_init_xml_xpath_object(void) {
@@ -1,104 +1,104 @@
1
- /* $Id: ruby_xml_xpointer.c 461 2008-07-15 21:35:56Z cfis $ */
2
-
3
- /* Please see the LICENSE file for copyright and distribution information */
4
-
5
- #include "ruby_libxml.h"
6
- #include "ruby_xml_xpointer.h"
7
-
8
- VALUE cXMLXPointer;
9
- VALUE eXMLXPointerInvalidExpression;
10
-
11
- VALUE
12
- ruby_xml_xpointer_point(VALUE class, VALUE rnode, VALUE xptr_str) {
13
- #ifdef LIBXML_XPTR_ENABLED
14
- xmlNodePtr xnode;
15
- xmlXPathContextPtr xctxt;
16
- xmlXPathObjectPtr xpop;
17
-
18
- VALUE context;
19
- VALUE result;
20
- VALUE argv[1];
21
-
22
- Check_Type(xptr_str, T_STRING);
23
- if (rb_obj_is_kind_of(rnode, cXMLNode) == Qfalse)
24
- rb_raise(rb_eTypeError, "require an XML::Node object");
25
-
26
- Data_Get_Struct(rnode, xmlNode, xnode);
27
-
28
- argv[0] = rb_funcall(rnode, rb_intern("doc"), 0);
29
- context = rb_class_new_instance(1, argv, cXMLXPathContext);
30
- Data_Get_Struct(context, xmlXPathContext, xctxt);
31
-
32
- xpop = xmlXPtrEval((xmlChar*)StringValuePtr(xptr_str), xctxt);
33
- if (!xpop)
34
- rb_raise(eXMLXPointerInvalidExpression, "Invalid xpointer expression");
35
-
36
- result = ruby_xml_xpath_object_wrap(xpop);
37
- rb_iv_set(result, "@context", context);
38
-
39
- return(result);
40
- #else
41
- rb_warn("libxml was compiled without XPointer support");
42
- return(Qfalse);
43
- #endif
44
- }
45
-
46
-
47
- VALUE
48
- ruby_xml_xpointer_point2(VALUE node, VALUE xptr_str) {
49
- return(ruby_xml_xpointer_point(cXMLXPointer, node, xptr_str));
50
- }
51
-
52
-
53
- /*
54
- * call-seq:
55
- * XML::XPointer.range(start_node, end_node) -> xpath
56
- *
57
- * Create an xpath representing the range between the supplied
58
- * start and end node.
59
- */
60
- VALUE
61
- ruby_xml_xpointer_range(VALUE class, VALUE rstart, VALUE rend) {
62
- #ifdef LIBXML_XPTR_ENABLED
63
- xmlNodePtr start, end;
64
- VALUE rxxp;
65
- xmlXPathObjectPtr xpath;
66
-
67
- if (rb_obj_is_kind_of(rstart, cXMLNode) == Qfalse)
68
- rb_raise(rb_eTypeError, "require an XML::Node object as a starting point");
69
- if (rb_obj_is_kind_of(rend, cXMLNode) == Qfalse)
70
- rb_raise(rb_eTypeError, "require an XML::Node object as an ending point");
71
-
72
- Data_Get_Struct(rstart, xmlNode, start);
73
- if (start == NULL)
74
- return(Qnil);
75
-
76
- Data_Get_Struct(rend, xmlNode, end);
77
- if (end == NULL)
78
- return(Qnil);
79
-
80
- xpath = xmlXPtrNewRangeNodes(start, end);
81
- if (xpath == NULL)
82
- rb_fatal("You shouldn't be able to have this happen");
83
-
84
- rxxp = ruby_xml_xpath_object_wrap(xpath);
85
- return(rxxp);
86
- #else
87
- rb_warn("libxml was compiled without XPointer support");
88
- return(Qfalse);
89
- #endif
90
- }
91
-
92
- // Rdoc needs to know
93
- #ifdef RDOC_NEVER_DEFINED
94
- mLibXML = rb_define_module("LibXML");
95
- mXML = rb_define_module_under(mLibXML, "XML");
96
- #endif
97
-
98
- void
99
- ruby_init_xml_xpointer(void) {
100
- cXMLXPointer = rb_define_class_under(mXML, "XPointer", rb_cObject);
101
- eXMLXPointerInvalidExpression = rb_define_class_under(cXMLXPointer, "InvalidExpression", eXMLError);
102
-
103
- rb_define_singleton_method(cXMLXPointer, "range", ruby_xml_xpointer_range, 2);
104
- }
1
+ /* $Id: ruby_xml_xpointer.c 461 2008-07-15 21:35:56Z cfis $ */
2
+
3
+ /* Please see the LICENSE file for copyright and distribution information */
4
+
5
+ #include "ruby_libxml.h"
6
+ #include "ruby_xml_xpointer.h"
7
+
8
+ VALUE cXMLXPointer;
9
+ VALUE eXMLXPointerInvalidExpression;
10
+
11
+ VALUE
12
+ ruby_xml_xpointer_point(VALUE class, VALUE rnode, VALUE xptr_str) {
13
+ #ifdef LIBXML_XPTR_ENABLED
14
+ xmlNodePtr xnode;
15
+ xmlXPathContextPtr xctxt;
16
+ xmlXPathObjectPtr xpop;
17
+
18
+ VALUE context;
19
+ VALUE result;
20
+ VALUE argv[1];
21
+
22
+ Check_Type(xptr_str, T_STRING);
23
+ if (rb_obj_is_kind_of(rnode, cXMLNode) == Qfalse)
24
+ rb_raise(rb_eTypeError, "require an XML::Node object");
25
+
26
+ Data_Get_Struct(rnode, xmlNode, xnode);
27
+
28
+ argv[0] = rb_funcall(rnode, rb_intern("doc"), 0);
29
+ context = rb_class_new_instance(1, argv, cXMLXPathContext);
30
+ Data_Get_Struct(context, xmlXPathContext, xctxt);
31
+
32
+ xpop = xmlXPtrEval((xmlChar*)StringValuePtr(xptr_str), xctxt);
33
+ if (!xpop)
34
+ rb_raise(eXMLXPointerInvalidExpression, "Invalid xpointer expression");
35
+
36
+ result = ruby_xml_xpath_object_wrap(xpop);
37
+ rb_iv_set(result, "@context", context);
38
+
39
+ return(result);
40
+ #else
41
+ rb_warn("libxml was compiled without XPointer support");
42
+ return(Qfalse);
43
+ #endif
44
+ }
45
+
46
+
47
+ VALUE
48
+ ruby_xml_xpointer_point2(VALUE node, VALUE xptr_str) {
49
+ return(ruby_xml_xpointer_point(cXMLXPointer, node, xptr_str));
50
+ }
51
+
52
+
53
+ /*
54
+ * call-seq:
55
+ * XML::XPointer.range(start_node, end_node) -> xpath
56
+ *
57
+ * Create an xpath representing the range between the supplied
58
+ * start and end node.
59
+ */
60
+ VALUE
61
+ ruby_xml_xpointer_range(VALUE class, VALUE rstart, VALUE rend) {
62
+ #ifdef LIBXML_XPTR_ENABLED
63
+ xmlNodePtr start, end;
64
+ VALUE rxxp;
65
+ xmlXPathObjectPtr xpath;
66
+
67
+ if (rb_obj_is_kind_of(rstart, cXMLNode) == Qfalse)
68
+ rb_raise(rb_eTypeError, "require an XML::Node object as a starting point");
69
+ if (rb_obj_is_kind_of(rend, cXMLNode) == Qfalse)
70
+ rb_raise(rb_eTypeError, "require an XML::Node object as an ending point");
71
+
72
+ Data_Get_Struct(rstart, xmlNode, start);
73
+ if (start == NULL)
74
+ return(Qnil);
75
+
76
+ Data_Get_Struct(rend, xmlNode, end);
77
+ if (end == NULL)
78
+ return(Qnil);
79
+
80
+ xpath = xmlXPtrNewRangeNodes(start, end);
81
+ if (xpath == NULL)
82
+ rb_fatal("You shouldn't be able to have this happen");
83
+
84
+ rxxp = ruby_xml_xpath_object_wrap(xpath);
85
+ return(rxxp);
86
+ #else
87
+ rb_warn("libxml was compiled without XPointer support");
88
+ return(Qfalse);
89
+ #endif
90
+ }
91
+
92
+ // Rdoc needs to know
93
+ #ifdef RDOC_NEVER_DEFINED
94
+ mLibXML = rb_define_module("LibXML");
95
+ mXML = rb_define_module_under(mLibXML, "XML");
96
+ #endif
97
+
98
+ void
99
+ ruby_init_xml_xpointer(void) {
100
+ cXMLXPointer = rb_define_class_under(mXML, "XPointer", rb_cObject);
101
+ eXMLXPointerInvalidExpression = rb_define_class_under(cXMLXPointer, "InvalidExpression", eXMLError);
102
+
103
+ rb_define_singleton_method(cXMLXPointer, "range", ruby_xml_xpointer_range, 2);
104
+ }
@@ -1,22 +1,22 @@
1
- /* $Id: ruby_xml_xpointer_context.c 461 2008-07-15 21:35:56Z cfis $ */
2
-
3
- /* Please see the LICENSE file for copyright and distribution information */
4
-
5
- #include "ruby_libxml.h"
6
- #include "ruby_xml_xpointer_context.h"
7
-
8
- VALUE cXMLXPointerContext;
9
- VALUE eXMLXPointerContextInvalidPath;
10
-
11
- // Rdoc needs to know
12
- #ifdef RDOC_NEVER_DEFINED
13
- mLibXML = rb_define_module("LibXML");
14
- mXML = rb_define_module_under(mLibXML, "XML");
15
- cXMLXPointer = rb_define_class_under(mXML, "XPointer", rb_cObject);
16
- #endif
17
-
18
- void
19
- ruby_init_xml_xpointer_context(void) {
20
- cXMLXPointerContext = rb_define_class_under(cXMLXPointer, "Context", cXMLXPathContext);
21
- eXMLXPointerContextInvalidPath = rb_define_class_under(cXMLXPointerContext, "InvalidPath", eXMLError);
22
- }
1
+ /* $Id: ruby_xml_xpointer_context.c 461 2008-07-15 21:35:56Z cfis $ */
2
+
3
+ /* Please see the LICENSE file for copyright and distribution information */
4
+
5
+ #include "ruby_libxml.h"
6
+ #include "ruby_xml_xpointer_context.h"
7
+
8
+ VALUE cXMLXPointerContext;
9
+ VALUE eXMLXPointerContextInvalidPath;
10
+
11
+ // Rdoc needs to know
12
+ #ifdef RDOC_NEVER_DEFINED
13
+ mLibXML = rb_define_module("LibXML");
14
+ mXML = rb_define_module_under(mLibXML, "XML");
15
+ cXMLXPointer = rb_define_class_under(mXML, "XPointer", rb_cObject);
16
+ #endif
17
+
18
+ void
19
+ ruby_init_xml_xpointer_context(void) {
20
+ cXMLXPointerContext = rb_define_class_under(cXMLXPointer, "Context", cXMLXPathContext);
21
+ eXMLXPointerContextInvalidPath = rb_define_class_under(cXMLXPointerContext, "InvalidPath", eXMLError);
22
+ }
@@ -1,9 +1,9 @@
1
1
  /* Don't nuke this block! It is used for automatically updating the
2
2
  * versions below. VERSION = string formatting, VERNUM = numbered
3
3
  * version for inline testing: increment both or none at all.*/
4
- #define RUBY_LIBXML_VERSION "0.8.1"
4
+ #define RUBY_LIBXML_VERSION "0.8.2"
5
5
  #define RUBY_LIBXML_VERNUM 0
6
6
  #define RUBY_LIBXML_VER_MAJ 0
7
7
  #define RUBY_LIBXML_VER_MIN 8
8
- #define RUBY_LIBXML_VER_MIC 1
8
+ #define RUBY_LIBXML_VER_MIC 2
9
9
  #define RUBY_LIBXML_VER_PATCH 0
@@ -0,0 +1,17 @@
1
+ ***************
2
+ *** 1,7 ****
3
+ /* Don't nuke this block! It is used for automatically updating the
4
+ * versions below. VERSION = string formatting, VERNUM = numbered
5
+ * version for inline testing: increment both or none at all.*/
6
+ - #define RUBY_LIBXML_VERSION "0.8.0"
7
+ #define RUBY_LIBXML_VERNUM 0
8
+ #define RUBY_LIBXML_VER_MAJ 0
9
+ #define RUBY_LIBXML_VER_MIN 8
10
+ --- 1,7 ----
11
+ /* Don't nuke this block! It is used for automatically updating the
12
+ * versions below. VERSION = string formatting, VERNUM = numbered
13
+ * version for inline testing: increment both or none at all.*/
14
+ + #define RUBY_LIBXML_VERSION "0.8.1.1"
15
+ #define RUBY_LIBXML_VERNUM 0
16
+ #define RUBY_LIBXML_VER_MAJ 0
17
+ #define RUBY_LIBXML_VER_MIN 8
@@ -0,0 +1,41 @@
1
+ # We can't use Ruby's standard build procedures
2
+ # on Windows because the Ruby executable is
3
+ # built with VC++ while here we want to build
4
+ # with MingW. So just roll our own...
5
+
6
+ require 'rake/clean'
7
+ require 'rbconfig'
8
+
9
+ RUBY_INCLUDE_DIR = Config::CONFIG["archdir"]
10
+ RUBY_BIN_DIR = Config::CONFIG["bindir"]
11
+ RUBY_LIB_DIR = Config::CONFIG["libdir"]
12
+ RUBY_SHARED_LIB = Config::CONFIG["LIBRUBY"]
13
+ RUBY_SHARED_DLL = RUBY_SHARED_LIB.gsub(/lib$/, 'dll')
14
+
15
+ EXTENSION_NAME = "libxml_ruby.#{Config::CONFIG["DLEXT"]}"
16
+ # MingW insists the import library is .dll.a
17
+ EXTENSION_LIB_NAME = "libxml_ruby.dll.a"
18
+
19
+ CLEAN.include('*.o')
20
+ CLOBBER.include(EXTENSION_NAME)
21
+ CLOBBER.include(EXTENSION_LIB_NAME)
22
+
23
+ task :default => "libxml"
24
+
25
+ SRC = FileList['../libxml/*.c']
26
+ OBJ = SRC.collect do |file_name|
27
+ File.basename(file_name).ext('o')
28
+ end
29
+
30
+ SRC.each do |srcfile|
31
+ objfile = File.basename(srcfile).ext('o')
32
+ file objfile => srcfile do
33
+ command = "gcc -c -fPIC -O2 -Wall -o #{objfile} -I/usr/local/include #{srcfile} -I#{RUBY_INCLUDE_DIR}"
34
+ sh "sh -c '#{command}'"
35
+ end
36
+ end
37
+
38
+ file "libxml" => OBJ do
39
+ command = "gcc -shared -o #{EXTENSION_NAME} -Wl,--out-implib,#{EXTENSION_LIB_NAME} -L/usr/local/lib #{OBJ} -lxml2 #{RUBY_BIN_DIR}/#{RUBY_SHARED_DLL}"
40
+ sh "sh -c '#{command}'"
41
+ end
@@ -1,8 +1,17 @@
1
- # $Id: libxml.rb 458 2008-07-15 21:10:55Z cfis $
1
+ # $Id: libxml.rb 509 2008-07-22 02:11:00Z cfis $
2
2
  # Please see the LICENSE file for copyright and distribution information
3
3
 
4
+ # If running on Windows, then add the current directory to the PATH
5
+ # for the current process so it can find the pre-built libxml2 and
6
+ # iconv2 shared libraries (dlls).
7
+ if RUBY_PLATFORM.match(/mswin/i)
8
+ ENV['PATH'] += ";#{File.dirname(__FILE__)}"
9
+ end
10
+
11
+ # Load the C-based binding.
4
12
  require 'libxml_ruby'
5
13
 
14
+ # Load Ruby supporting code.
6
15
  require 'libxml/parser'
7
16
  require 'libxml/parser_options'
8
17
  require 'libxml/document'
@@ -17,6 +26,8 @@ require 'libxml/properties'
17
26
 
18
27
  # Map the LibXML module into the XML module for both backwards
19
28
  # compatibility and ease of use.
20
- module XML
21
- include LibXML::XML
22
- end
29
+ #
30
+ # DEPRECATED: Use require 'xml' instead!
31
+ #
32
+ # include LibXML
33
+
Binary file
Binary file
Binary file
@@ -0,0 +1,14 @@
1
+ # This file loads libxml and adds the LibXML namespace
2
+ # to the toplevel for conveneience. The end result
3
+ # is to have XML:: universally exposed.
4
+ #
5
+ # It is recommend that you only load this file for libs
6
+ # that do not have their own namespace, eg. administrative
7
+ # scripts, personal programs, etc. For other applications
8
+ # require 'libxml' instead and include LibXML into your
9
+ # app/libs namespace.
10
+
11
+ require 'libxml'
12
+
13
+ include LibXML
14
+
@@ -1,5 +1,8 @@
1
1
  # This is here for backward compatibility.
2
- # Ultimately we can deprecate it.
2
+ #
3
+ # TODO: DEPRECATE!
3
4
 
4
5
  require 'libxml.rb'
5
6
 
7
+ include LibXML
8
+
@@ -1,4 +1,4 @@
1
- require 'libxml'
1
+ require 'xml'
2
2
 
3
3
  1.times do |count|
4
4
 
@@ -1,4 +1,4 @@
1
- require 'libxml'
1
+ require 'xml'
2
2
 
3
3
  def test( doc2 )
4
4
  doc = XML::Document.new('1.0')
@@ -1,4 +1,4 @@
1
- require 'libxml'
1
+ require 'xml'
2
2
 
3
3
  str = <<-STR
4
4
  <html>
@@ -1,4 +1,4 @@
1
- require 'libxml'
1
+ require 'xml'
2
2
 
3
3
  # This is related to bug 8337, complaint is on amd64/fbsd
4
4
  # unknown if it happens on other amd64/os combos
@@ -1,4 +1,4 @@
1
- require 'libxml'
1
+ require 'xml'
2
2
 
3
3
  100.times do |count|
4
4
 
@@ -1,4 +1,4 @@
1
- require 'libxml'
1
+ require 'xml'
2
2
 
3
3
  # test of bug 13310, clears MEM2
4
4