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, 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] adding additional elements to, Challa, Harsha | Thread | Re: [xsl] Template Parameter Q, David Carlisle |
Re: [xsl] Stylesheet to remove comm, Scott Moore | Date | Re: [xsl] Stylesheet to remove comm, Mike Brown |
Month |