nokogiri 1.11.0.rc1-x86-linux → 1.11.1-x86-linux
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/Gemfile +3 -0
- data/LICENSE-DEPENDENCIES.md +1015 -947
- data/README.md +164 -92
- data/ext/nokogiri/depend +476 -357
- data/ext/nokogiri/extconf.rb +467 -326
- data/ext/nokogiri/html_document.c +79 -78
- data/ext/nokogiri/html_sax_parser_context.c +4 -2
- data/ext/nokogiri/html_sax_push_parser.c +14 -8
- 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 +37 -46
- data/ext/nokogiri/nokogiri.h +25 -17
- data/ext/nokogiri/test_global_handlers.c +41 -0
- data/ext/nokogiri/xml_document.c +8 -3
- data/ext/nokogiri/xml_io.c +8 -6
- data/ext/nokogiri/xml_node.c +1 -1
- data/ext/nokogiri/xml_node_set.c +1 -1
- data/ext/nokogiri/xml_reader.c +6 -17
- 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 +4 -2
- data/ext/nokogiri/xml_sax_push_parser.c +2 -0
- data/ext/nokogiri/xml_schema.c +84 -13
- data/ext/nokogiri/xml_syntax_error.c +23 -0
- data/ext/nokogiri/xml_syntax_error.h +15 -3
- data/ext/nokogiri/xml_xpath_context.c +80 -4
- data/ext/nokogiri/xslt_stylesheet.c +1 -4
- data/lib/nokogiri.rb +20 -3
- 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 +62 -62
- data/lib/nokogiri/css/parser.y +2 -2
- data/lib/nokogiri/css/parser_extras.rb +38 -36
- data/lib/nokogiri/css/xpath_visitor.rb +70 -42
- data/lib/nokogiri/html/document.rb +12 -26
- data/lib/nokogiri/version.rb +2 -148
- data/lib/nokogiri/version/constant.rb +5 -0
- data/lib/nokogiri/version/info.rb +182 -0
- data/lib/nokogiri/xml/builder.rb +2 -2
- data/lib/nokogiri/xml/document.rb +17 -7
- data/lib/nokogiri/xml/document_fragment.rb +4 -6
- data/lib/nokogiri/xml/node.rb +562 -238
- 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 +24 -16
- metadata +149 -130
- data/lib/nokogiri/2.4/nokogiri.so +0 -0
@@ -0,0 +1,180 @@
|
|
1
|
+
/*
|
2
|
+
* Summary: compile-time version information for the XSLT engine
|
3
|
+
* Description: compile-time version information for the XSLT engine
|
4
|
+
* this module is autogenerated.
|
5
|
+
*
|
6
|
+
* Copy: See Copyright for the status of this software.
|
7
|
+
*
|
8
|
+
* Author: Daniel Veillard
|
9
|
+
*/
|
10
|
+
|
11
|
+
#ifndef __XML_XSLTCONFIG_H__
|
12
|
+
#define __XML_XSLTCONFIG_H__
|
13
|
+
|
14
|
+
#ifdef __cplusplus
|
15
|
+
extern "C" {
|
16
|
+
#endif
|
17
|
+
|
18
|
+
/**
|
19
|
+
* LIBXSLT_DOTTED_VERSION:
|
20
|
+
*
|
21
|
+
* the version string like "1.2.3"
|
22
|
+
*/
|
23
|
+
#define LIBXSLT_DOTTED_VERSION "1.1.34"
|
24
|
+
|
25
|
+
/**
|
26
|
+
* LIBXSLT_VERSION:
|
27
|
+
*
|
28
|
+
* the version number: 1.2.3 value is 10203
|
29
|
+
*/
|
30
|
+
#define LIBXSLT_VERSION 10134
|
31
|
+
|
32
|
+
/**
|
33
|
+
* LIBXSLT_VERSION_STRING:
|
34
|
+
*
|
35
|
+
* the version number string, 1.2.3 value is "10203"
|
36
|
+
*/
|
37
|
+
#define LIBXSLT_VERSION_STRING "10134"
|
38
|
+
|
39
|
+
/**
|
40
|
+
* LIBXSLT_VERSION_EXTRA:
|
41
|
+
*
|
42
|
+
* extra version information, used to show a CVS compilation
|
43
|
+
*/
|
44
|
+
#define LIBXSLT_VERSION_EXTRA ""
|
45
|
+
|
46
|
+
/**
|
47
|
+
* WITH_XSLT_DEBUG:
|
48
|
+
*
|
49
|
+
* Activate the compilation of the debug reporting. Speed penalty
|
50
|
+
* is insignifiant and being able to run xsltpoc -v is useful. On
|
51
|
+
* by default unless --without-debug is passed to configure
|
52
|
+
*/
|
53
|
+
#if 1
|
54
|
+
#define WITH_XSLT_DEBUG
|
55
|
+
#endif
|
56
|
+
|
57
|
+
#if 0
|
58
|
+
/**
|
59
|
+
* DEBUG_MEMORY:
|
60
|
+
*
|
61
|
+
* should be activated only when debugging libxslt. It replaces the
|
62
|
+
* allocator with a collect and debug shell to the libc allocator.
|
63
|
+
* Use configure --with-mem-debug to activate it on both library
|
64
|
+
*/
|
65
|
+
#define DEBUG_MEMORY
|
66
|
+
|
67
|
+
/**
|
68
|
+
* DEBUG_MEMORY_LOCATION:
|
69
|
+
*
|
70
|
+
* should be activated only when debugging libxslt.
|
71
|
+
* DEBUG_MEMORY_LOCATION should be activated only when libxml has
|
72
|
+
* been configured with --with-debug-mem too
|
73
|
+
*/
|
74
|
+
#define DEBUG_MEMORY_LOCATION
|
75
|
+
#endif
|
76
|
+
|
77
|
+
/**
|
78
|
+
* XSLT_NEED_TRIO:
|
79
|
+
*
|
80
|
+
* should be activated if the existing libc library lacks some of the
|
81
|
+
* string formatting function, in that case reuse the Trio ones already
|
82
|
+
* compiled in the libxml2 library.
|
83
|
+
*/
|
84
|
+
|
85
|
+
#if 0
|
86
|
+
#define XSLT_NEED_TRIO
|
87
|
+
#endif
|
88
|
+
#ifdef __VMS
|
89
|
+
#define HAVE_MATH_H 1
|
90
|
+
#define HAVE_SYS_STAT_H 1
|
91
|
+
#ifndef XSLT_NEED_TRIO
|
92
|
+
#define XSLT_NEED_TRIO
|
93
|
+
#endif
|
94
|
+
#endif
|
95
|
+
|
96
|
+
#ifdef XSLT_NEED_TRIO
|
97
|
+
#define TRIO_REPLACE_STDIO
|
98
|
+
#endif
|
99
|
+
|
100
|
+
/**
|
101
|
+
* WITH_XSLT_DEBUGGER:
|
102
|
+
*
|
103
|
+
* Activate the compilation of the debugger support. Speed penalty
|
104
|
+
* is insignifiant.
|
105
|
+
* On by default unless --without-debugger is passed to configure
|
106
|
+
*/
|
107
|
+
#if 1
|
108
|
+
#ifndef WITH_DEBUGGER
|
109
|
+
#define WITH_DEBUGGER
|
110
|
+
#endif
|
111
|
+
#endif
|
112
|
+
|
113
|
+
/**
|
114
|
+
* WITH_PROFILER:
|
115
|
+
*
|
116
|
+
* Activate the compilation of the profiler. Speed penalty
|
117
|
+
* is insignifiant.
|
118
|
+
* On by default unless --without-profiler is passed to configure
|
119
|
+
*/
|
120
|
+
#if 1
|
121
|
+
#ifndef WITH_PROFILER
|
122
|
+
#define WITH_PROFILER
|
123
|
+
#endif
|
124
|
+
#endif
|
125
|
+
|
126
|
+
/**
|
127
|
+
* WITH_MODULES:
|
128
|
+
*
|
129
|
+
* Whether module support is configured into libxslt
|
130
|
+
* Note: no default module path for win32 platforms
|
131
|
+
*/
|
132
|
+
#if 0
|
133
|
+
#ifndef WITH_MODULES
|
134
|
+
#define WITH_MODULES
|
135
|
+
#endif
|
136
|
+
#define LIBXSLT_DEFAULT_PLUGINS_PATH() "/home/flavorjones/code/oss/nokogiri/ports/i686-redhat-linux/libxslt/1.1.34/lib/libxslt-plugins"
|
137
|
+
#endif
|
138
|
+
|
139
|
+
/**
|
140
|
+
* ATTRIBUTE_UNUSED:
|
141
|
+
*
|
142
|
+
* This macro is used to flag unused function parameters to GCC
|
143
|
+
*/
|
144
|
+
#ifdef __GNUC__
|
145
|
+
#ifndef ATTRIBUTE_UNUSED
|
146
|
+
#define ATTRIBUTE_UNUSED __attribute__((unused))
|
147
|
+
#endif
|
148
|
+
#else
|
149
|
+
#define ATTRIBUTE_UNUSED
|
150
|
+
#endif
|
151
|
+
|
152
|
+
/**
|
153
|
+
* LIBXSLT_ATTR_FORMAT:
|
154
|
+
*
|
155
|
+
* This macro is used to indicate to GCC the parameters are printf-like
|
156
|
+
*/
|
157
|
+
#ifdef __GNUC__
|
158
|
+
#define LIBXSLT_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args)))
|
159
|
+
#else
|
160
|
+
#define LIBXSLT_ATTR_FORMAT(fmt,args)
|
161
|
+
#endif
|
162
|
+
|
163
|
+
/**
|
164
|
+
* LIBXSLT_PUBLIC:
|
165
|
+
*
|
166
|
+
* This macro is used to declare PUBLIC variables for Cygwin and for MSC on Windows
|
167
|
+
*/
|
168
|
+
#if !defined LIBXSLT_PUBLIC
|
169
|
+
#if (defined(__CYGWIN__) || defined _MSC_VER) && !defined IN_LIBXSLT && !defined LIBXSLT_STATIC
|
170
|
+
#define LIBXSLT_PUBLIC __declspec(dllimport)
|
171
|
+
#else
|
172
|
+
#define LIBXSLT_PUBLIC
|
173
|
+
#endif
|
174
|
+
#endif
|
175
|
+
|
176
|
+
#ifdef __cplusplus
|
177
|
+
}
|
178
|
+
#endif
|
179
|
+
|
180
|
+
#endif /* __XML_XSLTCONFIG_H__ */
|
@@ -0,0 +1,142 @@
|
|
1
|
+
/*
|
2
|
+
* Summary: macros for marking symbols as exportable/importable.
|
3
|
+
* Description: macros for marking symbols as exportable/importable.
|
4
|
+
*
|
5
|
+
* Copy: See Copyright for the status of this software.
|
6
|
+
*
|
7
|
+
* Author: Igor Zlatkovic <igor@zlatkovic.com>
|
8
|
+
*/
|
9
|
+
|
10
|
+
#ifndef __XSLT_EXPORTS_H__
|
11
|
+
#define __XSLT_EXPORTS_H__
|
12
|
+
|
13
|
+
/**
|
14
|
+
* XSLTPUBFUN:
|
15
|
+
* XSLTPUBFUN, XSLTPUBVAR, XSLTCALL
|
16
|
+
*
|
17
|
+
* Macros which declare an exportable function, an exportable variable and
|
18
|
+
* the calling convention used for functions.
|
19
|
+
*
|
20
|
+
* Please use an extra block for every platform/compiler combination when
|
21
|
+
* modifying this, rather than overlong #ifdef lines. This helps
|
22
|
+
* readability as well as the fact that different compilers on the same
|
23
|
+
* platform might need different definitions.
|
24
|
+
*/
|
25
|
+
|
26
|
+
/**
|
27
|
+
* XSLTPUBFUN:
|
28
|
+
*
|
29
|
+
* Macros which declare an exportable function
|
30
|
+
*/
|
31
|
+
#define XSLTPUBFUN
|
32
|
+
/**
|
33
|
+
* XSLTPUBVAR:
|
34
|
+
*
|
35
|
+
* Macros which declare an exportable variable
|
36
|
+
*/
|
37
|
+
#define XSLTPUBVAR extern
|
38
|
+
/**
|
39
|
+
* XSLTCALL:
|
40
|
+
*
|
41
|
+
* Macros which declare the called convention for exported functions
|
42
|
+
*/
|
43
|
+
#define XSLTCALL
|
44
|
+
|
45
|
+
/** DOC_DISABLE */
|
46
|
+
|
47
|
+
/* Windows platform with MS compiler */
|
48
|
+
#if defined(_WIN32) && defined(_MSC_VER)
|
49
|
+
#undef XSLTPUBFUN
|
50
|
+
#undef XSLTPUBVAR
|
51
|
+
#undef XSLTCALL
|
52
|
+
#if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC)
|
53
|
+
#define XSLTPUBFUN __declspec(dllexport)
|
54
|
+
#define XSLTPUBVAR __declspec(dllexport)
|
55
|
+
#else
|
56
|
+
#define XSLTPUBFUN
|
57
|
+
#if !defined(LIBXSLT_STATIC)
|
58
|
+
#define XSLTPUBVAR __declspec(dllimport) extern
|
59
|
+
#else
|
60
|
+
#define XSLTPUBVAR extern
|
61
|
+
#endif
|
62
|
+
#endif
|
63
|
+
#define XSLTCALL __cdecl
|
64
|
+
#if !defined _REENTRANT
|
65
|
+
#define _REENTRANT
|
66
|
+
#endif
|
67
|
+
#endif
|
68
|
+
|
69
|
+
/* Windows platform with Borland compiler */
|
70
|
+
#if defined(_WIN32) && defined(__BORLANDC__)
|
71
|
+
#undef XSLTPUBFUN
|
72
|
+
#undef XSLTPUBVAR
|
73
|
+
#undef XSLTCALL
|
74
|
+
#if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC)
|
75
|
+
#define XSLTPUBFUN __declspec(dllexport)
|
76
|
+
#define XSLTPUBVAR __declspec(dllexport) extern
|
77
|
+
#else
|
78
|
+
#define XSLTPUBFUN
|
79
|
+
#if !defined(LIBXSLT_STATIC)
|
80
|
+
#define XSLTPUBVAR __declspec(dllimport) extern
|
81
|
+
#else
|
82
|
+
#define XSLTPUBVAR extern
|
83
|
+
#endif
|
84
|
+
#endif
|
85
|
+
#define XSLTCALL __cdecl
|
86
|
+
#if !defined _REENTRANT
|
87
|
+
#define _REENTRANT
|
88
|
+
#endif
|
89
|
+
#endif
|
90
|
+
|
91
|
+
/* Windows platform with GNU compiler (Mingw) */
|
92
|
+
#if defined(_WIN32) && defined(__MINGW32__)
|
93
|
+
#undef XSLTPUBFUN
|
94
|
+
#undef XSLTPUBVAR
|
95
|
+
#undef XSLTCALL
|
96
|
+
/*
|
97
|
+
#if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC)
|
98
|
+
*/
|
99
|
+
#if !defined(LIBXSLT_STATIC)
|
100
|
+
#define XSLTPUBFUN __declspec(dllexport)
|
101
|
+
#define XSLTPUBVAR __declspec(dllexport) extern
|
102
|
+
#else
|
103
|
+
#define XSLTPUBFUN
|
104
|
+
#if !defined(LIBXSLT_STATIC)
|
105
|
+
#define XSLTPUBVAR __declspec(dllimport) extern
|
106
|
+
#else
|
107
|
+
#define XSLTPUBVAR extern
|
108
|
+
#endif
|
109
|
+
#endif
|
110
|
+
#define XSLTCALL __cdecl
|
111
|
+
#if !defined _REENTRANT
|
112
|
+
#define _REENTRANT
|
113
|
+
#endif
|
114
|
+
#endif
|
115
|
+
|
116
|
+
/* Cygwin platform (does not define _WIN32), GNU compiler */
|
117
|
+
#if defined(__CYGWIN__)
|
118
|
+
#undef XSLTPUBFUN
|
119
|
+
#undef XSLTPUBVAR
|
120
|
+
#undef XSLTCALL
|
121
|
+
#if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC)
|
122
|
+
#define XSLTPUBFUN __declspec(dllexport)
|
123
|
+
#define XSLTPUBVAR __declspec(dllexport)
|
124
|
+
#else
|
125
|
+
#define XSLTPUBFUN
|
126
|
+
#if !defined(LIBXSLT_STATIC)
|
127
|
+
#define XSLTPUBVAR __declspec(dllimport) extern
|
128
|
+
#else
|
129
|
+
#define XSLTPUBVAR extern
|
130
|
+
#endif
|
131
|
+
#endif
|
132
|
+
#define XSLTCALL __cdecl
|
133
|
+
#endif
|
134
|
+
|
135
|
+
/* Compatibility */
|
136
|
+
#if !defined(LIBXSLT_PUBLIC)
|
137
|
+
#define LIBXSLT_PUBLIC XSLTPUBVAR
|
138
|
+
#endif
|
139
|
+
|
140
|
+
#endif /* __XSLT_EXPORTS_H__ */
|
141
|
+
|
142
|
+
|
@@ -0,0 +1,76 @@
|
|
1
|
+
/*
|
2
|
+
* Summary: Locale handling
|
3
|
+
* Description: Interfaces for locale handling. Needed for language dependent
|
4
|
+
* sorting.
|
5
|
+
*
|
6
|
+
* Copy: See Copyright for the status of this software.
|
7
|
+
*
|
8
|
+
* Author: Nick Wellnhofer
|
9
|
+
*/
|
10
|
+
|
11
|
+
#ifndef __XML_XSLTLOCALE_H__
|
12
|
+
#define __XML_XSLTLOCALE_H__
|
13
|
+
|
14
|
+
#include <libxml/xmlstring.h>
|
15
|
+
#include "xsltexports.h"
|
16
|
+
|
17
|
+
#ifdef HAVE_STRXFRM_L
|
18
|
+
|
19
|
+
/*
|
20
|
+
* XSLT_LOCALE_POSIX:
|
21
|
+
* Macro indicating to use POSIX locale extensions
|
22
|
+
*/
|
23
|
+
#define XSLT_LOCALE_POSIX
|
24
|
+
|
25
|
+
#ifdef HAVE_LOCALE_H
|
26
|
+
#include <locale.h>
|
27
|
+
#endif
|
28
|
+
#ifdef HAVE_XLOCALE_H
|
29
|
+
#include <xlocale.h>
|
30
|
+
#endif
|
31
|
+
|
32
|
+
typedef locale_t xsltLocale;
|
33
|
+
typedef xmlChar xsltLocaleChar;
|
34
|
+
|
35
|
+
#elif defined(_WIN32) && !defined(__CYGWIN__)
|
36
|
+
|
37
|
+
/*
|
38
|
+
* XSLT_LOCALE_WINAPI:
|
39
|
+
* Macro indicating to use WinAPI for extended locale support
|
40
|
+
*/
|
41
|
+
#define XSLT_LOCALE_WINAPI
|
42
|
+
|
43
|
+
#include <windows.h>
|
44
|
+
#include <winnls.h>
|
45
|
+
|
46
|
+
typedef LCID xsltLocale;
|
47
|
+
typedef wchar_t xsltLocaleChar;
|
48
|
+
|
49
|
+
#else
|
50
|
+
|
51
|
+
/*
|
52
|
+
* XSLT_LOCALE_NONE:
|
53
|
+
* Macro indicating that there's no extended locale support
|
54
|
+
*/
|
55
|
+
#define XSLT_LOCALE_NONE
|
56
|
+
|
57
|
+
typedef void *xsltLocale;
|
58
|
+
typedef xmlChar xsltLocaleChar;
|
59
|
+
|
60
|
+
#endif
|
61
|
+
|
62
|
+
XSLTPUBFUN xsltLocale XSLTCALL
|
63
|
+
xsltNewLocale (const xmlChar *langName);
|
64
|
+
XSLTPUBFUN void XSLTCALL
|
65
|
+
xsltFreeLocale (xsltLocale locale);
|
66
|
+
XSLTPUBFUN xsltLocaleChar * XSLTCALL
|
67
|
+
xsltStrxfrm (xsltLocale locale,
|
68
|
+
const xmlChar *string);
|
69
|
+
XSLTPUBFUN int XSLTCALL
|
70
|
+
xsltLocaleStrcmp (xsltLocale locale,
|
71
|
+
const xsltLocaleChar *str1,
|
72
|
+
const xsltLocaleChar *str2);
|
73
|
+
XSLTPUBFUN void XSLTCALL
|
74
|
+
xsltFreeLocales (void);
|
75
|
+
|
76
|
+
#endif /* __XML_XSLTLOCALE_H__ */
|
@@ -0,0 +1,313 @@
|
|
1
|
+
/*
|
2
|
+
* Summary: set of utilities for the XSLT engine
|
3
|
+
* Description: interfaces for the utilities module of the XSLT engine.
|
4
|
+
* things like message handling, profiling, and other
|
5
|
+
* generally useful routines.
|
6
|
+
*
|
7
|
+
* Copy: See Copyright for the status of this software.
|
8
|
+
*
|
9
|
+
* Author: Daniel Veillard
|
10
|
+
*/
|
11
|
+
|
12
|
+
#ifndef __XML_XSLTUTILS_H__
|
13
|
+
#define __XML_XSLTUTILS_H__
|
14
|
+
|
15
|
+
#include <libxslt/xsltconfig.h>
|
16
|
+
#ifdef HAVE_STDARG_H
|
17
|
+
#include <stdarg.h>
|
18
|
+
#endif
|
19
|
+
#include <libxml/xpath.h>
|
20
|
+
#include <libxml/dict.h>
|
21
|
+
#include <libxml/xmlerror.h>
|
22
|
+
#include "xsltexports.h"
|
23
|
+
#include "xsltInternals.h"
|
24
|
+
|
25
|
+
#ifdef __cplusplus
|
26
|
+
extern "C" {
|
27
|
+
#endif
|
28
|
+
|
29
|
+
/**
|
30
|
+
* XSLT_TODO:
|
31
|
+
*
|
32
|
+
* Macro to flag unimplemented blocks.
|
33
|
+
*/
|
34
|
+
#define XSLT_TODO \
|
35
|
+
xsltGenericError(xsltGenericErrorContext, \
|
36
|
+
"Unimplemented block at %s:%d\n", \
|
37
|
+
__FILE__, __LINE__);
|
38
|
+
|
39
|
+
/**
|
40
|
+
* XSLT_STRANGE:
|
41
|
+
*
|
42
|
+
* Macro to flag that a problem was detected internally.
|
43
|
+
*/
|
44
|
+
#define XSLT_STRANGE \
|
45
|
+
xsltGenericError(xsltGenericErrorContext, \
|
46
|
+
"Internal error at %s:%d\n", \
|
47
|
+
__FILE__, __LINE__);
|
48
|
+
|
49
|
+
/**
|
50
|
+
* IS_XSLT_ELEM:
|
51
|
+
*
|
52
|
+
* Checks that the element pertains to XSLT namespace.
|
53
|
+
*/
|
54
|
+
#define IS_XSLT_ELEM(n) \
|
55
|
+
(((n) != NULL) && ((n)->type == XML_ELEMENT_NODE) && \
|
56
|
+
((n)->ns != NULL) && (xmlStrEqual((n)->ns->href, XSLT_NAMESPACE)))
|
57
|
+
|
58
|
+
/**
|
59
|
+
* IS_XSLT_NAME:
|
60
|
+
*
|
61
|
+
* Checks the value of an element in XSLT namespace.
|
62
|
+
*/
|
63
|
+
#define IS_XSLT_NAME(n, val) \
|
64
|
+
(xmlStrEqual((n)->name, (const xmlChar *) (val)))
|
65
|
+
|
66
|
+
/**
|
67
|
+
* IS_XSLT_REAL_NODE:
|
68
|
+
*
|
69
|
+
* Check that a node is a 'real' one: document, element, text or attribute.
|
70
|
+
*/
|
71
|
+
#define IS_XSLT_REAL_NODE(n) \
|
72
|
+
(((n) != NULL) && \
|
73
|
+
(((n)->type == XML_ELEMENT_NODE) || \
|
74
|
+
((n)->type == XML_TEXT_NODE) || \
|
75
|
+
((n)->type == XML_CDATA_SECTION_NODE) || \
|
76
|
+
((n)->type == XML_ATTRIBUTE_NODE) || \
|
77
|
+
((n)->type == XML_DOCUMENT_NODE) || \
|
78
|
+
((n)->type == XML_HTML_DOCUMENT_NODE) || \
|
79
|
+
((n)->type == XML_COMMENT_NODE) || \
|
80
|
+
((n)->type == XML_PI_NODE)))
|
81
|
+
|
82
|
+
/*
|
83
|
+
* Our own version of namespaced attributes lookup.
|
84
|
+
*/
|
85
|
+
XSLTPUBFUN xmlChar * XSLTCALL
|
86
|
+
xsltGetNsProp (xmlNodePtr node,
|
87
|
+
const xmlChar *name,
|
88
|
+
const xmlChar *nameSpace);
|
89
|
+
XSLTPUBFUN const xmlChar * XSLTCALL
|
90
|
+
xsltGetCNsProp (xsltStylesheetPtr style,
|
91
|
+
xmlNodePtr node,
|
92
|
+
const xmlChar *name,
|
93
|
+
const xmlChar *nameSpace);
|
94
|
+
XSLTPUBFUN int XSLTCALL
|
95
|
+
xsltGetUTF8Char (const unsigned char *utf,
|
96
|
+
int *len);
|
97
|
+
|
98
|
+
/*
|
99
|
+
* XSLT Debug Tracing Tracing Types
|
100
|
+
*/
|
101
|
+
typedef enum {
|
102
|
+
XSLT_TRACE_ALL = -1,
|
103
|
+
XSLT_TRACE_NONE = 0,
|
104
|
+
XSLT_TRACE_COPY_TEXT = 1<<0,
|
105
|
+
XSLT_TRACE_PROCESS_NODE = 1<<1,
|
106
|
+
XSLT_TRACE_APPLY_TEMPLATE = 1<<2,
|
107
|
+
XSLT_TRACE_COPY = 1<<3,
|
108
|
+
XSLT_TRACE_COMMENT = 1<<4,
|
109
|
+
XSLT_TRACE_PI = 1<<5,
|
110
|
+
XSLT_TRACE_COPY_OF = 1<<6,
|
111
|
+
XSLT_TRACE_VALUE_OF = 1<<7,
|
112
|
+
XSLT_TRACE_CALL_TEMPLATE = 1<<8,
|
113
|
+
XSLT_TRACE_APPLY_TEMPLATES = 1<<9,
|
114
|
+
XSLT_TRACE_CHOOSE = 1<<10,
|
115
|
+
XSLT_TRACE_IF = 1<<11,
|
116
|
+
XSLT_TRACE_FOR_EACH = 1<<12,
|
117
|
+
XSLT_TRACE_STRIP_SPACES = 1<<13,
|
118
|
+
XSLT_TRACE_TEMPLATES = 1<<14,
|
119
|
+
XSLT_TRACE_KEYS = 1<<15,
|
120
|
+
XSLT_TRACE_VARIABLES = 1<<16
|
121
|
+
} xsltDebugTraceCodes;
|
122
|
+
|
123
|
+
/**
|
124
|
+
* XSLT_TRACE:
|
125
|
+
*
|
126
|
+
* Control the type of xsl debugtrace messages emitted.
|
127
|
+
*/
|
128
|
+
#define XSLT_TRACE(ctxt,code,call) \
|
129
|
+
if (ctxt->traceCode && (*(ctxt->traceCode) & code)) \
|
130
|
+
call
|
131
|
+
|
132
|
+
XSLTPUBFUN void XSLTCALL
|
133
|
+
xsltDebugSetDefaultTrace(xsltDebugTraceCodes val);
|
134
|
+
XSLTPUBFUN xsltDebugTraceCodes XSLTCALL
|
135
|
+
xsltDebugGetDefaultTrace(void);
|
136
|
+
|
137
|
+
/*
|
138
|
+
* XSLT specific error and debug reporting functions.
|
139
|
+
*/
|
140
|
+
XSLTPUBVAR xmlGenericErrorFunc xsltGenericError;
|
141
|
+
XSLTPUBVAR void *xsltGenericErrorContext;
|
142
|
+
XSLTPUBVAR xmlGenericErrorFunc xsltGenericDebug;
|
143
|
+
XSLTPUBVAR void *xsltGenericDebugContext;
|
144
|
+
|
145
|
+
XSLTPUBFUN void XSLTCALL
|
146
|
+
xsltPrintErrorContext (xsltTransformContextPtr ctxt,
|
147
|
+
xsltStylesheetPtr style,
|
148
|
+
xmlNodePtr node);
|
149
|
+
XSLTPUBFUN void XSLTCALL
|
150
|
+
xsltMessage (xsltTransformContextPtr ctxt,
|
151
|
+
xmlNodePtr node,
|
152
|
+
xmlNodePtr inst);
|
153
|
+
XSLTPUBFUN void XSLTCALL
|
154
|
+
xsltSetGenericErrorFunc (void *ctx,
|
155
|
+
xmlGenericErrorFunc handler);
|
156
|
+
XSLTPUBFUN void XSLTCALL
|
157
|
+
xsltSetGenericDebugFunc (void *ctx,
|
158
|
+
xmlGenericErrorFunc handler);
|
159
|
+
XSLTPUBFUN void XSLTCALL
|
160
|
+
xsltSetTransformErrorFunc (xsltTransformContextPtr ctxt,
|
161
|
+
void *ctx,
|
162
|
+
xmlGenericErrorFunc handler);
|
163
|
+
XSLTPUBFUN void XSLTCALL
|
164
|
+
xsltTransformError (xsltTransformContextPtr ctxt,
|
165
|
+
xsltStylesheetPtr style,
|
166
|
+
xmlNodePtr node,
|
167
|
+
const char *msg,
|
168
|
+
...) LIBXSLT_ATTR_FORMAT(4,5);
|
169
|
+
|
170
|
+
XSLTPUBFUN int XSLTCALL
|
171
|
+
xsltSetCtxtParseOptions (xsltTransformContextPtr ctxt,
|
172
|
+
int options);
|
173
|
+
/*
|
174
|
+
* Sorting.
|
175
|
+
*/
|
176
|
+
|
177
|
+
XSLTPUBFUN void XSLTCALL
|
178
|
+
xsltDocumentSortFunction (xmlNodeSetPtr list);
|
179
|
+
XSLTPUBFUN void XSLTCALL
|
180
|
+
xsltSetSortFunc (xsltSortFunc handler);
|
181
|
+
XSLTPUBFUN void XSLTCALL
|
182
|
+
xsltSetCtxtSortFunc (xsltTransformContextPtr ctxt,
|
183
|
+
xsltSortFunc handler);
|
184
|
+
XSLTPUBFUN void XSLTCALL
|
185
|
+
xsltDefaultSortFunction (xsltTransformContextPtr ctxt,
|
186
|
+
xmlNodePtr *sorts,
|
187
|
+
int nbsorts);
|
188
|
+
XSLTPUBFUN void XSLTCALL
|
189
|
+
xsltDoSortFunction (xsltTransformContextPtr ctxt,
|
190
|
+
xmlNodePtr * sorts,
|
191
|
+
int nbsorts);
|
192
|
+
XSLTPUBFUN xmlXPathObjectPtr * XSLTCALL
|
193
|
+
xsltComputeSortResult (xsltTransformContextPtr ctxt,
|
194
|
+
xmlNodePtr sort);
|
195
|
+
|
196
|
+
/*
|
197
|
+
* QNames handling.
|
198
|
+
*/
|
199
|
+
|
200
|
+
XSLTPUBFUN const xmlChar * XSLTCALL
|
201
|
+
xsltSplitQName (xmlDictPtr dict,
|
202
|
+
const xmlChar *name,
|
203
|
+
const xmlChar **prefix);
|
204
|
+
XSLTPUBFUN const xmlChar * XSLTCALL
|
205
|
+
xsltGetQNameURI (xmlNodePtr node,
|
206
|
+
xmlChar **name);
|
207
|
+
|
208
|
+
XSLTPUBFUN const xmlChar * XSLTCALL
|
209
|
+
xsltGetQNameURI2 (xsltStylesheetPtr style,
|
210
|
+
xmlNodePtr node,
|
211
|
+
const xmlChar **name);
|
212
|
+
|
213
|
+
/*
|
214
|
+
* Output, reuse libxml I/O buffers.
|
215
|
+
*/
|
216
|
+
XSLTPUBFUN int XSLTCALL
|
217
|
+
xsltSaveResultTo (xmlOutputBufferPtr buf,
|
218
|
+
xmlDocPtr result,
|
219
|
+
xsltStylesheetPtr style);
|
220
|
+
XSLTPUBFUN int XSLTCALL
|
221
|
+
xsltSaveResultToFilename (const char *URI,
|
222
|
+
xmlDocPtr result,
|
223
|
+
xsltStylesheetPtr style,
|
224
|
+
int compression);
|
225
|
+
XSLTPUBFUN int XSLTCALL
|
226
|
+
xsltSaveResultToFile (FILE *file,
|
227
|
+
xmlDocPtr result,
|
228
|
+
xsltStylesheetPtr style);
|
229
|
+
XSLTPUBFUN int XSLTCALL
|
230
|
+
xsltSaveResultToFd (int fd,
|
231
|
+
xmlDocPtr result,
|
232
|
+
xsltStylesheetPtr style);
|
233
|
+
XSLTPUBFUN int XSLTCALL
|
234
|
+
xsltSaveResultToString (xmlChar **doc_txt_ptr,
|
235
|
+
int * doc_txt_len,
|
236
|
+
xmlDocPtr result,
|
237
|
+
xsltStylesheetPtr style);
|
238
|
+
|
239
|
+
/*
|
240
|
+
* XPath interface
|
241
|
+
*/
|
242
|
+
XSLTPUBFUN xmlXPathCompExprPtr XSLTCALL
|
243
|
+
xsltXPathCompile (xsltStylesheetPtr style,
|
244
|
+
const xmlChar *str);
|
245
|
+
XSLTPUBFUN xmlXPathCompExprPtr XSLTCALL
|
246
|
+
xsltXPathCompileFlags (xsltStylesheetPtr style,
|
247
|
+
const xmlChar *str,
|
248
|
+
int flags);
|
249
|
+
|
250
|
+
/*
|
251
|
+
* Profiling.
|
252
|
+
*/
|
253
|
+
XSLTPUBFUN void XSLTCALL
|
254
|
+
xsltSaveProfiling (xsltTransformContextPtr ctxt,
|
255
|
+
FILE *output);
|
256
|
+
XSLTPUBFUN xmlDocPtr XSLTCALL
|
257
|
+
xsltGetProfileInformation (xsltTransformContextPtr ctxt);
|
258
|
+
|
259
|
+
XSLTPUBFUN long XSLTCALL
|
260
|
+
xsltTimestamp (void);
|
261
|
+
XSLTPUBFUN void XSLTCALL
|
262
|
+
xsltCalibrateAdjust (long delta);
|
263
|
+
|
264
|
+
/**
|
265
|
+
* XSLT_TIMESTAMP_TICS_PER_SEC:
|
266
|
+
*
|
267
|
+
* Sampling precision for profiling
|
268
|
+
*/
|
269
|
+
#define XSLT_TIMESTAMP_TICS_PER_SEC 100000l
|
270
|
+
|
271
|
+
/*
|
272
|
+
* Hooks for the debugger.
|
273
|
+
*/
|
274
|
+
|
275
|
+
typedef enum {
|
276
|
+
XSLT_DEBUG_NONE = 0, /* no debugging allowed */
|
277
|
+
XSLT_DEBUG_INIT,
|
278
|
+
XSLT_DEBUG_STEP,
|
279
|
+
XSLT_DEBUG_STEPOUT,
|
280
|
+
XSLT_DEBUG_NEXT,
|
281
|
+
XSLT_DEBUG_STOP,
|
282
|
+
XSLT_DEBUG_CONT,
|
283
|
+
XSLT_DEBUG_RUN,
|
284
|
+
XSLT_DEBUG_RUN_RESTART,
|
285
|
+
XSLT_DEBUG_QUIT
|
286
|
+
} xsltDebugStatusCodes;
|
287
|
+
|
288
|
+
XSLTPUBVAR int xslDebugStatus;
|
289
|
+
|
290
|
+
typedef void (*xsltHandleDebuggerCallback) (xmlNodePtr cur, xmlNodePtr node,
|
291
|
+
xsltTemplatePtr templ, xsltTransformContextPtr ctxt);
|
292
|
+
typedef int (*xsltAddCallCallback) (xsltTemplatePtr templ, xmlNodePtr source);
|
293
|
+
typedef void (*xsltDropCallCallback) (void);
|
294
|
+
|
295
|
+
XSLTPUBFUN void XSLTCALL
|
296
|
+
xsltSetDebuggerStatus (int value);
|
297
|
+
XSLTPUBFUN int XSLTCALL
|
298
|
+
xsltGetDebuggerStatus (void);
|
299
|
+
XSLTPUBFUN int XSLTCALL
|
300
|
+
xsltSetDebuggerCallbacks (int no, void *block);
|
301
|
+
XSLTPUBFUN int XSLTCALL
|
302
|
+
xslAddCall (xsltTemplatePtr templ,
|
303
|
+
xmlNodePtr source);
|
304
|
+
XSLTPUBFUN void XSLTCALL
|
305
|
+
xslDropCall (void);
|
306
|
+
|
307
|
+
#ifdef __cplusplus
|
308
|
+
}
|
309
|
+
#endif
|
310
|
+
|
311
|
+
#endif /* __XML_XSLTUTILS_H__ */
|
312
|
+
|
313
|
+
|