[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Template Parameter 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|