[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Template Parameter Q

Subject: Template Parameter Q
From: "XSLList" <xsllist@xxxxxxxxxxxxx>
Date: Fri, 28 Feb 2003 16:00:10 -0500
template of q
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,

Jeff

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

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"/>
                </OPTION>
        </xsl:for-each>
        </SELECT>
</xsl:template>


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.