lxml 5.2.0__cp310-cp310-win32.whl → 5.2.2__cp310-cp310-win32.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 -244
- lxml/__init__.py +22 -22
- lxml/_elementpath.cp310-win32.pyd +0 -0
- lxml/_elementpath.py +341 -341
- lxml/apihelpers.pxi +1793 -1793
- lxml/builder.cp310-win32.pyd +0 -0
- lxml/builder.py +232 -232
- lxml/classlookup.pxi +580 -580
- lxml/cleanup.pxi +215 -215
- lxml/cssselect.py +101 -101
- lxml/debug.pxi +90 -90
- lxml/docloader.pxi +178 -178
- lxml/doctestcompare.py +488 -488
- lxml/dtd.pxi +478 -478
- lxml/etree.cp310-win32.pyd +0 -0
- lxml/etree.h +6 -6
- lxml/etree.pyx +3732 -3711
- lxml/extensions.pxi +833 -833
- lxml/html/ElementSoup.py +10 -10
- lxml/html/__init__.py +1923 -1923
- lxml/html/_diffcommand.py +86 -86
- lxml/html/_html5builder.py +100 -100
- lxml/html/_setmixin.py +56 -56
- lxml/html/builder.py +133 -133
- lxml/html/clean.py +21 -21
- lxml/html/defs.py +135 -135
- lxml/html/diff.cp310-win32.pyd +0 -0
- lxml/html/diff.py +878 -878
- lxml/html/formfill.py +299 -299
- lxml/html/html5parser.py +260 -260
- lxml/html/soupparser.py +314 -314
- lxml/html/usedoctest.py +13 -13
- lxml/includes/c14n.pxd +25 -25
- lxml/includes/config.pxd +3 -3
- lxml/includes/dtdvalid.pxd +18 -18
- lxml/includes/etree_defs.h +379 -379
- lxml/includes/etreepublic.pxd +237 -237
- lxml/includes/htmlparser.pxd +56 -56
- lxml/includes/lxml-version.h +1 -1
- lxml/includes/relaxng.pxd +64 -64
- lxml/includes/schematron.pxd +34 -34
- lxml/includes/tree.pxd +494 -494
- lxml/includes/uri.pxd +5 -5
- lxml/includes/xinclude.pxd +22 -22
- lxml/includes/xmlerror.pxd +852 -852
- lxml/includes/xmlparser.pxd +265 -265
- lxml/includes/xmlschema.pxd +35 -35
- lxml/includes/xpath.pxd +136 -136
- lxml/includes/xslt.pxd +190 -190
- lxml/isoschematron/__init__.py +348 -348
- lxml/isoschematron/resources/rng/iso-schematron.rng +709 -709
- lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl +75 -75
- lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl +312 -312
- lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl +1159 -1159
- lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl +54 -54
- lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl +1796 -1796
- lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl +588 -588
- lxml/iterparse.pxi +438 -438
- lxml/lxml.etree.h +6 -6
- lxml/nsclasses.pxi +281 -281
- lxml/objectify.cp310-win32.pyd +0 -0
- lxml/objectify.pyx +2145 -2145
- lxml/objectpath.pxi +332 -332
- lxml/parser.pxi +1994 -1994
- lxml/parsertarget.pxi +180 -180
- lxml/proxy.pxi +619 -619
- lxml/public-api.pxi +178 -178
- lxml/pyclasslookup.py +3 -3
- lxml/readonlytree.pxi +565 -565
- lxml/relaxng.pxi +165 -165
- lxml/sax.cp310-win32.pyd +0 -0
- lxml/sax.py +275 -275
- lxml/saxparser.pxi +875 -875
- lxml/schematron.pxi +168 -168
- lxml/serializer.pxi +1871 -1871
- lxml/usedoctest.py +13 -13
- lxml/xinclude.pxi +67 -67
- lxml/xmlerror.pxi +1654 -1654
- lxml/xmlid.pxi +179 -179
- lxml/xmlschema.pxi +215 -215
- lxml/xpath.pxi +487 -487
- lxml/xslt.pxi +950 -950
- lxml/xsltext.pxi +242 -242
- {lxml-5.2.0.dist-info → lxml-5.2.2.dist-info}/LICENSE.txt +29 -29
- {lxml-5.2.0.dist-info → lxml-5.2.2.dist-info}/LICENSES.txt +29 -29
- {lxml-5.2.0.dist-info → lxml-5.2.2.dist-info}/METADATA +9 -17
- {lxml-5.2.0.dist-info → lxml-5.2.2.dist-info}/RECORD +89 -89
- {lxml-5.2.0.dist-info → lxml-5.2.2.dist-info}/WHEEL +0 -0
- {lxml-5.2.0.dist-info → lxml-5.2.2.dist-info}/top_level.txt +0 -0
lxml/includes/xpath.pxd
CHANGED
@@ -1,136 +1,136 @@
|
|
1
|
-
from lxml.includes cimport tree
|
2
|
-
from lxml.includes cimport xmlerror
|
3
|
-
|
4
|
-
from libc.string cimport const_char
|
5
|
-
from lxml.includes.tree cimport xmlChar, const_xmlChar
|
6
|
-
|
7
|
-
|
8
|
-
cdef extern from "libxml/xpath.h" nogil:
|
9
|
-
ctypedef enum xmlXPathObjectType:
|
10
|
-
XPATH_UNDEFINED = 0
|
11
|
-
XPATH_NODESET = 1
|
12
|
-
XPATH_BOOLEAN = 2
|
13
|
-
XPATH_NUMBER = 3
|
14
|
-
XPATH_STRING = 4
|
15
|
-
XPATH_POINT = 5
|
16
|
-
XPATH_RANGE = 6
|
17
|
-
XPATH_LOCATIONSET = 7
|
18
|
-
XPATH_USERS = 8
|
19
|
-
XPATH_XSLT_TREE = 9
|
20
|
-
|
21
|
-
ctypedef enum xmlXPathError:
|
22
|
-
XPATH_EXPRESSION_OK = 0
|
23
|
-
XPATH_NUMBER_ERROR = 1
|
24
|
-
XPATH_UNFINISHED_LITERAL_ERROR = 2
|
25
|
-
XPATH_START_LITERAL_ERROR = 3
|
26
|
-
XPATH_VARIABLE_REF_ERROR = 4
|
27
|
-
XPATH_UNDEF_VARIABLE_ERROR = 5
|
28
|
-
XPATH_INVALID_PREDICATE_ERROR = 6
|
29
|
-
XPATH_EXPR_ERROR = 7
|
30
|
-
XPATH_UNCLOSED_ERROR = 8
|
31
|
-
XPATH_UNKNOWN_FUNC_ERROR = 9
|
32
|
-
XPATH_INVALID_OPERAND = 10
|
33
|
-
XPATH_INVALID_TYPE = 11
|
34
|
-
XPATH_INVALID_ARITY = 12
|
35
|
-
XPATH_INVALID_CTXT_SIZE = 13
|
36
|
-
XPATH_INVALID_CTXT_POSITION = 14
|
37
|
-
XPATH_MEMORY_ERROR = 15
|
38
|
-
XPTR_SYNTAX_ERROR = 16
|
39
|
-
XPTR_RESOURCE_ERROR = 17
|
40
|
-
XPTR_SUB_RESOURCE_ERROR = 18
|
41
|
-
XPATH_UNDEF_PREFIX_ERROR = 19
|
42
|
-
XPATH_ENCODING_ERROR = 20
|
43
|
-
XPATH_INVALID_CHAR_ERROR = 21
|
44
|
-
XPATH_INVALID_CTXT = 22
|
45
|
-
|
46
|
-
ctypedef struct xmlNodeSet:
|
47
|
-
int nodeNr
|
48
|
-
int nodeMax
|
49
|
-
tree.xmlNode** nodeTab
|
50
|
-
|
51
|
-
ctypedef struct xmlXPathObject:
|
52
|
-
xmlXPathObjectType type
|
53
|
-
xmlNodeSet* nodesetval
|
54
|
-
bint boolval
|
55
|
-
double floatval
|
56
|
-
xmlChar* stringval
|
57
|
-
|
58
|
-
ctypedef struct xmlXPathContext:
|
59
|
-
tree.xmlDoc* doc
|
60
|
-
tree.xmlNode* node
|
61
|
-
tree.xmlDict* dict
|
62
|
-
tree.xmlHashTable* nsHash
|
63
|
-
const_xmlChar* function
|
64
|
-
const_xmlChar* functionURI
|
65
|
-
xmlerror.xmlStructuredErrorFunc error
|
66
|
-
xmlerror.xmlError lastError
|
67
|
-
void* userData
|
68
|
-
|
69
|
-
ctypedef struct xmlXPathParserContext:
|
70
|
-
xmlXPathContext* context
|
71
|
-
xmlXPathObject* value
|
72
|
-
tree.xmlNode* ancestor
|
73
|
-
int error
|
74
|
-
|
75
|
-
ctypedef struct xmlXPathCompExpr
|
76
|
-
|
77
|
-
ctypedef void (*xmlXPathFunction)(xmlXPathParserContext* ctxt, int nargs)
|
78
|
-
ctypedef xmlXPathFunction (*xmlXPathFuncLookupFunc)(void* ctxt,
|
79
|
-
const_xmlChar* name,
|
80
|
-
const_xmlChar* ns_uri)
|
81
|
-
|
82
|
-
cdef xmlXPathContext* xmlXPathNewContext(tree.xmlDoc* doc)
|
83
|
-
cdef xmlXPathObject* xmlXPathEvalExpression(const_xmlChar* str,
|
84
|
-
xmlXPathContext* ctxt)
|
85
|
-
cdef xmlXPathObject* xmlXPathCompiledEval(xmlXPathCompExpr* comp,
|
86
|
-
xmlXPathContext* ctxt)
|
87
|
-
cdef xmlXPathCompExpr* xmlXPathCompile(const_xmlChar* str)
|
88
|
-
cdef xmlXPathCompExpr* xmlXPathCtxtCompile(xmlXPathContext* ctxt,
|
89
|
-
const_xmlChar* str)
|
90
|
-
cdef void xmlXPathFreeContext(xmlXPathContext* ctxt)
|
91
|
-
cdef void xmlXPathFreeCompExpr(xmlXPathCompExpr* comp)
|
92
|
-
cdef void xmlXPathFreeObject(xmlXPathObject* obj)
|
93
|
-
cdef int xmlXPathRegisterNs(xmlXPathContext* ctxt,
|
94
|
-
const_xmlChar* prefix, const_xmlChar* ns_uri)
|
95
|
-
|
96
|
-
cdef xmlNodeSet* xmlXPathNodeSetCreate(tree.xmlNode* val)
|
97
|
-
cdef void xmlXPathFreeNodeSet(xmlNodeSet* val)
|
98
|
-
|
99
|
-
|
100
|
-
cdef extern from "libxml/xpathInternals.h" nogil:
|
101
|
-
cdef int xmlXPathRegisterFunc(xmlXPathContext* ctxt,
|
102
|
-
const_xmlChar* name,
|
103
|
-
xmlXPathFunction f)
|
104
|
-
cdef int xmlXPathRegisterFuncNS(xmlXPathContext* ctxt,
|
105
|
-
const_xmlChar* name,
|
106
|
-
const_xmlChar* ns_uri,
|
107
|
-
xmlXPathFunction f)
|
108
|
-
cdef void xmlXPathRegisterFuncLookup(xmlXPathContext *ctxt,
|
109
|
-
xmlXPathFuncLookupFunc f,
|
110
|
-
void *funcCtxt)
|
111
|
-
cdef int xmlXPathRegisterVariable(xmlXPathContext *ctxt,
|
112
|
-
const_xmlChar* name,
|
113
|
-
xmlXPathObject* value)
|
114
|
-
cdef int xmlXPathRegisterVariableNS(xmlXPathContext *ctxt,
|
115
|
-
const_xmlChar* name,
|
116
|
-
const_xmlChar* ns_uri,
|
117
|
-
xmlXPathObject* value)
|
118
|
-
cdef void xmlXPathRegisteredVariablesCleanup(xmlXPathContext *ctxt)
|
119
|
-
cdef void xmlXPathRegisteredNsCleanup(xmlXPathContext *ctxt)
|
120
|
-
cdef xmlXPathObject* valuePop (xmlXPathParserContext *ctxt)
|
121
|
-
cdef int valuePush(xmlXPathParserContext* ctxt, xmlXPathObject *value)
|
122
|
-
|
123
|
-
cdef xmlXPathObject* xmlXPathNewCString(const_char *val)
|
124
|
-
cdef xmlXPathObject* xmlXPathWrapCString(const_char * val)
|
125
|
-
cdef xmlXPathObject* xmlXPathNewString(const_xmlChar *val)
|
126
|
-
cdef xmlXPathObject* xmlXPathWrapString(const_xmlChar * val)
|
127
|
-
cdef xmlXPathObject* xmlXPathNewFloat(double val)
|
128
|
-
cdef xmlXPathObject* xmlXPathNewBoolean(int val)
|
129
|
-
cdef xmlXPathObject* xmlXPathNewNodeSet(tree.xmlNode* val)
|
130
|
-
cdef xmlXPathObject* xmlXPathNewValueTree(tree.xmlNode* val)
|
131
|
-
cdef void xmlXPathNodeSetAdd(xmlNodeSet* cur,
|
132
|
-
tree.xmlNode* val)
|
133
|
-
cdef void xmlXPathNodeSetAddUnique(xmlNodeSet* cur,
|
134
|
-
tree.xmlNode* val)
|
135
|
-
cdef xmlXPathObject* xmlXPathWrapNodeSet(xmlNodeSet* val)
|
136
|
-
cdef void xmlXPathErr(xmlXPathParserContext* ctxt, int error)
|
1
|
+
from lxml.includes cimport tree
|
2
|
+
from lxml.includes cimport xmlerror
|
3
|
+
|
4
|
+
from libc.string cimport const_char
|
5
|
+
from lxml.includes.tree cimport xmlChar, const_xmlChar
|
6
|
+
|
7
|
+
|
8
|
+
cdef extern from "libxml/xpath.h" nogil:
|
9
|
+
ctypedef enum xmlXPathObjectType:
|
10
|
+
XPATH_UNDEFINED = 0
|
11
|
+
XPATH_NODESET = 1
|
12
|
+
XPATH_BOOLEAN = 2
|
13
|
+
XPATH_NUMBER = 3
|
14
|
+
XPATH_STRING = 4
|
15
|
+
XPATH_POINT = 5
|
16
|
+
XPATH_RANGE = 6
|
17
|
+
XPATH_LOCATIONSET = 7
|
18
|
+
XPATH_USERS = 8
|
19
|
+
XPATH_XSLT_TREE = 9
|
20
|
+
|
21
|
+
ctypedef enum xmlXPathError:
|
22
|
+
XPATH_EXPRESSION_OK = 0
|
23
|
+
XPATH_NUMBER_ERROR = 1
|
24
|
+
XPATH_UNFINISHED_LITERAL_ERROR = 2
|
25
|
+
XPATH_START_LITERAL_ERROR = 3
|
26
|
+
XPATH_VARIABLE_REF_ERROR = 4
|
27
|
+
XPATH_UNDEF_VARIABLE_ERROR = 5
|
28
|
+
XPATH_INVALID_PREDICATE_ERROR = 6
|
29
|
+
XPATH_EXPR_ERROR = 7
|
30
|
+
XPATH_UNCLOSED_ERROR = 8
|
31
|
+
XPATH_UNKNOWN_FUNC_ERROR = 9
|
32
|
+
XPATH_INVALID_OPERAND = 10
|
33
|
+
XPATH_INVALID_TYPE = 11
|
34
|
+
XPATH_INVALID_ARITY = 12
|
35
|
+
XPATH_INVALID_CTXT_SIZE = 13
|
36
|
+
XPATH_INVALID_CTXT_POSITION = 14
|
37
|
+
XPATH_MEMORY_ERROR = 15
|
38
|
+
XPTR_SYNTAX_ERROR = 16
|
39
|
+
XPTR_RESOURCE_ERROR = 17
|
40
|
+
XPTR_SUB_RESOURCE_ERROR = 18
|
41
|
+
XPATH_UNDEF_PREFIX_ERROR = 19
|
42
|
+
XPATH_ENCODING_ERROR = 20
|
43
|
+
XPATH_INVALID_CHAR_ERROR = 21
|
44
|
+
XPATH_INVALID_CTXT = 22
|
45
|
+
|
46
|
+
ctypedef struct xmlNodeSet:
|
47
|
+
int nodeNr
|
48
|
+
int nodeMax
|
49
|
+
tree.xmlNode** nodeTab
|
50
|
+
|
51
|
+
ctypedef struct xmlXPathObject:
|
52
|
+
xmlXPathObjectType type
|
53
|
+
xmlNodeSet* nodesetval
|
54
|
+
bint boolval
|
55
|
+
double floatval
|
56
|
+
xmlChar* stringval
|
57
|
+
|
58
|
+
ctypedef struct xmlXPathContext:
|
59
|
+
tree.xmlDoc* doc
|
60
|
+
tree.xmlNode* node
|
61
|
+
tree.xmlDict* dict
|
62
|
+
tree.xmlHashTable* nsHash
|
63
|
+
const_xmlChar* function
|
64
|
+
const_xmlChar* functionURI
|
65
|
+
xmlerror.xmlStructuredErrorFunc error
|
66
|
+
xmlerror.xmlError lastError
|
67
|
+
void* userData
|
68
|
+
|
69
|
+
ctypedef struct xmlXPathParserContext:
|
70
|
+
xmlXPathContext* context
|
71
|
+
xmlXPathObject* value
|
72
|
+
tree.xmlNode* ancestor
|
73
|
+
int error
|
74
|
+
|
75
|
+
ctypedef struct xmlXPathCompExpr
|
76
|
+
|
77
|
+
ctypedef void (*xmlXPathFunction)(xmlXPathParserContext* ctxt, int nargs)
|
78
|
+
ctypedef xmlXPathFunction (*xmlXPathFuncLookupFunc)(void* ctxt,
|
79
|
+
const_xmlChar* name,
|
80
|
+
const_xmlChar* ns_uri)
|
81
|
+
|
82
|
+
cdef xmlXPathContext* xmlXPathNewContext(tree.xmlDoc* doc)
|
83
|
+
cdef xmlXPathObject* xmlXPathEvalExpression(const_xmlChar* str,
|
84
|
+
xmlXPathContext* ctxt)
|
85
|
+
cdef xmlXPathObject* xmlXPathCompiledEval(xmlXPathCompExpr* comp,
|
86
|
+
xmlXPathContext* ctxt)
|
87
|
+
cdef xmlXPathCompExpr* xmlXPathCompile(const_xmlChar* str)
|
88
|
+
cdef xmlXPathCompExpr* xmlXPathCtxtCompile(xmlXPathContext* ctxt,
|
89
|
+
const_xmlChar* str)
|
90
|
+
cdef void xmlXPathFreeContext(xmlXPathContext* ctxt)
|
91
|
+
cdef void xmlXPathFreeCompExpr(xmlXPathCompExpr* comp)
|
92
|
+
cdef void xmlXPathFreeObject(xmlXPathObject* obj)
|
93
|
+
cdef int xmlXPathRegisterNs(xmlXPathContext* ctxt,
|
94
|
+
const_xmlChar* prefix, const_xmlChar* ns_uri)
|
95
|
+
|
96
|
+
cdef xmlNodeSet* xmlXPathNodeSetCreate(tree.xmlNode* val)
|
97
|
+
cdef void xmlXPathFreeNodeSet(xmlNodeSet* val)
|
98
|
+
|
99
|
+
|
100
|
+
cdef extern from "libxml/xpathInternals.h" nogil:
|
101
|
+
cdef int xmlXPathRegisterFunc(xmlXPathContext* ctxt,
|
102
|
+
const_xmlChar* name,
|
103
|
+
xmlXPathFunction f)
|
104
|
+
cdef int xmlXPathRegisterFuncNS(xmlXPathContext* ctxt,
|
105
|
+
const_xmlChar* name,
|
106
|
+
const_xmlChar* ns_uri,
|
107
|
+
xmlXPathFunction f)
|
108
|
+
cdef void xmlXPathRegisterFuncLookup(xmlXPathContext *ctxt,
|
109
|
+
xmlXPathFuncLookupFunc f,
|
110
|
+
void *funcCtxt)
|
111
|
+
cdef int xmlXPathRegisterVariable(xmlXPathContext *ctxt,
|
112
|
+
const_xmlChar* name,
|
113
|
+
xmlXPathObject* value)
|
114
|
+
cdef int xmlXPathRegisterVariableNS(xmlXPathContext *ctxt,
|
115
|
+
const_xmlChar* name,
|
116
|
+
const_xmlChar* ns_uri,
|
117
|
+
xmlXPathObject* value)
|
118
|
+
cdef void xmlXPathRegisteredVariablesCleanup(xmlXPathContext *ctxt)
|
119
|
+
cdef void xmlXPathRegisteredNsCleanup(xmlXPathContext *ctxt)
|
120
|
+
cdef xmlXPathObject* valuePop (xmlXPathParserContext *ctxt)
|
121
|
+
cdef int valuePush(xmlXPathParserContext* ctxt, xmlXPathObject *value)
|
122
|
+
|
123
|
+
cdef xmlXPathObject* xmlXPathNewCString(const_char *val)
|
124
|
+
cdef xmlXPathObject* xmlXPathWrapCString(const_char * val)
|
125
|
+
cdef xmlXPathObject* xmlXPathNewString(const_xmlChar *val)
|
126
|
+
cdef xmlXPathObject* xmlXPathWrapString(const_xmlChar * val)
|
127
|
+
cdef xmlXPathObject* xmlXPathNewFloat(double val)
|
128
|
+
cdef xmlXPathObject* xmlXPathNewBoolean(int val)
|
129
|
+
cdef xmlXPathObject* xmlXPathNewNodeSet(tree.xmlNode* val)
|
130
|
+
cdef xmlXPathObject* xmlXPathNewValueTree(tree.xmlNode* val)
|
131
|
+
cdef void xmlXPathNodeSetAdd(xmlNodeSet* cur,
|
132
|
+
tree.xmlNode* val)
|
133
|
+
cdef void xmlXPathNodeSetAddUnique(xmlNodeSet* cur,
|
134
|
+
tree.xmlNode* val)
|
135
|
+
cdef xmlXPathObject* xmlXPathWrapNodeSet(xmlNodeSet* val)
|
136
|
+
cdef void xmlXPathErr(xmlXPathParserContext* ctxt, int error)
|
lxml/includes/xslt.pxd
CHANGED
@@ -1,190 +1,190 @@
|
|
1
|
-
from lxml.includes.tree cimport xmlDoc, xmlNode, xmlDict, xmlChar, const_xmlChar, xmlOutputBuffer
|
2
|
-
from lxml.includes.xmlerror cimport xmlGenericErrorFunc
|
3
|
-
from lxml.includes.xpath cimport xmlXPathContext, xmlXPathFunction
|
4
|
-
|
5
|
-
from libc.string cimport const_char
|
6
|
-
|
7
|
-
cdef extern from "libxslt/xslt.h":
|
8
|
-
cdef int xsltLibxsltVersion
|
9
|
-
cdef int xsltMaxDepth
|
10
|
-
|
11
|
-
cdef extern from "libxslt/xsltconfig.h":
|
12
|
-
cdef int LIBXSLT_VERSION
|
13
|
-
|
14
|
-
cdef extern from "libxslt/xsltInternals.h" nogil:
|
15
|
-
ctypedef enum xsltTransformState:
|
16
|
-
XSLT_STATE_OK # 0
|
17
|
-
XSLT_STATE_ERROR # 1
|
18
|
-
XSLT_STATE_STOPPED # 2
|
19
|
-
|
20
|
-
ctypedef struct xsltDocument:
|
21
|
-
xmlDoc* doc
|
22
|
-
|
23
|
-
ctypedef struct xsltStylesheet:
|
24
|
-
xmlChar* encoding
|
25
|
-
xmlDoc* doc
|
26
|
-
int errors
|
27
|
-
|
28
|
-
ctypedef struct xsltTransformContext:
|
29
|
-
xsltStylesheet* style
|
30
|
-
xmlXPathContext* xpathCtxt
|
31
|
-
xsltDocument* document
|
32
|
-
void* _private
|
33
|
-
xmlDict* dict
|
34
|
-
int profile
|
35
|
-
xmlNode* node
|
36
|
-
xmlDoc* output
|
37
|
-
xmlNode* insert
|
38
|
-
xmlNode* inst
|
39
|
-
xsltTransformState state
|
40
|
-
|
41
|
-
ctypedef struct xsltStackElem
|
42
|
-
|
43
|
-
ctypedef struct xsltTemplate
|
44
|
-
|
45
|
-
cdef xsltStylesheet* xsltParseStylesheetDoc(xmlDoc* doc)
|
46
|
-
cdef void xsltFreeStylesheet(xsltStylesheet* sheet)
|
47
|
-
|
48
|
-
cdef extern from "libxslt/imports.h" nogil:
|
49
|
-
# actually defined in "etree_defs.h"
|
50
|
-
cdef void LXML_GET_XSLT_ENCODING(const_xmlChar* result_var, xsltStylesheet* style)
|
51
|
-
|
52
|
-
cdef extern from "libxslt/extensions.h" nogil:
|
53
|
-
ctypedef void (*xsltTransformFunction)(xsltTransformContext* ctxt,
|
54
|
-
xmlNode* context_node,
|
55
|
-
xmlNode* inst,
|
56
|
-
void* precomp_unused) noexcept
|
57
|
-
|
58
|
-
cdef int xsltRegisterExtFunction(xsltTransformContext* ctxt,
|
59
|
-
const_xmlChar* name,
|
60
|
-
const_xmlChar* URI,
|
61
|
-
xmlXPathFunction function)
|
62
|
-
cdef int xsltRegisterExtModuleFunction(const_xmlChar* name, const_xmlChar* URI,
|
63
|
-
xmlXPathFunction function)
|
64
|
-
cdef int xsltUnregisterExtModuleFunction(const_xmlChar* name, const_xmlChar* URI)
|
65
|
-
cdef xmlXPathFunction xsltExtModuleFunctionLookup(
|
66
|
-
const_xmlChar* name, const_xmlChar* URI)
|
67
|
-
cdef int xsltRegisterExtPrefix(xsltStylesheet* style,
|
68
|
-
const_xmlChar* prefix, const_xmlChar* URI)
|
69
|
-
cdef int xsltRegisterExtElement(xsltTransformContext* ctxt,
|
70
|
-
const_xmlChar* name, const_xmlChar* URI,
|
71
|
-
xsltTransformFunction function)
|
72
|
-
|
73
|
-
cdef extern from "libxslt/documents.h" nogil:
|
74
|
-
ctypedef enum xsltLoadType:
|
75
|
-
XSLT_LOAD_START
|
76
|
-
XSLT_LOAD_STYLESHEET
|
77
|
-
XSLT_LOAD_DOCUMENT
|
78
|
-
|
79
|
-
ctypedef xmlDoc* (*xsltDocLoaderFunc)(const_xmlChar* URI, xmlDict* dict,
|
80
|
-
int options,
|
81
|
-
void* ctxt,
|
82
|
-
xsltLoadType type) noexcept
|
83
|
-
cdef xsltDocLoaderFunc xsltDocDefaultLoader
|
84
|
-
cdef void xsltSetLoaderFunc(xsltDocLoaderFunc f)
|
85
|
-
|
86
|
-
cdef extern from "libxslt/transform.h" nogil:
|
87
|
-
cdef xmlDoc* xsltApplyStylesheet(xsltStylesheet* style, xmlDoc* doc,
|
88
|
-
const_char** params)
|
89
|
-
cdef xmlDoc* xsltApplyStylesheetUser(xsltStylesheet* style, xmlDoc* doc,
|
90
|
-
const_char** params, const_char* output,
|
91
|
-
void* profile,
|
92
|
-
xsltTransformContext* context)
|
93
|
-
cdef void xsltProcessOneNode(xsltTransformContext* ctxt,
|
94
|
-
xmlNode* contextNode,
|
95
|
-
xsltStackElem* params)
|
96
|
-
cdef xsltTransformContext* xsltNewTransformContext(xsltStylesheet* style,
|
97
|
-
xmlDoc* doc)
|
98
|
-
cdef void xsltFreeTransformContext(xsltTransformContext* context)
|
99
|
-
cdef void xsltApplyOneTemplate(xsltTransformContext* ctxt,
|
100
|
-
xmlNode* contextNode, xmlNode* list,
|
101
|
-
xsltTemplate* templ,
|
102
|
-
xsltStackElem* params)
|
103
|
-
|
104
|
-
|
105
|
-
cdef extern from "libxslt/xsltutils.h" nogil:
|
106
|
-
cdef int xsltSaveResultToString(xmlChar** doc_txt_ptr,
|
107
|
-
int* doc_txt_len,
|
108
|
-
xmlDoc* result,
|
109
|
-
xsltStylesheet* style)
|
110
|
-
cdef int xsltSaveResultToFilename(const_char *URL,
|
111
|
-
xmlDoc* result,
|
112
|
-
xsltStylesheet* style,
|
113
|
-
int compression)
|
114
|
-
cdef int xsltSaveResultTo(xmlOutputBuffer* buf,
|
115
|
-
xmlDoc* result,
|
116
|
-
xsltStylesheet* style)
|
117
|
-
cdef xmlGenericErrorFunc xsltGenericError
|
118
|
-
cdef void *xsltGenericErrorContext
|
119
|
-
cdef void xsltSetGenericErrorFunc(
|
120
|
-
void* ctxt, void (*handler)(void* ctxt, char* msg, ...) nogil)
|
121
|
-
cdef void xsltSetTransformErrorFunc(
|
122
|
-
xsltTransformContext*, void* ctxt,
|
123
|
-
void (*handler)(void* ctxt, char* msg, ...) nogil)
|
124
|
-
cdef void xsltTransformError(xsltTransformContext* ctxt,
|
125
|
-
xsltStylesheet* style,
|
126
|
-
xmlNode* node, char* msg, ...)
|
127
|
-
cdef void xsltSetCtxtParseOptions(
|
128
|
-
xsltTransformContext* ctxt, int options)
|
129
|
-
|
130
|
-
|
131
|
-
cdef extern from "libxslt/security.h" nogil:
|
132
|
-
ctypedef struct xsltSecurityPrefs
|
133
|
-
ctypedef enum xsltSecurityOption:
|
134
|
-
XSLT_SECPREF_READ_FILE = 1
|
135
|
-
XSLT_SECPREF_WRITE_FILE = 2
|
136
|
-
XSLT_SECPREF_CREATE_DIRECTORY = 3
|
137
|
-
XSLT_SECPREF_READ_NETWORK = 4
|
138
|
-
XSLT_SECPREF_WRITE_NETWORK = 5
|
139
|
-
|
140
|
-
ctypedef int (*xsltSecurityCheck)(xsltSecurityPrefs* sec,
|
141
|
-
xsltTransformContext* ctxt,
|
142
|
-
char* value) noexcept
|
143
|
-
|
144
|
-
cdef xsltSecurityPrefs* xsltNewSecurityPrefs()
|
145
|
-
cdef void xsltFreeSecurityPrefs(xsltSecurityPrefs* sec)
|
146
|
-
cdef int xsltSecurityForbid(xsltSecurityPrefs* sec,
|
147
|
-
xsltTransformContext* ctxt,
|
148
|
-
char* value)
|
149
|
-
cdef int xsltSecurityAllow(xsltSecurityPrefs* sec,
|
150
|
-
xsltTransformContext* ctxt,
|
151
|
-
char* value)
|
152
|
-
cdef int xsltSetSecurityPrefs(xsltSecurityPrefs* sec,
|
153
|
-
xsltSecurityOption option,
|
154
|
-
xsltSecurityCheck func)
|
155
|
-
cdef xsltSecurityCheck xsltGetSecurityPrefs(
|
156
|
-
xsltSecurityPrefs* sec,
|
157
|
-
xsltSecurityOption option)
|
158
|
-
cdef int xsltSetCtxtSecurityPrefs(xsltSecurityPrefs* sec,
|
159
|
-
xsltTransformContext* ctxt)
|
160
|
-
cdef xmlDoc* xsltGetProfileInformation(xsltTransformContext* ctxt)
|
161
|
-
|
162
|
-
cdef extern from "libxslt/variables.h" nogil:
|
163
|
-
cdef int xsltQuoteUserParams(xsltTransformContext* ctxt,
|
164
|
-
const_char** params)
|
165
|
-
cdef int xsltQuoteOneUserParam(xsltTransformContext* ctxt,
|
166
|
-
const_xmlChar* name,
|
167
|
-
const_xmlChar* value)
|
168
|
-
|
169
|
-
cdef extern from "libxslt/extra.h" nogil:
|
170
|
-
const_xmlChar* XSLT_LIBXSLT_NAMESPACE
|
171
|
-
const_xmlChar* XSLT_XALAN_NAMESPACE
|
172
|
-
const_xmlChar* XSLT_SAXON_NAMESPACE
|
173
|
-
const_xmlChar* XSLT_XT_NAMESPACE
|
174
|
-
|
175
|
-
cdef xmlXPathFunction xsltFunctionNodeSet
|
176
|
-
cdef void xsltRegisterAllExtras()
|
177
|
-
|
178
|
-
cdef extern from "libexslt/exslt.h" nogil:
|
179
|
-
cdef void exsltRegisterAll()
|
180
|
-
|
181
|
-
# libexslt 1.1.25+
|
182
|
-
const_xmlChar* EXSLT_DATE_NAMESPACE
|
183
|
-
const_xmlChar* EXSLT_SETS_NAMESPACE
|
184
|
-
const_xmlChar* EXSLT_MATH_NAMESPACE
|
185
|
-
const_xmlChar* EXSLT_STRINGS_NAMESPACE
|
186
|
-
|
187
|
-
cdef int exsltDateXpathCtxtRegister(xmlXPathContext* ctxt, const_xmlChar* prefix)
|
188
|
-
cdef int exsltSetsXpathCtxtRegister(xmlXPathContext* ctxt, const_xmlChar* prefix)
|
189
|
-
cdef int exsltMathXpathCtxtRegister(xmlXPathContext* ctxt, const_xmlChar* prefix)
|
190
|
-
cdef int exsltStrXpathCtxtRegister(xmlXPathContext* ctxt, const_xmlChar* prefix)
|
1
|
+
from lxml.includes.tree cimport xmlDoc, xmlNode, xmlDict, xmlChar, const_xmlChar, xmlOutputBuffer
|
2
|
+
from lxml.includes.xmlerror cimport xmlGenericErrorFunc
|
3
|
+
from lxml.includes.xpath cimport xmlXPathContext, xmlXPathFunction
|
4
|
+
|
5
|
+
from libc.string cimport const_char
|
6
|
+
|
7
|
+
cdef extern from "libxslt/xslt.h":
|
8
|
+
cdef int xsltLibxsltVersion
|
9
|
+
cdef int xsltMaxDepth
|
10
|
+
|
11
|
+
cdef extern from "libxslt/xsltconfig.h":
|
12
|
+
cdef int LIBXSLT_VERSION
|
13
|
+
|
14
|
+
cdef extern from "libxslt/xsltInternals.h" nogil:
|
15
|
+
ctypedef enum xsltTransformState:
|
16
|
+
XSLT_STATE_OK # 0
|
17
|
+
XSLT_STATE_ERROR # 1
|
18
|
+
XSLT_STATE_STOPPED # 2
|
19
|
+
|
20
|
+
ctypedef struct xsltDocument:
|
21
|
+
xmlDoc* doc
|
22
|
+
|
23
|
+
ctypedef struct xsltStylesheet:
|
24
|
+
xmlChar* encoding
|
25
|
+
xmlDoc* doc
|
26
|
+
int errors
|
27
|
+
|
28
|
+
ctypedef struct xsltTransformContext:
|
29
|
+
xsltStylesheet* style
|
30
|
+
xmlXPathContext* xpathCtxt
|
31
|
+
xsltDocument* document
|
32
|
+
void* _private
|
33
|
+
xmlDict* dict
|
34
|
+
int profile
|
35
|
+
xmlNode* node
|
36
|
+
xmlDoc* output
|
37
|
+
xmlNode* insert
|
38
|
+
xmlNode* inst
|
39
|
+
xsltTransformState state
|
40
|
+
|
41
|
+
ctypedef struct xsltStackElem
|
42
|
+
|
43
|
+
ctypedef struct xsltTemplate
|
44
|
+
|
45
|
+
cdef xsltStylesheet* xsltParseStylesheetDoc(xmlDoc* doc)
|
46
|
+
cdef void xsltFreeStylesheet(xsltStylesheet* sheet)
|
47
|
+
|
48
|
+
cdef extern from "libxslt/imports.h" nogil:
|
49
|
+
# actually defined in "etree_defs.h"
|
50
|
+
cdef void LXML_GET_XSLT_ENCODING(const_xmlChar* result_var, xsltStylesheet* style)
|
51
|
+
|
52
|
+
cdef extern from "libxslt/extensions.h" nogil:
|
53
|
+
ctypedef void (*xsltTransformFunction)(xsltTransformContext* ctxt,
|
54
|
+
xmlNode* context_node,
|
55
|
+
xmlNode* inst,
|
56
|
+
void* precomp_unused) noexcept
|
57
|
+
|
58
|
+
cdef int xsltRegisterExtFunction(xsltTransformContext* ctxt,
|
59
|
+
const_xmlChar* name,
|
60
|
+
const_xmlChar* URI,
|
61
|
+
xmlXPathFunction function)
|
62
|
+
cdef int xsltRegisterExtModuleFunction(const_xmlChar* name, const_xmlChar* URI,
|
63
|
+
xmlXPathFunction function)
|
64
|
+
cdef int xsltUnregisterExtModuleFunction(const_xmlChar* name, const_xmlChar* URI)
|
65
|
+
cdef xmlXPathFunction xsltExtModuleFunctionLookup(
|
66
|
+
const_xmlChar* name, const_xmlChar* URI)
|
67
|
+
cdef int xsltRegisterExtPrefix(xsltStylesheet* style,
|
68
|
+
const_xmlChar* prefix, const_xmlChar* URI)
|
69
|
+
cdef int xsltRegisterExtElement(xsltTransformContext* ctxt,
|
70
|
+
const_xmlChar* name, const_xmlChar* URI,
|
71
|
+
xsltTransformFunction function)
|
72
|
+
|
73
|
+
cdef extern from "libxslt/documents.h" nogil:
|
74
|
+
ctypedef enum xsltLoadType:
|
75
|
+
XSLT_LOAD_START
|
76
|
+
XSLT_LOAD_STYLESHEET
|
77
|
+
XSLT_LOAD_DOCUMENT
|
78
|
+
|
79
|
+
ctypedef xmlDoc* (*xsltDocLoaderFunc)(const_xmlChar* URI, xmlDict* dict,
|
80
|
+
int options,
|
81
|
+
void* ctxt,
|
82
|
+
xsltLoadType type) noexcept
|
83
|
+
cdef xsltDocLoaderFunc xsltDocDefaultLoader
|
84
|
+
cdef void xsltSetLoaderFunc(xsltDocLoaderFunc f)
|
85
|
+
|
86
|
+
cdef extern from "libxslt/transform.h" nogil:
|
87
|
+
cdef xmlDoc* xsltApplyStylesheet(xsltStylesheet* style, xmlDoc* doc,
|
88
|
+
const_char** params)
|
89
|
+
cdef xmlDoc* xsltApplyStylesheetUser(xsltStylesheet* style, xmlDoc* doc,
|
90
|
+
const_char** params, const_char* output,
|
91
|
+
void* profile,
|
92
|
+
xsltTransformContext* context)
|
93
|
+
cdef void xsltProcessOneNode(xsltTransformContext* ctxt,
|
94
|
+
xmlNode* contextNode,
|
95
|
+
xsltStackElem* params)
|
96
|
+
cdef xsltTransformContext* xsltNewTransformContext(xsltStylesheet* style,
|
97
|
+
xmlDoc* doc)
|
98
|
+
cdef void xsltFreeTransformContext(xsltTransformContext* context)
|
99
|
+
cdef void xsltApplyOneTemplate(xsltTransformContext* ctxt,
|
100
|
+
xmlNode* contextNode, xmlNode* list,
|
101
|
+
xsltTemplate* templ,
|
102
|
+
xsltStackElem* params)
|
103
|
+
|
104
|
+
|
105
|
+
cdef extern from "libxslt/xsltutils.h" nogil:
|
106
|
+
cdef int xsltSaveResultToString(xmlChar** doc_txt_ptr,
|
107
|
+
int* doc_txt_len,
|
108
|
+
xmlDoc* result,
|
109
|
+
xsltStylesheet* style)
|
110
|
+
cdef int xsltSaveResultToFilename(const_char *URL,
|
111
|
+
xmlDoc* result,
|
112
|
+
xsltStylesheet* style,
|
113
|
+
int compression)
|
114
|
+
cdef int xsltSaveResultTo(xmlOutputBuffer* buf,
|
115
|
+
xmlDoc* result,
|
116
|
+
xsltStylesheet* style)
|
117
|
+
cdef xmlGenericErrorFunc xsltGenericError
|
118
|
+
cdef void *xsltGenericErrorContext
|
119
|
+
cdef void xsltSetGenericErrorFunc(
|
120
|
+
void* ctxt, void (*handler)(void* ctxt, char* msg, ...) nogil)
|
121
|
+
cdef void xsltSetTransformErrorFunc(
|
122
|
+
xsltTransformContext*, void* ctxt,
|
123
|
+
void (*handler)(void* ctxt, char* msg, ...) nogil)
|
124
|
+
cdef void xsltTransformError(xsltTransformContext* ctxt,
|
125
|
+
xsltStylesheet* style,
|
126
|
+
xmlNode* node, char* msg, ...)
|
127
|
+
cdef void xsltSetCtxtParseOptions(
|
128
|
+
xsltTransformContext* ctxt, int options)
|
129
|
+
|
130
|
+
|
131
|
+
cdef extern from "libxslt/security.h" nogil:
|
132
|
+
ctypedef struct xsltSecurityPrefs
|
133
|
+
ctypedef enum xsltSecurityOption:
|
134
|
+
XSLT_SECPREF_READ_FILE = 1
|
135
|
+
XSLT_SECPREF_WRITE_FILE = 2
|
136
|
+
XSLT_SECPREF_CREATE_DIRECTORY = 3
|
137
|
+
XSLT_SECPREF_READ_NETWORK = 4
|
138
|
+
XSLT_SECPREF_WRITE_NETWORK = 5
|
139
|
+
|
140
|
+
ctypedef int (*xsltSecurityCheck)(xsltSecurityPrefs* sec,
|
141
|
+
xsltTransformContext* ctxt,
|
142
|
+
char* value) noexcept
|
143
|
+
|
144
|
+
cdef xsltSecurityPrefs* xsltNewSecurityPrefs()
|
145
|
+
cdef void xsltFreeSecurityPrefs(xsltSecurityPrefs* sec)
|
146
|
+
cdef int xsltSecurityForbid(xsltSecurityPrefs* sec,
|
147
|
+
xsltTransformContext* ctxt,
|
148
|
+
char* value)
|
149
|
+
cdef int xsltSecurityAllow(xsltSecurityPrefs* sec,
|
150
|
+
xsltTransformContext* ctxt,
|
151
|
+
char* value)
|
152
|
+
cdef int xsltSetSecurityPrefs(xsltSecurityPrefs* sec,
|
153
|
+
xsltSecurityOption option,
|
154
|
+
xsltSecurityCheck func)
|
155
|
+
cdef xsltSecurityCheck xsltGetSecurityPrefs(
|
156
|
+
xsltSecurityPrefs* sec,
|
157
|
+
xsltSecurityOption option)
|
158
|
+
cdef int xsltSetCtxtSecurityPrefs(xsltSecurityPrefs* sec,
|
159
|
+
xsltTransformContext* ctxt)
|
160
|
+
cdef xmlDoc* xsltGetProfileInformation(xsltTransformContext* ctxt)
|
161
|
+
|
162
|
+
cdef extern from "libxslt/variables.h" nogil:
|
163
|
+
cdef int xsltQuoteUserParams(xsltTransformContext* ctxt,
|
164
|
+
const_char** params)
|
165
|
+
cdef int xsltQuoteOneUserParam(xsltTransformContext* ctxt,
|
166
|
+
const_xmlChar* name,
|
167
|
+
const_xmlChar* value)
|
168
|
+
|
169
|
+
cdef extern from "libxslt/extra.h" nogil:
|
170
|
+
const_xmlChar* XSLT_LIBXSLT_NAMESPACE
|
171
|
+
const_xmlChar* XSLT_XALAN_NAMESPACE
|
172
|
+
const_xmlChar* XSLT_SAXON_NAMESPACE
|
173
|
+
const_xmlChar* XSLT_XT_NAMESPACE
|
174
|
+
|
175
|
+
cdef xmlXPathFunction xsltFunctionNodeSet
|
176
|
+
cdef void xsltRegisterAllExtras()
|
177
|
+
|
178
|
+
cdef extern from "libexslt/exslt.h" nogil:
|
179
|
+
cdef void exsltRegisterAll()
|
180
|
+
|
181
|
+
# libexslt 1.1.25+
|
182
|
+
const_xmlChar* EXSLT_DATE_NAMESPACE
|
183
|
+
const_xmlChar* EXSLT_SETS_NAMESPACE
|
184
|
+
const_xmlChar* EXSLT_MATH_NAMESPACE
|
185
|
+
const_xmlChar* EXSLT_STRINGS_NAMESPACE
|
186
|
+
|
187
|
+
cdef int exsltDateXpathCtxtRegister(xmlXPathContext* ctxt, const_xmlChar* prefix)
|
188
|
+
cdef int exsltSetsXpathCtxtRegister(xmlXPathContext* ctxt, const_xmlChar* prefix)
|
189
|
+
cdef int exsltMathXpathCtxtRegister(xmlXPathContext* ctxt, const_xmlChar* prefix)
|
190
|
+
cdef int exsltStrXpathCtxtRegister(xmlXPathContext* ctxt, const_xmlChar* prefix)
|