nokogiri 1.11.0.rc3-x86-mingw32 → 1.11.0.rc4-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of nokogiri might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/LICENSE-DEPENDENCIES.md +1015 -947
- data/README.md +1 -1
- data/ext/nokogiri/depend +476 -357
- data/ext/nokogiri/extconf.rb +441 -321
- data/ext/nokogiri/html_document.c +79 -78
- data/ext/nokogiri/html_sax_parser_context.c +2 -2
- data/ext/nokogiri/include/libexslt/exslt.h +102 -0
- data/ext/nokogiri/include/libexslt/exsltconfig.h +70 -0
- data/ext/nokogiri/include/libexslt/exsltexports.h +140 -0
- data/ext/nokogiri/include/libxml2/libxml/DOCBparser.h +96 -0
- data/ext/nokogiri/include/libxml2/libxml/HTMLparser.h +306 -0
- data/ext/nokogiri/include/libxml2/libxml/HTMLtree.h +147 -0
- data/ext/nokogiri/include/libxml2/libxml/SAX.h +173 -0
- data/ext/nokogiri/include/libxml2/libxml/SAX2.h +178 -0
- data/ext/nokogiri/include/libxml2/libxml/c14n.h +126 -0
- data/ext/nokogiri/include/libxml2/libxml/catalog.h +182 -0
- data/ext/nokogiri/include/libxml2/libxml/chvalid.h +230 -0
- data/ext/nokogiri/include/libxml2/libxml/debugXML.h +217 -0
- data/ext/nokogiri/include/libxml2/libxml/dict.h +79 -0
- data/ext/nokogiri/include/libxml2/libxml/encoding.h +245 -0
- data/ext/nokogiri/include/libxml2/libxml/entities.h +151 -0
- data/ext/nokogiri/include/libxml2/libxml/globals.h +508 -0
- data/ext/nokogiri/include/libxml2/libxml/hash.h +236 -0
- data/ext/nokogiri/include/libxml2/libxml/list.h +137 -0
- data/ext/nokogiri/include/libxml2/libxml/nanoftp.h +163 -0
- data/ext/nokogiri/include/libxml2/libxml/nanohttp.h +81 -0
- data/ext/nokogiri/include/libxml2/libxml/parser.h +1241 -0
- data/ext/nokogiri/include/libxml2/libxml/parserInternals.h +644 -0
- data/ext/nokogiri/include/libxml2/libxml/pattern.h +100 -0
- data/ext/nokogiri/include/libxml2/libxml/relaxng.h +217 -0
- data/ext/nokogiri/include/libxml2/libxml/schemasInternals.h +958 -0
- data/ext/nokogiri/include/libxml2/libxml/schematron.h +142 -0
- data/ext/nokogiri/include/libxml2/libxml/threads.h +89 -0
- data/ext/nokogiri/include/libxml2/libxml/tree.h +1311 -0
- data/ext/nokogiri/include/libxml2/libxml/uri.h +94 -0
- data/ext/nokogiri/include/libxml2/libxml/valid.h +458 -0
- data/ext/nokogiri/include/libxml2/libxml/xinclude.h +129 -0
- data/ext/nokogiri/include/libxml2/libxml/xlink.h +189 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlIO.h +366 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlautomata.h +146 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlerror.h +945 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlexports.h +153 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlmemory.h +224 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlmodule.h +57 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlreader.h +428 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlregexp.h +222 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlsave.h +88 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlschemas.h +246 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlschemastypes.h +151 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlstring.h +140 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlunicode.h +202 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlversion.h +485 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlwriter.h +488 -0
- data/ext/nokogiri/include/libxml2/libxml/xpath.h +566 -0
- data/ext/nokogiri/include/libxml2/libxml/xpathInternals.h +632 -0
- data/ext/nokogiri/include/libxml2/libxml/xpointer.h +114 -0
- data/ext/nokogiri/include/libxslt/attributes.h +38 -0
- data/ext/nokogiri/include/libxslt/documents.h +93 -0
- data/ext/nokogiri/include/libxslt/extensions.h +262 -0
- data/ext/nokogiri/include/libxslt/extra.h +72 -0
- data/ext/nokogiri/include/libxslt/functions.h +78 -0
- data/ext/nokogiri/include/libxslt/imports.h +75 -0
- data/ext/nokogiri/include/libxslt/keys.h +53 -0
- data/ext/nokogiri/include/libxslt/namespaces.h +68 -0
- data/ext/nokogiri/include/libxslt/numbersInternals.h +73 -0
- data/ext/nokogiri/include/libxslt/pattern.h +84 -0
- data/ext/nokogiri/include/libxslt/preproc.h +43 -0
- data/ext/nokogiri/include/libxslt/security.h +104 -0
- data/ext/nokogiri/include/libxslt/templates.h +77 -0
- data/ext/nokogiri/include/libxslt/transform.h +207 -0
- data/ext/nokogiri/include/libxslt/variables.h +118 -0
- data/ext/nokogiri/include/libxslt/xslt.h +110 -0
- data/ext/nokogiri/include/libxslt/xsltInternals.h +1978 -0
- data/ext/nokogiri/include/libxslt/xsltconfig.h +180 -0
- data/ext/nokogiri/include/libxslt/xsltexports.h +142 -0
- data/ext/nokogiri/include/libxslt/xsltlocale.h +76 -0
- data/ext/nokogiri/include/libxslt/xsltutils.h +313 -0
- data/ext/nokogiri/nokogiri.c +34 -46
- data/ext/nokogiri/nokogiri.h +22 -26
- data/ext/nokogiri/xml_document.c +2 -2
- data/ext/nokogiri/xml_node.c +1 -1
- data/ext/nokogiri/xml_node_set.c +1 -1
- data/ext/nokogiri/xml_relax_ng.c +29 -11
- data/ext/nokogiri/xml_sax_parser.c +2 -7
- data/ext/nokogiri/xml_sax_parser_context.c +2 -2
- data/ext/nokogiri/xml_schema.c +55 -13
- data/ext/nokogiri/xml_xpath_context.c +80 -4
- data/ext/nokogiri/xslt_stylesheet.c +1 -4
- data/lib/nokogiri.rb +1 -1
- data/lib/nokogiri/2.5/nokogiri.so +0 -0
- data/lib/nokogiri/2.6/nokogiri.so +0 -0
- data/lib/nokogiri/2.7/nokogiri.so +0 -0
- data/lib/nokogiri/3.0/nokogiri.so +0 -0
- data/lib/nokogiri/css/parser.rb +3 -3
- data/lib/nokogiri/css/parser.y +2 -2
- data/lib/nokogiri/css/xpath_visitor.rb +70 -42
- data/lib/nokogiri/html/document.rb +12 -26
- data/lib/nokogiri/version.rb +2 -149
- data/lib/nokogiri/version/constant.rb +5 -0
- data/lib/nokogiri/version/info.rb +182 -0
- data/lib/nokogiri/xml/document.rb +17 -7
- data/lib/nokogiri/xml/document_fragment.rb +4 -6
- data/lib/nokogiri/xml/node.rb +50 -27
- data/lib/nokogiri/xml/parse_options.rb +6 -0
- data/lib/nokogiri/xml/relax_ng.rb +6 -2
- data/lib/nokogiri/xml/schema.rb +12 -4
- data/lib/nokogiri/xml/searchable.rb +3 -1
- metadata +105 -28
- data/lib/nokogiri/2.4/nokogiri.so +0 -0
@@ -1,6 +1,7 @@
|
|
1
1
|
#include <html_document.h>
|
2
2
|
|
3
3
|
static ID id_encoding_found;
|
4
|
+
static ID id_to_s;
|
4
5
|
|
5
6
|
/*
|
6
7
|
* call-seq:
|
@@ -8,19 +9,20 @@ static ID id_encoding_found;
|
|
8
9
|
*
|
9
10
|
* Create a new document
|
10
11
|
*/
|
11
|
-
static VALUE
|
12
|
+
static VALUE
|
13
|
+
rb_html_document_s_new(int argc, VALUE *argv, VALUE klass)
|
12
14
|
{
|
13
15
|
VALUE uri, external_id, rest, rb_doc;
|
14
16
|
htmlDocPtr doc;
|
15
17
|
|
16
18
|
rb_scan_args(argc, argv, "0*", &rest);
|
17
|
-
uri
|
19
|
+
uri = rb_ary_entry(rest, (long)0);
|
18
20
|
external_id = rb_ary_entry(rest, (long)1);
|
19
21
|
|
20
22
|
doc = htmlNewDoc(
|
21
|
-
|
22
|
-
|
23
|
-
|
23
|
+
RTEST(uri) ? (const xmlChar *)StringValueCStr(uri) : NULL,
|
24
|
+
RTEST(external_id) ? (const xmlChar *)StringValueCStr(external_id) : NULL
|
25
|
+
);
|
24
26
|
rb_doc = Nokogiri_wrap_xml_document(klass, doc);
|
25
27
|
rb_obj_call_init(rb_doc, argc, argv);
|
26
28
|
return rb_doc ;
|
@@ -33,60 +35,55 @@ static VALUE new(int argc, VALUE *argv, VALUE klass)
|
|
33
35
|
* Read the HTML document from +io+ with given +url+, +encoding+,
|
34
36
|
* and +options+. See Nokogiri::HTML.parse
|
35
37
|
*/
|
36
|
-
static VALUE
|
37
|
-
|
38
|
-
VALUE url,
|
39
|
-
VALUE encoding,
|
40
|
-
VALUE options )
|
38
|
+
static VALUE
|
39
|
+
rb_html_document_s_read_io(VALUE klass, VALUE rb_io, VALUE rb_url, VALUE rb_encoding, VALUE rb_options)
|
41
40
|
{
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
41
|
+
VALUE rb_doc;
|
42
|
+
VALUE rb_error_list = rb_ary_new();
|
43
|
+
htmlDocPtr c_doc;
|
44
|
+
const char *c_url = NIL_P(rb_url) ? NULL : StringValueCStr(rb_url);
|
45
|
+
const char *c_encoding = NIL_P(rb_encoding) ? NULL : StringValueCStr(rb_encoding);
|
46
|
+
int options = NUM2INT(rb_options);
|
47
|
+
|
48
|
+
xmlSetStructuredErrorFunc((void *)rb_error_list, Nokogiri_error_array_pusher);
|
49
|
+
|
50
|
+
c_doc = htmlReadIO(io_read_callback, io_close_callback, (void *)rb_io, c_url, c_encoding, options);
|
47
51
|
|
48
|
-
xmlResetLastError();
|
49
|
-
xmlSetStructuredErrorFunc((void *)error_list, Nokogiri_error_array_pusher);
|
50
|
-
|
51
|
-
doc = htmlReadIO(
|
52
|
-
io_read_callback,
|
53
|
-
io_close_callback,
|
54
|
-
(void *)io,
|
55
|
-
c_url,
|
56
|
-
c_enc,
|
57
|
-
(int)NUM2INT(options)
|
58
|
-
);
|
59
52
|
xmlSetStructuredErrorFunc(NULL, NULL);
|
60
53
|
|
61
54
|
/*
|
62
55
|
* If EncodingFound has occurred in EncodingReader, make sure to do
|
63
56
|
* a cleanup and propagate the error.
|
64
57
|
*/
|
65
|
-
if (rb_respond_to(
|
66
|
-
VALUE encoding_found = rb_funcall(
|
58
|
+
if (rb_respond_to(rb_io, id_encoding_found)) {
|
59
|
+
VALUE encoding_found = rb_funcall(rb_io, id_encoding_found, 0);
|
67
60
|
if (!NIL_P(encoding_found)) {
|
68
|
-
xmlFreeDoc(
|
61
|
+
xmlFreeDoc(c_doc);
|
69
62
|
rb_exc_raise(encoding_found);
|
70
63
|
}
|
71
64
|
}
|
72
65
|
|
73
|
-
if(
|
74
|
-
|
66
|
+
if ((c_doc == NULL) || (!(options & XML_PARSE_RECOVER) && (RARRAY_LEN(rb_error_list) > 0))) {
|
67
|
+
VALUE rb_error ;
|
75
68
|
|
76
|
-
xmlFreeDoc(
|
69
|
+
xmlFreeDoc(c_doc);
|
77
70
|
|
78
|
-
|
79
|
-
if(
|
80
|
-
rb_exc_raise(Nokogiri_wrap_xml_syntax_error(error));
|
81
|
-
else
|
71
|
+
rb_error = rb_ary_entry(rb_error_list, 0);
|
72
|
+
if (rb_error == Qnil) {
|
82
73
|
rb_raise(rb_eRuntimeError, "Could not parse document");
|
74
|
+
} else {
|
75
|
+
VALUE exception_message = rb_funcall(rb_error, id_to_s, 0);
|
76
|
+
exception_message = rb_str_concat(rb_str_new2("Parser without recover option encountered error or warning: "),
|
77
|
+
exception_message);
|
78
|
+
rb_exc_raise(rb_class_new_instance(1, &exception_message, cNokogiriXmlSyntaxError));
|
79
|
+
}
|
83
80
|
|
84
81
|
return Qnil;
|
85
82
|
}
|
86
83
|
|
87
|
-
|
88
|
-
rb_iv_set(
|
89
|
-
return
|
84
|
+
rb_doc = Nokogiri_wrap_xml_document(klass, c_doc);
|
85
|
+
rb_iv_set(rb_doc, "@errors", rb_error_list);
|
86
|
+
return rb_doc;
|
90
87
|
}
|
91
88
|
|
92
89
|
/*
|
@@ -96,43 +93,45 @@ static VALUE read_io( VALUE klass,
|
|
96
93
|
* Read the HTML document contained in +string+ with given +url+, +encoding+,
|
97
94
|
* and +options+. See Nokogiri::HTML.parse
|
98
95
|
*/
|
99
|
-
static VALUE
|
100
|
-
|
101
|
-
VALUE url,
|
102
|
-
VALUE encoding,
|
103
|
-
VALUE options )
|
96
|
+
static VALUE
|
97
|
+
rb_html_document_s_read_memory(VALUE klass, VALUE rb_html, VALUE rb_url, VALUE rb_encoding, VALUE rb_options)
|
104
98
|
{
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
99
|
+
VALUE rb_doc;
|
100
|
+
VALUE rb_error_list = rb_ary_new();
|
101
|
+
htmlDocPtr c_doc;
|
102
|
+
const char *c_buffer = StringValuePtr(rb_html);
|
103
|
+
const char *c_url = NIL_P(rb_url) ? NULL : StringValueCStr(rb_url);
|
104
|
+
const char *c_encoding = NIL_P(rb_encoding) ? NULL : StringValueCStr(rb_encoding);
|
105
|
+
int html_len = (int)RSTRING_LEN(rb_html);
|
106
|
+
int options = NUM2INT(rb_options);
|
112
107
|
|
113
|
-
|
114
|
-
|
108
|
+
xmlSetStructuredErrorFunc((void *)rb_error_list, Nokogiri_error_array_pusher);
|
109
|
+
|
110
|
+
c_doc = htmlReadMemory(c_buffer, html_len, c_url, c_encoding, options);
|
115
111
|
|
116
|
-
doc = htmlReadMemory(c_buffer, len, c_url, c_enc, (int)NUM2INT(options));
|
117
112
|
xmlSetStructuredErrorFunc(NULL, NULL);
|
118
113
|
|
119
|
-
if(
|
120
|
-
|
114
|
+
if ((c_doc == NULL) || (!(options & XML_PARSE_RECOVER) && (RARRAY_LEN(rb_error_list) > 0))) {
|
115
|
+
VALUE rb_error ;
|
121
116
|
|
122
|
-
xmlFreeDoc(
|
117
|
+
xmlFreeDoc(c_doc);
|
123
118
|
|
124
|
-
|
125
|
-
if(
|
126
|
-
rb_exc_raise(Nokogiri_wrap_xml_syntax_error(error));
|
127
|
-
else
|
119
|
+
rb_error = rb_ary_entry(rb_error_list, 0);
|
120
|
+
if (rb_error == Qnil) {
|
128
121
|
rb_raise(rb_eRuntimeError, "Could not parse document");
|
122
|
+
} else {
|
123
|
+
VALUE exception_message = rb_funcall(rb_error, id_to_s, 0);
|
124
|
+
exception_message = rb_str_concat(rb_str_new2("Parser without recover option encountered error or warning: "),
|
125
|
+
exception_message);
|
126
|
+
rb_exc_raise(rb_class_new_instance(1, &exception_message, cNokogiriXmlSyntaxError));
|
127
|
+
}
|
129
128
|
|
130
129
|
return Qnil;
|
131
130
|
}
|
132
131
|
|
133
|
-
|
134
|
-
rb_iv_set(
|
135
|
-
return
|
132
|
+
rb_doc = Nokogiri_wrap_xml_document(klass, c_doc);
|
133
|
+
rb_iv_set(rb_doc, "@errors", rb_error_list);
|
134
|
+
return rb_doc;
|
136
135
|
}
|
137
136
|
|
138
137
|
/*
|
@@ -141,7 +140,8 @@ static VALUE read_memory( VALUE klass,
|
|
141
140
|
*
|
142
141
|
* The type for this document
|
143
142
|
*/
|
144
|
-
static VALUE
|
143
|
+
static VALUE
|
144
|
+
rb_html_document_type(VALUE self)
|
145
145
|
{
|
146
146
|
htmlDocPtr doc;
|
147
147
|
Data_Get_Struct(self, xmlDoc, doc);
|
@@ -149,22 +149,23 @@ static VALUE type(VALUE self)
|
|
149
149
|
}
|
150
150
|
|
151
151
|
VALUE cNokogiriHtmlDocument ;
|
152
|
-
void init_html_document()
|
153
|
-
{
|
154
|
-
VALUE nokogiri = rb_define_module("Nokogiri");
|
155
|
-
VALUE html = rb_define_module_under(nokogiri, "HTML");
|
156
|
-
VALUE xml = rb_define_module_under(nokogiri, "XML");
|
157
|
-
VALUE node = rb_define_class_under(xml, "Node", rb_cObject);
|
158
|
-
VALUE xml_doc = rb_define_class_under(xml, "Document", node);
|
159
|
-
VALUE klass = rb_define_class_under(html, "Document", xml_doc);
|
160
152
|
|
161
|
-
|
153
|
+
void
|
154
|
+
init_html_document()
|
155
|
+
{
|
156
|
+
VALUE nokogiri = rb_define_module("Nokogiri");
|
157
|
+
VALUE nokogiri_xml = rb_define_module_under(nokogiri, "XML");
|
158
|
+
VALUE nokogiri_xml_node = rb_define_class_under(nokogiri_xml, "Node", rb_cObject);
|
159
|
+
VALUE nokogiri_xml_document = rb_define_class_under(nokogiri_xml, "Document", nokogiri_xml_node);
|
160
|
+
VALUE nokogiri_html = rb_define_module_under(nokogiri, "HTML");
|
161
|
+
cNokogiriHtmlDocument = rb_define_class_under(nokogiri_html, "Document", nokogiri_xml_document);
|
162
162
|
|
163
|
-
rb_define_singleton_method(
|
164
|
-
rb_define_singleton_method(
|
165
|
-
rb_define_singleton_method(
|
163
|
+
rb_define_singleton_method(cNokogiriHtmlDocument, "read_memory", rb_html_document_s_read_memory, 4);
|
164
|
+
rb_define_singleton_method(cNokogiriHtmlDocument, "read_io", rb_html_document_s_read_io, 4);
|
165
|
+
rb_define_singleton_method(cNokogiriHtmlDocument, "new", rb_html_document_s_new, -1);
|
166
166
|
|
167
|
-
rb_define_method(
|
167
|
+
rb_define_method(cNokogiriHtmlDocument, "type", rb_html_document_type, 0);
|
168
168
|
|
169
169
|
id_encoding_found = rb_intern("encoding_found");
|
170
|
+
id_to_s = rb_intern("to_s");
|
170
171
|
}
|
@@ -4,13 +4,13 @@ VALUE cNokogiriHtmlSaxParserContext ;
|
|
4
4
|
|
5
5
|
static void deallocate(xmlParserCtxtPtr ctxt)
|
6
6
|
{
|
7
|
-
NOKOGIRI_DEBUG_START(
|
7
|
+
NOKOGIRI_DEBUG_START(ctxt);
|
8
8
|
|
9
9
|
ctxt->sax = NULL;
|
10
10
|
|
11
11
|
htmlFreeParserCtxt(ctxt);
|
12
12
|
|
13
|
-
NOKOGIRI_DEBUG_END(
|
13
|
+
NOKOGIRI_DEBUG_END(ctxt);
|
14
14
|
}
|
15
15
|
|
16
16
|
static VALUE
|
@@ -0,0 +1,102 @@
|
|
1
|
+
|
2
|
+
#ifndef __EXSLT_H__
|
3
|
+
#define __EXSLT_H__
|
4
|
+
|
5
|
+
#include <libxml/tree.h>
|
6
|
+
#include <libxml/xpath.h>
|
7
|
+
#include "exsltexports.h"
|
8
|
+
#include <libexslt/exsltconfig.h>
|
9
|
+
|
10
|
+
#ifdef __cplusplus
|
11
|
+
extern "C" {
|
12
|
+
#endif
|
13
|
+
|
14
|
+
EXSLTPUBVAR const char *exsltLibraryVersion;
|
15
|
+
EXSLTPUBVAR const int exsltLibexsltVersion;
|
16
|
+
EXSLTPUBVAR const int exsltLibxsltVersion;
|
17
|
+
EXSLTPUBVAR const int exsltLibxmlVersion;
|
18
|
+
|
19
|
+
/**
|
20
|
+
* EXSLT_COMMON_NAMESPACE:
|
21
|
+
*
|
22
|
+
* Namespace for EXSLT common functions
|
23
|
+
*/
|
24
|
+
#define EXSLT_COMMON_NAMESPACE ((const xmlChar *) "http://exslt.org/common")
|
25
|
+
/**
|
26
|
+
* EXSLT_CRYPTO_NAMESPACE:
|
27
|
+
*
|
28
|
+
* Namespace for EXSLT crypto functions
|
29
|
+
*/
|
30
|
+
#define EXSLT_CRYPTO_NAMESPACE ((const xmlChar *) "http://exslt.org/crypto")
|
31
|
+
/**
|
32
|
+
* EXSLT_MATH_NAMESPACE:
|
33
|
+
*
|
34
|
+
* Namespace for EXSLT math functions
|
35
|
+
*/
|
36
|
+
#define EXSLT_MATH_NAMESPACE ((const xmlChar *) "http://exslt.org/math")
|
37
|
+
/**
|
38
|
+
* EXSLT_SETS_NAMESPACE:
|
39
|
+
*
|
40
|
+
* Namespace for EXSLT set functions
|
41
|
+
*/
|
42
|
+
#define EXSLT_SETS_NAMESPACE ((const xmlChar *) "http://exslt.org/sets")
|
43
|
+
/**
|
44
|
+
* EXSLT_FUNCTIONS_NAMESPACE:
|
45
|
+
*
|
46
|
+
* Namespace for EXSLT functions extension functions
|
47
|
+
*/
|
48
|
+
#define EXSLT_FUNCTIONS_NAMESPACE ((const xmlChar *) "http://exslt.org/functions")
|
49
|
+
/**
|
50
|
+
* EXSLT_STRINGS_NAMESPACE:
|
51
|
+
*
|
52
|
+
* Namespace for EXSLT strings functions
|
53
|
+
*/
|
54
|
+
#define EXSLT_STRINGS_NAMESPACE ((const xmlChar *) "http://exslt.org/strings")
|
55
|
+
/**
|
56
|
+
* EXSLT_DATE_NAMESPACE:
|
57
|
+
*
|
58
|
+
* Namespace for EXSLT date functions
|
59
|
+
*/
|
60
|
+
#define EXSLT_DATE_NAMESPACE ((const xmlChar *) "http://exslt.org/dates-and-times")
|
61
|
+
/**
|
62
|
+
* EXSLT_DYNAMIC_NAMESPACE:
|
63
|
+
*
|
64
|
+
* Namespace for EXSLT dynamic functions
|
65
|
+
*/
|
66
|
+
#define EXSLT_DYNAMIC_NAMESPACE ((const xmlChar *) "http://exslt.org/dynamic")
|
67
|
+
|
68
|
+
/**
|
69
|
+
* SAXON_NAMESPACE:
|
70
|
+
*
|
71
|
+
* Namespace for SAXON extensions functions
|
72
|
+
*/
|
73
|
+
#define SAXON_NAMESPACE ((const xmlChar *) "http://icl.com/saxon")
|
74
|
+
|
75
|
+
EXSLTPUBFUN void EXSLTCALL exsltCommonRegister (void);
|
76
|
+
#ifdef EXSLT_CRYPTO_ENABLED
|
77
|
+
EXSLTPUBFUN void EXSLTCALL exsltCryptoRegister (void);
|
78
|
+
#endif
|
79
|
+
EXSLTPUBFUN void EXSLTCALL exsltMathRegister (void);
|
80
|
+
EXSLTPUBFUN void EXSLTCALL exsltSetsRegister (void);
|
81
|
+
EXSLTPUBFUN void EXSLTCALL exsltFuncRegister (void);
|
82
|
+
EXSLTPUBFUN void EXSLTCALL exsltStrRegister (void);
|
83
|
+
EXSLTPUBFUN void EXSLTCALL exsltDateRegister (void);
|
84
|
+
EXSLTPUBFUN void EXSLTCALL exsltSaxonRegister (void);
|
85
|
+
EXSLTPUBFUN void EXSLTCALL exsltDynRegister(void);
|
86
|
+
|
87
|
+
EXSLTPUBFUN void EXSLTCALL exsltRegisterAll (void);
|
88
|
+
|
89
|
+
EXSLTPUBFUN int EXSLTCALL exsltDateXpathCtxtRegister (xmlXPathContextPtr ctxt,
|
90
|
+
const xmlChar *prefix);
|
91
|
+
EXSLTPUBFUN int EXSLTCALL exsltMathXpathCtxtRegister (xmlXPathContextPtr ctxt,
|
92
|
+
const xmlChar *prefix);
|
93
|
+
EXSLTPUBFUN int EXSLTCALL exsltSetsXpathCtxtRegister (xmlXPathContextPtr ctxt,
|
94
|
+
const xmlChar *prefix);
|
95
|
+
EXSLTPUBFUN int EXSLTCALL exsltStrXpathCtxtRegister (xmlXPathContextPtr ctxt,
|
96
|
+
const xmlChar *prefix);
|
97
|
+
|
98
|
+
#ifdef __cplusplus
|
99
|
+
}
|
100
|
+
#endif
|
101
|
+
#endif /* __EXSLT_H__ */
|
102
|
+
|
@@ -0,0 +1,70 @@
|
|
1
|
+
/*
|
2
|
+
* exsltconfig.h: compile-time version information for the EXSLT library
|
3
|
+
*
|
4
|
+
* See Copyright for the status of this software.
|
5
|
+
*
|
6
|
+
* daniel@veillard.com
|
7
|
+
*/
|
8
|
+
|
9
|
+
#ifndef __XML_EXSLTCONFIG_H__
|
10
|
+
#define __XML_EXSLTCONFIG_H__
|
11
|
+
|
12
|
+
#ifdef __cplusplus
|
13
|
+
extern "C" {
|
14
|
+
#endif
|
15
|
+
|
16
|
+
/**
|
17
|
+
* LIBEXSLT_DOTTED_VERSION:
|
18
|
+
*
|
19
|
+
* the version string like "1.2.3"
|
20
|
+
*/
|
21
|
+
#define LIBEXSLT_DOTTED_VERSION "1.1.34"
|
22
|
+
|
23
|
+
/**
|
24
|
+
* LIBEXSLT_VERSION:
|
25
|
+
*
|
26
|
+
* the version number: 1.2.3 value is 10203
|
27
|
+
*/
|
28
|
+
#define LIBEXSLT_VERSION 820
|
29
|
+
|
30
|
+
/**
|
31
|
+
* LIBEXSLT_VERSION_STRING:
|
32
|
+
*
|
33
|
+
* the version number string, 1.2.3 value is "10203"
|
34
|
+
*/
|
35
|
+
#define LIBEXSLT_VERSION_STRING "820"
|
36
|
+
|
37
|
+
/**
|
38
|
+
* LIBEXSLT_VERSION_EXTRA:
|
39
|
+
*
|
40
|
+
* extra version information, used to show a CVS compilation
|
41
|
+
*/
|
42
|
+
#define LIBEXSLT_VERSION_EXTRA ""
|
43
|
+
|
44
|
+
/**
|
45
|
+
* WITH_CRYPTO:
|
46
|
+
*
|
47
|
+
* Whether crypto support is configured into exslt
|
48
|
+
*/
|
49
|
+
#if 0
|
50
|
+
#define EXSLT_CRYPTO_ENABLED
|
51
|
+
#endif
|
52
|
+
|
53
|
+
/**
|
54
|
+
* ATTRIBUTE_UNUSED:
|
55
|
+
*
|
56
|
+
* This macro is used to flag unused function parameters to GCC
|
57
|
+
*/
|
58
|
+
#ifdef __GNUC__
|
59
|
+
#ifndef ATTRIBUTE_UNUSED
|
60
|
+
#define ATTRIBUTE_UNUSED __attribute__((unused))
|
61
|
+
#endif
|
62
|
+
#else
|
63
|
+
#define ATTRIBUTE_UNUSED
|
64
|
+
#endif
|
65
|
+
|
66
|
+
#ifdef __cplusplus
|
67
|
+
}
|
68
|
+
#endif
|
69
|
+
|
70
|
+
#endif /* __XML_EXSLTCONFIG_H__ */
|
@@ -0,0 +1,140 @@
|
|
1
|
+
/*
|
2
|
+
* exsltexports.h : macros for marking symbols as exportable/importable.
|
3
|
+
*
|
4
|
+
* See Copyright for the status of this software.
|
5
|
+
*
|
6
|
+
* igor@zlatkovic.com
|
7
|
+
*/
|
8
|
+
|
9
|
+
#ifndef __EXSLT_EXPORTS_H__
|
10
|
+
#define __EXSLT_EXPORTS_H__
|
11
|
+
|
12
|
+
/**
|
13
|
+
* EXSLTPUBFUN, EXSLTPUBVAR, EXSLTCALL
|
14
|
+
*
|
15
|
+
* Macros which declare an exportable function, an exportable variable and
|
16
|
+
* the calling convention used for functions.
|
17
|
+
*
|
18
|
+
* Please use an extra block for every platform/compiler combination when
|
19
|
+
* modifying this, rather than overlong #ifdef lines. This helps
|
20
|
+
* readability as well as the fact that different compilers on the same
|
21
|
+
* platform might need different definitions.
|
22
|
+
*/
|
23
|
+
|
24
|
+
/**
|
25
|
+
* EXSLTPUBFUN:
|
26
|
+
*
|
27
|
+
* Macros which declare an exportable function
|
28
|
+
*/
|
29
|
+
#define EXSLTPUBFUN
|
30
|
+
/**
|
31
|
+
* EXSLTPUBVAR:
|
32
|
+
*
|
33
|
+
* Macros which declare an exportable variable
|
34
|
+
*/
|
35
|
+
#define EXSLTPUBVAR extern
|
36
|
+
/**
|
37
|
+
* EXSLTCALL:
|
38
|
+
*
|
39
|
+
* Macros which declare the called convention for exported functions
|
40
|
+
*/
|
41
|
+
#define EXSLTCALL
|
42
|
+
|
43
|
+
/** DOC_DISABLE */
|
44
|
+
|
45
|
+
/* Windows platform with MS compiler */
|
46
|
+
#if defined(_WIN32) && defined(_MSC_VER)
|
47
|
+
#undef EXSLTPUBFUN
|
48
|
+
#undef EXSLTPUBVAR
|
49
|
+
#undef EXSLTCALL
|
50
|
+
#if defined(IN_LIBEXSLT) && !defined(LIBEXSLT_STATIC)
|
51
|
+
#define EXSLTPUBFUN __declspec(dllexport)
|
52
|
+
#define EXSLTPUBVAR __declspec(dllexport)
|
53
|
+
#else
|
54
|
+
#define EXSLTPUBFUN
|
55
|
+
#if !defined(LIBEXSLT_STATIC)
|
56
|
+
#define EXSLTPUBVAR __declspec(dllimport) extern
|
57
|
+
#else
|
58
|
+
#define EXSLTPUBVAR extern
|
59
|
+
#endif
|
60
|
+
#endif
|
61
|
+
#define EXSLTCALL __cdecl
|
62
|
+
#if !defined _REENTRANT
|
63
|
+
#define _REENTRANT
|
64
|
+
#endif
|
65
|
+
#endif
|
66
|
+
|
67
|
+
/* Windows platform with Borland compiler */
|
68
|
+
#if defined(_WIN32) && defined(__BORLANDC__)
|
69
|
+
#undef EXSLTPUBFUN
|
70
|
+
#undef EXSLTPUBVAR
|
71
|
+
#undef EXSLTCALL
|
72
|
+
#if defined(IN_LIBEXSLT) && !defined(LIBEXSLT_STATIC)
|
73
|
+
#define EXSLTPUBFUN __declspec(dllexport)
|
74
|
+
#define EXSLTPUBVAR __declspec(dllexport) extern
|
75
|
+
#else
|
76
|
+
#define EXSLTPUBFUN
|
77
|
+
#if !defined(LIBEXSLT_STATIC)
|
78
|
+
#define EXSLTPUBVAR __declspec(dllimport) extern
|
79
|
+
#else
|
80
|
+
#define EXSLTPUBVAR extern
|
81
|
+
#endif
|
82
|
+
#endif
|
83
|
+
#define EXSLTCALL __cdecl
|
84
|
+
#if !defined _REENTRANT
|
85
|
+
#define _REENTRANT
|
86
|
+
#endif
|
87
|
+
#endif
|
88
|
+
|
89
|
+
/* Windows platform with GNU compiler (Mingw) */
|
90
|
+
#if defined(_WIN32) && defined(__MINGW32__)
|
91
|
+
#undef EXSLTPUBFUN
|
92
|
+
#undef EXSLTPUBVAR
|
93
|
+
#undef EXSLTCALL
|
94
|
+
/*
|
95
|
+
#if defined(IN_LIBEXSLT) && !defined(LIBEXSLT_STATIC)
|
96
|
+
*/
|
97
|
+
#if !defined(LIBEXSLT_STATIC)
|
98
|
+
#define EXSLTPUBFUN __declspec(dllexport)
|
99
|
+
#define EXSLTPUBVAR __declspec(dllexport) extern
|
100
|
+
#else
|
101
|
+
#define EXSLTPUBFUN
|
102
|
+
#if !defined(LIBEXSLT_STATIC)
|
103
|
+
#define EXSLTPUBVAR __declspec(dllimport) extern
|
104
|
+
#else
|
105
|
+
#define EXSLTPUBVAR extern
|
106
|
+
#endif
|
107
|
+
#endif
|
108
|
+
#define EXSLTCALL __cdecl
|
109
|
+
#if !defined _REENTRANT
|
110
|
+
#define _REENTRANT
|
111
|
+
#endif
|
112
|
+
#endif
|
113
|
+
|
114
|
+
/* Cygwin platform (does not define _WIN32), GNU compiler */
|
115
|
+
#if defined(__CYGWIN__)
|
116
|
+
#undef EXSLTPUBFUN
|
117
|
+
#undef EXSLTPUBVAR
|
118
|
+
#undef EXSLTCALL
|
119
|
+
#if defined(IN_LIBEXSLT) && !defined(LIBEXSLT_STATIC)
|
120
|
+
#define EXSLTPUBFUN __declspec(dllexport)
|
121
|
+
#define EXSLTPUBVAR __declspec(dllexport)
|
122
|
+
#else
|
123
|
+
#define EXSLTPUBFUN
|
124
|
+
#if !defined(LIBEXSLT_STATIC)
|
125
|
+
#define EXSLTPUBVAR __declspec(dllimport) extern
|
126
|
+
#else
|
127
|
+
#define EXSLTPUBVAR extern
|
128
|
+
#endif
|
129
|
+
#endif
|
130
|
+
#define EXSLTCALL __cdecl
|
131
|
+
#endif
|
132
|
+
|
133
|
+
/* Compatibility */
|
134
|
+
#if !defined(LIBEXSLT_PUBLIC)
|
135
|
+
#define LIBEXSLT_PUBLIC EXSLTPUBVAR
|
136
|
+
#endif
|
137
|
+
|
138
|
+
#endif /* __EXSLT_EXPORTS_H__ */
|
139
|
+
|
140
|
+
|