summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam M. Brack <wbrack@src.gnome.org>2003-08-14 15:16:41 +0000
committerWilliam M. Brack <wbrack@src.gnome.org>2003-08-14 15:16:41 +0000
commite5b3ed6f720c9db69cf66b7cf9a224f0eb6f0363 (patch)
tree6c8fc35836786a2b9c2306db7e0aaf1caf0861dc
parent5580b2bce15da78e52ac5032160d37ecd6f9ffcb (diff)
downloadlibxslt-e5b3ed6f720c9db69cf66b7cf9a224f0eb6f0363.tar.gz
libxslt-e5b3ed6f720c9db69cf66b7cf9a224f0eb6f0363.tar.bz2
libxslt-e5b3ed6f720c9db69cf66b7cf9a224f0eb6f0363.zip
fixed bug 114563 (params not passed when default template processed)
* transform.c: fixed bug 114563 (params not passed when default template processed)
-rw-r--r--ChangeLog7
-rw-r--r--libxslt/transform.c16
2 files changed, 15 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 2d6d7b24..9edaac8b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
-Thu Aug 14 10:04:37 HKT 2003 William Brack <wbrack@mmm.com.hk>
+Thu Aug 14 23:15:14 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * transform.c: fixed bug 114563 (params not passed when
+ default template processed)
+
+Thu Aug 14 22:04:37 HKT 2003 William Brack <wbrack@mmm.com.hk>
* xslt.c: fixed bug 119862 (missing param on ns error print)
diff --git a/libxslt/transform.c b/libxslt/transform.c
index 3e3a7a62..59c9449f 100644
--- a/libxslt/transform.c
+++ b/libxslt/transform.c
@@ -1038,6 +1038,7 @@ void xsltProcessOneNode(xsltTransformContextPtr ctxt, xmlNodePtr node,
* xsltDefaultProcessOneNode:
* @ctxt: a XSLT process context
* @node: the node in the source tree.
+ * @params: extra parameters passed to the template if any
*
* Process the source node with the default built-in template rule:
* <xsl:template match="*|/">
@@ -1056,7 +1057,8 @@ void xsltProcessOneNode(xsltTransformContextPtr ctxt, xmlNodePtr node,
* for namespace nodes.
*/
static void
-xsltDefaultProcessOneNode(xsltTransformContextPtr ctxt, xmlNodePtr node) {
+xsltDefaultProcessOneNode(xsltTransformContextPtr ctxt, xmlNodePtr node,
+ xsltStackElemPtr params) {
xmlNodePtr copy;
xmlAttrPtr attrs;
xmlNodePtr delete = NULL, cur;
@@ -1190,7 +1192,7 @@ xsltDefaultProcessOneNode(xsltTransformContextPtr ctxt, xmlNodePtr node) {
template = xsltGetTemplate(ctxt, (xmlNodePtr) attrs, NULL);
if (template) {
xsltApplyOneTemplate(ctxt, (xmlNodePtr) attrs,
- template->content, template, NULL);
+ template->content, template, params);
}
attrs = attrs->next;
}
@@ -1206,7 +1208,7 @@ xsltDefaultProcessOneNode(xsltTransformContextPtr ctxt, xmlNodePtr node) {
case XML_ELEMENT_NODE:
ctxt->xpathCtxt->contextSize = nbchild;
ctxt->xpathCtxt->proximityPosition = childno;
- xsltProcessOneNode(ctxt, cur, NULL);
+ xsltProcessOneNode(ctxt, cur, params);
break;
case XML_CDATA_SECTION_NODE:
template = xsltGetTemplate(ctxt, cur, NULL);
@@ -1217,7 +1219,7 @@ xsltDefaultProcessOneNode(xsltTransformContextPtr ctxt, xmlNodePtr node) {
cur->content);
#endif
xsltApplyOneTemplate(ctxt, cur, template->content,
- template, NULL);
+ template, params);
} else /* if (ctxt->mode == NULL) */ {
#ifdef WITH_XSLT_DEBUG_PROCESS
xsltGenericDebug(xsltGenericDebugContext,
@@ -1242,7 +1244,7 @@ xsltDefaultProcessOneNode(xsltTransformContextPtr ctxt, xmlNodePtr node) {
ctxt->xpathCtxt->contextSize = nbchild;
ctxt->xpathCtxt->proximityPosition = childno;
xsltApplyOneTemplate(ctxt, cur, template->content,
- template, NULL);
+ template, params);
} else /* if (ctxt->mode == NULL) */ {
#ifdef WITH_XSLT_DEBUG_PROCESS
if (cur->content == NULL)
@@ -1276,7 +1278,7 @@ xsltDefaultProcessOneNode(xsltTransformContextPtr ctxt, xmlNodePtr node) {
ctxt->xpathCtxt->contextSize = nbchild;
ctxt->xpathCtxt->proximityPosition = childno;
xsltApplyOneTemplate(ctxt, cur, template->content,
- template, NULL);
+ template, params);
}
break;
default:
@@ -1324,7 +1326,7 @@ xsltProcessOneNode(xsltTransformContextPtr ctxt, xmlNodePtr node,
#endif
oldNode = ctxt->node;
ctxt->node = node;
- xsltDefaultProcessOneNode(ctxt, node);
+ xsltDefaultProcessOneNode(ctxt, node, params);
ctxt->node = oldNode;
return;
}