+Wed Aug 9 13:22:13 PDT 2006 William Brack <wbrack@mmm.com.hk>
+
+ * libxslt/transform.c: Fixed problem with cleanup of RVT's, should
+ clear bug350085; cleaned up most warnings (still a problem in
+ xsltShallowCopyNsNode)
+ * trivial warning cleanup in libxslt/[extensions.c, namespaces.c,
+ xslt.c and xsltInternals.h] and libexslt/functions.c
+
Fri Aug 4 14:50:41 CEST 2006 Daniel Veillard <daniel@veillard.com>
* python/generator.py: fixed the conversion of long parameters
int nargs);
static exsltFuncFunctionData *exsltFuncNewFunctionData(void);
-static const xmlChar *exsltResultDataID = (const xmlChar *) "EXSLT Result";
+/*static const xmlChar *exsltResultDataID = (const xmlChar *) "EXSLT Result";*/
/**
* exsltFuncRegisterFunc:
const xmlChar *ext_directory = NULL;
const xmlChar *protocol = NULL;
xmlChar *i, *regfunc_name;
- int rc, seen_before;
+ int rc;
/* check for bad inputs */
if (URI == NULL)
}
/* have we attempted to register this module already? */
- seen_before = (int) xmlHashLookup(xsltModuleHash, URI);
- if (0 != seen_before) {
+ if (xmlHashLookup(xsltModuleHash, URI) != NULL) {
return (-1);
}
return(NULL);
}
+#ifdef XSLT_REFACTORED
/**
- * xsltStyleGetExtDataPerStylesheetLevel:
+ * xsltStyleStylesheetLevelGetExtData:
* @style: an XSLT stylesheet
* @URI: the URI associated to the exension module
*
return (dataContainer->extData);
return(NULL);
}
+#endif
/**
* xsltGetExtData:
* Returns: a new xmlNsPtr, or NULL in case of an error.
*/
xmlNsPtr
-xsltCopyNamespace(xsltTransformContextPtr ctxt, xmlNodePtr elem,
- xmlNsPtr ns)
+xsltCopyNamespace(xsltTransformContextPtr ctxt ATTRIBUTE_UNUSED,
+ xmlNodePtr elem, xmlNsPtr ns)
{
if ((ns == NULL) || (ns->type != XML_NAMESPACE_DECL))
return(NULL);
xmlNodePtr insert,
xmlNsPtr ns)
{
+ /*
+ * TODO: Contrary to header comments, this is declared as int.
+ * be modified to return a node pointer, or NULL if any error
+ */
xmlNsPtr tmpns;
if ((insert == NULL) || (insert->type != XML_ELEMENT_NODE))
* was not called by the extension author.
*/
if (oldLocalFragmentTop != ctxt->localRVT) {
- xmlDocPtr cur = ctxt->localRVT, tmp;
+ xmlDocPtr curdoc = ctxt->localRVT, tmp;
do {
- tmp = cur;
- cur = (xmlDocPtr) cur->next;
+ tmp = curdoc;
+ curdoc = (xmlDocPtr) curdoc->next;
xsltReleaseRVT(ctxt, tmp);
- } while (cur != oldLocalFragmentTop);
+ } while (curdoc != oldLocalFragmentTop);
}
ctxt->localRVT = oldLocalFragmentTop;
* of the obsolete xsltRegisterTmpRVT().
*/
if (ctxt->tmpRVT) {
- xmlDocPtr cur = ctxt->tmpRVT, tmp;
+ xmlDocPtr curdoc = ctxt->tmpRVT, tmp;
- while (cur != NULL) {
- tmp = cur;
- cur = (xmlDocPtr) cur->next;
+ while (curdoc != NULL) {
+ tmp = curdoc;
+ curdoc = (xmlDocPtr) curdoc->next;
xsltReleaseRVT(ctxt, tmp);
}
}
}
vptr = vptr->next;
}
+#if 0
+ /*
+ * code disabled by wmb; awaiting kb's review
+ * problem is that global variable(s) may contain xpath objects
+ * from doc associated with RVT, so can't be freed at this point.
+ * xsltFreeTransformContext includes a call to xsltFreeRVTs, so
+ * I assume this shouldn't be required at this point.
+ */
/*
* Free all remaining tree fragments.
*/
xsltFreeRVTs(ctxt);
+#endif
/*
* Do some post processing work depending on the generated output
*/
* @node: the element where the stylesheet is rooted at
*
* Actually @node need not be the document-element, but
- * currently Libxslt does not support embedeed stylesheets.
+ * currently Libxslt does not support embedded stylesheets.
*
* Returns 0 if OK, -1 on API or internal errors.
*/
static int
-xsltCleanupStylesheetTree(xmlDocPtr doc, xmlNodePtr rootElem)
+xsltCleanupStylesheetTree(xmlDocPtr doc ATTRIBUTE_UNUSED,
+ xmlNodePtr rootElem ATTRIBUTE_UNUSED)
{
#if 0 /* TODO: Currently disabled, since probably not needed. */
xmlNodePtr cur;
XSLT_FUNC_PARAM,
XSLT_FUNC_VARIABLE,
XSLT_FUNC_WHEN,
- XSLT_FUNC_EXTENSION,
+ XSLT_FUNC_EXTENSION
#ifdef XSLT_REFACTORED
+ ,
XSLT_FUNC_OTHERWISE,
XSLT_FUNC_FALLBACK,
XSLT_FUNC_MESSAGE,
XSLT_FUNC_INCLUDE,
XSLT_FUNC_ATTRSET,
XSLT_FUNC_LITERAL_RESULT_ELEMENT,
- XSLT_FUNC_UNKOWN_FORWARDS_COMPAT,
+ XSLT_FUNC_UNKOWN_FORWARDS_COMPAT
#endif
} xsltStyleType;