|
ReactOS 0.4.16-dev-2208-g6350669
|
#include "libxslt.h"#include <stdlib.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 <libxml/threads.h>#include "xslt.h"#include "xsltInternals.h"#include "xsltlocale.h"#include "xsltutils.h"#include "imports.h"#include "extensions.h"
Go to the source code of this file.
Classes | |
| struct | _xsltExtDef |
| struct | _xsltExtModule |
| struct | _xsltExtData |
| struct | _xsltExtElement |
| struct | _xsltInitExtCtxt |
Macros | |
| #define | IN_LIBXSLT |
Typedefs | |
| typedef struct _xsltExtDef | xsltExtDef |
| typedef xsltExtDef * | xsltExtDefPtr |
| typedef struct _xsltExtModule | xsltExtModule |
| typedef xsltExtModule * | xsltExtModulePtr |
| typedef struct _xsltExtData | xsltExtData |
| typedef xsltExtData * | xsltExtDataPtr |
| typedef struct _xsltExtElement | xsltExtElement |
| typedef xsltExtElement * | xsltExtElementPtr |
Variables | |
| static xmlHashTablePtr | xsltExtensionsHash = NULL |
| static xmlHashTablePtr | xsltFunctionsHash = NULL |
| static xmlHashTablePtr | xsltElementsHash = NULL |
| static xmlHashTablePtr | xsltTopLevelsHash = NULL |
| static xmlHashTablePtr | xsltModuleHash = NULL |
| static xmlMutexPtr | xsltExtMutex = NULL |
| #define IN_LIBXSLT |
Definition at line 12 of file extensions.c.
| typedef struct _xsltExtData xsltExtData |
Definition at line 73 of file extensions.c.
| typedef xsltExtData* xsltExtDataPtr |
Definition at line 74 of file extensions.c.
| typedef struct _xsltExtDef xsltExtDef |
Definition at line 55 of file extensions.c.
| typedef xsltExtDef* xsltExtDefPtr |
Definition at line 56 of file extensions.c.
| typedef struct _xsltExtElement xsltExtElement |
Definition at line 80 of file extensions.c.
| typedef xsltExtElement* xsltExtElementPtr |
Definition at line 81 of file extensions.c.
| typedef struct _xsltExtModule xsltExtModule |
Definition at line 64 of file extensions.c.
| typedef xsltExtModule* xsltExtModulePtr |
Definition at line 65 of file extensions.c.
| typedef struct _xsltInitExtCtxt xsltInitExtCtxt |
Definition at line 942 of file extensions.c.
| int xsltCheckExtPrefix | ( | xsltStylesheetPtr | style, |
| const xmlChar * | URI | ||
| ) |
xsltCheckExtPrefix: @style: the stylesheet @URI: 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
Definition at line 1183 of file extensions.c.
Referenced by xsltGetInheritedNsList(), and xsltParseTemplateContent().
| int xsltCheckExtURI | ( | xsltStylesheetPtr | style, |
| const xmlChar * | URI | ||
| ) |
xsltCheckExtURI: @style: the stylesheet @URI: 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
Definition at line 1243 of file extensions.c.
Referenced by xsltPreprocessStylesheet().
xsltCleanupGlobals:
Unregister all global variables set up by the XSLT library
Definition at line 2295 of file extensions.c.
Referenced by DllMain().
xsltDebugDumpExtensions: @output: the FILE * for the output, if NULL stdout is used
Dumps a list of the registered XSLT extension functions and elements
Definition at line 2348 of file extensions.c.
|
static |
Definition at line 2318 of file extensions.c.
Referenced by xsltDebugDumpExtensions().
|
static |
Definition at line 2330 of file extensions.c.
Referenced by xsltDebugDumpExtensions().
| xsltTransformFunction xsltExtElementLookup | ( | xsltTransformContextPtr | ctxt, |
| const xmlChar * | name, | ||
| const xmlChar * | URI | ||
| ) |
Definition at line 1693 of file extensions.c.
Referenced by xsltApplySequenceConstructor(), and xsltElementAvailableFunction().
|
static |
xsltExtElementPreCompTest: @style: the stylesheet @inst: the instruction in the stylesheet
Process a libxslt:test node
Definition at line 2046 of file extensions.c.
Referenced by xsltRegisterTestModule().
|
static |
xsltExtElementTest: @ctxt: an XSLT processing context @node: The current node @inst: the instruction in the stylesheet @comp: precomputed information
Process a libxslt:test node
Definition at line 2090 of file extensions.c.
Referenced by xsltRegisterTestModule().
|
static |
xsltExtFunctionTest: @ctxt: the XPath Parser context @nargs: the number of arguments
function libxslt:test() for testing the extensions support.
Definition at line 1996 of file extensions.c.
Referenced by xsltRegisterTestModule().
|
static |
xsltExtInitTest: @ctxt: an XSLT transformation context @URI: the namespace URI for the extension
A function called at initialization time of an XSLT extension module
Returns a pointer to the module specific data for this transformation
Definition at line 2142 of file extensions.c.
Referenced by xsltRegisterTestModule().
| xsltTransformFunction xsltExtModuleElementLookup | ( | const xmlChar * | name, |
| const xmlChar * | URI | ||
| ) |
Definition at line 1723 of file extensions.c.
Referenced by xsltExtElementLookup().
| xsltPreComputeFunction xsltExtModuleElementPreComputeLookup | ( | const xmlChar * | name, |
| const xmlChar * | URI | ||
| ) |
Definition at line 1766 of file extensions.c.
Definition at line 1441 of file extensions.c.
Referenced by xsltXPathFunctionLookup().
Definition at line 481 of file extensions.c.
Referenced by xsltExtModuleElementLookup(), xsltExtModuleElementPreComputeLookup(), xsltExtModuleFunctionLookup(), xsltExtModuleTopLevelLookup(), and xsltRegisterExtPrefix().
| xsltTopLevelFunction xsltExtModuleTopLevelLookup | ( | const xmlChar * | name, |
| const xmlChar * | URI | ||
| ) |
Definition at line 1881 of file extensions.c.
Referenced by xsltParseStylesheetTop().
|
static |
xsltExtShutdownTest: @ctxt: an XSLT transformation context @URI: the namespace URI for the extension @data: the data associated to this module
A function called at shutdown time of an XSLT extension module
Definition at line 2176 of file extensions.c.
Referenced by xsltRegisterTestModule().
|
static |
xsltExtStyleInitTest: @style: an XSLT stylesheet @URI: the namespace URI for the extension
A function called at initialization time of an XSLT extension module
Returns a pointer to the module specific data for this transformation
Definition at line 2203 of file extensions.c.
Referenced by xsltRegisterTestModule().
|
static |
xsltExtStyleShutdownTest: @style: an XSLT stylesheet @URI: the namespace URI for the extension @data: the data associated to this module
A function called at shutdown time of an XSLT extension module
Definition at line 2227 of file extensions.c.
Referenced by xsltRegisterTestModule().
| void xsltFreeCtxtExts | ( | xsltTransformContextPtr | ctxt | ) |
xsltFreeCtxtExts: @ctxt: an XSLT transformation context
Free the XSLT extension data
Definition at line 664 of file extensions.c.
Referenced by xsltFreeTransformContext().
|
static |
Definition at line 1513 of file extensions.c.
Referenced by xsltNewElemPreComp().
|
static |
xsltFreeExtData: @ext: an XSLT extension module data wrapper
Free up the memory allocated by @ext
Definition at line 249 of file extensions.c.
Referenced by xsltFreeExtDataEntry(), xsltGetExtData(), xsltInitCtxtExt(), and xsltStyleInitializeStylesheetModule().
Definition at line 257 of file extensions.c.
Referenced by xsltShutdownCtxtExts(), and xsltShutdownExts().
|
static |
xsltFreeExtDef: @extensiond: an XSLT extension definition
Free up the memory allocated by @extensiond
Definition at line 135 of file extensions.c.
Referenced by xsltFreeExtDefList().
|
static |
xsltFreeExtDefList: @extensiond: an XSLT extension definition list
Free up the memory allocated by all the elements of @extensiond
Definition at line 153 of file extensions.c.
Referenced by xsltFreeExts().
|
static |
xsltFreeExtElement: @ext: an XSLT extension element
Frees up the memory allocated by @ext
Definition at line 298 of file extensions.c.
Referenced by xsltFreeExtElementEntry().
Definition at line 306 of file extensions.c.
Referenced by xsltRegisterExtModuleElement(), xsltUnregisterAllExtModuleElement(), and xsltUnregisterExtModuleElement().
|
static |
xsltFreeExtModule: @ext: an XSLT extension module
Free up the memory allocated by @ext
Definition at line 203 of file extensions.c.
Referenced by xsltFreeExtModuleEntry().
Definition at line 211 of file extensions.c.
Referenced by xsltUnregisterAllExtModules(), and xsltUnregisterExtModule().
| void xsltFreeExts | ( | xsltStylesheetPtr | style | ) |
xsltFreeExts: @style: an XSLT stylesheet
Free up the memory used by XSLT extensions in a stylesheet
Definition at line 501 of file extensions.c.
Referenced by xsltFreeStylesheet().
| void * xsltGetExtData | ( | xsltTransformContextPtr | ctxt, |
| const xmlChar * | URI | ||
| ) |
xsltGetExtData: @ctxt: an XSLT transformation context @URI: 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
Definition at line 883 of file extensions.c.
Referenced by xsltExtElementTest(), and xsltExtFunctionTest().
| xmlHashTablePtr xsltGetExtInfo | ( | xsltStylesheetPtr | style, |
| const xmlChar * | URI | ||
| ) |
xsltGetExtInfo: @style: pointer to a stylesheet @URI: the namespace URI desired
looks up URI in extInfos of the stylesheet
returns a pointer to the hash table if found, else NULL
Definition at line 1960 of file extensions.c.
|
static |
Definition at line 2267 of file extensions.c.
Referenced by xsltCleanupGlobals().
xsltInitCtxtExt: @styleData: the registered stylesheet data for the module @ctxt: the XSLT transformation context + the return value @URI: the extension URI
Initializes an extension module
Definition at line 957 of file extensions.c.
Referenced by xsltInitCtxtExts().
| int xsltInitCtxtExts | ( | xsltTransformContextPtr | ctxt | ) |
xsltInitCtxtExts: @ctxt: 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
Definition at line 1041 of file extensions.c.
Referenced by xsltNewTransformContext().
| void xsltInitElemPreComp | ( | xsltElemPreCompPtr | comp, |
| xsltStylesheetPtr | style, | ||
| xmlNodePtr | inst, | ||
| xsltTransformFunction | function, | ||
| xsltElemPreCompDeallocator | freeFunc | ||
| ) |
xsltInitElemPreComp: @comp: an xsltElemPreComp (or generally a derived structure) @style: the XSLT stylesheet @inst: the element node @function: the transform function @freeFunc: the @comp 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.
Definition at line 1560 of file extensions.c.
Referenced by xsltNewElemPreComp().
xsltInitGlobals:
Initialize the global variables for extensions
Definition at line 2282 of file extensions.c.
Referenced by xsltApplyStylesheetInternal(), xsltLoadStylesheetPI(), xsltNewSecurityPrefs(), xsltNewTransformContext(), xsltParseStylesheetDoc(), xsltParseStylesheetFile(), xsltParseStylesheetProcess(), xsltRegisterTestModule(), and xsltSetSecurityPrefs().
| xsltElemPreCompPtr xsltNewElemPreComp | ( | xsltStylesheetPtr | style, |
| xmlNodePtr | inst, | ||
| xsltTransformFunction | function | ||
| ) |
xsltNewElemPreComp: @style: the XSLT stylesheet @inst: the element node @function: the transform function
Creates and initializes an xsltElemPreComp
Returns the new and initialized xsltElemPreComp
Definition at line 1528 of file extensions.c.
Referenced by xsltExtElementPreCompTest(), and xsltPreComputeExtModuleElement().
|
static |
xsltNewExtData: @extModule: the module @extData: the associated data
Create a new XSLT extension module data wrapper
Returns the newly allocated xsltExtDataPtr or NULL in case of error
Definition at line 225 of file extensions.c.
Referenced by xsltGetExtData(), xsltInitCtxtExt(), and xsltStyleInitializeStylesheetModule().
|
static |
xsltNewExtDef: @prefix: the extension prefix @URI: the namespace URI
Create a new XSLT ExtDef
Returns the newly allocated xsltExtDefPtr or NULL in case of error
Definition at line 110 of file extensions.c.
Referenced by xsltRegisterExtPrefix().
|
static |
xsltNewExtElement: @precomp: the pre-computation function @transform: the transformation function
Create a new XSLT extension element
Returns the newly allocated xsltExtElementPtr or NULL in case of error
Definition at line 272 of file extensions.c.
Referenced by xsltRegisterExtModuleElement().
|
static |
xsltNewExtModule: @initFunc: the module initialization function @shutdownFunc: the module shutdown function @styleInitFunc: the stylesheet module data allocator function @styleShutdownFunc: the stylesheet module data free function
Create a new XSLT extension module
Returns the newly allocated xsltExtModulePtr or NULL in case of error
Definition at line 176 of file extensions.c.
Referenced by xsltRegisterExtModuleFull().
| xsltElemPreCompPtr xsltPreComputeExtModuleElement | ( | xsltStylesheetPtr | style, |
| xmlNodePtr | inst | ||
| ) |
xsltPreComputeExtModuleElement: @style: the stylesheet @inst: the element node
Precomputes an extension module element
Returns the precomputed data
Definition at line 1583 of file extensions.c.
Referenced by xsltStylePreCompute().
| int xsltRegisterExtElement | ( | xsltTransformContextPtr | ctxt, |
| const xmlChar * | name, | ||
| const xmlChar * | URI, | ||
| xsltTransformFunction | function | ||
| ) |
Definition at line 643 of file extensions.c.
Referenced by xsltRegisterAllElement().
| int xsltRegisterExtFunction | ( | xsltTransformContextPtr | ctxt, |
| const xmlChar * | name, | ||
| const xmlChar * | URI, | ||
| xmlXPathFunction | function | ||
| ) |
Definition at line 609 of file extensions.c.
| int xsltRegisterExtModule | ( | const xmlChar * | URI, |
| xsltExtInitFunction | initFunc, | ||
| xsltExtShutdownFunction | shutdownFunc | ||
| ) |
xsltRegisterExtModule: @URI: URI associated to this module @initFunc: the module initialization function @shutdownFunc: the module shutdown function
Register an XSLT extension module to the library.
Returns 0 if sucessful, -1 in case of error
Definition at line 1325 of file extensions.c.
| int xsltRegisterExtModuleElement | ( | const xmlChar * | name, |
| const xmlChar * | URI, | ||
| xsltPreComputeFunction | precomp, | ||
| xsltTransformFunction | transform | ||
| ) |
Definition at line 1648 of file extensions.c.
Referenced by xsltRegisterAllExtras(), and xsltRegisterTestModule().
| int xsltRegisterExtModuleFull | ( | const xmlChar * | URI, |
| xsltExtInitFunction | initFunc, | ||
| xsltExtShutdownFunction | shutdownFunc, | ||
| xsltStyleExtInitFunction | styleInitFunc, | ||
| xsltStyleExtShutdownFunction | styleShutdownFunc | ||
| ) |
xsltRegisterExtModuleFull: @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
Register an XSLT extension module to the library.
Returns 0 if sucessful, -1 in case of error
Definition at line 1273 of file extensions.c.
Referenced by xsltRegisterExtModule(), and xsltRegisterTestModule().
| int xsltRegisterExtModuleFunction | ( | const xmlChar * | name, |
| const xmlChar * | URI, | ||
| xmlXPathFunction | function | ||
| ) |
Definition at line 1410 of file extensions.c.
Referenced by init_libxslt(), xsltRegisterAllExtras(), and xsltRegisterTestModule().
| int xsltRegisterExtModuleTopLevel | ( | const xmlChar * | name, |
| const xmlChar * | URI, | ||
| xsltTopLevelFunction | function | ||
| ) |
Definition at line 1850 of file extensions.c.
xsltRegisterExtPrefix: @style: an XSLT stylesheet @prefix: the prefix used (optional) @URI: 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 @URI was already registered as an extension namespace and -1 in case of failure
Definition at line 525 of file extensions.c.
Referenced by xsltParseStylesheetExtPrefix().
xsltRegisterTestModule:
Registers the test module
Definition at line 2250 of file extensions.c.
xsltShutdownCtxtExt: @data: the registered data for the module @ctxt: the XSLT transformation context @URI: the extension URI
Shutdown an extension module loaded
Definition at line 1080 of file extensions.c.
Referenced by xsltShutdownCtxtExts().
| void xsltShutdownCtxtExts | ( | xsltTransformContextPtr | ctxt | ) |
xsltShutdownCtxtExts: @ctxt: an XSLT transformation context
Shutdown the set of modules loaded
Definition at line 1106 of file extensions.c.
Referenced by xsltApplyStylesheetInternal(), and xsltFreeTransformContext().
xsltShutdownExt: @data: the registered data for the module @ctxt: the XSLT stylesheet @URI: the extension URI
Shutdown an extension module loaded
Definition at line 1126 of file extensions.c.
Referenced by xsltShutdownExts().
| void xsltShutdownExts | ( | xsltStylesheetPtr | style | ) |
xsltShutdownExts: @style: an XSLT stylesheet
Shutdown the set of modules loaded
Definition at line 1158 of file extensions.c.
Referenced by xsltFreeStylesheet().
| void * xsltStyleGetExtData | ( | xsltStylesheetPtr | style, |
| const xmlChar * | URI | ||
| ) |
xsltStyleGetExtData: @style: an XSLT stylesheet @URI: 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
Definition at line 781 of file extensions.c.
Referenced by xsltExtElementPreCompTest(), xsltExtInitTest(), and xsltRegisterExtPrefix().
|
static |
xsltStyleGetStylesheetExtData: @style: an XSLT stylesheet @URI: the URI associated to the exension module
Fires the compile-time initialization callback of an extension module and returns a container holding the user-data (retrieved via the callback).
Returns the create module-data container or NULL if such a module was not registered.
Definition at line 685 of file extensions.c.
Referenced by xsltStyleGetExtData().
xsltUnregisterAllExtModuleElement:
Unregisters all extension module element
Definition at line 1829 of file extensions.c.
Referenced by xsltCleanupGlobals().
xsltUnregisterAllExtModuleFunction:
Unregisters all extension module function
Definition at line 1501 of file extensions.c.
Referenced by xsltCleanupGlobals().
xsltUnregisterAllExtModules:
Unregister all the XSLT extension module from the library.
Definition at line 1366 of file extensions.c.
Referenced by xsltCleanupGlobals().
xsltUnregisterAllExtModuleTopLevel:
Unregisters all extension module function
Definition at line 1940 of file extensions.c.
Referenced by xsltCleanupGlobals().
xsltUnregisterExtModule: @URI: URI associated to this module
Unregister an XSLT extension module from the library.
Returns 0 if sucessful, -1 in case of error
Definition at line 1342 of file extensions.c.
Definition at line 1806 of file extensions.c.
Definition at line 1479 of file extensions.c.
Definition at line 1918 of file extensions.c.
| xsltTransformContextPtr xsltXPathGetTransformContext | ( | xmlXPathParserContextPtr | ctxt | ) |
xsltXPathGetTransformContext: @ctxt: 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.
Definition at line 1392 of file extensions.c.
Referenced by xsltCurrentFunction(), xsltDocumentFunction(), xsltDocumentFunctionLoadDocument(), xsltElementAvailableFunction(), xsltExtFunctionTest(), xsltFormatNumberFunction(), xsltFunctionAvailableFunction(), xsltFunctionNodeSet(), xsltGenerateIdFunction(), xsltKeyFunction(), and xsltSystemPropertyFunction().
Definition at line 1985 of file extensions.c.
Referenced by xsltExtElementTest(), xsltExtFunctionTest(), xsltExtInitTest(), and xsltExtShutdownTest().
Definition at line 1986 of file extensions.c.
Referenced by xsltExtElementPreCompTest(), xsltExtInitTest(), xsltExtStyleInitTest(), and xsltExtStyleShutdownTest().
|
static |
Definition at line 89 of file extensions.c.
Referenced by xsltDebugDumpExtensions(), xsltExtModuleElementLookup(), xsltExtModuleElementPreComputeLookup(), xsltPreComputeExtModuleElement(), xsltRegisterExtModuleElement(), xsltUnregisterAllExtModuleElement(), and xsltUnregisterExtModuleElement().
|
static |
Definition at line 87 of file extensions.c.
Referenced by xsltDebugDumpExtensions(), xsltGetExtData(), xsltRegisterExtModuleFull(), xsltRegisterExtPrefix(), xsltStyleGetExtData(), xsltStyleInitializeStylesheetModule(), xsltUnregisterAllExtModules(), and xsltUnregisterExtModule().
|
static |
Definition at line 92 of file extensions.c.
Referenced by xsltCleanupGlobals(), xsltDebugDumpExtensions(), xsltExtModuleElementLookup(), xsltExtModuleElementPreComputeLookup(), xsltExtModuleFunctionLookup(), xsltExtModuleTopLevelLookup(), xsltGetExtData(), xsltInitGlobals(), xsltPreComputeExtModuleElement(), xsltRegisterExtModuleElement(), xsltRegisterExtModuleFull(), xsltRegisterExtModuleFunction(), xsltRegisterExtModuleTopLevel(), xsltRegisterExtPrefix(), xsltStyleInitializeStylesheetModule(), xsltUnregisterAllExtModuleElement(), xsltUnregisterAllExtModuleFunction(), xsltUnregisterAllExtModules(), xsltUnregisterAllExtModuleTopLevel(), xsltUnregisterExtModule(), xsltUnregisterExtModuleElement(), xsltUnregisterExtModuleFunction(), and xsltUnregisterExtModuleTopLevel().
|
static |
Definition at line 88 of file extensions.c.
Referenced by xsltDebugDumpExtensions(), xsltExtModuleFunctionLookup(), xsltRegisterExtModuleFunction(), xsltUnregisterAllExtModuleFunction(), and xsltUnregisterExtModuleFunction().
|
static |
Definition at line 91 of file extensions.c.
Referenced by xsltCleanupGlobals().
|
static |
Definition at line 90 of file extensions.c.
Referenced by xsltDebugDumpExtensions(), xsltExtModuleTopLevelLookup(), xsltRegisterExtModuleTopLevel(), xsltUnregisterAllExtModuleTopLevel(), and xsltUnregisterExtModuleTopLevel().