nokogiri 1.11.0.rc3-x86-linux → 1.11.3-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/LICENSE.md +1 -1
- data/README.md +168 -91
- data/ext/nokogiri/depend +37 -358
- data/ext/nokogiri/extconf.rb +581 -374
- data/ext/nokogiri/html_document.c +78 -82
- data/ext/nokogiri/html_element_description.c +84 -71
- data/ext/nokogiri/html_entity_lookup.c +21 -16
- data/ext/nokogiri/html_sax_parser_context.c +69 -66
- data/ext/nokogiri/html_sax_push_parser.c +42 -34
- 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/libxml2_backwards_compat.c +121 -0
- data/ext/nokogiri/nokogiri.c +192 -93
- data/ext/nokogiri/nokogiri.h +177 -98
- data/ext/nokogiri/test_global_handlers.c +40 -0
- data/ext/nokogiri/xml_attr.c +15 -15
- data/ext/nokogiri/xml_attribute_decl.c +18 -18
- data/ext/nokogiri/xml_cdata.c +13 -18
- data/ext/nokogiri/xml_comment.c +19 -26
- data/ext/nokogiri/xml_document.c +246 -188
- data/ext/nokogiri/xml_document_fragment.c +13 -15
- data/ext/nokogiri/xml_dtd.c +54 -48
- data/ext/nokogiri/xml_element_content.c +30 -27
- data/ext/nokogiri/xml_element_decl.c +22 -22
- data/ext/nokogiri/xml_encoding_handler.c +17 -11
- data/ext/nokogiri/xml_entity_decl.c +32 -30
- data/ext/nokogiri/xml_entity_reference.c +16 -18
- data/ext/nokogiri/xml_namespace.c +56 -49
- data/ext/nokogiri/xml_node.c +371 -320
- data/ext/nokogiri/xml_node_set.c +168 -156
- data/ext/nokogiri/xml_processing_instruction.c +17 -19
- data/ext/nokogiri/xml_reader.c +191 -157
- data/ext/nokogiri/xml_relax_ng.c +52 -28
- data/ext/nokogiri/xml_sax_parser.c +118 -118
- data/ext/nokogiri/xml_sax_parser_context.c +103 -86
- data/ext/nokogiri/xml_sax_push_parser.c +36 -27
- data/ext/nokogiri/xml_schema.c +95 -47
- data/ext/nokogiri/xml_syntax_error.c +42 -21
- data/ext/nokogiri/xml_text.c +13 -17
- data/ext/nokogiri/xml_xpath_context.c +206 -123
- data/ext/nokogiri/xslt_stylesheet.c +158 -161
- data/lib/nokogiri.rb +3 -7
- 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/extension.rb +26 -0
- data/lib/nokogiri/html/document.rb +12 -26
- data/lib/nokogiri/html/document_fragment.rb +15 -15
- data/lib/nokogiri/version.rb +2 -149
- data/lib/nokogiri/version/constant.rb +5 -0
- data/lib/nokogiri/version/info.rb +205 -0
- data/lib/nokogiri/xml/document.rb +91 -35
- data/lib/nokogiri/xml/document_fragment.rb +4 -6
- data/lib/nokogiri/xml/node.rb +89 -69
- data/lib/nokogiri/xml/parse_options.rb +6 -0
- data/lib/nokogiri/xml/reader.rb +2 -9
- 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
- data/lib/nokogiri/xml/xpath.rb +1 -3
- data/lib/nokogiri/xml/xpath/syntax_error.rb +1 -1
- metadata +150 -171
- data/ext/nokogiri/html_document.h +0 -10
- data/ext/nokogiri/html_element_description.h +0 -10
- data/ext/nokogiri/html_entity_lookup.h +0 -8
- data/ext/nokogiri/html_sax_parser_context.h +0 -11
- data/ext/nokogiri/html_sax_push_parser.h +0 -9
- data/ext/nokogiri/xml_attr.h +0 -9
- data/ext/nokogiri/xml_attribute_decl.h +0 -9
- data/ext/nokogiri/xml_cdata.h +0 -9
- data/ext/nokogiri/xml_comment.h +0 -9
- data/ext/nokogiri/xml_document.h +0 -23
- data/ext/nokogiri/xml_document_fragment.h +0 -10
- data/ext/nokogiri/xml_dtd.h +0 -10
- data/ext/nokogiri/xml_element_content.h +0 -10
- data/ext/nokogiri/xml_element_decl.h +0 -9
- data/ext/nokogiri/xml_encoding_handler.h +0 -8
- data/ext/nokogiri/xml_entity_decl.h +0 -10
- data/ext/nokogiri/xml_entity_reference.h +0 -9
- data/ext/nokogiri/xml_io.c +0 -63
- data/ext/nokogiri/xml_io.h +0 -11
- data/ext/nokogiri/xml_libxml2_hacks.c +0 -112
- data/ext/nokogiri/xml_libxml2_hacks.h +0 -12
- data/ext/nokogiri/xml_namespace.h +0 -14
- data/ext/nokogiri/xml_node.h +0 -13
- data/ext/nokogiri/xml_node_set.h +0 -12
- data/ext/nokogiri/xml_processing_instruction.h +0 -9
- data/ext/nokogiri/xml_reader.h +0 -10
- data/ext/nokogiri/xml_relax_ng.h +0 -9
- data/ext/nokogiri/xml_sax_parser.h +0 -39
- data/ext/nokogiri/xml_sax_parser_context.h +0 -10
- data/ext/nokogiri/xml_sax_push_parser.h +0 -9
- data/ext/nokogiri/xml_schema.h +0 -9
- data/ext/nokogiri/xml_syntax_error.h +0 -13
- data/ext/nokogiri/xml_text.h +0 -9
- data/ext/nokogiri/xml_xpath_context.h +0 -10
- data/ext/nokogiri/xslt_stylesheet.h +0 -14
- data/lib/nokogiri/2.4/nokogiri.so +0 -0
@@ -0,0 +1,72 @@
|
|
1
|
+
/*
|
2
|
+
* Summary: interface for the non-standard features
|
3
|
+
* Description: implement some extension outside the XSLT namespace
|
4
|
+
* but not EXSLT with is in a different library.
|
5
|
+
*
|
6
|
+
* Copy: See Copyright for the status of this software.
|
7
|
+
*
|
8
|
+
* Author: Daniel Veillard
|
9
|
+
*/
|
10
|
+
|
11
|
+
#ifndef __XML_XSLT_EXTRA_H__
|
12
|
+
#define __XML_XSLT_EXTRA_H__
|
13
|
+
|
14
|
+
#include <libxml/xpath.h>
|
15
|
+
#include "xsltexports.h"
|
16
|
+
#include "xsltInternals.h"
|
17
|
+
|
18
|
+
#ifdef __cplusplus
|
19
|
+
extern "C" {
|
20
|
+
#endif
|
21
|
+
|
22
|
+
/**
|
23
|
+
* XSLT_LIBXSLT_NAMESPACE:
|
24
|
+
*
|
25
|
+
* This is the libxslt namespace for specific extensions.
|
26
|
+
*/
|
27
|
+
#define XSLT_LIBXSLT_NAMESPACE ((xmlChar *) "http://xmlsoft.org/XSLT/namespace")
|
28
|
+
|
29
|
+
/**
|
30
|
+
* XSLT_SAXON_NAMESPACE:
|
31
|
+
*
|
32
|
+
* This is Michael Kay's Saxon processor namespace for extensions.
|
33
|
+
*/
|
34
|
+
#define XSLT_SAXON_NAMESPACE ((xmlChar *) "http://icl.com/saxon")
|
35
|
+
|
36
|
+
/**
|
37
|
+
* XSLT_XT_NAMESPACE:
|
38
|
+
*
|
39
|
+
* This is James Clark's XT processor namespace for extensions.
|
40
|
+
*/
|
41
|
+
#define XSLT_XT_NAMESPACE ((xmlChar *) "http://www.jclark.com/xt")
|
42
|
+
|
43
|
+
/**
|
44
|
+
* XSLT_XALAN_NAMESPACE:
|
45
|
+
*
|
46
|
+
* This is the Apache project XALAN processor namespace for extensions.
|
47
|
+
*/
|
48
|
+
#define XSLT_XALAN_NAMESPACE ((xmlChar *) \
|
49
|
+
"org.apache.xalan.xslt.extensions.Redirect")
|
50
|
+
|
51
|
+
|
52
|
+
XSLTPUBFUN void XSLTCALL
|
53
|
+
xsltFunctionNodeSet (xmlXPathParserContextPtr ctxt,
|
54
|
+
int nargs);
|
55
|
+
XSLTPUBFUN void XSLTCALL
|
56
|
+
xsltDebug (xsltTransformContextPtr ctxt,
|
57
|
+
xmlNodePtr node,
|
58
|
+
xmlNodePtr inst,
|
59
|
+
xsltElemPreCompPtr comp);
|
60
|
+
|
61
|
+
|
62
|
+
XSLTPUBFUN void XSLTCALL
|
63
|
+
xsltRegisterExtras (xsltTransformContextPtr ctxt);
|
64
|
+
XSLTPUBFUN void XSLTCALL
|
65
|
+
xsltRegisterAllExtras (void);
|
66
|
+
|
67
|
+
#ifdef __cplusplus
|
68
|
+
}
|
69
|
+
#endif
|
70
|
+
|
71
|
+
#endif /* __XML_XSLT_EXTRA_H__ */
|
72
|
+
|
@@ -0,0 +1,78 @@
|
|
1
|
+
/*
|
2
|
+
* Summary: interface for the XSLT functions not from XPath
|
3
|
+
* Description: a set of extra functions coming from XSLT but not in XPath
|
4
|
+
*
|
5
|
+
* Copy: See Copyright for the status of this software.
|
6
|
+
*
|
7
|
+
* Author: Daniel Veillard and Bjorn Reese <breese@users.sourceforge.net>
|
8
|
+
*/
|
9
|
+
|
10
|
+
#ifndef __XML_XSLT_FUNCTIONS_H__
|
11
|
+
#define __XML_XSLT_FUNCTIONS_H__
|
12
|
+
|
13
|
+
#include <libxml/xpath.h>
|
14
|
+
#include <libxml/xpathInternals.h>
|
15
|
+
#include "xsltexports.h"
|
16
|
+
#include "xsltInternals.h"
|
17
|
+
|
18
|
+
#ifdef __cplusplus
|
19
|
+
extern "C" {
|
20
|
+
#endif
|
21
|
+
|
22
|
+
/**
|
23
|
+
* XSLT_REGISTER_FUNCTION_LOOKUP:
|
24
|
+
*
|
25
|
+
* Registering macro, not general purpose at all but used in different modules.
|
26
|
+
*/
|
27
|
+
#define XSLT_REGISTER_FUNCTION_LOOKUP(ctxt) \
|
28
|
+
xmlXPathRegisterFuncLookup((ctxt)->xpathCtxt, \
|
29
|
+
xsltXPathFunctionLookup, \
|
30
|
+
(void *)(ctxt->xpathCtxt));
|
31
|
+
|
32
|
+
XSLTPUBFUN xmlXPathFunction XSLTCALL
|
33
|
+
xsltXPathFunctionLookup (void *vctxt,
|
34
|
+
const xmlChar *name,
|
35
|
+
const xmlChar *ns_uri);
|
36
|
+
|
37
|
+
/*
|
38
|
+
* Interfaces for the functions implementations.
|
39
|
+
*/
|
40
|
+
|
41
|
+
XSLTPUBFUN void XSLTCALL
|
42
|
+
xsltDocumentFunction (xmlXPathParserContextPtr ctxt,
|
43
|
+
int nargs);
|
44
|
+
XSLTPUBFUN void XSLTCALL
|
45
|
+
xsltKeyFunction (xmlXPathParserContextPtr ctxt,
|
46
|
+
int nargs);
|
47
|
+
XSLTPUBFUN void XSLTCALL
|
48
|
+
xsltUnparsedEntityURIFunction (xmlXPathParserContextPtr ctxt,
|
49
|
+
int nargs);
|
50
|
+
XSLTPUBFUN void XSLTCALL
|
51
|
+
xsltFormatNumberFunction (xmlXPathParserContextPtr ctxt,
|
52
|
+
int nargs);
|
53
|
+
XSLTPUBFUN void XSLTCALL
|
54
|
+
xsltGenerateIdFunction (xmlXPathParserContextPtr ctxt,
|
55
|
+
int nargs);
|
56
|
+
XSLTPUBFUN void XSLTCALL
|
57
|
+
xsltSystemPropertyFunction (xmlXPathParserContextPtr ctxt,
|
58
|
+
int nargs);
|
59
|
+
XSLTPUBFUN void XSLTCALL
|
60
|
+
xsltElementAvailableFunction (xmlXPathParserContextPtr ctxt,
|
61
|
+
int nargs);
|
62
|
+
XSLTPUBFUN void XSLTCALL
|
63
|
+
xsltFunctionAvailableFunction (xmlXPathParserContextPtr ctxt,
|
64
|
+
int nargs);
|
65
|
+
|
66
|
+
/*
|
67
|
+
* And the registration
|
68
|
+
*/
|
69
|
+
|
70
|
+
XSLTPUBFUN void XSLTCALL
|
71
|
+
xsltRegisterAllFunctions (xmlXPathContextPtr ctxt);
|
72
|
+
|
73
|
+
#ifdef __cplusplus
|
74
|
+
}
|
75
|
+
#endif
|
76
|
+
|
77
|
+
#endif /* __XML_XSLT_FUNCTIONS_H__ */
|
78
|
+
|
@@ -0,0 +1,75 @@
|
|
1
|
+
/*
|
2
|
+
* Summary: interface for the XSLT import support
|
3
|
+
* Description: macros and fuctions needed to implement and
|
4
|
+
* access the import tree
|
5
|
+
*
|
6
|
+
* Copy: See Copyright for the status of this software.
|
7
|
+
*
|
8
|
+
* Author: Daniel Veillard
|
9
|
+
*/
|
10
|
+
|
11
|
+
#ifndef __XML_XSLT_IMPORTS_H__
|
12
|
+
#define __XML_XSLT_IMPORTS_H__
|
13
|
+
|
14
|
+
#include <libxml/tree.h>
|
15
|
+
#include "xsltexports.h"
|
16
|
+
#include "xsltInternals.h"
|
17
|
+
|
18
|
+
#ifdef __cplusplus
|
19
|
+
extern "C" {
|
20
|
+
#endif
|
21
|
+
|
22
|
+
/**
|
23
|
+
* XSLT_GET_IMPORT_PTR:
|
24
|
+
*
|
25
|
+
* A macro to import pointers from the stylesheet cascading order.
|
26
|
+
*/
|
27
|
+
#define XSLT_GET_IMPORT_PTR(res, style, name) { \
|
28
|
+
xsltStylesheetPtr st = style; \
|
29
|
+
res = NULL; \
|
30
|
+
while (st != NULL) { \
|
31
|
+
if (st->name != NULL) { res = st->name; break; } \
|
32
|
+
st = xsltNextImport(st); \
|
33
|
+
}}
|
34
|
+
|
35
|
+
/**
|
36
|
+
* XSLT_GET_IMPORT_INT:
|
37
|
+
*
|
38
|
+
* A macro to import intergers from the stylesheet cascading order.
|
39
|
+
*/
|
40
|
+
#define XSLT_GET_IMPORT_INT(res, style, name) { \
|
41
|
+
xsltStylesheetPtr st = style; \
|
42
|
+
res = -1; \
|
43
|
+
while (st != NULL) { \
|
44
|
+
if (st->name != -1) { res = st->name; break; } \
|
45
|
+
st = xsltNextImport(st); \
|
46
|
+
}}
|
47
|
+
|
48
|
+
/*
|
49
|
+
* Module interfaces
|
50
|
+
*/
|
51
|
+
XSLTPUBFUN int XSLTCALL
|
52
|
+
xsltParseStylesheetImport(xsltStylesheetPtr style,
|
53
|
+
xmlNodePtr cur);
|
54
|
+
XSLTPUBFUN int XSLTCALL
|
55
|
+
xsltParseStylesheetInclude
|
56
|
+
(xsltStylesheetPtr style,
|
57
|
+
xmlNodePtr cur);
|
58
|
+
XSLTPUBFUN xsltStylesheetPtr XSLTCALL
|
59
|
+
xsltNextImport (xsltStylesheetPtr style);
|
60
|
+
XSLTPUBFUN int XSLTCALL
|
61
|
+
xsltNeedElemSpaceHandling(xsltTransformContextPtr ctxt);
|
62
|
+
XSLTPUBFUN int XSLTCALL
|
63
|
+
xsltFindElemSpaceHandling(xsltTransformContextPtr ctxt,
|
64
|
+
xmlNodePtr node);
|
65
|
+
XSLTPUBFUN xsltTemplatePtr XSLTCALL
|
66
|
+
xsltFindTemplate (xsltTransformContextPtr ctxt,
|
67
|
+
const xmlChar *name,
|
68
|
+
const xmlChar *nameURI);
|
69
|
+
|
70
|
+
#ifdef __cplusplus
|
71
|
+
}
|
72
|
+
#endif
|
73
|
+
|
74
|
+
#endif /* __XML_XSLT_IMPORTS_H__ */
|
75
|
+
|
@@ -0,0 +1,53 @@
|
|
1
|
+
/*
|
2
|
+
* Summary: interface for the key matching used in key() and template matches.
|
3
|
+
* Description: implementation of the key mechanims.
|
4
|
+
*
|
5
|
+
* Copy: See Copyright for the status of this software.
|
6
|
+
*
|
7
|
+
* Author: Daniel Veillard
|
8
|
+
*/
|
9
|
+
|
10
|
+
#ifndef __XML_XSLT_KEY_H__
|
11
|
+
#define __XML_XSLT_KEY_H__
|
12
|
+
|
13
|
+
#include <libxml/xpath.h>
|
14
|
+
#include "xsltexports.h"
|
15
|
+
#include "xsltInternals.h"
|
16
|
+
|
17
|
+
#ifdef __cplusplus
|
18
|
+
extern "C" {
|
19
|
+
#endif
|
20
|
+
|
21
|
+
/**
|
22
|
+
* NODE_IS_KEYED:
|
23
|
+
*
|
24
|
+
* check for bit 15 set
|
25
|
+
*/
|
26
|
+
#define NODE_IS_KEYED (1 >> 15)
|
27
|
+
|
28
|
+
XSLTPUBFUN int XSLTCALL
|
29
|
+
xsltAddKey (xsltStylesheetPtr style,
|
30
|
+
const xmlChar *name,
|
31
|
+
const xmlChar *nameURI,
|
32
|
+
const xmlChar *match,
|
33
|
+
const xmlChar *use,
|
34
|
+
xmlNodePtr inst);
|
35
|
+
XSLTPUBFUN xmlNodeSetPtr XSLTCALL
|
36
|
+
xsltGetKey (xsltTransformContextPtr ctxt,
|
37
|
+
const xmlChar *name,
|
38
|
+
const xmlChar *nameURI,
|
39
|
+
const xmlChar *value);
|
40
|
+
XSLTPUBFUN void XSLTCALL
|
41
|
+
xsltInitCtxtKeys (xsltTransformContextPtr ctxt,
|
42
|
+
xsltDocumentPtr doc);
|
43
|
+
XSLTPUBFUN void XSLTCALL
|
44
|
+
xsltFreeKeys (xsltStylesheetPtr style);
|
45
|
+
XSLTPUBFUN void XSLTCALL
|
46
|
+
xsltFreeDocumentKeys (xsltDocumentPtr doc);
|
47
|
+
|
48
|
+
#ifdef __cplusplus
|
49
|
+
}
|
50
|
+
#endif
|
51
|
+
|
52
|
+
#endif /* __XML_XSLT_H__ */
|
53
|
+
|
@@ -0,0 +1,68 @@
|
|
1
|
+
/*
|
2
|
+
* Summary: interface for the XSLT namespace handling
|
3
|
+
* Description: set of function easing the processing and generation
|
4
|
+
* of namespace nodes in XSLT.
|
5
|
+
*
|
6
|
+
* Copy: See Copyright for the status of this software.
|
7
|
+
*
|
8
|
+
* Author: Daniel Veillard
|
9
|
+
*/
|
10
|
+
|
11
|
+
#ifndef __XML_XSLT_NAMESPACES_H__
|
12
|
+
#define __XML_XSLT_NAMESPACES_H__
|
13
|
+
|
14
|
+
#include <libxml/tree.h>
|
15
|
+
#include "xsltexports.h"
|
16
|
+
|
17
|
+
#ifdef __cplusplus
|
18
|
+
extern "C" {
|
19
|
+
#endif
|
20
|
+
|
21
|
+
/*
|
22
|
+
* Used within nsAliases hashtable when the default namespace is required
|
23
|
+
* but it's not been explicitly defined
|
24
|
+
*/
|
25
|
+
/**
|
26
|
+
* UNDEFINED_DEFAULT_NS:
|
27
|
+
*
|
28
|
+
* Special value for undefined namespace, internal
|
29
|
+
*/
|
30
|
+
#define UNDEFINED_DEFAULT_NS (const xmlChar *) -1L
|
31
|
+
|
32
|
+
XSLTPUBFUN void XSLTCALL
|
33
|
+
xsltNamespaceAlias (xsltStylesheetPtr style,
|
34
|
+
xmlNodePtr node);
|
35
|
+
XSLTPUBFUN xmlNsPtr XSLTCALL
|
36
|
+
xsltGetNamespace (xsltTransformContextPtr ctxt,
|
37
|
+
xmlNodePtr cur,
|
38
|
+
xmlNsPtr ns,
|
39
|
+
xmlNodePtr out);
|
40
|
+
XSLTPUBFUN xmlNsPtr XSLTCALL
|
41
|
+
xsltGetPlainNamespace (xsltTransformContextPtr ctxt,
|
42
|
+
xmlNodePtr cur,
|
43
|
+
xmlNsPtr ns,
|
44
|
+
xmlNodePtr out);
|
45
|
+
XSLTPUBFUN xmlNsPtr XSLTCALL
|
46
|
+
xsltGetSpecialNamespace (xsltTransformContextPtr ctxt,
|
47
|
+
xmlNodePtr cur,
|
48
|
+
const xmlChar *URI,
|
49
|
+
const xmlChar *prefix,
|
50
|
+
xmlNodePtr out);
|
51
|
+
XSLTPUBFUN xmlNsPtr XSLTCALL
|
52
|
+
xsltCopyNamespace (xsltTransformContextPtr ctxt,
|
53
|
+
xmlNodePtr elem,
|
54
|
+
xmlNsPtr ns);
|
55
|
+
XSLTPUBFUN xmlNsPtr XSLTCALL
|
56
|
+
xsltCopyNamespaceList (xsltTransformContextPtr ctxt,
|
57
|
+
xmlNodePtr node,
|
58
|
+
xmlNsPtr cur);
|
59
|
+
XSLTPUBFUN void XSLTCALL
|
60
|
+
xsltFreeNamespaceAliasHashes
|
61
|
+
(xsltStylesheetPtr style);
|
62
|
+
|
63
|
+
#ifdef __cplusplus
|
64
|
+
}
|
65
|
+
#endif
|
66
|
+
|
67
|
+
#endif /* __XML_XSLT_NAMESPACES_H__ */
|
68
|
+
|
@@ -0,0 +1,73 @@
|
|
1
|
+
/*
|
2
|
+
* Summary: Implementation of the XSLT number functions
|
3
|
+
* Description: Implementation of the XSLT number functions
|
4
|
+
*
|
5
|
+
* Copy: See Copyright for the status of this software.
|
6
|
+
*
|
7
|
+
* Author: Bjorn Reese <breese@users.sourceforge.net> and Daniel Veillard
|
8
|
+
*/
|
9
|
+
|
10
|
+
#ifndef __XML_XSLT_NUMBERSINTERNALS_H__
|
11
|
+
#define __XML_XSLT_NUMBERSINTERNALS_H__
|
12
|
+
|
13
|
+
#include <libxml/tree.h>
|
14
|
+
#include "xsltexports.h"
|
15
|
+
|
16
|
+
#ifdef __cplusplus
|
17
|
+
extern "C" {
|
18
|
+
#endif
|
19
|
+
|
20
|
+
struct _xsltCompMatch;
|
21
|
+
|
22
|
+
/**
|
23
|
+
* xsltNumberData:
|
24
|
+
*
|
25
|
+
* This data structure is just a wrapper to pass xsl:number data in.
|
26
|
+
*/
|
27
|
+
typedef struct _xsltNumberData xsltNumberData;
|
28
|
+
typedef xsltNumberData *xsltNumberDataPtr;
|
29
|
+
|
30
|
+
struct _xsltNumberData {
|
31
|
+
const xmlChar *level;
|
32
|
+
const xmlChar *count;
|
33
|
+
const xmlChar *from;
|
34
|
+
const xmlChar *value;
|
35
|
+
const xmlChar *format;
|
36
|
+
int has_format;
|
37
|
+
int digitsPerGroup;
|
38
|
+
int groupingCharacter;
|
39
|
+
int groupingCharacterLen;
|
40
|
+
xmlDocPtr doc;
|
41
|
+
xmlNodePtr node;
|
42
|
+
struct _xsltCompMatch *countPat;
|
43
|
+
struct _xsltCompMatch *fromPat;
|
44
|
+
|
45
|
+
/*
|
46
|
+
* accelerators
|
47
|
+
*/
|
48
|
+
};
|
49
|
+
|
50
|
+
/**
|
51
|
+
* xsltFormatNumberInfo,:
|
52
|
+
*
|
53
|
+
* This data structure lists the various parameters needed to format numbers.
|
54
|
+
*/
|
55
|
+
typedef struct _xsltFormatNumberInfo xsltFormatNumberInfo;
|
56
|
+
typedef xsltFormatNumberInfo *xsltFormatNumberInfoPtr;
|
57
|
+
|
58
|
+
struct _xsltFormatNumberInfo {
|
59
|
+
int integer_hash; /* Number of '#' in integer part */
|
60
|
+
int integer_digits; /* Number of '0' in integer part */
|
61
|
+
int frac_digits; /* Number of '0' in fractional part */
|
62
|
+
int frac_hash; /* Number of '#' in fractional part */
|
63
|
+
int group; /* Number of chars per display 'group' */
|
64
|
+
int multiplier; /* Scaling for percent or permille */
|
65
|
+
char add_decimal; /* Flag for whether decimal point appears in pattern */
|
66
|
+
char is_multiplier_set; /* Flag to catch multiple occurences of percent/permille */
|
67
|
+
char is_negative_pattern;/* Flag for processing -ve prefix/suffix */
|
68
|
+
};
|
69
|
+
|
70
|
+
#ifdef __cplusplus
|
71
|
+
}
|
72
|
+
#endif
|
73
|
+
#endif /* __XML_XSLT_NUMBERSINTERNALS_H__ */
|
@@ -0,0 +1,84 @@
|
|
1
|
+
/*
|
2
|
+
* Summary: interface for the pattern matching used in template matches.
|
3
|
+
* Description: the implementation of the lookup of the right template
|
4
|
+
* for a given node must be really fast in order to keep
|
5
|
+
* decent performances.
|
6
|
+
*
|
7
|
+
* Copy: See Copyright for the status of this software.
|
8
|
+
*
|
9
|
+
* Author: Daniel Veillard
|
10
|
+
*/
|
11
|
+
|
12
|
+
#ifndef __XML_XSLT_PATTERN_H__
|
13
|
+
#define __XML_XSLT_PATTERN_H__
|
14
|
+
|
15
|
+
#include "xsltInternals.h"
|
16
|
+
#include "xsltexports.h"
|
17
|
+
|
18
|
+
#ifdef __cplusplus
|
19
|
+
extern "C" {
|
20
|
+
#endif
|
21
|
+
|
22
|
+
/**
|
23
|
+
* xsltCompMatch:
|
24
|
+
*
|
25
|
+
* Data structure used for the implementation of patterns.
|
26
|
+
* It is kept private (in pattern.c).
|
27
|
+
*/
|
28
|
+
typedef struct _xsltCompMatch xsltCompMatch;
|
29
|
+
typedef xsltCompMatch *xsltCompMatchPtr;
|
30
|
+
|
31
|
+
/*
|
32
|
+
* Pattern related interfaces.
|
33
|
+
*/
|
34
|
+
|
35
|
+
XSLTPUBFUN xsltCompMatchPtr XSLTCALL
|
36
|
+
xsltCompilePattern (const xmlChar *pattern,
|
37
|
+
xmlDocPtr doc,
|
38
|
+
xmlNodePtr node,
|
39
|
+
xsltStylesheetPtr style,
|
40
|
+
xsltTransformContextPtr runtime);
|
41
|
+
XSLTPUBFUN void XSLTCALL
|
42
|
+
xsltFreeCompMatchList (xsltCompMatchPtr comp);
|
43
|
+
XSLTPUBFUN int XSLTCALL
|
44
|
+
xsltTestCompMatchList (xsltTransformContextPtr ctxt,
|
45
|
+
xmlNodePtr node,
|
46
|
+
xsltCompMatchPtr comp);
|
47
|
+
XSLTPUBFUN void XSLTCALL
|
48
|
+
xsltCompMatchClearCache (xsltTransformContextPtr ctxt,
|
49
|
+
xsltCompMatchPtr comp);
|
50
|
+
XSLTPUBFUN void XSLTCALL
|
51
|
+
xsltNormalizeCompSteps (void *payload,
|
52
|
+
void *data,
|
53
|
+
const xmlChar *name);
|
54
|
+
|
55
|
+
/*
|
56
|
+
* Template related interfaces.
|
57
|
+
*/
|
58
|
+
XSLTPUBFUN int XSLTCALL
|
59
|
+
xsltAddTemplate (xsltStylesheetPtr style,
|
60
|
+
xsltTemplatePtr cur,
|
61
|
+
const xmlChar *mode,
|
62
|
+
const xmlChar *modeURI);
|
63
|
+
XSLTPUBFUN xsltTemplatePtr XSLTCALL
|
64
|
+
xsltGetTemplate (xsltTransformContextPtr ctxt,
|
65
|
+
xmlNodePtr node,
|
66
|
+
xsltStylesheetPtr style);
|
67
|
+
XSLTPUBFUN void XSLTCALL
|
68
|
+
xsltFreeTemplateHashes (xsltStylesheetPtr style);
|
69
|
+
XSLTPUBFUN void XSLTCALL
|
70
|
+
xsltCleanupTemplates (xsltStylesheetPtr style);
|
71
|
+
|
72
|
+
#if 0
|
73
|
+
int xsltMatchPattern (xsltTransformContextPtr ctxt,
|
74
|
+
xmlNodePtr node,
|
75
|
+
const xmlChar *pattern,
|
76
|
+
xmlDocPtr ctxtdoc,
|
77
|
+
xmlNodePtr ctxtnode);
|
78
|
+
#endif
|
79
|
+
#ifdef __cplusplus
|
80
|
+
}
|
81
|
+
#endif
|
82
|
+
|
83
|
+
#endif /* __XML_XSLT_PATTERN_H__ */
|
84
|
+
|