mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-08-07 10:42:55 +03:00
more cleanup of the problems introduced with EXSLT, also closes bug #58180
* libexslt/functions.c libxslt/extensions.[ch] libxslt/extensions.h libxslt/xslt.[hc] libxslt/xsltInternals.h xsltproc/xsltproc.c: more cleanup of the problems introduced with EXSLT, also closes bug #58180 Daniel
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
Sun Jul 29 08:37:59 EDT 2001 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* libexslt/functions.c libxslt/extensions.[ch] libxslt/extensions.h
|
||||
libxslt/xslt.[hc] libxslt/xsltInternals.h xsltproc/xsltproc.c:
|
||||
more cleanup of the problems introduced with EXSLT, also closes
|
||||
bug #58180
|
||||
|
||||
Sat Jul 28 08:25:05 MDT 2001 John Fleck <jfleck@inkstain.net>
|
||||
|
||||
* doc/internals.html - general cleanup
|
||||
|
@@ -1,14 +1,18 @@
|
||||
#include "libxslt/libxslt.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/xpath.h>
|
||||
#include <libxml/xpathInternals.h>
|
||||
#include <libxml/hash.h>
|
||||
#include <libxml/debugXML.h>
|
||||
|
||||
#include <libxslt/xsltutils.h>
|
||||
#include <libxslt/variables.h>
|
||||
#include <libxslt/xsltInternals.h>
|
||||
#include <libxslt/extensions.h>
|
||||
#include <libxslt/transform.h>
|
||||
|
||||
#include "exslt.h"
|
||||
|
||||
@@ -167,7 +171,6 @@ exsltFuncNewFunctionData (void) {
|
||||
static void
|
||||
exsltFuncFunctionFunction (xmlXPathParserContextPtr ctxt, int nargs) {
|
||||
xmlXPathObjectPtr obj, oldResult, ret;
|
||||
xmlHashTablePtr funcs;
|
||||
exsltFuncData *data;
|
||||
exsltFuncFunctionData *func;
|
||||
xmlNodePtr paramNode, oldInsert, fake;
|
||||
@@ -340,8 +343,9 @@ exsltFuncFunctionComp (xsltStylesheetPtr style, xmlNodePtr inst) {
|
||||
}
|
||||
|
||||
static void
|
||||
exsltFuncResultElem (xsltTransformContextPtr ctxt, xmlNodePtr node,
|
||||
xmlNodePtr inst, xsltStylePreCompPtr comp) {
|
||||
exsltFuncResultElem (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node ATTRIBUTE_UNUSED, xmlNodePtr inst,
|
||||
xsltStylePreCompPtr comp ATTRIBUTE_UNUSED) {
|
||||
xmlNodePtr test;
|
||||
xmlChar *select;
|
||||
exsltFuncData *data;
|
||||
|
@@ -851,7 +851,7 @@ xsltUnregisterExtModule(const xmlChar * URI)
|
||||
*
|
||||
* Unregister all the XSLT extension module from the library.
|
||||
*/
|
||||
void
|
||||
static void
|
||||
xsltUnregisterAllExtModules(void)
|
||||
{
|
||||
if (xsltExtensionsHash == NULL)
|
||||
@@ -948,7 +948,7 @@ xsltUnregisterExtModuleFunction (const xmlChar *name,
|
||||
*
|
||||
* Unregisters all extension module function
|
||||
*/
|
||||
void
|
||||
static void
|
||||
xsltUnregisterAllExtModuleFunction (void) {
|
||||
xmlHashFree(xsltFunctionsHash, NULL);
|
||||
xsltFunctionsHash = NULL;
|
||||
@@ -1088,7 +1088,7 @@ xsltUnregisterExtModuleElement (const xmlChar *name,
|
||||
*
|
||||
* Unregisters all extension module element
|
||||
*/
|
||||
void
|
||||
static void
|
||||
xsltUnregisterAllExtModuleElement (void) {
|
||||
xmlHashFree(xsltElementsHash, (xmlHashDeallocator) xsltFreeExtElement);
|
||||
xsltElementsHash = NULL;
|
||||
@@ -1162,7 +1162,7 @@ xsltUnregisterExtModuleTopLevel (const xmlChar *name,
|
||||
*
|
||||
* Unregisters all extension module function
|
||||
*/
|
||||
void
|
||||
static void
|
||||
xsltUnregisterAllExtModuleTopLevel (void) {
|
||||
xmlHashFree(xsltTopLevelsHash, NULL);
|
||||
xsltTopLevelsHash = NULL;
|
||||
@@ -1465,3 +1465,18 @@ xsltRegisterTestModule (void) {
|
||||
xsltExtElementPreCompTest ,
|
||||
xsltExtElementTest);
|
||||
}
|
||||
|
||||
/**
|
||||
* xsltCleanupGlobals:
|
||||
*
|
||||
* Unregister all global variables set up by the XSLT library
|
||||
*/
|
||||
void
|
||||
xsltCleanupGlobals(void)
|
||||
{
|
||||
xsltUnregisterAllExtModules();
|
||||
xsltUnregisterAllExtModuleFunction();
|
||||
xsltUnregisterAllExtModuleElement();
|
||||
xsltUnregisterAllExtModuleTopLevel();
|
||||
}
|
||||
|
||||
|
@@ -80,8 +80,6 @@ int xsltRegisterExtModuleFull
|
||||
|
||||
int xsltUnregisterExtModule (const xmlChar * URI);
|
||||
|
||||
void xsltUnregisterAllExtModules(void);
|
||||
|
||||
void * xsltGetExtData (xsltTransformContextPtr ctxt,
|
||||
const xmlChar *URI);
|
||||
|
||||
|
@@ -1249,7 +1249,7 @@ xsltGatherNamespaces(xsltStylesheetPtr style) {
|
||||
/**
|
||||
* xsltParseTemplateContent:
|
||||
* @style: the XSLT stylesheet
|
||||
* @template: the container node (can be a document for literal results)
|
||||
* @templ: the container node (can be a document for literal results)
|
||||
*
|
||||
* parse a template content-model
|
||||
* Clean-up the template content from unwanted ignorable blank nodes
|
||||
@@ -1257,14 +1257,14 @@ xsltGatherNamespaces(xsltStylesheetPtr style) {
|
||||
*/
|
||||
|
||||
void
|
||||
xsltParseTemplateContent(xsltStylesheetPtr style, xmlNodePtr template) {
|
||||
xsltParseTemplateContent(xsltStylesheetPtr style, xmlNodePtr templ) {
|
||||
xmlNodePtr cur, delete;
|
||||
/*
|
||||
* This content comes from the stylesheet
|
||||
* For stylesheets, the set of whitespace-preserving
|
||||
* element names consists of just xsl:text.
|
||||
*/
|
||||
cur = template->children;
|
||||
cur = templ->children;
|
||||
delete = NULL;
|
||||
while (cur != NULL) {
|
||||
if (delete != NULL) {
|
||||
@@ -1362,7 +1362,7 @@ skip_children:
|
||||
cur = cur->parent;
|
||||
if (cur == NULL)
|
||||
break;
|
||||
if (cur == template) {
|
||||
if (cur == templ) {
|
||||
cur = NULL;
|
||||
break;
|
||||
}
|
||||
@@ -1385,7 +1385,7 @@ skip_children:
|
||||
/*
|
||||
* Skip the first params
|
||||
*/
|
||||
cur = template->children;
|
||||
cur = templ->children;
|
||||
while (cur != NULL) {
|
||||
if ((IS_XSLT_ELEM(cur)) && (!(IS_XSLT_NAME(cur, "param"))))
|
||||
break;
|
||||
|
@@ -71,6 +71,11 @@ extern const int xsltLibxsltVersion;
|
||||
*/
|
||||
extern const int xsltLibxmlVersion;
|
||||
|
||||
/*
|
||||
* Global cleanup function
|
||||
*/
|
||||
void xsltCleanupGlobals (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -455,7 +455,7 @@ xmlXPathError xsltFormatNumberConversion(xsltDecimalFormatPtr self,
|
||||
xmlChar **result);
|
||||
|
||||
void xsltParseTemplateContent(xsltStylesheetPtr style,
|
||||
xmlNodePtr template);
|
||||
xmlNodePtr templ);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -505,10 +505,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
xsltFreeStylesheet(cur);
|
||||
}
|
||||
xsltUnregisterAllExtModules();
|
||||
xsltUnregisterAllExtModuleFunction();
|
||||
xsltUnregisterAllExtModuleElement();
|
||||
xsltUnregisterAllExtModuleTopLevel();
|
||||
xsltCleanupGlobals();
|
||||
xmlCleanupParser();
|
||||
xmlMemoryDump();
|
||||
return (0);
|
||||
|
Reference in New Issue
Block a user