Mercurial > repos > guerler > springsuite
comparison planemo/lib/python3.7/site-packages/lxml/includes/xslt.pxd @ 1:56ad4e20f292 draft
"planemo upload commit 6eee67778febed82ddd413c3ca40b3183a3898f1"
author | guerler |
---|---|
date | Fri, 31 Jul 2020 00:32:28 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:d30785e31577 | 1:56ad4e20f292 |
---|---|
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": | |
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) nogil | |
46 cdef void xsltFreeStylesheet(xsltStylesheet* sheet) nogil | |
47 | |
48 cdef extern from "libxslt/imports.h": | |
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": | |
53 ctypedef void (*xsltTransformFunction)(xsltTransformContext* ctxt, | |
54 xmlNode* context_node, | |
55 xmlNode* inst, | |
56 void* precomp_unused) nogil | |
57 | |
58 cdef int xsltRegisterExtFunction(xsltTransformContext* ctxt, | |
59 const_xmlChar* name, | |
60 const_xmlChar* URI, | |
61 xmlXPathFunction function) nogil | |
62 cdef int xsltRegisterExtModuleFunction(const_xmlChar* name, const_xmlChar* URI, | |
63 xmlXPathFunction function) nogil | |
64 cdef int xsltUnregisterExtModuleFunction(const_xmlChar* name, const_xmlChar* URI) | |
65 cdef xmlXPathFunction xsltExtModuleFunctionLookup( | |
66 const_xmlChar* name, const_xmlChar* URI) nogil | |
67 cdef int xsltRegisterExtPrefix(xsltStylesheet* style, | |
68 const_xmlChar* prefix, const_xmlChar* URI) nogil | |
69 cdef int xsltRegisterExtElement(xsltTransformContext* ctxt, | |
70 const_xmlChar* name, const_xmlChar* URI, | |
71 xsltTransformFunction function) nogil | |
72 | |
73 cdef extern from "libxslt/documents.h": | |
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) nogil | |
83 cdef xsltDocLoaderFunc xsltDocDefaultLoader | |
84 cdef void xsltSetLoaderFunc(xsltDocLoaderFunc f) nogil | |
85 | |
86 cdef extern from "libxslt/transform.h": | |
87 cdef xmlDoc* xsltApplyStylesheet(xsltStylesheet* style, xmlDoc* doc, | |
88 const_char** params) nogil | |
89 cdef xmlDoc* xsltApplyStylesheetUser(xsltStylesheet* style, xmlDoc* doc, | |
90 const_char** params, const_char* output, | |
91 void* profile, | |
92 xsltTransformContext* context) nogil | |
93 cdef void xsltProcessOneNode(xsltTransformContext* ctxt, | |
94 xmlNode* contextNode, | |
95 xsltStackElem* params) nogil | |
96 cdef xsltTransformContext* xsltNewTransformContext(xsltStylesheet* style, | |
97 xmlDoc* doc) nogil | |
98 cdef void xsltFreeTransformContext(xsltTransformContext* context) nogil | |
99 cdef void xsltApplyOneTemplate(xsltTransformContext* ctxt, | |
100 xmlNode* contextNode, xmlNode* list, | |
101 xsltTemplate* templ, | |
102 xsltStackElem* params) nogil | |
103 | |
104 | |
105 cdef extern from "libxslt/xsltutils.h": | |
106 cdef int xsltSaveResultToString(xmlChar** doc_txt_ptr, | |
107 int* doc_txt_len, | |
108 xmlDoc* result, | |
109 xsltStylesheet* style) nogil | |
110 cdef int xsltSaveResultToFilename(const_char *URL, | |
111 xmlDoc* result, | |
112 xsltStylesheet* style, | |
113 int compression) nogil | |
114 cdef int xsltSaveResultTo(xmlOutputBuffer* buf, | |
115 xmlDoc* result, | |
116 xsltStylesheet* style) nogil | |
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) 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": | |
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) nogil | |
143 | |
144 cdef xsltSecurityPrefs* xsltNewSecurityPrefs() nogil | |
145 cdef void xsltFreeSecurityPrefs(xsltSecurityPrefs* sec) nogil | |
146 cdef int xsltSecurityForbid(xsltSecurityPrefs* sec, | |
147 xsltTransformContext* ctxt, | |
148 char* value) nogil | |
149 cdef int xsltSecurityAllow(xsltSecurityPrefs* sec, | |
150 xsltTransformContext* ctxt, | |
151 char* value) nogil | |
152 cdef int xsltSetSecurityPrefs(xsltSecurityPrefs* sec, | |
153 xsltSecurityOption option, | |
154 xsltSecurityCheck func) nogil | |
155 cdef xsltSecurityCheck xsltGetSecurityPrefs( | |
156 xsltSecurityPrefs* sec, | |
157 xsltSecurityOption option) nogil | |
158 cdef int xsltSetCtxtSecurityPrefs(xsltSecurityPrefs* sec, | |
159 xsltTransformContext* ctxt) nogil | |
160 cdef xmlDoc* xsltGetProfileInformation(xsltTransformContext* ctxt) nogil | |
161 | |
162 cdef extern from "libxslt/variables.h": | |
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": | |
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() nogil | |
177 | |
178 cdef extern from "libexslt/exslt.h": | |
179 cdef void exsltRegisterAll() nogil | |
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) | |
191 |