Eneboo - Documentación para desarrolladores
src/libxslt/libxslt/extensions.h
Ir a la documentación de este archivo.
00001 /*
00002  * Summary: interface for the extension support
00003  * Description: This provide the API needed for simple and module
00004  *              extension support.
00005  *
00006  * Copy: See Copyright for the status of this software.
00007  *
00008  * Author: Daniel Veillard
00009  */
00010 
00011 #ifndef __XML_XSLT_EXTENSION_H__
00012 #define __XML_XSLT_EXTENSION_H__
00013 
00014 #include <libxml/xpath.h>
00015 #include "xsltexports.h"
00016 #include "xsltInternals.h"
00017 
00018 #ifdef __cplusplus
00019 extern "C" {
00020 #endif
00021 
00033 XSLTPUBFUN void XSLTCALL
00034                 xsltInitGlobals                 (void);
00035 
00045 typedef void * (*xsltStyleExtInitFunction)      (xsltStylesheetPtr style,
00046                                                  const xmlChar *URI);
00047 
00056 typedef void (*xsltStyleExtShutdownFunction)    (xsltStylesheetPtr style,
00057                                                  const xmlChar *URI,
00058                                                  void *data);
00059 
00069 typedef void * (*xsltExtInitFunction)   (xsltTransformContextPtr ctxt,
00070                                          const xmlChar *URI);
00071 
00080 typedef void (*xsltExtShutdownFunction) (xsltTransformContextPtr ctxt,
00081                                          const xmlChar *URI,
00082                                          void *data);
00083 
00084 XSLTPUBFUN int XSLTCALL
00085                 xsltRegisterExtModule   (const xmlChar *URI,
00086                                          xsltExtInitFunction initFunc,
00087                                          xsltExtShutdownFunction shutdownFunc);
00088 XSLTPUBFUN int XSLTCALL
00089                 xsltRegisterExtModuleFull
00090                                         (const xmlChar * URI,
00091                                          xsltExtInitFunction initFunc,
00092                                          xsltExtShutdownFunction shutdownFunc,
00093                                          xsltStyleExtInitFunction styleInitFunc,
00094                                          xsltStyleExtShutdownFunction styleShutdownFunc);
00095 
00096 XSLTPUBFUN int XSLTCALL
00097                 xsltUnregisterExtModule (const xmlChar * URI);
00098 
00099 XSLTPUBFUN void * XSLTCALL
00100                 xsltGetExtData          (xsltTransformContextPtr ctxt,
00101                                          const xmlChar *URI);
00102 
00103 XSLTPUBFUN void * XSLTCALL
00104                 xsltStyleGetExtData     (xsltStylesheetPtr style,
00105                                          const xmlChar *URI);
00106 #ifdef XSLT_REFACTORED
00107 XSLTPUBFUN void * XSLTCALL
00108                 xsltStyleStylesheetLevelGetExtData(
00109                                          xsltStylesheetPtr style,
00110                                          const xmlChar * URI);
00111 #endif
00112 XSLTPUBFUN void XSLTCALL
00113                 xsltShutdownCtxtExts    (xsltTransformContextPtr ctxt);
00114 
00115 XSLTPUBFUN void XSLTCALL
00116                 xsltShutdownExts        (xsltStylesheetPtr style);
00117 
00118 XSLTPUBFUN xsltTransformContextPtr XSLTCALL
00119                 xsltXPathGetTransformContext
00120                                         (xmlXPathParserContextPtr ctxt);
00121 
00122 /*
00123  * extension functions
00124 */
00125 XSLTPUBFUN int XSLTCALL
00126                 xsltRegisterExtModuleFunction
00127                                         (const xmlChar *name,
00128                                          const xmlChar *URI,
00129                                          xmlXPathFunction function);
00130 XSLTPUBFUN xmlXPathFunction XSLTCALL
00131         xsltExtModuleFunctionLookup     (const xmlChar *name,
00132                                          const xmlChar *URI);
00133 XSLTPUBFUN int XSLTCALL
00134                 xsltUnregisterExtModuleFunction
00135                                         (const xmlChar *name,
00136                                          const xmlChar *URI);
00137 
00138 /*
00139  * extension elements
00140  */
00141 typedef xsltElemPreCompPtr (*xsltPreComputeFunction)
00142                                         (xsltStylesheetPtr style,
00143                                          xmlNodePtr inst,
00144                                          xsltTransformFunction function);
00145 
00146 XSLTPUBFUN xsltElemPreCompPtr XSLTCALL
00147                 xsltNewElemPreComp      (xsltStylesheetPtr style,
00148                                          xmlNodePtr inst,
00149                                          xsltTransformFunction function);
00150 XSLTPUBFUN void XSLTCALL
00151                 xsltInitElemPreComp     (xsltElemPreCompPtr comp,
00152                                          xsltStylesheetPtr style,
00153                                          xmlNodePtr inst,
00154                                          xsltTransformFunction function,
00155                                          xsltElemPreCompDeallocator freeFunc);
00156 
00157 XSLTPUBFUN int XSLTCALL
00158                 xsltRegisterExtModuleElement
00159                                         (const xmlChar *name,
00160                                          const xmlChar *URI,
00161                                          xsltPreComputeFunction precomp,
00162                                          xsltTransformFunction transform);
00163 XSLTPUBFUN xsltTransformFunction XSLTCALL
00164                 xsltExtElementLookup    (xsltTransformContextPtr ctxt,
00165                                          const xmlChar *name,
00166                                          const xmlChar *URI);
00167 XSLTPUBFUN xsltTransformFunction XSLTCALL
00168                 xsltExtModuleElementLookup
00169                                         (const xmlChar *name,
00170                                          const xmlChar *URI);
00171 XSLTPUBFUN xsltPreComputeFunction XSLTCALL
00172                 xsltExtModuleElementPreComputeLookup
00173                                         (const xmlChar *name,
00174                                          const xmlChar *URI);
00175 XSLTPUBFUN int XSLTCALL
00176                 xsltUnregisterExtModuleElement
00177                                         (const xmlChar *name,
00178                                          const xmlChar *URI);
00179 
00180 /*
00181  * top-level elements
00182  */
00183 typedef void (*xsltTopLevelFunction)    (xsltStylesheetPtr style,
00184                                          xmlNodePtr inst);
00185 
00186 XSLTPUBFUN int XSLTCALL
00187                 xsltRegisterExtModuleTopLevel
00188                                         (const xmlChar *name,
00189                                          const xmlChar *URI,
00190                                          xsltTopLevelFunction function);
00191 XSLTPUBFUN xsltTopLevelFunction XSLTCALL
00192                 xsltExtModuleTopLevelLookup
00193                                         (const xmlChar *name,
00194                                          const xmlChar *URI);
00195 XSLTPUBFUN int XSLTCALL
00196                 xsltUnregisterExtModuleTopLevel
00197                                         (const xmlChar *name,
00198                                          const xmlChar *URI);
00199 
00200 
00201 /* These 2 functions are deprecated for use within modules. */
00202 XSLTPUBFUN int XSLTCALL
00203                 xsltRegisterExtFunction (xsltTransformContextPtr ctxt,
00204                                          const xmlChar *name,
00205                                          const xmlChar *URI,
00206                                          xmlXPathFunction function);
00207 XSLTPUBFUN int XSLTCALL
00208                 xsltRegisterExtElement  (xsltTransformContextPtr ctxt,
00209                                          const xmlChar *name,
00210                                          const xmlChar *URI,
00211                                          xsltTransformFunction function);
00212 
00213 /*
00214  * Extension Prefix handling API.
00215  * Those are used by the XSLT (pre)processor.
00216  */
00217 
00218 XSLTPUBFUN int XSLTCALL
00219                 xsltRegisterExtPrefix   (xsltStylesheetPtr style,
00220                                          const xmlChar *prefix,
00221                                          const xmlChar *URI);
00222 XSLTPUBFUN int XSLTCALL
00223                 xsltCheckExtPrefix      (xsltStylesheetPtr style,
00224                                          const xmlChar *URI);
00225 XSLTPUBFUN int XSLTCALL
00226                 xsltCheckExtURI         (xsltStylesheetPtr style,
00227                                          const xmlChar *URI);
00228 XSLTPUBFUN int XSLTCALL
00229                 xsltInitCtxtExts        (xsltTransformContextPtr ctxt);
00230 XSLTPUBFUN void XSLTCALL
00231                 xsltFreeCtxtExts        (xsltTransformContextPtr ctxt);
00232 XSLTPUBFUN void XSLTCALL
00233                 xsltFreeExts            (xsltStylesheetPtr style);
00234 
00235 XSLTPUBFUN xsltElemPreCompPtr XSLTCALL
00236                 xsltPreComputeExtModuleElement
00237                                         (xsltStylesheetPtr style,
00238                                          xmlNodePtr inst);
00239 /*
00240  * Extension Infos access.
00241  * Used by exslt initialisation
00242  */
00243 
00244 XSLTPUBFUN xmlHashTablePtr XSLTCALL
00245                 xsltGetExtInfo          (xsltStylesheetPtr style,
00246                                          const xmlChar *URI);
00247 
00251 XSLTPUBFUN void XSLTCALL
00252                 xsltRegisterTestModule  (void);
00253 XSLTPUBFUN void XSLTCALL
00254                 xsltDebugDumpExtensions (FILE * output);
00255 
00256 
00257 #ifdef __cplusplus
00258 }
00259 #endif
00260 
00261 #endif /* __XML_XSLT_EXTENSION_H__ */
00262 
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'