diff options
author | Daniel Veillard <veillard@redhat.com> | 2012-08-08 15:31:05 +0800 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2012-08-08 15:40:56 +0800 |
commit | 937ba2a3eb42d288f53c8adc211bd1122869f0bf (patch) | |
tree | 64a9bd19a52e9f5ae4890b850e1034bb03abcd4d | |
parent | 1d62941e10c7419bf2341dbbb17d2ba6a73ed4ae (diff) | |
download | libxslt-937ba2a3eb42d288f53c8adc211bd1122869f0bf.tar.gz libxslt-937ba2a3eb42d288f53c8adc211bd1122869f0bf.tar.bz2 libxslt-937ba2a3eb42d288f53c8adc211bd1122869f0bf.zip |
Fix default template processing on namespace nodes
-rw-r--r-- | libxslt/transform.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libxslt/transform.c b/libxslt/transform.c index 53eefcc3..c6df19ef 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, |