xmlNsPtr *nsList; /* the namespaces in scope */
int nsNr; /* the number of namespaces in scope */
xsltStepOpPtr steps; /* ops for computation */
+ int novar; /* doesn't contain variables */
};
typedef struct _xsltParserContext xsltParserContext;
}
}
+static void
+xsltFreeCompMatchListEntry(void *payload,
+ const xmlChar *name ATTRIBUTE_UNUSED) {
+ xsltFreeCompMatchList((xsltCompMatchPtr) payload);
+}
+
/**
* xsltNormalizeCompSteps:
* @payload: pointer to template hash table entry
return(0);
}
+static void
+xmlXPathFreeObjectWrapper(void *obj) {
+ xmlXPathFreeObject((xmlXPathObjectPtr) obj);
+}
+
/**
* xsltTestCompMatchDirect:
* @ctxt: a XSLT process context
}
ix = 0;
- if ((parent == NULL) || (node->doc == NULL) || isRVT)
+ if ((parent == NULL) || (node->doc == NULL) || isRVT ||
+ (comp->novar == 0))
nocache = 1;
if (nocache == 0) {
XSLT_RUNTIME_EXTRA(ctxt, sel->indexExtra, ival) =
0;
XSLT_RUNTIME_EXTRA_FREE(ctxt, sel->lenExtra) =
- (xmlFreeFunc) xmlXPathFreeObject;
+ xmlXPathFreeObjectWrapper;
} else
list = newlist;
}
j++;
}
element->nsNr = j;
+ element->novar = novar;
#ifdef WITH_XSLT_DEBUG_PATTERN
xsltFreeTemplateHashes(xsltStylesheetPtr style) {
if (style->templatesHash != NULL)
xmlHashFree((xmlHashTablePtr) style->templatesHash,
- (xmlHashDeallocator) xsltFreeCompMatchList);
+ xsltFreeCompMatchListEntry);
if (style->rootMatch != NULL)
xsltFreeCompMatchList(style->rootMatch);
if (style->keyMatch != NULL)