Eneboo - Documentación para desarrolladores
Clases | 'defines' | 'typedefs' | Funciones
Referencia del Archivo src/libxslt/libxslt/extensions.c
#include "libxslt.h"
#include <string.h>
#include <limits.h>
#include <libxml/xmlmemory.h>
#include <libxml/tree.h>
#include <libxml/hash.h>
#include <libxml/xmlerror.h>
#include <libxml/parserInternals.h>
#include <libxml/xpathInternals.h>
#include <libxml/list.h>
#include <libxml/xmlIO.h>
#include "xslt.h"
#include "xsltInternals.h"
#include "xsltutils.h"
#include "imports.h"
#include "extensions.h"

Clases

struct  _xsltExtDef
struct  _xsltExtModule
struct  _xsltExtData
struct  _xsltExtElement
struct  _xsltInitExtCtxt

'defines'

#define IN_LIBXSLT

'typedefs'

typedef struct _xsltExtDef xsltExtDef
typedef xsltExtDefxsltExtDefPtr
typedef struct _xsltExtModule xsltExtModule
typedef xsltExtModulexsltExtModulePtr
typedef struct _xsltExtData xsltExtData
typedef xsltExtDataxsltExtDataPtr
typedef struct _xsltExtElement xsltExtElement
typedef xsltExtElementxsltExtElementPtr

Funciones

void xsltFreeExts (xsltStylesheetPtr style)
int xsltRegisterExtPrefix (xsltStylesheetPtr style, const xmlChar *prefix, const xmlChar *URI)
: the function name

xsltUnregisterExtModuleFunction:

: the function namespace URI

Unregisters an extension module function

Returns 0 if successful, -1 in case of error.

int xsltRegisterExtModuleFunction (const xmlChar *name, const xmlChar *URI, xmlXPathFunction function)
xmlXPathFunction xsltExtModuleFunctionLookup (const xmlChar *name, const xmlChar *URI)
int xsltUnregisterExtModuleFunction (const xmlChar *name, const xmlChar *URI)
xsltElemPreCompPtr xsltNewElemPreComp (xsltStylesheetPtr style, xmlNodePtr inst, xsltTransformFunction function)
void xsltInitElemPreComp (xsltElemPreCompPtr comp, xsltStylesheetPtr style, xmlNodePtr inst, xsltTransformFunction function, xsltElemPreCompDeallocator freeFunc)
xsltElemPreCompPtr xsltPreComputeExtModuleElement (xsltStylesheetPtr style, xmlNodePtr inst)
: the element name

xsltUnregisterExtModuleElement:

: the element namespace URI

Unregisters an extension module element

Returns 0 if successful, -1 in case of error.

int xsltRegisterExtModuleElement (const xmlChar *name, const xmlChar *URI, xsltPreComputeFunction precomp, xsltTransformFunction transform)
xsltTransformFunction xsltExtElementLookup (xsltTransformContextPtr ctxt, const xmlChar *name, const xmlChar *URI)
xsltTransformFunction xsltExtModuleElementLookup (const xmlChar *name, const xmlChar *URI)
xsltPreComputeFunction xsltExtModuleElementPreComputeLookup (const xmlChar *name, const xmlChar *URI)
int xsltUnregisterExtModuleElement (const xmlChar *name, const xmlChar *URI)

: the name of the element

xsltRegisterExtElement: : an XSLT transformation context

: the URI associated to the element : the actual implementation which should be called

Registers an extension element

Returns 0 in case of success, -1 in case of failure

typedef struct _xsltInitExtCtxt xsltInitExtCtxt
int xsltRegisterExtFunction (xsltTransformContextPtr ctxt, const xmlChar *name, const xmlChar *URI, xmlXPathFunction function)
int xsltRegisterExtElement (xsltTransformContextPtr ctxt, const xmlChar *name, const xmlChar *URI, xsltTransformFunction function)
void xsltFreeCtxtExts (xsltTransformContextPtr ctxt)
void * xsltStyleGetExtData (xsltStylesheetPtr style, const xmlChar *URI)
void * xsltGetExtData (xsltTransformContextPtr ctxt, const xmlChar *URI)
int xsltInitCtxtExts (xsltTransformContextPtr ctxt)
void xsltShutdownCtxtExts (xsltTransformContextPtr ctxt)
void xsltShutdownExts (xsltStylesheetPtr style)
int xsltCheckExtPrefix (xsltStylesheetPtr style, const xmlChar *URI)
int xsltCheckExtURI (xsltStylesheetPtr style, const xmlChar *URI)
int xsltRegisterExtModuleFull (const xmlChar *URI, xsltExtInitFunction initFunc, xsltExtShutdownFunction shutdownFunc, xsltStyleExtInitFunction styleInitFunc, xsltStyleExtShutdownFunction styleShutdownFunc)
int xsltRegisterExtModule (const xmlChar *URI, xsltExtInitFunction initFunc, xsltExtShutdownFunction shutdownFunc)
int xsltUnregisterExtModule (const xmlChar *URI)
xsltTransformContextPtr xsltXPathGetTransformContext (xmlXPathParserContextPtr ctxt)

