xsl-list
[Top] [All Lists]

Re: [xsl] Param value not getting value passed

2011-01-30 16:12:39
On 30/01/2011 22:05, Karl Stubsjoen wrote:
I'm perplexed.  I have a template match routine and param value that
is not receiving the param value passed.  I am passing the param value
like this:

<xsl:with-param name="group-value" select="number(16)"/>


you could miss out the number()   (16 s already a number)


The param is defined in the template match like this:
<xsl:param name="group-value">0</xsl:param>

better to use select="0" (but that is not the cause of the problem)

The value is always:
type:ABC
value: "0"
(According to Oxygen)


so the working assumption must be that the parameter is not being passed down, typically this is caused by having

<foo>
    <a>
       <b>


and the template matching foo saying

<xsl:apply-templates>
   <xsl:with-param name="x" select="16"/>
</

and the template for b having
<xsl:param name="x"/>

the solution is to make a pass on teh param with

<xsl:with-param name="x" select="$x"/>

or (in xslt 2) declaring the parameter to be tunnel="yes" when this passing through intermediate templates is automatic.

David



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>