[xsl] Template Parameter Q

Subject: [xsl] Template Parameter Q
From: "XSLList" <xsllist@xxxxxxxxxxxxx>
Date: Fri, 28 Feb 2003 16:00:10 -0500
Hello all,

I attempted to create an abstract template that I would pass a parameter (an
attribute name) to be used within the template.  I'm either trying to do
something not permitted, or have botched the syntax.  I hope someone can
point out my error(s).  I believe that the expression is being evaluated at
the time of the call, and being passed as an empty string (it's not present
in context at time of call.)  Is there a way to do what I'm attempting?

Thanks for any help,


The call...
<xsl:call-template name="make_list">
 <xsl:with-param name="att" select="@mfg_name"/>

Within the template...
<xsl:template name="make_list">
        <xsl:param name="att"/>

        <SELECT id="mfg_list">
        <xsl:for-each select="//wheel[count(. | key('wheels-by-mfg',
@mfg_name)[1]) = 1]">
-->             <OPTION value="{$att}">
-->             <xsl:value-of select="$att"/>

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread