You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-libs/libxslt/files/libxslt-1.1.26-node-type-1....

38 lines
1.1 KiB

From 937ba2a3eb42d288f53c8adc211bd1122869f0bf Mon Sep 17 00:00:00 2001
From: Daniel Veillard <veillard@redhat.com>
Date: Wed, 8 Aug 2012 15:31:05 +0800
Subject: [PATCH] Fix default template processing on namespace nodes
---
libxslt/transform.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/libxslt/transform.c b/libxslt/transform.c
index 53eefcc..c6df19e 100644
--- a/libxslt/transform.c
+++ b/libxslt/transform.c
@@ -4895,7 +4895,10 @@ xsltApplyTemplates(xsltTransformContextPtr ctxt, xmlNodePtr node,
list = xmlXPathNodeSetCreate(NULL);
if (list == NULL)
goto error;
- cur = node->children;
+ if (node->type != XML_NAMESPACE_DECL)
+ cur = node->children;
+ else
+ cur = NULL;
while (cur != NULL) {
switch (cur->type) {
case XML_TEXT_NODE:
@@ -4944,6 +4947,8 @@ xsltApplyTemplates(xsltTransformContextPtr ctxt, xmlNodePtr node,
if (cur->prev != NULL)
cur->prev->next = cur->next;
break;
+ case XML_NAMESPACE_DECL:
+ break;
default:
#ifdef WITH_XSLT_DEBUG_PROCESS
XSLT_TRACE(ctxt,XSLT_TRACE_APPLY_TEMPLATES,xsltGenericDebug(xsltGenericDebugContext,
--
1.7.12