libxml-ruby 0.8.1-x86-mswin32-60 → 0.8.2-x86-mswin32-60
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.
- data/CHANGES +21 -0
- data/RAKEFILE +213 -0
- data/README +32 -11
- data/doc/rdoc/classes/LibXML.html +4 -0
- data/doc/rdoc/classes/LibXML/XML.html +7 -0
- data/doc/rdoc/classes/LibXML/XML/Attr.html +187 -177
- data/doc/rdoc/classes/LibXML/XML/Attributes.html +62 -61
- data/doc/rdoc/classes/LibXML/XML/Document.html +318 -254
- data/doc/rdoc/classes/LibXML/XML/Dtd.html +62 -8
- data/doc/rdoc/classes/LibXML/XML/Error.html +6 -0
- data/doc/rdoc/classes/LibXML/XML/HTMLParser.html +59 -41
- data/doc/rdoc/classes/LibXML/XML/InputCallbacks.html +12 -6
- data/doc/rdoc/classes/LibXML/XML/NS.html +65 -50
- data/doc/rdoc/classes/LibXML/XML/Node.html +671 -630
- data/doc/rdoc/classes/LibXML/XML/Node/FailedModify.html +12 -0
- data/doc/rdoc/classes/LibXML/XML/Node/Set.html +64 -60
- data/doc/rdoc/classes/LibXML/XML/Node/SetNamespace.html +12 -0
- data/doc/rdoc/classes/LibXML/XML/Node/UnknownType.html +12 -0
- data/doc/rdoc/classes/LibXML/XML/Parser.html +407 -383
- data/doc/rdoc/classes/LibXML/XML/Parser/Context.html +241 -219
- data/doc/rdoc/classes/LibXML/XML/Parser/ParseError.html +12 -0
- data/doc/rdoc/classes/LibXML/XML/Reader.html +421 -331
- data/doc/rdoc/classes/LibXML/XML/RelaxNG.html +237 -0
- data/doc/rdoc/classes/LibXML/XML/SaxParser.html +79 -60
- data/doc/rdoc/classes/LibXML/XML/Schema.html +109 -22
- data/doc/rdoc/classes/LibXML/XML/State.html +6 -0
- data/doc/rdoc/classes/LibXML/XML/XInclude.html +6 -0
- data/doc/rdoc/classes/LibXML/XML/XInclude/Error.html +6 -0
- data/doc/rdoc/classes/LibXML/XML/XPath.html +4 -48
- data/doc/rdoc/classes/LibXML/XML/XPath/Context.html +6 -5
- data/doc/rdoc/classes/LibXML/XML/XPath/InvalidPath.html +61 -0
- data/doc/rdoc/classes/LibXML/XML/XPath/Object.html +12 -8
- data/doc/rdoc/classes/LibXML/XML/XPointer.html +14 -8
- data/doc/rdoc/classes/LibXML/XML/XPointer/Context.html +6 -0
- data/doc/rdoc/classes/LibXML/XML/XPointer/Context/InvalidPath.html +6 -0
- data/doc/rdoc/classes/LibXML/XML/XPointer/InvalidExpression.html +13 -0
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/CHANGES.html +38 -10
- data/doc/rdoc/files/LICENSE.html +1 -1
- data/doc/rdoc/files/README.html +57 -23
- data/doc/rdoc/files/VERSION.html +1 -1
- data/doc/rdoc/files/ext/libxml/cbg_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/libxml_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_attr_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_attributes_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_document_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_dtd_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_html_parser_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_input_cbg_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_node_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_node_set_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_ns_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_parser_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_parser_context_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_reader_c.html +1 -1
- data/doc/rdoc/{classes/XML.html → files/ext/libxml/ruby_xml_relaxng_c.html} +16 -35
- data/doc/rdoc/files/ext/libxml/ruby_xml_sax_parser_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_schema_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_state_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_xinclude_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_context_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_object_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpointer_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpointer_context_c.html +1 -1
- data/doc/rdoc/files/lib/libxml/attr_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml/attributes_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml/document_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml/node_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml/node_set_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml/parser_options_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml/parser_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml/properties_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml/tree_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml_rb.html +2 -2
- data/doc/rdoc/files/lib/xml/libxml_rb.html +12 -2
- data/doc/rdoc/files/lib/xml_rb.html +134 -0
- data/doc/rdoc/fr_class_index.html +1 -1
- data/doc/rdoc/fr_file_index.html +2 -0
- data/doc/rdoc/fr_method_index.html +349 -344
- data/ext/libxml/libxml.c +2 -1
- data/ext/libxml/ruby_libxml.h +1 -0
- data/ext/libxml/ruby_xml_attr.c +8 -2
- data/ext/libxml/ruby_xml_attributes.c +5 -5
- data/ext/libxml/ruby_xml_document.c +41 -2
- data/ext/libxml/ruby_xml_dtd.c +169 -169
- data/ext/libxml/ruby_xml_html_parser.c +449 -449
- data/ext/libxml/ruby_xml_input_cbg.c +165 -165
- data/ext/libxml/ruby_xml_node.c +1 -1
- data/ext/libxml/ruby_xml_node_set.c +172 -172
- data/ext/libxml/ruby_xml_ns.c +145 -145
- data/ext/libxml/ruby_xml_parser.c +1398 -1398
- data/ext/libxml/ruby_xml_parser_context.c +697 -697
- data/ext/libxml/ruby_xml_reader.c +44 -0
- data/ext/libxml/ruby_xml_reader.h +14 -14
- data/ext/libxml/ruby_xml_relaxng.c +97 -0
- data/ext/libxml/ruby_xml_relaxng.h +15 -0
- data/ext/libxml/ruby_xml_sax_parser.c +486 -486
- data/ext/libxml/ruby_xml_schema.c +1 -1
- data/ext/libxml/ruby_xml_state.c +4 -4
- data/ext/libxml/ruby_xml_xinclude.c +21 -21
- data/ext/libxml/ruby_xml_xpath.c +89 -89
- data/ext/libxml/ruby_xml_xpath_context.c +283 -283
- data/ext/libxml/ruby_xml_xpath_object.c +5 -5
- data/ext/libxml/ruby_xml_xpointer.c +104 -104
- data/ext/libxml/ruby_xml_xpointer_context.c +22 -22
- data/ext/libxml/version.h +2 -2
- data/ext/libxml/version.h.rej +17 -0
- data/ext/mingw/Rakefile +41 -0
- data/{mingw → lib}/libiconv-2.dll +0 -0
- data/lib/libxml.rb +15 -4
- data/lib/libxml2-2.dll +0 -0
- data/lib/libxml_ruby.dll.a +0 -0
- data/lib/libxml_ruby.so +0 -0
- data/lib/xml.rb +14 -0
- data/lib/xml/libxml.rb +4 -1
- data/test/etc_doc_to_s.rb +1 -1
- data/test/ets_copy_bug.rb +1 -1
- data/test/ets_copy_bug3.rb +1 -1
- data/test/ets_doc_file.rb +1 -1
- data/test/ets_doc_to_s.rb +1 -1
- data/test/ets_node_gc.rb +1 -1
- data/test/ets_tsr.rb +1 -1
- data/test/model/shiporder.rnc +28 -0
- data/test/model/shiporder.rng +86 -0
- data/test/{tc_xml_attributes.rb → tc_attributes.rb} +1 -10
- data/test/{tc_xml_document.rb → tc_document.rb} +1 -1
- data/test/{tc_xml_document_write.rb → tc_document_write.rb} +1 -1
- data/test/{tc_xml_dtd.rb → tc_dtd.rb} +1 -1
- data/test/{tc_xml_html_parser.rb → tc_html_parser.rb} +1 -1
- data/test/{tc_xml_node.rb → tc_node.rb} +1 -1
- data/test/{tc_xml_node_attr.rb → tc_node_attr.rb} +1 -1
- data/test/{tc_xml_node_cdata.rb → tc_node_cdata.rb} +24 -5
- data/test/{tc_xml_node_comment.rb → tc_node_comment.rb} +1 -1
- data/test/{tc_xml_node_copy.rb → tc_node_copy.rb} +1 -1
- data/test/{tc_xml_node_edit.rb → tc_node_edit.rb} +1 -1
- data/test/{tc_xml_node_set.rb → tc_node_set.rb} +1 -1
- data/test/{tc_xml_node_set2.rb → tc_node_set2.rb} +1 -1
- data/test/{tc_xml_node_text.rb → tc_node_text.rb} +1 -1
- data/test/{tc_xml_node_xlink.rb → tc_node_xlink.rb} +2 -2
- data/test/{tc_xml_parser.rb → tc_parser.rb} +1 -1
- data/test/{tc_xml_parser_context.rb → tc_parser_context.rb} +1 -1
- data/test/{tc_xml_properties.rb → tc_properties.rb} +1 -7
- data/test/{tc_xml_reader.rb → tc_reader.rb} +1 -1
- data/test/tc_relaxng.rb +39 -0
- data/test/{tc_xml_sax_parser.rb → tc_sax_parser.rb} +1 -1
- data/test/{tc_xml_schema.rb → tc_schema.rb} +1 -1
- data/test/{tc_xml_traversal.rb → tc_traversal.rb} +1 -1
- data/test/{tc_xml_xinclude.rb → tc_xinclude.rb} +1 -1
- data/test/{tc_xml_xpath.rb → tc_xpath.rb} +1 -1
- data/test/{tc_xml_xpath_context.rb → tc_xpath_context.rb} +1 -1
- data/test/{tc_xml_xpointer.rb → tc_xpointer.rb} +1 -1
- data/test/test_suite.rb +26 -25
- metadata +103 -100
- data/benchmark/depixelate.rb +0 -632
- data/benchmark/hamlet.xml +0 -9055
- data/benchmark/sock_entries.xml +0 -507
- data/benchmark/throughput.rb +0 -39
- data/benchmark/xml_benchmarks.rb +0 -227
- data/mingw/libxml2-2.dll +0 -0
- data/mingw/libxml_ruby.so +0 -0
- data/test/gc.log +0 -0
- data/vc/libxml_ruby.sln +0 -20
- 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
|
+
}
|
data/ext/libxml/version.h
CHANGED
@@ -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.
|
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
|
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
|
data/ext/mingw/Rakefile
ADDED
@@ -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
|
Binary file
|
data/lib/libxml.rb
CHANGED
@@ -1,8 +1,17 @@
|
|
1
|
-
# $Id: libxml.rb
|
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
|
-
|
21
|
-
|
22
|
-
|
29
|
+
#
|
30
|
+
# DEPRECATED: Use require 'xml' instead!
|
31
|
+
#
|
32
|
+
# include LibXML
|
33
|
+
|
data/lib/libxml2-2.dll
ADDED
Binary file
|
Binary file
|
data/lib/libxml_ruby.so
CHANGED
Binary file
|
data/lib/xml.rb
ADDED
@@ -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
|
+
|
data/lib/xml/libxml.rb
CHANGED
data/test/etc_doc_to_s.rb
CHANGED
data/test/ets_copy_bug.rb
CHANGED
data/test/ets_copy_bug3.rb
CHANGED
data/test/ets_doc_file.rb
CHANGED
data/test/ets_doc_to_s.rb
CHANGED
data/test/ets_node_gc.rb
CHANGED