+Thu Feb 26 16:59:45 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * libxslt/keys.c libxslt/pattern.c: removed the last use
+ of _private that time in the input document, use the psvi
+ field again, this may be interesting if XSLT2 support gets
+ in but since this is very unlikely ...
+
Thu Feb 26 16:04:28 CET 2004 Daniel Veillard <daniel@veillard.com>
* libxslt/transform.c libxslt/variables.c: use the psvi field
} else {
xmlXPathNodeSetAdd(keylist, nodelist->nodeTab[i]);
}
- nodelist->nodeTab[i]->_private = keyd;
+ switch (nodelist->nodeTab[i]->type) {
+ case XML_ELEMENT_NODE:
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ nodelist->nodeTab[i]->psvi = keyd;
+ break;
+ case XML_ATTRIBUTE_NODE: {
+ xmlAttrPtr attr = (xmlAttrPtr)
+ nodelist->nodeTab[i]->psvi;
+ attr->psvi = keyd;
+ break;
+ }
+ case XML_DOCUMENT_NODE:
+ case XML_HTML_DOCUMENT_NODE: {
+ xmlDocPtr doc = (xmlDocPtr)
+ nodelist->nodeTab[i]->psvi;
+ doc->psvi = keyd;
+ break;
+ }
+ default:
+ break;
+ }
xmlFree(str);
str = list[index++];
}
const xmlChar *name = NULL;
xsltCompMatchPtr list = NULL;
float priority;
+ int keyed = 0;
if ((ctxt == NULL) || (node == NULL))
return(NULL);
list = curstyle->rootMatch;
else
list = curstyle->elemMatch;
+ if (node->psvi != NULL) keyed = 1;
break;
- case XML_ATTRIBUTE_NODE:
+ case XML_ATTRIBUTE_NODE: {
+ xmlAttrPtr attr;
+
list = curstyle->attrMatch;
+ attr = (xmlAttrPtr) node;
+ if (attr->psvi != NULL) keyed = 1;
break;
+ }
case XML_PI_NODE:
list = curstyle->piMatch;
+ if (node->psvi != NULL) keyed = 1;
break;
case XML_DOCUMENT_NODE:
- case XML_HTML_DOCUMENT_NODE:
+ case XML_HTML_DOCUMENT_NODE: {
+ xmlDocPtr doc;
+
list = curstyle->rootMatch;
+ doc = (xmlDocPtr) node;
+ if (doc->psvi != NULL) keyed = 1;
break;
+ }
case XML_TEXT_NODE:
case XML_CDATA_SECTION_NODE:
list = curstyle->textMatch;
+ if (node->psvi != NULL) keyed = 1;
break;
case XML_COMMENT_NODE:
list = curstyle->commentMatch;
+ if (node->psvi != NULL) keyed = 1;
break;
case XML_ENTITY_REF_NODE:
case XML_ENTITY_NODE:
break;
default:
break;
-
}
while ((list != NULL) &&
((ret == NULL) || (list->priority > priority))) {
}
}
- if (node->_private != NULL) {
+ if (keyed) {
list = curstyle->keyMatch;
while ((list != NULL) &&
((ret == NULL) || (list->priority > priority))) {