lxml 6.0.0__cp310-cp310-win_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lxml/ElementInclude.py +244 -0
- lxml/__init__.py +22 -0
- lxml/_elementpath.cp310-win_arm64.pyd +0 -0
- lxml/_elementpath.py +343 -0
- lxml/apihelpers.pxi +1801 -0
- lxml/builder.cp310-win_arm64.pyd +0 -0
- lxml/builder.py +243 -0
- lxml/classlookup.pxi +580 -0
- lxml/cleanup.pxi +215 -0
- lxml/cssselect.py +101 -0
- lxml/debug.pxi +36 -0
- lxml/docloader.pxi +178 -0
- lxml/doctestcompare.py +488 -0
- lxml/dtd.pxi +479 -0
- lxml/etree.cp310-win_arm64.pyd +0 -0
- lxml/etree.h +244 -0
- lxml/etree.pyx +3853 -0
- lxml/etree_api.h +204 -0
- lxml/extensions.pxi +830 -0
- lxml/html/ElementSoup.py +10 -0
- lxml/html/__init__.py +1927 -0
- lxml/html/_diffcommand.py +86 -0
- lxml/html/_difflib.cp310-win_arm64.pyd +0 -0
- lxml/html/_difflib.py +2106 -0
- lxml/html/_html5builder.py +100 -0
- lxml/html/_setmixin.py +56 -0
- lxml/html/builder.py +173 -0
- lxml/html/clean.py +21 -0
- lxml/html/defs.py +135 -0
- lxml/html/diff.cp310-win_arm64.pyd +0 -0
- lxml/html/diff.py +972 -0
- lxml/html/formfill.py +299 -0
- lxml/html/html5parser.py +260 -0
- lxml/html/soupparser.py +314 -0
- lxml/html/usedoctest.py +13 -0
- lxml/includes/__init__.pxd +0 -0
- lxml/includes/__init__.py +0 -0
- lxml/includes/c14n.pxd +25 -0
- lxml/includes/config.pxd +3 -0
- lxml/includes/dtdvalid.pxd +18 -0
- lxml/includes/etree_defs.h +379 -0
- lxml/includes/etreepublic.pxd +237 -0
- lxml/includes/extlibs/__init__.py +0 -0
- lxml/includes/extlibs/zconf.h +543 -0
- lxml/includes/extlibs/zlib.h +1938 -0
- lxml/includes/htmlparser.pxd +56 -0
- lxml/includes/libexslt/__init__.py +0 -0
- lxml/includes/libexslt/exslt.h +108 -0
- lxml/includes/libexslt/exsltconfig.h +70 -0
- lxml/includes/libexslt/exsltexports.h +63 -0
- lxml/includes/libexslt/libexslt.h +29 -0
- lxml/includes/libxml/HTMLparser.h +320 -0
- lxml/includes/libxml/HTMLtree.h +147 -0
- lxml/includes/libxml/SAX.h +204 -0
- lxml/includes/libxml/SAX2.h +173 -0
- lxml/includes/libxml/__init__.py +0 -0
- lxml/includes/libxml/c14n.h +128 -0
- lxml/includes/libxml/catalog.h +182 -0
- lxml/includes/libxml/chvalid.h +230 -0
- lxml/includes/libxml/debugXML.h +217 -0
- lxml/includes/libxml/dict.h +81 -0
- lxml/includes/libxml/encoding.h +233 -0
- lxml/includes/libxml/entities.h +151 -0
- lxml/includes/libxml/globals.h +529 -0
- lxml/includes/libxml/hash.h +236 -0
- lxml/includes/libxml/list.h +137 -0
- lxml/includes/libxml/nanoftp.h +186 -0
- lxml/includes/libxml/nanohttp.h +81 -0
- lxml/includes/libxml/parser.h +1265 -0
- lxml/includes/libxml/parserInternals.h +662 -0
- lxml/includes/libxml/pattern.h +100 -0
- lxml/includes/libxml/relaxng.h +218 -0
- lxml/includes/libxml/schemasInternals.h +958 -0
- lxml/includes/libxml/schematron.h +142 -0
- lxml/includes/libxml/threads.h +94 -0
- lxml/includes/libxml/tree.h +1314 -0
- lxml/includes/libxml/uri.h +94 -0
- lxml/includes/libxml/valid.h +448 -0
- lxml/includes/libxml/xinclude.h +129 -0
- lxml/includes/libxml/xlink.h +189 -0
- lxml/includes/libxml/xmlIO.h +369 -0
- lxml/includes/libxml/xmlautomata.h +146 -0
- lxml/includes/libxml/xmlerror.h +919 -0
- lxml/includes/libxml/xmlexports.h +50 -0
- lxml/includes/libxml/xmlmemory.h +228 -0
- lxml/includes/libxml/xmlmodule.h +57 -0
- lxml/includes/libxml/xmlreader.h +428 -0
- lxml/includes/libxml/xmlregexp.h +222 -0
- lxml/includes/libxml/xmlsave.h +88 -0
- lxml/includes/libxml/xmlschemas.h +246 -0
- lxml/includes/libxml/xmlschemastypes.h +152 -0
- lxml/includes/libxml/xmlstring.h +140 -0
- lxml/includes/libxml/xmlunicode.h +202 -0
- lxml/includes/libxml/xmlversion.h +526 -0
- lxml/includes/libxml/xmlwriter.h +488 -0
- lxml/includes/libxml/xpath.h +575 -0
- lxml/includes/libxml/xpathInternals.h +632 -0
- lxml/includes/libxml/xpointer.h +137 -0
- lxml/includes/libxslt/__init__.py +0 -0
- lxml/includes/libxslt/attributes.h +39 -0
- lxml/includes/libxslt/documents.h +93 -0
- lxml/includes/libxslt/extensions.h +262 -0
- lxml/includes/libxslt/extra.h +72 -0
- lxml/includes/libxslt/functions.h +78 -0
- lxml/includes/libxslt/imports.h +75 -0
- lxml/includes/libxslt/keys.h +53 -0
- lxml/includes/libxslt/libxslt.h +36 -0
- lxml/includes/libxslt/namespaces.h +68 -0
- lxml/includes/libxslt/numbersInternals.h +73 -0
- lxml/includes/libxslt/preproc.h +43 -0
- lxml/includes/libxslt/security.h +104 -0
- lxml/includes/libxslt/templates.h +77 -0
- lxml/includes/libxslt/transform.h +207 -0
- lxml/includes/libxslt/trio.h +216 -0
- lxml/includes/libxslt/triodef.h +220 -0
- lxml/includes/libxslt/variables.h +118 -0
- lxml/includes/libxslt/win32config.h +51 -0
- lxml/includes/libxslt/xslt.h +110 -0
- lxml/includes/libxslt/xsltInternals.h +1992 -0
- lxml/includes/libxslt/xsltconfig.h +179 -0
- lxml/includes/libxslt/xsltexports.h +64 -0
- lxml/includes/libxslt/xsltlocale.h +44 -0
- lxml/includes/libxslt/xsltutils.h +343 -0
- lxml/includes/lxml-version.h +3 -0
- lxml/includes/relaxng.pxd +64 -0
- lxml/includes/schematron.pxd +34 -0
- lxml/includes/tree.pxd +492 -0
- lxml/includes/uri.pxd +5 -0
- lxml/includes/xinclude.pxd +22 -0
- lxml/includes/xmlerror.pxd +852 -0
- lxml/includes/xmlparser.pxd +303 -0
- lxml/includes/xmlschema.pxd +35 -0
- lxml/includes/xpath.pxd +136 -0
- lxml/includes/xslt.pxd +190 -0
- lxml/isoschematron/__init__.py +348 -0
- lxml/isoschematron/resources/rng/iso-schematron.rng +709 -0
- lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl +75 -0
- lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl +77 -0
- lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl +313 -0
- lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl +1160 -0
- lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl +55 -0
- lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl +1796 -0
- lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl +588 -0
- lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt +84 -0
- lxml/iterparse.pxi +438 -0
- lxml/lxml.etree.h +244 -0
- lxml/lxml.etree_api.h +204 -0
- lxml/nsclasses.pxi +281 -0
- lxml/objectify.cp310-win_arm64.pyd +0 -0
- lxml/objectify.pyx +2149 -0
- lxml/objectpath.pxi +332 -0
- lxml/parser.pxi +2059 -0
- lxml/parsertarget.pxi +180 -0
- lxml/proxy.pxi +619 -0
- lxml/public-api.pxi +178 -0
- lxml/pyclasslookup.py +3 -0
- lxml/readonlytree.pxi +565 -0
- lxml/relaxng.pxi +165 -0
- lxml/sax.cp310-win_arm64.pyd +0 -0
- lxml/sax.py +286 -0
- lxml/saxparser.pxi +875 -0
- lxml/schematron.pxi +173 -0
- lxml/serializer.pxi +1849 -0
- lxml/usedoctest.py +13 -0
- lxml/xinclude.pxi +67 -0
- lxml/xmlerror.pxi +1654 -0
- lxml/xmlid.pxi +179 -0
- lxml/xmlschema.pxi +215 -0
- lxml/xpath.pxi +487 -0
- lxml/xslt.pxi +957 -0
- lxml/xsltext.pxi +242 -0
- lxml-6.0.0.dist-info/METADATA +163 -0
- lxml-6.0.0.dist-info/RECORD +177 -0
- lxml-6.0.0.dist-info/WHEEL +5 -0
- lxml-6.0.0.dist-info/licenses/LICENSE.txt +31 -0
- lxml-6.0.0.dist-info/licenses/LICENSES.txt +29 -0
- lxml-6.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,189 @@
|
|
1
|
+
/*
|
2
|
+
* Summary: unfinished XLink detection module
|
3
|
+
* Description: unfinished XLink detection module
|
4
|
+
*
|
5
|
+
* Copy: See Copyright for the status of this software.
|
6
|
+
*
|
7
|
+
* Author: Daniel Veillard
|
8
|
+
*/
|
9
|
+
|
10
|
+
#ifndef __XML_XLINK_H__
|
11
|
+
#define __XML_XLINK_H__
|
12
|
+
|
13
|
+
#include <libxml/xmlversion.h>
|
14
|
+
#include <libxml/tree.h>
|
15
|
+
|
16
|
+
#ifdef LIBXML_XPTR_ENABLED
|
17
|
+
|
18
|
+
#ifdef __cplusplus
|
19
|
+
extern "C" {
|
20
|
+
#endif
|
21
|
+
|
22
|
+
/**
|
23
|
+
* Various defines for the various Link properties.
|
24
|
+
*
|
25
|
+
* NOTE: the link detection layer will try to resolve QName expansion
|
26
|
+
* of namespaces. If "foo" is the prefix for "http://foo.com/"
|
27
|
+
* then the link detection layer will expand role="foo:myrole"
|
28
|
+
* to "http://foo.com/:myrole".
|
29
|
+
* NOTE: the link detection layer will expand URI-References found on
|
30
|
+
* href attributes by using the base mechanism if found.
|
31
|
+
*/
|
32
|
+
typedef xmlChar *xlinkHRef;
|
33
|
+
typedef xmlChar *xlinkRole;
|
34
|
+
typedef xmlChar *xlinkTitle;
|
35
|
+
|
36
|
+
typedef enum {
|
37
|
+
XLINK_TYPE_NONE = 0,
|
38
|
+
XLINK_TYPE_SIMPLE,
|
39
|
+
XLINK_TYPE_EXTENDED,
|
40
|
+
XLINK_TYPE_EXTENDED_SET
|
41
|
+
} xlinkType;
|
42
|
+
|
43
|
+
typedef enum {
|
44
|
+
XLINK_SHOW_NONE = 0,
|
45
|
+
XLINK_SHOW_NEW,
|
46
|
+
XLINK_SHOW_EMBED,
|
47
|
+
XLINK_SHOW_REPLACE
|
48
|
+
} xlinkShow;
|
49
|
+
|
50
|
+
typedef enum {
|
51
|
+
XLINK_ACTUATE_NONE = 0,
|
52
|
+
XLINK_ACTUATE_AUTO,
|
53
|
+
XLINK_ACTUATE_ONREQUEST
|
54
|
+
} xlinkActuate;
|
55
|
+
|
56
|
+
/**
|
57
|
+
* xlinkNodeDetectFunc:
|
58
|
+
* @ctx: user data pointer
|
59
|
+
* @node: the node to check
|
60
|
+
*
|
61
|
+
* This is the prototype for the link detection routine.
|
62
|
+
* It calls the default link detection callbacks upon link detection.
|
63
|
+
*/
|
64
|
+
typedef void (*xlinkNodeDetectFunc) (void *ctx, xmlNodePtr node);
|
65
|
+
|
66
|
+
/*
|
67
|
+
* The link detection module interact with the upper layers using
|
68
|
+
* a set of callback registered at parsing time.
|
69
|
+
*/
|
70
|
+
|
71
|
+
/**
|
72
|
+
* xlinkSimpleLinkFunk:
|
73
|
+
* @ctx: user data pointer
|
74
|
+
* @node: the node carrying the link
|
75
|
+
* @href: the target of the link
|
76
|
+
* @role: the role string
|
77
|
+
* @title: the link title
|
78
|
+
*
|
79
|
+
* This is the prototype for a simple link detection callback.
|
80
|
+
*/
|
81
|
+
typedef void
|
82
|
+
(*xlinkSimpleLinkFunk) (void *ctx,
|
83
|
+
xmlNodePtr node,
|
84
|
+
const xlinkHRef href,
|
85
|
+
const xlinkRole role,
|
86
|
+
const xlinkTitle title);
|
87
|
+
|
88
|
+
/**
|
89
|
+
* xlinkExtendedLinkFunk:
|
90
|
+
* @ctx: user data pointer
|
91
|
+
* @node: the node carrying the link
|
92
|
+
* @nbLocators: the number of locators detected on the link
|
93
|
+
* @hrefs: pointer to the array of locator hrefs
|
94
|
+
* @roles: pointer to the array of locator roles
|
95
|
+
* @nbArcs: the number of arcs detected on the link
|
96
|
+
* @from: pointer to the array of source roles found on the arcs
|
97
|
+
* @to: pointer to the array of target roles found on the arcs
|
98
|
+
* @show: array of values for the show attributes found on the arcs
|
99
|
+
* @actuate: array of values for the actuate attributes found on the arcs
|
100
|
+
* @nbTitles: the number of titles detected on the link
|
101
|
+
* @title: array of titles detected on the link
|
102
|
+
* @langs: array of xml:lang values for the titles
|
103
|
+
*
|
104
|
+
* This is the prototype for a extended link detection callback.
|
105
|
+
*/
|
106
|
+
typedef void
|
107
|
+
(*xlinkExtendedLinkFunk)(void *ctx,
|
108
|
+
xmlNodePtr node,
|
109
|
+
int nbLocators,
|
110
|
+
const xlinkHRef *hrefs,
|
111
|
+
const xlinkRole *roles,
|
112
|
+
int nbArcs,
|
113
|
+
const xlinkRole *from,
|
114
|
+
const xlinkRole *to,
|
115
|
+
xlinkShow *show,
|
116
|
+
xlinkActuate *actuate,
|
117
|
+
int nbTitles,
|
118
|
+
const xlinkTitle *titles,
|
119
|
+
const xmlChar **langs);
|
120
|
+
|
121
|
+
/**
|
122
|
+
* xlinkExtendedLinkSetFunk:
|
123
|
+
* @ctx: user data pointer
|
124
|
+
* @node: the node carrying the link
|
125
|
+
* @nbLocators: the number of locators detected on the link
|
126
|
+
* @hrefs: pointer to the array of locator hrefs
|
127
|
+
* @roles: pointer to the array of locator roles
|
128
|
+
* @nbTitles: the number of titles detected on the link
|
129
|
+
* @title: array of titles detected on the link
|
130
|
+
* @langs: array of xml:lang values for the titles
|
131
|
+
*
|
132
|
+
* This is the prototype for a extended link set detection callback.
|
133
|
+
*/
|
134
|
+
typedef void
|
135
|
+
(*xlinkExtendedLinkSetFunk) (void *ctx,
|
136
|
+
xmlNodePtr node,
|
137
|
+
int nbLocators,
|
138
|
+
const xlinkHRef *hrefs,
|
139
|
+
const xlinkRole *roles,
|
140
|
+
int nbTitles,
|
141
|
+
const xlinkTitle *titles,
|
142
|
+
const xmlChar **langs);
|
143
|
+
|
144
|
+
/**
|
145
|
+
* This is the structure containing a set of Links detection callbacks.
|
146
|
+
*
|
147
|
+
* There is no default xlink callbacks, if one want to get link
|
148
|
+
* recognition activated, those call backs must be provided before parsing.
|
149
|
+
*/
|
150
|
+
typedef struct _xlinkHandler xlinkHandler;
|
151
|
+
typedef xlinkHandler *xlinkHandlerPtr;
|
152
|
+
struct _xlinkHandler {
|
153
|
+
xlinkSimpleLinkFunk simple;
|
154
|
+
xlinkExtendedLinkFunk extended;
|
155
|
+
xlinkExtendedLinkSetFunk set;
|
156
|
+
};
|
157
|
+
|
158
|
+
/*
|
159
|
+
* The default detection routine, can be overridden, they call the default
|
160
|
+
* detection callbacks.
|
161
|
+
*/
|
162
|
+
|
163
|
+
XMLPUBFUN xlinkNodeDetectFunc
|
164
|
+
xlinkGetDefaultDetect (void);
|
165
|
+
XMLPUBFUN void
|
166
|
+
xlinkSetDefaultDetect (xlinkNodeDetectFunc func);
|
167
|
+
|
168
|
+
/*
|
169
|
+
* Routines to set/get the default handlers.
|
170
|
+
*/
|
171
|
+
XMLPUBFUN xlinkHandlerPtr
|
172
|
+
xlinkGetDefaultHandler (void);
|
173
|
+
XMLPUBFUN void
|
174
|
+
xlinkSetDefaultHandler (xlinkHandlerPtr handler);
|
175
|
+
|
176
|
+
/*
|
177
|
+
* Link detection module itself.
|
178
|
+
*/
|
179
|
+
XMLPUBFUN xlinkType
|
180
|
+
xlinkIsLink (xmlDocPtr doc,
|
181
|
+
xmlNodePtr node);
|
182
|
+
|
183
|
+
#ifdef __cplusplus
|
184
|
+
}
|
185
|
+
#endif
|
186
|
+
|
187
|
+
#endif /* LIBXML_XPTR_ENABLED */
|
188
|
+
|
189
|
+
#endif /* __XML_XLINK_H__ */
|
@@ -0,0 +1,369 @@
|
|
1
|
+
/*
|
2
|
+
* Summary: interface for the I/O interfaces used by the parser
|
3
|
+
* Description: interface for the I/O interfaces used by the parser
|
4
|
+
*
|
5
|
+
* Copy: See Copyright for the status of this software.
|
6
|
+
*
|
7
|
+
* Author: Daniel Veillard
|
8
|
+
*/
|
9
|
+
|
10
|
+
#ifndef __XML_IO_H__
|
11
|
+
#define __XML_IO_H__
|
12
|
+
|
13
|
+
#include <stdio.h>
|
14
|
+
#include <libxml/xmlversion.h>
|
15
|
+
|
16
|
+
#ifdef __cplusplus
|
17
|
+
extern "C" {
|
18
|
+
#endif
|
19
|
+
|
20
|
+
/*
|
21
|
+
* Those are the functions and datatypes for the parser input
|
22
|
+
* I/O structures.
|
23
|
+
*/
|
24
|
+
|
25
|
+
/**
|
26
|
+
* xmlInputMatchCallback:
|
27
|
+
* @filename: the filename or URI
|
28
|
+
*
|
29
|
+
* Callback used in the I/O Input API to detect if the current handler
|
30
|
+
* can provide input functionality for this resource.
|
31
|
+
*
|
32
|
+
* Returns 1 if yes and 0 if another Input module should be used
|
33
|
+
*/
|
34
|
+
typedef int (*xmlInputMatchCallback) (char const *filename);
|
35
|
+
/**
|
36
|
+
* xmlInputOpenCallback:
|
37
|
+
* @filename: the filename or URI
|
38
|
+
*
|
39
|
+
* Callback used in the I/O Input API to open the resource
|
40
|
+
*
|
41
|
+
* Returns an Input context or NULL in case or error
|
42
|
+
*/
|
43
|
+
typedef void * (*xmlInputOpenCallback) (char const *filename);
|
44
|
+
/**
|
45
|
+
* xmlInputReadCallback:
|
46
|
+
* @context: an Input context
|
47
|
+
* @buffer: the buffer to store data read
|
48
|
+
* @len: the length of the buffer in bytes
|
49
|
+
*
|
50
|
+
* Callback used in the I/O Input API to read the resource
|
51
|
+
*
|
52
|
+
* Returns the number of bytes read or -1 in case of error
|
53
|
+
*/
|
54
|
+
typedef int (*xmlInputReadCallback) (void * context, char * buffer, int len);
|
55
|
+
/**
|
56
|
+
* xmlInputCloseCallback:
|
57
|
+
* @context: an Input context
|
58
|
+
*
|
59
|
+
* Callback used in the I/O Input API to close the resource
|
60
|
+
*
|
61
|
+
* Returns 0 or -1 in case of error
|
62
|
+
*/
|
63
|
+
typedef int (*xmlInputCloseCallback) (void * context);
|
64
|
+
|
65
|
+
#ifdef LIBXML_OUTPUT_ENABLED
|
66
|
+
/*
|
67
|
+
* Those are the functions and datatypes for the library output
|
68
|
+
* I/O structures.
|
69
|
+
*/
|
70
|
+
|
71
|
+
/**
|
72
|
+
* xmlOutputMatchCallback:
|
73
|
+
* @filename: the filename or URI
|
74
|
+
*
|
75
|
+
* Callback used in the I/O Output API to detect if the current handler
|
76
|
+
* can provide output functionality for this resource.
|
77
|
+
*
|
78
|
+
* Returns 1 if yes and 0 if another Output module should be used
|
79
|
+
*/
|
80
|
+
typedef int (*xmlOutputMatchCallback) (char const *filename);
|
81
|
+
/**
|
82
|
+
* xmlOutputOpenCallback:
|
83
|
+
* @filename: the filename or URI
|
84
|
+
*
|
85
|
+
* Callback used in the I/O Output API to open the resource
|
86
|
+
*
|
87
|
+
* Returns an Output context or NULL in case or error
|
88
|
+
*/
|
89
|
+
typedef void * (*xmlOutputOpenCallback) (char const *filename);
|
90
|
+
/**
|
91
|
+
* xmlOutputWriteCallback:
|
92
|
+
* @context: an Output context
|
93
|
+
* @buffer: the buffer of data to write
|
94
|
+
* @len: the length of the buffer in bytes
|
95
|
+
*
|
96
|
+
* Callback used in the I/O Output API to write to the resource
|
97
|
+
*
|
98
|
+
* Returns the number of bytes written or -1 in case of error
|
99
|
+
*/
|
100
|
+
typedef int (*xmlOutputWriteCallback) (void * context, const char * buffer,
|
101
|
+
int len);
|
102
|
+
/**
|
103
|
+
* xmlOutputCloseCallback:
|
104
|
+
* @context: an Output context
|
105
|
+
*
|
106
|
+
* Callback used in the I/O Output API to close the resource
|
107
|
+
*
|
108
|
+
* Returns 0 or -1 in case of error
|
109
|
+
*/
|
110
|
+
typedef int (*xmlOutputCloseCallback) (void * context);
|
111
|
+
#endif /* LIBXML_OUTPUT_ENABLED */
|
112
|
+
|
113
|
+
#ifdef __cplusplus
|
114
|
+
}
|
115
|
+
#endif
|
116
|
+
|
117
|
+
#include <libxml/globals.h>
|
118
|
+
#include <libxml/tree.h>
|
119
|
+
#include <libxml/parser.h>
|
120
|
+
#include <libxml/encoding.h>
|
121
|
+
|
122
|
+
#ifdef __cplusplus
|
123
|
+
extern "C" {
|
124
|
+
#endif
|
125
|
+
struct _xmlParserInputBuffer {
|
126
|
+
void* context;
|
127
|
+
xmlInputReadCallback readcallback;
|
128
|
+
xmlInputCloseCallback closecallback;
|
129
|
+
|
130
|
+
xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
|
131
|
+
|
132
|
+
xmlBufPtr buffer; /* Local buffer encoded in UTF-8 */
|
133
|
+
xmlBufPtr raw; /* if encoder != NULL buffer for raw input */
|
134
|
+
int compressed; /* -1=unknown, 0=not compressed, 1=compressed */
|
135
|
+
int error;
|
136
|
+
unsigned long rawconsumed;/* amount consumed from raw */
|
137
|
+
};
|
138
|
+
|
139
|
+
|
140
|
+
#ifdef LIBXML_OUTPUT_ENABLED
|
141
|
+
struct _xmlOutputBuffer {
|
142
|
+
void* context;
|
143
|
+
xmlOutputWriteCallback writecallback;
|
144
|
+
xmlOutputCloseCallback closecallback;
|
145
|
+
|
146
|
+
xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
|
147
|
+
|
148
|
+
xmlBufPtr buffer; /* Local buffer encoded in UTF-8 or ISOLatin */
|
149
|
+
xmlBufPtr conv; /* if encoder != NULL buffer for output */
|
150
|
+
int written; /* total number of byte written */
|
151
|
+
int error;
|
152
|
+
};
|
153
|
+
#endif /* LIBXML_OUTPUT_ENABLED */
|
154
|
+
|
155
|
+
/*
|
156
|
+
* Interfaces for input
|
157
|
+
*/
|
158
|
+
XMLPUBFUN void
|
159
|
+
xmlCleanupInputCallbacks (void);
|
160
|
+
|
161
|
+
XMLPUBFUN int
|
162
|
+
xmlPopInputCallbacks (void);
|
163
|
+
|
164
|
+
XMLPUBFUN void
|
165
|
+
xmlRegisterDefaultInputCallbacks (void);
|
166
|
+
XMLPUBFUN xmlParserInputBufferPtr
|
167
|
+
xmlAllocParserInputBuffer (xmlCharEncoding enc);
|
168
|
+
|
169
|
+
XMLPUBFUN xmlParserInputBufferPtr
|
170
|
+
xmlParserInputBufferCreateFilename (const char *URI,
|
171
|
+
xmlCharEncoding enc);
|
172
|
+
XMLPUBFUN xmlParserInputBufferPtr
|
173
|
+
xmlParserInputBufferCreateFile (FILE *file,
|
174
|
+
xmlCharEncoding enc);
|
175
|
+
XMLPUBFUN xmlParserInputBufferPtr
|
176
|
+
xmlParserInputBufferCreateFd (int fd,
|
177
|
+
xmlCharEncoding enc);
|
178
|
+
XMLPUBFUN xmlParserInputBufferPtr
|
179
|
+
xmlParserInputBufferCreateMem (const char *mem, int size,
|
180
|
+
xmlCharEncoding enc);
|
181
|
+
XML_DEPRECATED
|
182
|
+
XMLPUBFUN xmlParserInputBufferPtr
|
183
|
+
xmlParserInputBufferCreateStatic (const char *mem, int size,
|
184
|
+
xmlCharEncoding enc);
|
185
|
+
XMLPUBFUN xmlParserInputBufferPtr
|
186
|
+
xmlParserInputBufferCreateIO (xmlInputReadCallback ioread,
|
187
|
+
xmlInputCloseCallback ioclose,
|
188
|
+
void *ioctx,
|
189
|
+
xmlCharEncoding enc);
|
190
|
+
XMLPUBFUN int
|
191
|
+
xmlParserInputBufferRead (xmlParserInputBufferPtr in,
|
192
|
+
int len);
|
193
|
+
XMLPUBFUN int
|
194
|
+
xmlParserInputBufferGrow (xmlParserInputBufferPtr in,
|
195
|
+
int len);
|
196
|
+
XMLPUBFUN int
|
197
|
+
xmlParserInputBufferPush (xmlParserInputBufferPtr in,
|
198
|
+
int len,
|
199
|
+
const char *buf);
|
200
|
+
XMLPUBFUN void
|
201
|
+
xmlFreeParserInputBuffer (xmlParserInputBufferPtr in);
|
202
|
+
XMLPUBFUN char *
|
203
|
+
xmlParserGetDirectory (const char *filename);
|
204
|
+
|
205
|
+
XMLPUBFUN int
|
206
|
+
xmlRegisterInputCallbacks (xmlInputMatchCallback matchFunc,
|
207
|
+
xmlInputOpenCallback openFunc,
|
208
|
+
xmlInputReadCallback readFunc,
|
209
|
+
xmlInputCloseCallback closeFunc);
|
210
|
+
|
211
|
+
xmlParserInputBufferPtr
|
212
|
+
__xmlParserInputBufferCreateFilename(const char *URI,
|
213
|
+
xmlCharEncoding enc);
|
214
|
+
|
215
|
+
#ifdef LIBXML_OUTPUT_ENABLED
|
216
|
+
/*
|
217
|
+
* Interfaces for output
|
218
|
+
*/
|
219
|
+
XMLPUBFUN void
|
220
|
+
xmlCleanupOutputCallbacks (void);
|
221
|
+
XMLPUBFUN int
|
222
|
+
xmlPopOutputCallbacks (void);
|
223
|
+
XMLPUBFUN void
|
224
|
+
xmlRegisterDefaultOutputCallbacks(void);
|
225
|
+
XMLPUBFUN xmlOutputBufferPtr
|
226
|
+
xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder);
|
227
|
+
|
228
|
+
XMLPUBFUN xmlOutputBufferPtr
|
229
|
+
xmlOutputBufferCreateFilename (const char *URI,
|
230
|
+
xmlCharEncodingHandlerPtr encoder,
|
231
|
+
int compression);
|
232
|
+
|
233
|
+
XMLPUBFUN xmlOutputBufferPtr
|
234
|
+
xmlOutputBufferCreateFile (FILE *file,
|
235
|
+
xmlCharEncodingHandlerPtr encoder);
|
236
|
+
|
237
|
+
XMLPUBFUN xmlOutputBufferPtr
|
238
|
+
xmlOutputBufferCreateBuffer (xmlBufferPtr buffer,
|
239
|
+
xmlCharEncodingHandlerPtr encoder);
|
240
|
+
|
241
|
+
XMLPUBFUN xmlOutputBufferPtr
|
242
|
+
xmlOutputBufferCreateFd (int fd,
|
243
|
+
xmlCharEncodingHandlerPtr encoder);
|
244
|
+
|
245
|
+
XMLPUBFUN xmlOutputBufferPtr
|
246
|
+
xmlOutputBufferCreateIO (xmlOutputWriteCallback iowrite,
|
247
|
+
xmlOutputCloseCallback ioclose,
|
248
|
+
void *ioctx,
|
249
|
+
xmlCharEncodingHandlerPtr encoder);
|
250
|
+
|
251
|
+
/* Couple of APIs to get the output without digging into the buffers */
|
252
|
+
XMLPUBFUN const xmlChar *
|
253
|
+
xmlOutputBufferGetContent (xmlOutputBufferPtr out);
|
254
|
+
XMLPUBFUN size_t
|
255
|
+
xmlOutputBufferGetSize (xmlOutputBufferPtr out);
|
256
|
+
|
257
|
+
XMLPUBFUN int
|
258
|
+
xmlOutputBufferWrite (xmlOutputBufferPtr out,
|
259
|
+
int len,
|
260
|
+
const char *buf);
|
261
|
+
XMLPUBFUN int
|
262
|
+
xmlOutputBufferWriteString (xmlOutputBufferPtr out,
|
263
|
+
const char *str);
|
264
|
+
XMLPUBFUN int
|
265
|
+
xmlOutputBufferWriteEscape (xmlOutputBufferPtr out,
|
266
|
+
const xmlChar *str,
|
267
|
+
xmlCharEncodingOutputFunc escaping);
|
268
|
+
|
269
|
+
XMLPUBFUN int
|
270
|
+
xmlOutputBufferFlush (xmlOutputBufferPtr out);
|
271
|
+
XMLPUBFUN int
|
272
|
+
xmlOutputBufferClose (xmlOutputBufferPtr out);
|
273
|
+
|
274
|
+
XMLPUBFUN int
|
275
|
+
xmlRegisterOutputCallbacks (xmlOutputMatchCallback matchFunc,
|
276
|
+
xmlOutputOpenCallback openFunc,
|
277
|
+
xmlOutputWriteCallback writeFunc,
|
278
|
+
xmlOutputCloseCallback closeFunc);
|
279
|
+
|
280
|
+
xmlOutputBufferPtr
|
281
|
+
__xmlOutputBufferCreateFilename(const char *URI,
|
282
|
+
xmlCharEncodingHandlerPtr encoder,
|
283
|
+
int compression);
|
284
|
+
|
285
|
+
#ifdef LIBXML_HTTP_ENABLED
|
286
|
+
/* This function only exists if HTTP support built into the library */
|
287
|
+
XMLPUBFUN void
|
288
|
+
xmlRegisterHTTPPostCallbacks (void );
|
289
|
+
#endif /* LIBXML_HTTP_ENABLED */
|
290
|
+
|
291
|
+
#endif /* LIBXML_OUTPUT_ENABLED */
|
292
|
+
|
293
|
+
XMLPUBFUN xmlParserInputPtr
|
294
|
+
xmlCheckHTTPInput (xmlParserCtxtPtr ctxt,
|
295
|
+
xmlParserInputPtr ret);
|
296
|
+
|
297
|
+
/*
|
298
|
+
* A predefined entity loader disabling network accesses
|
299
|
+
*/
|
300
|
+
XMLPUBFUN xmlParserInputPtr
|
301
|
+
xmlNoNetExternalEntityLoader (const char *URL,
|
302
|
+
const char *ID,
|
303
|
+
xmlParserCtxtPtr ctxt);
|
304
|
+
|
305
|
+
/*
|
306
|
+
* xmlNormalizeWindowsPath is obsolete, don't use it.
|
307
|
+
* Check xmlCanonicPath in uri.h for a better alternative.
|
308
|
+
*/
|
309
|
+
XMLPUBFUN xmlChar *
|
310
|
+
xmlNormalizeWindowsPath (const xmlChar *path);
|
311
|
+
|
312
|
+
XMLPUBFUN int
|
313
|
+
xmlCheckFilename (const char *path);
|
314
|
+
/**
|
315
|
+
* Default 'file://' protocol callbacks
|
316
|
+
*/
|
317
|
+
XMLPUBFUN int
|
318
|
+
xmlFileMatch (const char *filename);
|
319
|
+
XMLPUBFUN void *
|
320
|
+
xmlFileOpen (const char *filename);
|
321
|
+
XMLPUBFUN int
|
322
|
+
xmlFileRead (void * context,
|
323
|
+
char * buffer,
|
324
|
+
int len);
|
325
|
+
XMLPUBFUN int
|
326
|
+
xmlFileClose (void * context);
|
327
|
+
|
328
|
+
/**
|
329
|
+
* Default 'http://' protocol callbacks
|
330
|
+
*/
|
331
|
+
#ifdef LIBXML_HTTP_ENABLED
|
332
|
+
XMLPUBFUN int
|
333
|
+
xmlIOHTTPMatch (const char *filename);
|
334
|
+
XMLPUBFUN void *
|
335
|
+
xmlIOHTTPOpen (const char *filename);
|
336
|
+
#ifdef LIBXML_OUTPUT_ENABLED
|
337
|
+
XMLPUBFUN void *
|
338
|
+
xmlIOHTTPOpenW (const char * post_uri,
|
339
|
+
int compression );
|
340
|
+
#endif /* LIBXML_OUTPUT_ENABLED */
|
341
|
+
XMLPUBFUN int
|
342
|
+
xmlIOHTTPRead (void * context,
|
343
|
+
char * buffer,
|
344
|
+
int len);
|
345
|
+
XMLPUBFUN int
|
346
|
+
xmlIOHTTPClose (void * context);
|
347
|
+
#endif /* LIBXML_HTTP_ENABLED */
|
348
|
+
|
349
|
+
/**
|
350
|
+
* Default 'ftp://' protocol callbacks
|
351
|
+
*/
|
352
|
+
#ifdef LIBXML_FTP_ENABLED
|
353
|
+
XMLPUBFUN int
|
354
|
+
xmlIOFTPMatch (const char *filename);
|
355
|
+
XMLPUBFUN void *
|
356
|
+
xmlIOFTPOpen (const char *filename);
|
357
|
+
XMLPUBFUN int
|
358
|
+
xmlIOFTPRead (void * context,
|
359
|
+
char * buffer,
|
360
|
+
int len);
|
361
|
+
XMLPUBFUN int
|
362
|
+
xmlIOFTPClose (void * context);
|
363
|
+
#endif /* LIBXML_FTP_ENABLED */
|
364
|
+
|
365
|
+
#ifdef __cplusplus
|
366
|
+
}
|
367
|
+
#endif
|
368
|
+
|
369
|
+
#endif /* __XML_IO_H__ */
|
@@ -0,0 +1,146 @@
|
|
1
|
+
/*
|
2
|
+
* Summary: API to build regexp automata
|
3
|
+
* Description: the API to build regexp automata
|
4
|
+
*
|
5
|
+
* Copy: See Copyright for the status of this software.
|
6
|
+
*
|
7
|
+
* Author: Daniel Veillard
|
8
|
+
*/
|
9
|
+
|
10
|
+
#ifndef __XML_AUTOMATA_H__
|
11
|
+
#define __XML_AUTOMATA_H__
|
12
|
+
|
13
|
+
#include <libxml/xmlversion.h>
|
14
|
+
|
15
|
+
#ifdef LIBXML_REGEXP_ENABLED
|
16
|
+
#ifdef LIBXML_AUTOMATA_ENABLED
|
17
|
+
|
18
|
+
#include <libxml/xmlstring.h>
|
19
|
+
|
20
|
+
#ifdef __cplusplus
|
21
|
+
extern "C" {
|
22
|
+
#endif
|
23
|
+
|
24
|
+
/**
|
25
|
+
* xmlAutomataPtr:
|
26
|
+
*
|
27
|
+
* A libxml automata description, It can be compiled into a regexp
|
28
|
+
*/
|
29
|
+
typedef struct _xmlAutomata xmlAutomata;
|
30
|
+
typedef xmlAutomata *xmlAutomataPtr;
|
31
|
+
|
32
|
+
/**
|
33
|
+
* xmlAutomataStatePtr:
|
34
|
+
*
|
35
|
+
* A state int the automata description,
|
36
|
+
*/
|
37
|
+
typedef struct _xmlAutomataState xmlAutomataState;
|
38
|
+
typedef xmlAutomataState *xmlAutomataStatePtr;
|
39
|
+
|
40
|
+
/*
|
41
|
+
* Building API
|
42
|
+
*/
|
43
|
+
XMLPUBFUN xmlAutomataPtr
|
44
|
+
xmlNewAutomata (void);
|
45
|
+
XMLPUBFUN void
|
46
|
+
xmlFreeAutomata (xmlAutomataPtr am);
|
47
|
+
|
48
|
+
XMLPUBFUN xmlAutomataStatePtr
|
49
|
+
xmlAutomataGetInitState (xmlAutomataPtr am);
|
50
|
+
XMLPUBFUN int
|
51
|
+
xmlAutomataSetFinalState (xmlAutomataPtr am,
|
52
|
+
xmlAutomataStatePtr state);
|
53
|
+
XMLPUBFUN xmlAutomataStatePtr
|
54
|
+
xmlAutomataNewState (xmlAutomataPtr am);
|
55
|
+
XMLPUBFUN xmlAutomataStatePtr
|
56
|
+
xmlAutomataNewTransition (xmlAutomataPtr am,
|
57
|
+
xmlAutomataStatePtr from,
|
58
|
+
xmlAutomataStatePtr to,
|
59
|
+
const xmlChar *token,
|
60
|
+
void *data);
|
61
|
+
XMLPUBFUN xmlAutomataStatePtr
|
62
|
+
xmlAutomataNewTransition2 (xmlAutomataPtr am,
|
63
|
+
xmlAutomataStatePtr from,
|
64
|
+
xmlAutomataStatePtr to,
|
65
|
+
const xmlChar *token,
|
66
|
+
const xmlChar *token2,
|
67
|
+
void *data);
|
68
|
+
XMLPUBFUN xmlAutomataStatePtr
|
69
|
+
xmlAutomataNewNegTrans (xmlAutomataPtr am,
|
70
|
+
xmlAutomataStatePtr from,
|
71
|
+
xmlAutomataStatePtr to,
|
72
|
+
const xmlChar *token,
|
73
|
+
const xmlChar *token2,
|
74
|
+
void *data);
|
75
|
+
|
76
|
+
XMLPUBFUN xmlAutomataStatePtr
|
77
|
+
xmlAutomataNewCountTrans (xmlAutomataPtr am,
|
78
|
+
xmlAutomataStatePtr from,
|
79
|
+
xmlAutomataStatePtr to,
|
80
|
+
const xmlChar *token,
|
81
|
+
int min,
|
82
|
+
int max,
|
83
|
+
void *data);
|
84
|
+
XMLPUBFUN xmlAutomataStatePtr
|
85
|
+
xmlAutomataNewCountTrans2 (xmlAutomataPtr am,
|
86
|
+
xmlAutomataStatePtr from,
|
87
|
+
xmlAutomataStatePtr to,
|
88
|
+
const xmlChar *token,
|
89
|
+
const xmlChar *token2,
|
90
|
+
int min,
|
91
|
+
int max,
|
92
|
+
void *data);
|
93
|
+
XMLPUBFUN xmlAutomataStatePtr
|
94
|
+
xmlAutomataNewOnceTrans (xmlAutomataPtr am,
|
95
|
+
xmlAutomataStatePtr from,
|
96
|
+
xmlAutomataStatePtr to,
|
97
|
+
const xmlChar *token,
|
98
|
+
int min,
|
99
|
+
int max,
|
100
|
+
void *data);
|
101
|
+
XMLPUBFUN xmlAutomataStatePtr
|
102
|
+
xmlAutomataNewOnceTrans2 (xmlAutomataPtr am,
|
103
|
+
xmlAutomataStatePtr from,
|
104
|
+
xmlAutomataStatePtr to,
|
105
|
+
const xmlChar *token,
|
106
|
+
const xmlChar *token2,
|
107
|
+
int min,
|
108
|
+
int max,
|
109
|
+
void *data);
|
110
|
+
XMLPUBFUN xmlAutomataStatePtr
|
111
|
+
xmlAutomataNewAllTrans (xmlAutomataPtr am,
|
112
|
+
xmlAutomataStatePtr from,
|
113
|
+
xmlAutomataStatePtr to,
|
114
|
+
int lax);
|
115
|
+
XMLPUBFUN xmlAutomataStatePtr
|
116
|
+
xmlAutomataNewEpsilon (xmlAutomataPtr am,
|
117
|
+
xmlAutomataStatePtr from,
|
118
|
+
xmlAutomataStatePtr to);
|
119
|
+
XMLPUBFUN xmlAutomataStatePtr
|
120
|
+
xmlAutomataNewCountedTrans (xmlAutomataPtr am,
|
121
|
+
xmlAutomataStatePtr from,
|
122
|
+
xmlAutomataStatePtr to,
|
123
|
+
int counter);
|
124
|
+
XMLPUBFUN xmlAutomataStatePtr
|
125
|
+
xmlAutomataNewCounterTrans (xmlAutomataPtr am,
|
126
|
+
xmlAutomataStatePtr from,
|
127
|
+
xmlAutomataStatePtr to,
|
128
|
+
int counter);
|
129
|
+
XMLPUBFUN int
|
130
|
+
xmlAutomataNewCounter (xmlAutomataPtr am,
|
131
|
+
int min,
|
132
|
+
int max);
|
133
|
+
|
134
|
+
XMLPUBFUN struct _xmlRegexp *
|
135
|
+
xmlAutomataCompile (xmlAutomataPtr am);
|
136
|
+
XMLPUBFUN int
|
137
|
+
xmlAutomataIsDeterminist (xmlAutomataPtr am);
|
138
|
+
|
139
|
+
#ifdef __cplusplus
|
140
|
+
}
|
141
|
+
#endif
|
142
|
+
|
143
|
+
#endif /* LIBXML_AUTOMATA_ENABLED */
|
144
|
+
#endif /* LIBXML_REGEXP_ENABLED */
|
145
|
+
|
146
|
+
#endif /* __XML_AUTOMATA_H__ */
|