[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] xsL:with-param, xsl:-param emptiness, Xalan and xsltproc


Subject: RE: [xsl] xsL:with-param, xsl:-param emptiness, Xalan and xsltproc
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 23 Mar 2006 15:24:11 -0000

> I've tried both xalan (2.7.0) and xsltproc (compiled against libxml 
> 20623, libxslt 10115 and libexslt 812) and can't get xsl:with-param 
> calls to show up in my xsl:param arguments to templates.

Without studying your code in any detail, the most common cause of this
problem is as follows:

Rule A does apply-templates with-param P=5

Rule B gets invoked, but P is not set

cause: A's apply-templates selected a node N for which there is no explicit
template rule. The built-in template rule for N got invoked, and this did
another apply-templates which selected a node that matched rule B. The
built-in template rule (in XSLT 1.0) does *not* pass parameters on, so B is
called with no supplied parameter value for P. (This changes in 2.0)

Michael Kay
http://www.saxonica.com/


Current Thread
Keywords