Annotation of win32/gnome/libxslt-x.x.x/libxslt/extensions.h, revision 1.1
1.1 ! paf 1: /*
! 2: * extension.h: interface for the extension support
! 3: *
! 4: * See Copyright for the status of this software.
! 5: *
! 6: * daniel@veillard.com
! 7: */
! 8:
! 9: #ifndef __XML_XSLT_EXTENSION_H__
! 10: #define __XML_XSLT_EXTENSION_H__
! 11:
! 12: #include "libxml/xpath.h"
! 13: #include "xsltInternals.h"
! 14:
! 15: #ifdef __cplusplus
! 16: extern "C" {
! 17: #endif
! 18:
! 19: /**
! 20: * Extension Modules API
! 21: */
! 22:
! 23: /**
! 24: * xsltStyleExtInitFunction:
! 25: * @ctxt: an XSLT stylesheet
! 26: * @URI: the namespace URI for the extension
! 27: *
! 28: * A function called at initialization time of an XSLT extension module
! 29: *
! 30: * Returns a pointer to the module specific data for this transformation
! 31: */
! 32: typedef void * (*xsltStyleExtInitFunction) (xsltStylesheetPtr style,
! 33: const xmlChar *URI);
! 34:
! 35: /**
! 36: * xsltStyleExtShutdownFunction:
! 37: * @ctxt: an XSLT stylesheet
! 38: * @URI: the namespace URI for the extension
! 39: * @data: the data associated to this module
! 40: *
! 41: * A function called at shutdown time of an XSLT extension module
! 42: */
! 43: typedef void (*xsltStyleExtShutdownFunction) (xsltStylesheetPtr style,
! 44: const xmlChar *URI,
! 45: void *data);
! 46:
! 47: /**
! 48: * xsltExtInitFunction:
! 49: * @ctxt: an XSLT transformation context
! 50: * @URI: the namespace URI for the extension
! 51: *
! 52: * A function called at initialization time of an XSLT extension module
! 53: *
! 54: * Returns a pointer to the module specific data for this transformation
! 55: */
! 56: typedef void * (*xsltExtInitFunction) (xsltTransformContextPtr ctxt,
! 57: const xmlChar *URI);
! 58:
! 59: /**
! 60: * xsltExtShutdownFunction:
! 61: * @ctxt: an XSLT transformation context
! 62: * @URI: the namespace URI for the extension
! 63: * @data: the data associated to this module
! 64: *
! 65: * A function called at shutdown time of an XSLT extension module
! 66: */
! 67: typedef void (*xsltExtShutdownFunction) (xsltTransformContextPtr ctxt,
! 68: const xmlChar *URI,
! 69: void *data);
! 70:
! 71: int xsltRegisterExtModule (const xmlChar *URI,
! 72: xsltExtInitFunction initFunc,
! 73: xsltExtShutdownFunction shutdownFunc);
! 74: int xsltRegisterExtModuleFull
! 75: (const xmlChar * URI,
! 76: xsltExtInitFunction initFunc,
! 77: xsltExtShutdownFunction shutdownFunc,
! 78: xsltStyleExtInitFunction styleInitFunc,
! 79: xsltStyleExtShutdownFunction styleShutdownFunc);
! 80:
! 81: int xsltUnregisterExtModule (const xmlChar * URI);
! 82:
! 83: void * xsltGetExtData (xsltTransformContextPtr ctxt,
! 84: const xmlChar *URI);
! 85:
! 86: void * xsltStyleGetExtData (xsltStylesheetPtr style,
! 87: const xmlChar *URI);
! 88:
! 89: void xsltShutdownCtxtExts (xsltTransformContextPtr ctxt);
! 90:
! 91: void xsltShutdownExts (xsltStylesheetPtr style);
! 92:
! 93: xsltTransformContextPtr
! 94: xsltXPathGetTransformContext
! 95: (xmlXPathParserContextPtr ctxt);
! 96:
! 97: /*
! 98: * extension functions
! 99: */
! 100: int xsltRegisterExtModuleFunction (const xmlChar *name,
! 101: const xmlChar *URI,
! 102: xmlXPathFunction function);
! 103: xmlXPathFunction
! 104: xsltExtFunctionLookup (xsltTransformContextPtr ctxt,
! 105: const xmlChar *name,
! 106: const xmlChar *URI);
! 107: xmlXPathFunction
! 108: xsltExtModuleFunctionLookup (const xmlChar *name,
! 109: const xmlChar *URI);
! 110: int xsltUnregisterExtModuleFunction (const xmlChar *name,
! 111: const xmlChar *URI);
! 112:
! 113: /*
! 114: * extension elements
! 115: */
! 116: typedef xsltElemPreCompPtr
! 117: (*xsltPreComputeFunction) (xsltStylesheetPtr style,
! 118: xmlNodePtr inst,
! 119: xsltTransformFunction function);
! 120:
! 121: xsltElemPreCompPtr
! 122: xsltNewElemPreComp (xsltStylesheetPtr style,
! 123: xmlNodePtr inst,
! 124: xsltTransformFunction function);
! 125: void xsltInitElemPreComp (xsltElemPreCompPtr comp,
! 126: xsltStylesheetPtr style,
! 127: xmlNodePtr inst,
! 128: xsltTransformFunction function,
! 129: xsltElemPreCompDeallocator freeFunc);
! 130:
! 131: int xsltRegisterExtModuleElement (const xmlChar *name,
! 132: const xmlChar *URI,
! 133: xsltPreComputeFunction precomp,
! 134: xsltTransformFunction transform);
! 135: xsltTransformFunction
! 136: xsltExtElementLookup (xsltTransformContextPtr ctxt,
! 137: const xmlChar *name,
! 138: const xmlChar *URI);
! 139: xsltTransformFunction
! 140: xsltExtModuleElementLookup (const xmlChar *name,
! 141: const xmlChar *URI);
! 142: xsltPreComputeFunction
! 143: xsltExtModuleElementPreComputeLookup
! 144: (const xmlChar *name,
! 145: const xmlChar *URI);
! 146: int xsltUnregisterExtModuleElement (const xmlChar *name,
! 147: const xmlChar *URI);
! 148:
! 149: /*
! 150: * top-level elements
! 151: */
! 152: typedef void
! 153: (*xsltTopLevelFunction) (xsltStylesheetPtr style,
! 154: xmlNodePtr inst);
! 155:
! 156: int xsltRegisterExtModuleTopLevel (const xmlChar *name,
! 157: const xmlChar *URI,
! 158: xsltTopLevelFunction function);
! 159: xsltTopLevelFunction
! 160: xsltExtModuleTopLevelLookup (const xmlChar *name,
! 161: const xmlChar *URI);
! 162: int xsltUnregisterExtModuleTopLevel (const xmlChar *name,
! 163: const xmlChar *URI);
! 164:
! 165:
! 166: /* These 2 functions are deprecated for use within modules */
! 167: int xsltRegisterExtFunction (xsltTransformContextPtr ctxt,
! 168: const xmlChar *name,
! 169: const xmlChar *URI,
! 170: xmlXPathFunction function);
! 171: int xsltRegisterExtElement (xsltTransformContextPtr ctxt,
! 172: const xmlChar *name,
! 173: const xmlChar *URI,
! 174: xsltTransformFunction function);
! 175:
! 176: /**
! 177: * Extension Prefix handling API
! 178: * Those are used by the XSLT (pre)processor.
! 179: */
! 180:
! 181: int xsltRegisterExtPrefix (xsltStylesheetPtr style,
! 182: const xmlChar *prefix,
! 183: const xmlChar *URI);
! 184: int xsltCheckExtPrefix (xsltStylesheetPtr style,
! 185: const xmlChar *prefix);
! 186: int xsltInitCtxtExts (xsltTransformContextPtr ctxt);
! 187: void xsltFreeCtxtExts (xsltTransformContextPtr ctxt);
! 188: void xsltFreeExts (xsltStylesheetPtr style);
! 189:
! 190: xsltElemPreCompPtr
! 191: xsltPreComputeExtModuleElement (xsltStylesheetPtr style,
! 192: xmlNodePtr inst);
! 193:
! 194: /**
! 195: * Test module http://xmlsoft.org/XSLT/
! 196: */
! 197: void xsltRegisterTestModule (void);
! 198:
! 199: #ifdef __cplusplus
! 200: }
! 201: #endif
! 202:
! 203: #endif /* __XML_XSLT_EXTENSION_H__ */
! 204:
E-mail: