summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--libxslt/pattern.c9
-rw-r--r--libxslt/transform.c2
3 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 7a3b48c4..7294cffd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Feb 4 18:39:35 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * libxslt/pattern.c libxslt/transform.c: changed the way the
+ root element of value tree are handled to fix bug #104123
+
Tue Feb 4 18:15:01 CET 2003 Daniel Veillard <daniel@veillard.com>
* README: change of policy w.r.t. mails
diff --git a/libxslt/pattern.c b/libxslt/pattern.c
index 9da3f194..a80a224f 100644
--- a/libxslt/pattern.c
+++ b/libxslt/pattern.c
@@ -400,6 +400,8 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp,
#endif
(node->type == XML_HTML_DOCUMENT_NODE))
continue;
+ if ((node->type == XML_ELEMENT_NODE) && (node->name[0] == ' '))
+ continue;
return(0);
case XSLT_OP_ELEM:
if (node->type != XML_ELEMENT_NODE)
@@ -2041,6 +2043,8 @@ xsltGetTemplate(xsltTransformContextPtr ctxt, xmlNodePtr node,
*/
switch (node->type) {
case XML_ELEMENT_NODE:
+ if (node->name[0] == ' ')
+ break;
case XML_ATTRIBUTE_NODE:
case XML_PI_NODE:
name = node->name;
@@ -2092,7 +2096,10 @@ xsltGetTemplate(xsltTransformContextPtr ctxt, xmlNodePtr node,
*/
switch (node->type) {
case XML_ELEMENT_NODE:
- list = curstyle->elemMatch;
+ if (node->name[0] == ' ')
+ list = curstyle->rootMatch;
+ else
+ list = curstyle->elemMatch;
break;
case XML_ATTRIBUTE_NODE:
list = curstyle->attrMatch;
diff --git a/libxslt/transform.c b/libxslt/transform.c
index 2263f8a3..851bb77e 100644
--- a/libxslt/transform.c
+++ b/libxslt/transform.c
@@ -1170,6 +1170,7 @@ xsltProcessOneNode(xsltTransformContextPtr ctxt, xmlNodePtr node,
xsltTemplatePtr template;
xmlNodePtr oldNode;
+#if 0
if (xmlStrEqual(node->name, BAD_CAST " fake node libxslt")) {
xmlNodePtr children;
@@ -1180,6 +1181,7 @@ xsltProcessOneNode(xsltTransformContextPtr ctxt, xmlNodePtr node,
}
return;
}
+#endif
template = xsltGetTemplate(ctxt, node, NULL);
/*
* If no template is found, apply the default rule.