: the top-level element name

xsltUnregisterExtModuleTopLevel:

: the top-level element namespace URI

Unregisters an extension module top-level element

Returns 0 if successful, -1 in case of error.

int xsltRegisterExtModuleTopLevel (const xmlChar *name, const xmlChar *URI, xsltTopLevelFunction function)
xsltTopLevelFunction xsltExtModuleTopLevelLookup (const xmlChar *name, const xmlChar *URI)
int xsltUnregisterExtModuleTopLevel (const xmlChar *name, const xmlChar *URI)
xmlHashTablePtr xsltGetExtInfo (xsltStylesheetPtr style, const xmlChar *URI)
void xsltRegisterTestModule (void)
void xsltInitGlobals (void)
void xsltCleanupGlobals (void)
void xsltDebugDumpExtensions (FILE *output)

Documentación de los 'defines'

#define IN_LIBXSLT

Documentación de los 'typedefs'

typedef struct _xsltExtData xsltExtData
typedef struct _xsltExtDef xsltExtDef
typedef struct _xsltExtModule xsltExtModule

Documentación de las funciones

int xsltCheckExtPrefix ( xsltStylesheetPtr  style,
const xmlChar URI 
)

xsltCheckExtPrefix: : the stylesheet : the namespace prefix (possibly NULL)

Check if the given prefix is one of the declared extensions. This is intended to be called only at compile-time. Called by: xsltGetInheritedNsList() (xslt.c) xsltParseTemplateContent (xslt.c)

Returns 1 if this is an extension, 0 otherwise

int xsltCheckExtURI ( xsltStylesheetPtr  style,
const xmlChar URI 
)

xsltCheckExtURI: : the stylesheet : the namespace URI (possibly NULL)

Check if the given prefix is one of the declared extensions. This is intended to be called only at compile-time. Called by: xsltPrecomputeStylesheet() (xslt.c) xsltParseTemplateContent (xslt.c)

Returns 1 if this is an extension, 0 otherwise

void xsltCleanupGlobals ( void  )

xsltCleanupGlobals:

Unregister all global variables set up by the XSLT library

void xsltDebugDumpExtensions ( FILE *  output)

xsltDebugDumpExtensions: : the FILE * for the output, if NULL stdout is used

Dumps a list of the registered XSLT extension functions and elements

xsltTransformFunction xsltExtElementLookup ( xsltTransformContextPtr  ctxt,
const xmlChar name,
const xmlChar URI 
)
xsltTransformFunction xsltExtModuleElementLookup ( const xmlChar name,
const xmlChar URI 
)
xsltPreComputeFunction xsltExtModuleElementPreComputeLookup ( const xmlChar name,
const xmlChar URI 
)
xmlXPathFunction xsltExtModuleFunctionLookup ( const xmlChar name,
const xmlChar URI 
)
xsltTopLevelFunction xsltExtModuleTopLevelLookup ( const xmlChar name,
const xmlChar URI 
)
void xsltFreeCtxtExts ( xsltTransformContextPtr  ctxt)

xsltFreeCtxtExts: : an XSLT transformation context

Free the XSLT extension data

void xsltFreeExts ( xsltStylesheetPtr  style)

xsltFreeExts: : an XSLT stylesheet

Free up the memory used by XSLT extensions in a stylesheet

void* xsltGetExtData ( xsltTransformContextPtr  ctxt,
const xmlChar URI 
)

xsltGetExtData: : an XSLT transformation context : the URI associated to the exension module

Retrieve the data associated to the extension module in this given transformation.

Returns the pointer or NULL if not present

xmlHashTablePtr xsltGetExtInfo ( xsltStylesheetPtr  style,
const xmlChar URI 
)

xsltGetExtInfo: : pointer to a stylesheet : the namespace URI desired

looks up URI in extInfos of the stylesheet

returns a pointer to the hash table if found, else NULL

int xsltInitCtxtExts ( xsltTransformContextPtr  ctxt)

xsltInitCtxtExts: : an XSLT transformation context

Initialize the set of modules with registered stylesheet data

Returns the number of modules initialized or -1 in case of error

void xsltInitElemPreComp ( xsltElemPreCompPtr  comp,
xsltStylesheetPtr  style,
xmlNodePtr  inst,
xsltTransformFunction  function,
xsltElemPreCompDeallocator  freeFunc 
)

