[libxslt] Fix default template processing on namespace nodes
- From: Daniel Veillard <veillard src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxslt] Fix default template processing on namespace nodes
- Date: Wed, 8 Aug 2012 07:43:05 +0000 (UTC)
commit 937ba2a3eb42d288f53c8adc211bd1122869f0bf
Author: Daniel Veillard <veillard redhat com>
Date: Wed Aug 8 15:31:05 2012 +0800
Fix default template processing on namespace nodes
libxslt/transform.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]