VirtualBox

source: vbox/trunk/src/libs/libxslt-1.1.22/libxslt/extensions.h@ 8857

最後變更 在這個檔案從8857是 7296,由 vboxsync 提交於 17 年 前

Added libxslt-1.1.22 sources.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Date Revision Author Id
檔案大小: 6.7 KB
 
1/*
2 * Summary: interface for the extension support
3 * Description: This provide the API needed for simple and module
4 * extension support.
5 *
6 * Copy: See Copyright for the status of this software.
7 *
8 * Author: Daniel Veillard
9 */
10
11#ifndef __XML_XSLT_EXTENSION_H__
12#define __XML_XSLT_EXTENSION_H__
13
14#include <libxml/xpath.h>
15#include "xsltexports.h"
16#include "xsltInternals.h"
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22/**
23 * Extension Modules API.
24 */
25
26/**
27 * xsltStyleExtInitFunction:
28 * @ctxt: an XSLT stylesheet
29 * @URI: the namespace URI for the extension
30 *
31 * A function called at initialization time of an XSLT extension module.
32 *
33 * Returns a pointer to the module specific data for this transformation.
34 */
35typedef void * (*xsltStyleExtInitFunction) (xsltStylesheetPtr style,
36 const xmlChar *URI);
37
38/**
39 * xsltStyleExtShutdownFunction:
40 * @ctxt: an XSLT stylesheet
41 * @URI: the namespace URI for the extension
42 * @data: the data associated to this module
43 *
44 * A function called at shutdown time of an XSLT extension module.
45 */
46typedef void (*xsltStyleExtShutdownFunction) (xsltStylesheetPtr style,
47 const xmlChar *URI,
48 void *data);
49
50/**
51 * xsltExtInitFunction:
52 * @ctxt: an XSLT transformation context
53 * @URI: the namespace URI for the extension
54 *
55 * A function called at initialization time of an XSLT extension module.
56 *
57 * Returns a pointer to the module specific data for this transformation.
58 */
59typedef void * (*xsltExtInitFunction) (xsltTransformContextPtr ctxt,
60 const xmlChar *URI);
61
62/**
63 * xsltExtShutdownFunction:
64 * @ctxt: an XSLT transformation context
65 * @URI: the namespace URI for the extension
66 * @data: the data associated to this module
67 *
68 * A function called at shutdown time of an XSLT extension module.
69 */
70typedef void (*xsltExtShutdownFunction) (xsltTransformContextPtr ctxt,
71 const xmlChar *URI,
72 void *data);
73
74XSLTPUBFUN int XSLTCALL
75 xsltRegisterExtModule (const xmlChar *URI,
76 xsltExtInitFunction initFunc,
77 xsltExtShutdownFunction shutdownFunc);
78XSLTPUBFUN int XSLTCALL
79 xsltRegisterExtModuleFull
80 (const xmlChar * URI,
81 xsltExtInitFunction initFunc,
82 xsltExtShutdownFunction shutdownFunc,
83 xsltStyleExtInitFunction styleInitFunc,
84 xsltStyleExtShutdownFunction styleShutdownFunc);
85
86XSLTPUBFUN int XSLTCALL
87 xsltUnregisterExtModule (const xmlChar * URI);
88
89XSLTPUBFUN void * XSLTCALL
90 xsltGetExtData (xsltTransformContextPtr ctxt,
91 const xmlChar *URI);
92
93XSLTPUBFUN void * XSLTCALL
94 xsltStyleGetExtData (xsltStylesheetPtr style,
95 const xmlChar *URI);
96#ifdef XSLT_REFACTORED
97XSLTPUBFUN void * XSLTCALL
98 xsltStyleStylesheetLevelGetExtData(
99 xsltStylesheetPtr style,
100 const xmlChar * URI);
101#endif
102XSLTPUBFUN void XSLTCALL
103 xsltShutdownCtxtExts (xsltTransformContextPtr ctxt);
104
105XSLTPUBFUN void XSLTCALL
106 xsltShutdownExts (xsltStylesheetPtr style);
107
108XSLTPUBFUN xsltTransformContextPtr XSLTCALL
109 xsltXPathGetTransformContext
110 (xmlXPathParserContextPtr ctxt);
111
112/*
113 * extension functions
114*/
115XSLTPUBFUN int XSLTCALL
116 xsltRegisterExtModuleFunction
117 (const xmlChar *name,
118 const xmlChar *URI,
119 xmlXPathFunction function);
120XSLTPUBFUN xmlXPathFunction XSLTCALL
121 xsltExtFunctionLookup (xsltTransformContextPtr ctxt,
122 const xmlChar *name,
123 const xmlChar *URI);
124XSLTPUBFUN xmlXPathFunction XSLTCALL
125 xsltExtModuleFunctionLookup (const xmlChar *name,
126 const xmlChar *URI);
127XSLTPUBFUN int XSLTCALL
128 xsltUnregisterExtModuleFunction
129 (const xmlChar *name,
130 const xmlChar *URI);
131
132/*
133 * extension elements
134 */
135typedef xsltElemPreCompPtr (*xsltPreComputeFunction)
136 (xsltStylesheetPtr style,
137 xmlNodePtr inst,
138 xsltTransformFunction function);
139
140XSLTPUBFUN xsltElemPreCompPtr XSLTCALL
141 xsltNewElemPreComp (xsltStylesheetPtr style,
142 xmlNodePtr inst,
143 xsltTransformFunction function);
144XSLTPUBFUN void XSLTCALL
145 xsltInitElemPreComp (xsltElemPreCompPtr comp,
146 xsltStylesheetPtr style,
147 xmlNodePtr inst,
148 xsltTransformFunction function,
149 xsltElemPreCompDeallocator freeFunc);
150
151XSLTPUBFUN int XSLTCALL
152 xsltRegisterExtModuleElement
153 (const xmlChar *name,
154 const xmlChar *URI,
155 xsltPreComputeFunction precomp,
156 xsltTransformFunction transform);
157XSLTPUBFUN xsltTransformFunction XSLTCALL
158 xsltExtElementLookup (xsltTransformContextPtr ctxt,
159 const xmlChar *name,
160 const xmlChar *URI);
161XSLTPUBFUN xsltTransformFunction XSLTCALL
162 xsltExtModuleElementLookup
163 (const xmlChar *name,
164 const xmlChar *URI);
165XSLTPUBFUN xsltPreComputeFunction XSLTCALL
166 xsltExtModuleElementPreComputeLookup
167 (const xmlChar *name,
168 const xmlChar *URI);
169XSLTPUBFUN int XSLTCALL
170 xsltUnregisterExtModuleElement
171 (const xmlChar *name,
172 const xmlChar *URI);
173
174/*
175 * top-level elements
176 */
177typedef void (*xsltTopLevelFunction) (xsltStylesheetPtr style,
178 xmlNodePtr inst);
179
180XSLTPUBFUN int XSLTCALL
181 xsltRegisterExtModuleTopLevel
182 (const xmlChar *name,
183 const xmlChar *URI,
184 xsltTopLevelFunction function);
185XSLTPUBFUN xsltTopLevelFunction XSLTCALL
186 xsltExtModuleTopLevelLookup
187 (const xmlChar *name,
188 const xmlChar *URI);
189XSLTPUBFUN int XSLTCALL
190 xsltUnregisterExtModuleTopLevel
191 (const xmlChar *name,
192 const xmlChar *URI);
193
194
195/* These 2 functions are deprecated for use within modules. */
196XSLTPUBFUN int XSLTCALL
197 xsltRegisterExtFunction (xsltTransformContextPtr ctxt,
198 const xmlChar *name,
199 const xmlChar *URI,
200 xmlXPathFunction function);
201XSLTPUBFUN int XSLTCALL
202 xsltRegisterExtElement (xsltTransformContextPtr ctxt,
203 const xmlChar *name,
204 const xmlChar *URI,
205 xsltTransformFunction function);
206
207/*
208 * Extension Prefix handling API.
209 * Those are used by the XSLT (pre)processor.
210 */
211
212XSLTPUBFUN int XSLTCALL
213 xsltRegisterExtPrefix (xsltStylesheetPtr style,
214 const xmlChar *prefix,
215 const xmlChar *URI);
216XSLTPUBFUN int XSLTCALL
217 xsltCheckExtPrefix (xsltStylesheetPtr style,
218 const xmlChar *URI);
219XSLTPUBFUN int XSLTCALL
220 xsltInitCtxtExts (xsltTransformContextPtr ctxt);
221XSLTPUBFUN void XSLTCALL
222 xsltFreeCtxtExts (xsltTransformContextPtr ctxt);
223XSLTPUBFUN void XSLTCALL
224 xsltFreeExts (xsltStylesheetPtr style);
225
226XSLTPUBFUN xsltElemPreCompPtr XSLTCALL
227 xsltPreComputeExtModuleElement
228 (xsltStylesheetPtr style,
229 xmlNodePtr inst);
230/*
231 * Extension Infos access.
232 * Used by exslt initialisation
233 */
234
235XSLTPUBFUN xmlHashTablePtr XSLTCALL
236 xsltGetExtInfo (xsltStylesheetPtr style,
237 const xmlChar *URI);
238
239/**
240 * Test module http://xmlsoft.org/XSLT/
241 */
242XSLTPUBFUN void XSLTCALL
243 xsltRegisterTestModule (void);
244XSLTPUBFUN void XSLTCALL
245 xsltDebugDumpExtensions (FILE * output);
246
247
248#ifdef __cplusplus
249}
250#endif
251
252#endif /* __XML_XSLT_EXTENSION_H__ */
253
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette