![]() | ![]() | ![]() | Gnome XSLT Library Reference Manual | ![]() |
---|
extensions —
void* (*xsltStyleExtInitFunction) (xsltStylesheetPtr style, constxmlChar *URI); void (*xsltStyleExtShutdownFunction) (xsltStylesheetPtr style, constxmlChar *URI, void *data); void* (*xsltExtInitFunction) (xsltTransformContextPtr ctxt, constxmlChar *URI); void (*xsltExtShutdownFunction) (xsltTransformContextPtr ctxt, constxmlChar *URI, void *data); int xsltRegisterExtModule (constxmlChar *URI, xsltExtInitFunction initFunc, xsltExtShutdownFunction shutdownFunc); int xsltRegisterExtModuleFull (constxmlChar *URI, xsltExtInitFunction initFunc, xsltExtShutdownFunction shutdownFunc, xsltStyleExtInitFunction styleInitFunc, xsltStyleExtShutdownFunction styleShutdownFunc); int xsltUnregisterExtModule (constxmlChar *URI); void* xsltGetExtData (xsltTransformContextPtr ctxt, constxmlChar *URI); void* xsltStyleGetExtData (xsltStylesheetPtr style, constxmlChar *URI); void xsltShutdownCtxtExts (xsltTransformContextPtr ctxt); void xsltShutdownExts (xsltStylesheetPtr style); xsltTransformContextPtr xsltXPathGetTransformContext (xmlXPathParserContextPtr ctxt); int xsltRegisterExtModuleFunction (constxmlChar *name, constxmlChar *URI,xmlXPathFunction function);xmlXPathFunction xsltExtFunctionLookup (xsltTransformContextPtr ctxt, constxmlChar *name, constxmlChar *URI);xmlXPathFunction xsltExtModuleFunctionLookup (constxmlChar *name, constxmlChar *URI); int xsltUnregisterExtModuleFunction (constxmlChar *name, constxmlChar *URI); xsltElemPreCompPtr xsltNewElemPreComp (xsltStylesheetPtr style,xmlNodePtr inst, xsltTransformFunction function); void xsltInitElemPreComp (xsltElemPreCompPtr comp, xsltStylesheetPtr style,xmlNodePtr inst, xsltTransformFunction function, xsltElemPreCompDeallocator freeFunc); int xsltRegisterExtModuleElement (constxmlChar *name, constxmlChar *URI,xsltPreComputeFunction precomp, xsltTransformFunction transform); xsltTransformFunction xsltExtElementLookup (xsltTransformContextPtr ctxt, constxmlChar *name, constxmlChar *URI); xsltTransformFunction xsltExtModuleElementLookup (constxmlChar *name, constxmlChar *URI);xsltPreComputeFunction xsltExtModuleElementPreComputeLookup (constxmlChar *name, constxmlChar *URI); int xsltUnregisterExtModuleElement (constxmlChar *name, constxmlChar *URI); void (*xsltTopLevelFunction) (xsltStylesheetPtr style,xmlNodePtr inst); int xsltRegisterExtModuleTopLevel (constxmlChar *name, constxmlChar *URI, xsltTopLevelFunction function); xsltTopLevelFunction xsltExtModuleTopLevelLookup (constxmlChar *name, constxmlChar *URI); int xsltUnregisterExtModuleTopLevel (constxmlChar *name, constxmlChar *URI); int xsltRegisterExtFunction (xsltTransformContextPtr ctxt, constxmlChar *name, constxmlChar *URI,xmlXPathFunction function); int xsltRegisterExtElement (xsltTransformContextPtr ctxt, constxmlChar *name, constxmlChar *URI, xsltTransformFunction function); int xsltRegisterExtPrefix (xsltStylesheetPtr style, constxmlChar *prefix, constxmlChar *URI); int xsltCheckExtPrefix (xsltStylesheetPtr style, constxmlChar *prefix); int xsltInitCtxtExts (xsltTransformContextPtr ctxt); void xsltFreeCtxtExts (xsltTransformContextPtr ctxt); void xsltFreeExts (xsltStylesheetPtr style); xsltElemPreCompPtr xsltPreComputeExtModuleElement (xsltStylesheetPtr style,xmlNodePtr inst);xmlHashTablePtr xsltGetExtInfo (xsltStylesheetPtr style, constxmlChar *URI); void xsltRegisterTestModule (void); void xsltDebugDumpExtensions (FILE *output);
void* (*xsltStyleExtInitFunction) (xsltStylesheetPtr style, constxmlChar *URI);
A function called at initialization time of an XSLT extension module.
style : | |
URI : | the namespace URI for the extension |
void (*xsltStyleExtShutdownFunction) (xsltStylesheetPtr style, constxmlChar *URI, void *data);
A function called at shutdown time of an XSLT extension module.
style : | |
URI : | the namespace URI for the extension |
data : | the data associated to this module |
void* (*xsltExtInitFunction) (xsltTransformContextPtr ctxt, constxmlChar *URI);
A function called at initialization time of an XSLT extension module.
ctxt : | an XSLT transformation context |
URI : | the namespace URI for the extension |
void (*xsltExtShutdownFunction) (xsltTransformContextPtr ctxt, constxmlChar *URI, void *data);
A function called at shutdown time of an XSLT extension module.
ctxt : | an XSLT transformation context |
URI : | the namespace URI for the extension |
data : | the data associated to this module |
int xsltRegisterExtModule (constxmlChar *URI, xsltExtInitFunction initFunc, xsltExtShutdownFunction shutdownFunc);
Register an XSLT extension module to the library.
URI : | URI associated to this module |
initFunc : | the module initialization function |
shutdownFunc : | the module shutdown function |
Returns : | 0 if sucessful, -1 in case of error |
int xsltRegisterExtModuleFull (constxmlChar *URI, xsltExtInitFunction initFunc, xsltExtShutdownFunction shutdownFunc, xsltStyleExtInitFunction styleInitFunc, xsltStyleExtShutdownFunction styleShutdownFunc);
Register an XSLT extension module to the library.
URI : | URI associated to this module |
initFunc : | the module initialization function |
shutdownFunc : | the module shutdown function |
styleInitFunc : | the module initialization function |
styleShutdownFunc : | the module shutdown function |
Returns : | 0 if sucessful, -1 in case of error |
int xsltUnregisterExtModule (constxmlChar *URI);
Unregister an XSLT extension module from the library.
URI : | URI associated to this module |
Returns : | 0 if sucessful, -1 in case of error |
void* xsltGetExtData (xsltTransformContextPtr ctxt, constxmlChar *URI);
Retrieve the data associated to the extension module in this given transformation.
ctxt : | an XSLT transformation context |
URI : | the URI associated to the exension module |
void* xsltStyleGetExtData (xsltStylesheetPtr style, constxmlChar *URI);
Retrieve the data associated to the extension module in this given stylesheet.
style : | an XSLT stylesheet |
URI : | the URI associated to the exension module |
void xsltShutdownCtxtExts (xsltTransformContextPtr ctxt);
Shutdown the set of modules loaded
ctxt : | an XSLT transformation context |
void xsltShutdownExts (xsltStylesheetPtr style);
Shutdown the set of modules loaded
style : | an XSLT stylesheet |
xsltTransformContextPtr xsltXPathGetTransformContext (xmlXPathParserContextPtr ctxt);
Provides the XSLT transformation context from the XPath transformation context. This is useful when an XPath function in the extension module is called by the XPath interpreter and that the XSLT context is needed for example to retrieve the associated data pertaining to this XSLT transformation.
ctxt : | an XPath transformation context |
Returns : | the XSLT transformation context or NULL in case of error. |
int xsltRegisterExtModuleFunction (constxmlChar *name, constxmlChar *URI,xmlXPathFunction function);
Registers an extension module function.
name : | the function name |
URI : | the function namespace URI |
function : | the function callback |
Returns : | 0 if successful, -1 in case of error. |
xmlXPathFunction xsltExtFunctionLookup (xsltTransformContextPtr ctxt, constxmlChar *name, constxmlChar *URI);
ctxt : | |
name : | |
URI : | |
Returns : |
xmlXPathFunction xsltExtModuleFunctionLookup (constxmlChar *name, constxmlChar *URI);
Looks up an extension module function
name : | the function name |
URI : | the function namespace URI |
Returns : | the function if found, NULL otherwise. |
int xsltUnregisterExtModuleFunction (constxmlChar *name, constxmlChar *URI);
Unregisters an extension module function
name : | the function name |
URI : | the function namespace URI |
Returns : | 0 if successful, -1 in case of error. |
xsltElemPreCompPtr xsltNewElemPreComp (xsltStylesheetPtr style,xmlNodePtr inst, xsltTransformFunction function);
Creates and initializes an xsltElemPreComp
style : | the XSLT stylesheet |
inst : | the element node |
function : | the transform function |
Returns : | the new and initialized xsltElemPreComp |
void xsltInitElemPreComp (xsltElemPreCompPtr comp, xsltStylesheetPtr style,xmlNodePtr inst, xsltTransformFunction function, xsltElemPreCompDeallocator freeFunc);
Initializes an existing xsltElemPreComp structure. This is usefull when extending an xsltElemPreComp to store precomputed data. This function MUST be called on any extension element precomputed data struct.
comp : | an xsltElemPreComp (or generally a derived structure) |
style : | the XSLT stylesheet |
inst : | the element node |
function : | the transform function |
freeFunc : | the comp deallocator |
int xsltRegisterExtModuleElement (constxmlChar *name, constxmlChar *URI,xsltPreComputeFunction precomp, xsltTransformFunction transform);
Registers an extension module element.
name : | the element name |
URI : | the element namespace URI |
precomp : | the pre-computation callback |
transform : | the transformation callback |
Returns : | 0 if successful, -1 in case of error. |
xsltTransformFunction xsltExtElementLookup (xsltTransformContextPtr ctxt, constxmlChar *name, constxmlChar *URI);
Looks up an extension element. ctxt can be NULL to search only in module elements.
ctxt : | an XSLT process context |
name : | the element name |
URI : | the element namespace URI |
Returns : | the element callback or NULL if not found |
xsltTransformFunction xsltExtModuleElementLookup (constxmlChar *name, constxmlChar *URI);
Looks up an extension module element
name : | the element name |
URI : | the element namespace URI |
Returns : | the callback function if found, NULL otherwise. |
xsltPreComputeFunction xsltExtModuleElementPreComputeLookup (constxmlChar *name, constxmlChar *URI);
Looks up an extension module element pre-computation function
name : | the element name |
URI : | the element namespace URI |
Returns : | the callback function if found, NULL otherwise. |
int xsltUnregisterExtModuleElement (constxmlChar *name, constxmlChar *URI);
Unregisters an extension module element
name : | the element name |
URI : | the element namespace URI |
Returns : | 0 if successful, -1 in case of error. |
void (*xsltTopLevelFunction) (xsltStylesheetPtr style,xmlNodePtr inst);
style : | |
inst : |
int xsltRegisterExtModuleTopLevel (constxmlChar *name, constxmlChar *URI, xsltTopLevelFunction function);
Registers an extension module top-level element.
name : | the top-level element name |
URI : | the top-level element namespace URI |
function : | the top-level element callback |
Returns : | 0 if successful, -1 in case of error. |
xsltTopLevelFunction xsltExtModuleTopLevelLookup (constxmlChar *name, constxmlChar *URI);
Looks up an extension module top-level element
name : | the top-level element name |
URI : | the top-level element namespace URI |
Returns : | the callback function if found, NULL otherwise. |
int xsltUnregisterExtModuleTopLevel (constxmlChar *name, constxmlChar *URI);
Unregisters an extension module top-level element
name : | the top-level element name |
URI : | the top-level element namespace URI |
Returns : | 0 if successful, -1 in case of error. |
int xsltRegisterExtFunction (xsltTransformContextPtr ctxt, constxmlChar *name, constxmlChar *URI,xmlXPathFunction function);
Registers an extension function
ctxt : | an XSLT transformation context |
name : | the name of the element |
URI : | the URI associated to the element |
function : | the actual implementation which should be called |
Returns : | 0 in case of success, -1 in case of failure |
int xsltRegisterExtElement (xsltTransformContextPtr ctxt, constxmlChar *name, constxmlChar *URI, xsltTransformFunction function);
Registers an extension element
ctxt : | an XSLT transformation context |
name : | the name of the element |
URI : | the URI associated to the element |
function : | the actual implementation which should be called |
Returns : | 0 in case of success, -1 in case of failure |
int xsltRegisterExtPrefix (xsltStylesheetPtr style, constxmlChar *prefix, constxmlChar *URI);
Registers an extension namespace
style : | an XSLT stylesheet |
prefix : | the prefix used |
URI : | the URI associated to the extension |
Returns : | 0 in case of success, -1 in case of failure |
int xsltCheckExtPrefix (xsltStylesheetPtr style, constxmlChar *prefix);
Check if the given prefix is one of the declared extensions
style : | the stylesheet |
prefix : | the namespace prefix (possibly NULL) |
Returns : | 1 if this is an extension, 0 otherwise |
int xsltInitCtxtExts (xsltTransformContextPtr ctxt);
Initialize the set of modules with registered stylesheet data
ctxt : | an XSLT transformation context |
Returns : | the number of modules initialized or -1 in case of error |
void xsltFreeCtxtExts (xsltTransformContextPtr ctxt);
Free the XSLT extension data
ctxt : | an XSLT transformation context |
void xsltFreeExts (xsltStylesheetPtr style);
Free up the memory used by XSLT extensions in a stylesheet
style : | an XSLT stylesheet |
xsltElemPreCompPtr xsltPreComputeExtModuleElement (xsltStylesheetPtr style,xmlNodePtr inst);
Precomputes an extension module element
style : | the stylesheet |
inst : | the element node |
Returns : | the precomputed data |
xmlHashTablePtr xsltGetExtInfo (xsltStylesheetPtr style, constxmlChar *URI);
looks up URI in extInfos of the stylesheet
style : | pointer to a stylesheet |
URI : | the namespace URI desired |
Returns : | a pointer to the hash table if found, else NULL |
<< imports | namespaces >> |