libxsl-ruby 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. data/CHANGELOG +14 -0
  2. data/LICENSE +21 -0
  3. data/README +50 -0
  4. data/Rakefile +245 -0
  5. data/TODO +32 -0
  6. data/ext/xml/extconf.rb +97 -0
  7. data/ext/xml/libxml-ruby/libxml.h +92 -0
  8. data/ext/xml/libxml-ruby/ruby_xml_attr.h +31 -0
  9. data/ext/xml/libxml-ruby/ruby_xml_attribute.h +31 -0
  10. data/ext/xml/libxml-ruby/ruby_xml_document.h +37 -0
  11. data/ext/xml/libxml-ruby/ruby_xml_dtd.h +27 -0
  12. data/ext/xml/libxml-ruby/ruby_xml_input_cbg.h +31 -0
  13. data/ext/xml/libxml-ruby/ruby_xml_node.h +38 -0
  14. data/ext/xml/libxml-ruby/ruby_xml_node_set.h +36 -0
  15. data/ext/xml/libxml-ruby/ruby_xml_ns.h +31 -0
  16. data/ext/xml/libxml-ruby/ruby_xml_parser.h +41 -0
  17. data/ext/xml/libxml-ruby/ruby_xml_parser_context.h +32 -0
  18. data/ext/xml/libxml-ruby/ruby_xml_sax_parser.h +31 -0
  19. data/ext/xml/libxml-ruby/ruby_xml_schema.h +26 -0
  20. data/ext/xml/libxml-ruby/ruby_xml_tree.h +22 -0
  21. data/ext/xml/libxml-ruby/ruby_xml_xinclude.h +23 -0
  22. data/ext/xml/libxml-ruby/ruby_xml_xpath.h +34 -0
  23. data/ext/xml/libxml-ruby/ruby_xml_xpath_context.h +34 -0
  24. data/ext/xml/libxml-ruby/ruby_xml_xpointer.h +37 -0
  25. data/ext/xml/libxml-ruby/ruby_xml_xpointer_context.h +28 -0
  26. data/ext/xml/libxslt.c +247 -0
  27. data/ext/xml/libxslt.h +52 -0
  28. data/ext/xml/ruby_xslt_stylesheet.c +298 -0
  29. data/ext/xml/ruby_xslt_stylesheet.h +21 -0
  30. data/ext/xml/ruby_xslt_transform_context.c +63 -0
  31. data/ext/xml/ruby_xslt_transform_context.h +22 -0
  32. data/tests/commentary.dtd +34 -0
  33. data/tests/fuzface.rb +15 -0
  34. data/tests/fuzface.xml +154 -0
  35. data/tests/fuzface.xsl +4 -0
  36. data/tests/ramblings.xsl +46 -0
  37. data/tests/tc_libxslt.rb +65 -0
  38. data/tests/tc_xslt_stylesheet.rb +41 -0
  39. data/tests/tc_xslt_stylesheet2.rb +41 -0
  40. metadata +101 -0
@@ -0,0 +1,92 @@
1
+ /* DO NOT EDIT THIS FILE - UPDATE FROM LIBXML-RUBY ONLY */
2
+ /* Generated: Thu Mar 09 23:18:22 GMT 2006 */
3
+ /* Release : 0.3.6 */
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+ /* Please see the LICENSE file for copyright and distribution information */
12
+
13
+ #ifndef __RUBY_LIBXML_H__
14
+ #define __RUBY_LIBXML_H__
15
+
16
+ /* Don't nuke this block! It is used for automatically updating the
17
+ * versions below. VERSION = string formatting, VERNUM = numbered
18
+ * version for inline testing: increment both or none at all. */
19
+ #define RUBY_LIBXML_VERSION "0.3.6"
20
+ #define RUBY_LIBXML_VERNUM 036
21
+ #define RUBY_LIBXML_VER_MAJ 0
22
+ #define RUBY_LIBXML_VER_MIN 3
23
+ #define RUBY_LIBXML_VER_MIC 6
24
+
25
+ #include <ruby.h>
26
+ #include <rubyio.h>
27
+ #include <util.h>
28
+ #include <libxml/parser.h>
29
+ #include <libxml/parserInternals.h>
30
+ #include <libxml/debugXML.h>
31
+ #include <libxml/xmlversion.h>
32
+ #include <libxml/xmlmemory.h>
33
+ #include <libxml/xpath.h>
34
+ #include <libxml/valid.h>
35
+ #include <libxml/catalog.h>
36
+ #ifdef LIBXML_DEBUG_ENABLED
37
+ #include <libxml/xpathInternals.h>
38
+ #endif
39
+ #ifdef LIBXML_XINCLUDE_ENABLED
40
+ #include <libxml/xinclude.h>
41
+ #endif
42
+ #ifdef LIBXML_XPTR_ENABLED
43
+ #include <libxml/xpointer.h>
44
+ #endif
45
+
46
+ #define RUBY_LIBXML_SRC_TYPE_NULL 0
47
+ #define RUBY_LIBXML_SRC_TYPE_FILE 1
48
+ #define RUBY_LIBXML_SRC_TYPE_STRING 2
49
+ #define RUBY_LIBXML_SRC_TYPE_IO 3
50
+ #define RUBY_LIBXML_SRC_TYPE_XPATH 4
51
+
52
+ typedef struct rx_file_data {
53
+ VALUE filename; /* Filename/path to self */
54
+ } rx_file_data;
55
+
56
+ typedef struct rx_io_data {
57
+ VALUE io;
58
+ } rx_io_data;
59
+
60
+ typedef struct rx_string_data {
61
+ VALUE str;
62
+ } rx_string_data;
63
+
64
+ typedef struct rx_xpath_data {
65
+ VALUE ctxt;
66
+ } rx_xpath_data;
67
+
68
+ #include "ruby_xml_attr.h"
69
+ #include "ruby_xml_attribute.h"
70
+ #include "ruby_xml_document.h"
71
+ #include "ruby_xml_node.h"
72
+ #include "ruby_xml_node_set.h"
73
+ #include "ruby_xml_ns.h"
74
+ #include "ruby_xml_parser.h"
75
+ #include "ruby_xml_parser_context.h"
76
+ #include "ruby_xml_sax_parser.h"
77
+ #include "ruby_xml_tree.h"
78
+ #include "ruby_xml_xinclude.h"
79
+ #include "ruby_xml_xpath.h"
80
+ #include "ruby_xml_xpath_context.h"
81
+ #include "ruby_xml_xpointer.h"
82
+ #include "ruby_xml_xpointer_context.h"
83
+ #include "ruby_xml_input_cbg.h"
84
+ #include "ruby_xml_dtd.h"
85
+ #include "ruby_xml_schema.h"
86
+
87
+ extern VALUE mXML;
88
+
89
+ void ruby_init_parser(void);
90
+ void ruby_xml_parser_free(ruby_xml_parser *rxp);
91
+
92
+ #endif
@@ -0,0 +1,31 @@
1
+ /* DO NOT EDIT THIS FILE - UPDATE FROM LIBXML-RUBY ONLY */
2
+ /* Generated: Thu Mar 09 23:18:22 GMT 2006 */
3
+ /* Release : 0.3.6 */
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+ /* $Id: ruby_xml_attr.h,v 1.1 2006/02/21 20:40:16 roscopeco Exp $ */
12
+
13
+ /* Please see the LICENSE file for copyright and distribution information */
14
+
15
+ #ifndef __RUBY_XML_ATTR__
16
+ #define __RUBY_XML_ATTR__
17
+
18
+ extern VALUE cXMLAttr;
19
+
20
+ typedef struct ruby_xml_attr {
21
+ xmlAttrPtr attr;
22
+ VALUE xd;
23
+ int is_ptr;
24
+ } ruby_xml_attr;
25
+
26
+ void ruby_xml_attr_free(ruby_xml_attr *rxn);
27
+ void ruby_init_xml_attr(void);
28
+ VALUE ruby_xml_attr_new(VALUE class, VALUE xd, xmlAttrPtr attr);
29
+ VALUE ruby_xml_attr_new2(VALUE class, VALUE xd, xmlAttrPtr attr);
30
+ VALUE ruby_xml_attr_name_get(VALUE self);
31
+ #endif
@@ -0,0 +1,31 @@
1
+ /* DO NOT EDIT THIS FILE - UPDATE FROM LIBXML-RUBY ONLY */
2
+ /* Generated: Thu Mar 09 23:18:22 GMT 2006 */
3
+ /* Release : 0.3.6 */
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+ /* $Id: ruby_xml_attribute.h,v 1.1 2006/02/21 20:40:16 roscopeco Exp $ */
12
+
13
+ /* Please see the LICENSE file for copyright and distribution information */
14
+
15
+ #ifndef __RUBY_XML_ATTRIBUTE__
16
+ #define __RUBY_XML_ATTRIBUTE__
17
+
18
+ extern VALUE cXMLAttribute;
19
+
20
+ typedef struct ruby_xml_attribute {
21
+ xmlAttributePtr attribute;
22
+ VALUE xd;
23
+ int is_ptr;
24
+ } ruby_xml_attribute;
25
+
26
+ void ruby_xml_attribute_free(ruby_xml_attribute *rxa);
27
+ void ruby_init_xml_attribute(void);
28
+ VALUE ruby_xml_attribute_new(VALUE class, VALUE xd, xmlAttributePtr attribute);
29
+ VALUE ruby_xml_attribute_new2(VALUE class, VALUE xd, xmlAttributePtr attribute);
30
+ VALUE ruby_xml_attribute_name_get(VALUE self);
31
+ #endif
@@ -0,0 +1,37 @@
1
+ /* DO NOT EDIT THIS FILE - UPDATE FROM LIBXML-RUBY ONLY */
2
+ /* Generated: Thu Mar 09 23:18:22 GMT 2006 */
3
+ /* Release : 0.3.6 */
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+ /* $Id: ruby_xml_document.h,v 1.1 2006/02/21 20:40:16 roscopeco Exp $ */
12
+
13
+ /* Please see the LICENSE file for copyright and distribution information */
14
+
15
+ #ifndef __RUBY_XML_DOCUMENT__
16
+ #define __RUBY_XML_DOCUMENT__
17
+
18
+ extern VALUE cXMLDocument;
19
+
20
+ typedef struct rxp_document {
21
+ xmlDocPtr doc; /* Tree/DOM interface */
22
+ int data_type; /* The data type referenced by *data */
23
+ void *data; /* Pointer to an external structure of options */
24
+ int is_ptr; /* Determines if this object owns its data or points to it someplace else */
25
+ VALUE xmlver; /* T_STRING with the xml version */
26
+ } ruby_xml_document;
27
+
28
+ VALUE ruby_xml_document_filename_get(VALUE self);
29
+ void ruby_xml_document_free(ruby_xml_document *rxd);
30
+ VALUE ruby_xml_document_new(VALUE class, xmlDocPtr doc);
31
+ VALUE ruby_xml_document_new2(VALUE class, VALUE xmlver);
32
+ VALUE ruby_xml_document_new3(VALUE class);
33
+ VALUE ruby_xml_document_new4(VALUE class, xmlDocPtr doc);
34
+ VALUE ruby_xml_document_root_get(VALUE self);
35
+ void ruby_init_xml_document(void);
36
+
37
+ #endif
@@ -0,0 +1,27 @@
1
+ /* DO NOT EDIT THIS FILE - UPDATE FROM LIBXML-RUBY ONLY */
2
+ /* Generated: Thu Mar 09 23:18:22 GMT 2006 */
3
+ /* Release : 0.3.6 */
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+ #ifndef __RUBY_XML_DTD__
12
+ #define __RUBY_XML_DTD__
13
+
14
+ extern VALUE cXMLDtd;
15
+
16
+ typedef struct rxp_dtd {
17
+ xmlDtdPtr dtd; /* DTD interface */
18
+ //int data_type; /* The data type referenced by *data */
19
+ //void *data; /* Pointer to an external structure of options */
20
+ //int is_ptr; /* Determines if this object owns its data or points to it someplace else */
21
+ //VALUE xmlver; /* T_STRING with the xml version */
22
+ } ruby_xml_dtd;
23
+
24
+ void ruby_init_xml_dtd(void);
25
+ void ruby_dtd_free(ruby_xml_dtd *rxdtd);
26
+
27
+ #endif
@@ -0,0 +1,31 @@
1
+ /* DO NOT EDIT THIS FILE - UPDATE FROM LIBXML-RUBY ONLY */
2
+ /* Generated: Thu Mar 09 23:18:22 GMT 2006 */
3
+ /* Release : 0.3.6 */
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+ #ifndef _INPUT_CBG_
12
+ #define _INPUT_CBG_
13
+
14
+ void ruby_init_input_callbacks(void);
15
+
16
+ typedef struct ic_doc_context {
17
+ char *buffer;
18
+ char *bpos;
19
+ int remaining;
20
+ } ic_doc_context;
21
+
22
+ typedef struct ic_scheme {
23
+ char *scheme_name;
24
+ //MUFF char *class;
25
+ VALUE class;
26
+ int name_len;
27
+
28
+ struct ic_scheme *next_scheme;
29
+ } ic_scheme;
30
+
31
+ #endif
@@ -0,0 +1,38 @@
1
+ /* DO NOT EDIT THIS FILE - UPDATE FROM LIBXML-RUBY ONLY */
2
+ /* Generated: Thu Mar 09 23:18:22 GMT 2006 */
3
+ /* Release : 0.3.6 */
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+ /* $Id: ruby_xml_node.h,v 1.1 2006/02/21 20:40:16 roscopeco Exp $ */
12
+
13
+ /* Please see the LICENSE file for copyright and distribution information */
14
+
15
+ #ifndef __RUBY_XML_NODE__
16
+ #define __RUBY_XML_NODE__
17
+
18
+ extern VALUE cXMLNode;
19
+ extern VALUE eXMLNodeSetNamespace;
20
+ extern VALUE eXMLNodeFailedModify;
21
+ extern VALUE eXMLNodeUnknownType;
22
+
23
+ typedef struct ruby_xml_node {
24
+ xmlNodePtr node;
25
+ VALUE xd;
26
+ int is_ptr;
27
+ } ruby_xml_node;
28
+
29
+ void ruby_xml_node_free(ruby_xml_node *rxn);
30
+ void ruby_init_xml_node(void);
31
+ VALUE ruby_xml_node_child_set(VALUE self, VALUE obj);
32
+ VALUE ruby_xml_node_new(VALUE class, xmlNodePtr node);
33
+ VALUE ruby_xml_node_new2(VALUE class, VALUE xd, xmlNodePtr node);
34
+ VALUE ruby_xml_node_name_get(VALUE self);
35
+ VALUE ruby_xml_node_property_get(VALUE self, VALUE key);
36
+ VALUE ruby_xml_node_property_set(VALUE self, VALUE key, VALUE val);
37
+ VALUE ruby_xml_node_set_ptr(VALUE node, int is_ptr);
38
+ #endif
@@ -0,0 +1,36 @@
1
+ /* DO NOT EDIT THIS FILE - UPDATE FROM LIBXML-RUBY ONLY */
2
+ /* Generated: Thu Mar 09 23:18:22 GMT 2006 */
3
+ /* Release : 0.3.6 */
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+ /* $Id: ruby_xml_node_set.h,v 1.1 2006/02/21 20:40:16 roscopeco Exp $ */
12
+
13
+ /* Please see the LICENSE file for copyright and distribution information */
14
+
15
+ #ifndef __RUBY_XML_NODE_SET__
16
+ #define __RUBY_XML_NODE_SET__
17
+
18
+ extern VALUE cXMLNodeSet;
19
+
20
+ typedef struct ruby_xml_node_set {
21
+ xmlNodeSetPtr node_set;
22
+ VALUE xd;
23
+ VALUE xpath;
24
+ int data_type;
25
+ void *data;
26
+ } ruby_xml_node_set;
27
+
28
+ void ruby_xml_node_set_free(ruby_xml_node_set *rxnset);
29
+ void ruby_init_xml_node_set(void);
30
+ VALUE ruby_xml_node_set_new(VALUE class, VALUE xd, VALUE xpath,
31
+ xmlNodeSetPtr node_set);
32
+ VALUE ruby_xml_node_set_new2(VALUE xd, VALUE xpath,
33
+ xmlNodeSetPtr node_set);
34
+ VALUE ruby_xml_node_set_each(VALUE self);
35
+
36
+ #endif
@@ -0,0 +1,31 @@
1
+ /* DO NOT EDIT THIS FILE - UPDATE FROM LIBXML-RUBY ONLY */
2
+ /* Generated: Thu Mar 09 23:18:22 GMT 2006 */
3
+ /* Release : 0.3.6 */
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+ /* $Id: ruby_xml_ns.h,v 1.1 2006/02/21 20:40:16 roscopeco Exp $ */
12
+
13
+ /* Please see the LICENSE file for copyright and distribution information */
14
+
15
+ #ifndef __RUBY_XML_NS__
16
+ #define __RUBY_XML_NS__
17
+
18
+ extern VALUE cXMLNS;
19
+
20
+ typedef struct ruby_xml_ns {
21
+ xmlNsPtr ns;
22
+ int is_ptr;
23
+ VALUE xd;
24
+ } ruby_xml_ns;
25
+
26
+ void ruby_xml_ns_free(ruby_xml_ns *rxn);
27
+ void ruby_init_xml_ns(void);
28
+ VALUE ruby_xml_ns_new(VALUE class, VALUE xd, xmlNsPtr ns);
29
+ VALUE ruby_xml_ns_new2(VALUE class, VALUE xd, xmlNsPtr ns);
30
+ VALUE ruby_xml_ns_name_get(VALUE self);
31
+ #endif
@@ -0,0 +1,41 @@
1
+ /* DO NOT EDIT THIS FILE - UPDATE FROM LIBXML-RUBY ONLY */
2
+ /* Generated: Thu Mar 09 23:18:22 GMT 2006 */
3
+ /* Release : 0.3.6 */
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+ /* $Id: ruby_xml_parser.h,v 1.1 2006/02/21 20:40:16 roscopeco Exp $ */
12
+
13
+ /* Please see the LICENSE file for copyright and distribution information */
14
+
15
+ #ifndef __RUBY_XML_PARSER__
16
+ #define __RUBY_XML_PARSER__
17
+
18
+ #define MAX_LIBXML_FEATURES_LEN 50
19
+
20
+ extern int ruby_xml_parser_count;
21
+ extern VALUE cXMLParser;
22
+ extern VALUE eXMLParserParseError;
23
+
24
+ typedef struct ruby_xml_parser {
25
+ VALUE ctxt;
26
+ int parsed;
27
+ void *data;
28
+ int data_type;
29
+ } ruby_xml_parser;
30
+
31
+ VALUE ruby_xml_parser_default_load_external_dtd_set(VALUE class, VALUE bool);
32
+ VALUE ruby_xml_parser_default_substitute_entities_set(VALUE class, VALUE bool);
33
+ VALUE ruby_xml_parser_features(VALUE self);
34
+ VALUE ruby_xml_parser_filename_get(VALUE self);
35
+ VALUE ruby_xml_parser_filename_set(VALUE self, VALUE filename);
36
+ VALUE ruby_xml_parser_new(VALUE class);
37
+ VALUE ruby_xml_parser_parse(VALUE self);
38
+ VALUE ruby_xml_parser_str_get(VALUE self);
39
+ VALUE ruby_xml_parser_str_set(VALUE self, VALUE str);
40
+
41
+ #endif
@@ -0,0 +1,32 @@
1
+ /* DO NOT EDIT THIS FILE - UPDATE FROM LIBXML-RUBY ONLY */
2
+ /* Generated: Thu Mar 09 23:18:22 GMT 2006 */
3
+ /* Release : 0.3.6 */
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+ /* $Id: ruby_xml_parser_context.h,v 1.1 2006/02/21 20:40:16 roscopeco Exp $ */
12
+
13
+ /* Please see the LICENSE file for copyright and distribution information */
14
+
15
+ #ifndef __RUBY_XML_PARSER_CONTEXT__
16
+ #define __RUBY_XML_PARSER_CONTEXT__
17
+
18
+ extern VALUE cXMLParserContext;
19
+
20
+ typedef struct ruby_xml_parser_context {
21
+ xmlParserCtxtPtr ctxt;
22
+ int is_ptr;
23
+ } ruby_xml_parser_context;
24
+
25
+ void ruby_xml_parser_context_free(ruby_xml_parser_context *ctxt);
26
+ void ruby_init_xml_parser_context(void);
27
+ VALUE ruby_xml_parser_context_new(VALUE class, xmlParserCtxtPtr ctxt);
28
+ VALUE ruby_xml_parser_context_new2(VALUE class);
29
+ VALUE ruby_xml_parser_context_new3();
30
+ VALUE ruby_xml_parser_context_each(VALUE self);
31
+
32
+ #endif
@@ -0,0 +1,31 @@
1
+ /* DO NOT EDIT THIS FILE - UPDATE FROM LIBXML-RUBY ONLY */
2
+ /* Generated: Thu Mar 09 23:18:22 GMT 2006 */
3
+ /* Release : 0.3.6 */
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+ /* $Id: ruby_xml_sax_parser.h,v 1.1 2006/02/21 20:40:16 roscopeco Exp $ */
12
+
13
+ /* Please see the LICENSE file for copyright and distribution information */
14
+
15
+ #ifndef __RUBY_XML_SAX_PARSER__
16
+ #define __RUBY_XML_SAX_PARSER__
17
+
18
+ extern VALUE cXMLSaxParser;
19
+
20
+ typedef struct ruby_xml_sax_parser {
21
+ xmlParserCtxtPtr xpc;
22
+ xmlSAXHandlerPtr xsh;
23
+ VALUE filename;
24
+ VALUE str;
25
+ } ruby_xml_sax_parser;
26
+
27
+ void ruby_xml_sax_parser_free(ruby_xml_sax_parser *rxsp);
28
+ void ruby_init_xml_sax_parser(void);
29
+ VALUE ruby_xml_sax_parser_new(VALUE class);
30
+
31
+ #endif