+Mon May 7 22:27:03 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * libxslt/extra.c: add more debug to xsltDebug
+ * libxslt/transform.c: spent a few hours tracking down an ugly
+ race like bug in xsltCopyTreeList() arghhh
+ * libxslt/xsltproc.c: call xmlInitMemory() explictely
+
Mon May 7 11:38:54 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
* doc/internals.html: more work done on the doc, mostly complete
* Process an debug node
*/
void
-xsltDebug(xsltTransformContextPtr ctxt ATTRIBUTE_UNUSED, xmlNodePtr node ATTRIBUTE_UNUSED,
+xsltDebug(xsltTransformContextPtr ctxt, xmlNodePtr node ATTRIBUTE_UNUSED,
xmlNodePtr inst ATTRIBUTE_UNUSED, xsltStylePreCompPtr comp ATTRIBUTE_UNUSED) {
int i, j;
fprintf(stdout, "Templates:\n");
- for (i = 0, j = ctxt->templNr - 1;((i < 5) && (j >= 0));i++,j--) {
+ for (i = 0, j = ctxt->templNr - 1;((i < 15) && (j >= 0));i++,j--) {
fprintf(stdout, "#%d ", i);
if (ctxt->templTab[j]->name != NULL)
fprintf(stdout, "name %s ", ctxt->templTab[j]->name);
fprintf(stdout, "\n");
}
fprintf(stdout, "Variables:\n");
- for (i = 0, j = ctxt->varsNr - 1;((i < 10) && (j >= 0));i++,j--) {
+ for (i = 0, j = ctxt->varsNr - 1;((i < 15) && (j >= 0));i++,j--) {
xsltStackElemPtr cur;
if (ctxt->varsTab[j] == NULL)
{
xmlXPathError status = XPATH_EXPRESSION_OK;
xmlBufferPtr buffer;
- xmlChar *the_format, *prefix, *suffix, *nprefix, *nsuffix;
+ xmlChar *the_format, *prefix = NULL, *suffix = NULL;
+ xmlChar *nprefix, *nsuffix = NULL;
xmlChar pchar;
- int prefix_length, suffix_length, nprefix_length, nsuffix_length;
+ int prefix_length, suffix_length = 0, nprefix_length, nsuffix_length;
double scale;
int j;
xsltFormatNumberInfo format_info;
static xmlNodePtr
xsltCopyTreeList(xsltTransformContextPtr ctxt, xmlNodePtr list,
xmlNodePtr insert) {
- xmlNodePtr copy, ret = NULL, last = NULL;
+ xmlNodePtr copy, ret = NULL;
while (list != NULL) {
copy = xsltCopyTree(ctxt, list, insert);
if (copy != NULL) {
if (ret == NULL) {
ret = copy;
- last = ret;
- } else {
- last->next = copy;
- last = copy;
}
}
list = list->next;
copy->doc = ctxt->output;
if (copy != NULL) {
xmlAddChild(insert, copy);
+ copy->next = NULL;
/*
* Add namespaces as they are needed
*/
ctxt->xpathCtxt->contextSize = oldContextSize;
if (res != NULL) {
if (res->type == XPATH_NODESET) {
+#ifdef WITH_XSLT_DEBUG_PROCESS
+ xsltGenericDebug(xsltGenericDebugContext,
+ "xslcopyOf: result is a node set\n");
+#endif
list = res->nodesetval;
if (list != NULL) {
/* sort the list in document order */
}
}
} else if (res->type == XPATH_XSLT_TREE) {
+#ifdef WITH_XSLT_DEBUG_PROCESS
+ xsltGenericDebug(xsltGenericDebugContext,
+ "xslcopyOf: result is a result tree fragment\n");
+#endif
list = res->nodesetval;
if ((list != NULL) && (list->nodeTab != NULL) &&
(list->nodeTab[0] != NULL)) {
printf(" --docbook: the input document is SGML docbook\n");
#endif
printf(" --param name value\n");
+ printf(" --debug-mem use libxml memory debugging\n");
return(0);
}
- /* --repeat : repeat 20 times, for timing or profiling */
+ xmlInitMemory();
LIBXML_TEST_VERSION
for (i = 1; i < argc ; i++) {
#ifdef LIBXML_DEBUG_ENABLED