xsltInitElemPreComp: : an xsltElemPreComp (or generally a derived structure) : the XSLT stylesheet : the element node : the transform function : the deallocator

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.

void xsltInitGlobals ( void  )

xsltInitGlobals:

Initialize the global variables for extensions

xsltElemPreCompPtr xsltNewElemPreComp ( xsltStylesheetPtr  style,
xmlNodePtr  inst,
xsltTransformFunction  function 
)

xsltNewElemPreComp: : the XSLT stylesheet : the element node : the transform function

Creates and initializes an xsltElemPreComp

Returns the new and initialized xsltElemPreComp

xsltElemPreCompPtr xsltPreComputeExtModuleElement ( xsltStylesheetPtr  style,
xmlNodePtr  inst 
)

xsltPreComputeExtModuleElement: : the stylesheet : the element node

Precomputes an extension module element

Returns the precomputed data

int xsltRegisterExtElement ( xsltTransformContextPtr  ctxt,
const xmlChar name,
const xmlChar URI,
xsltTransformFunction  function 
)
int xsltRegisterExtFunction ( xsltTransformContextPtr  ctxt,
const xmlChar name,
const xmlChar URI,
xmlXPathFunction  function 
)
int xsltRegisterExtModule ( const xmlChar URI,
xsltExtInitFunction  initFunc,
xsltExtShutdownFunction  shutdownFunc 
)

xsltRegisterExtModule: : URI associated to this module : the module initialization function : the module shutdown function

Register an XSLT extension module to the library.

Returns 0 if sucessful, -1 in case of error

int xsltRegisterExtModuleElement ( const xmlChar name,
const xmlChar URI,
xsltPreComputeFunction  precomp,
xsltTransformFunction  transform 
)
int xsltRegisterExtModuleFull ( const xmlChar URI,
xsltExtInitFunction  initFunc,
xsltExtShutdownFunction  shutdownFunc,
xsltStyleExtInitFunction  styleInitFunc,
xsltStyleExtShutdownFunction  styleShutdownFunc 
)

xsltRegisterExtModuleFull: : URI associated to this module : the module initialization function : the module shutdown function : the module initialization function : the module shutdown function

Register an XSLT extension module to the library.

Returns 0 if sucessful, -1 in case of error

int xsltRegisterExtModuleFunction ( const xmlChar name,
const xmlChar URI,
xmlXPathFunction  function 
)
int xsltRegisterExtModuleTopLevel ( const xmlChar name,
const xmlChar URI,
xsltTopLevelFunction  function 
)
int xsltRegisterExtPrefix ( xsltStylesheetPtr  style,
const xmlChar prefix,
const xmlChar URI 
)

xsltRegisterExtPrefix: : an XSLT stylesheet : the prefix used (optional) : the URI associated to the extension

Registers an extension namespace This is called from xslt.c during compile-time. The given prefix is not needed. Called by: xsltParseExtElemPrefixes() (new function) xsltRegisterExtPrefix() (old function)

Returns 0 in case of success, 1 if the was already registered as an extension namespace and -1 in case of failure

void xsltRegisterTestModule ( void  )

xsltRegisterTestModule:

Registers the test module

void xsltShutdownCtxtExts ( xsltTransformContextPtr  ctxt)

xsltShutdownCtxtExts: : an XSLT transformation context

Shutdown the set of modules loaded

void xsltShutdownExts ( xsltStylesheetPtr  style)

xsltShutdownExts: : an XSLT stylesheet

Shutdown the set of modules loaded

void* xsltStyleGetExtData ( xsltStylesheetPtr  style,
const xmlChar URI 
)

xsltStyleGetExtData: : an XSLT stylesheet : the URI associated to the exension module

Retrieve the data associated to the extension module in this given stylesheet. Called by: xsltRegisterExtPrefix(), ( xsltExtElementPreCompTest(), xsltExtInitTest )

Returns the pointer or NULL if not present

int xsltUnregisterExtModule ( const xmlChar URI)

xsltUnregisterExtModule: : URI associated to this module

Unregister an XSLT extension module from the library.

Returns 0 if sucessful, -1 in case of error

int xsltUnregisterExtModuleElement ( const xmlChar name,
const xmlChar URI 
)
int xsltUnregisterExtModuleFunction ( const xmlChar name,
const xmlChar URI 
)
int xsltUnregisterExtModuleTopLevel ( const xmlChar name,
const xmlChar URI 
)
xsltTransformContextPtr xsltXPathGetTransformContext ( xmlXPathParserContextPtr  ctxt)

xsltXPathGetTransformContext: : an XPath transformation context

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.

Returns the XSLT transformation context or NULL in case of error.

 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'