|
Subject: RE: [xsl] call-template with-param problem. From: "Sullivan, Dan" <dsullivan@xxxxxxxxxxx> Date: Sat, 25 Aug 2001 13:14:08 -0700 |
You need to add the param to your template, then access the param with a
value-of. For example:
<xsl:template name="header">
<xsl:param name="title"/>
<h2><xsl:value-of select="$title"/></h2>
</xsl:template>
<xsl:call-template name="header">
<xsl:with-param
name="title">
This is a test
</xsl:with-param>
</xsl:call-template>
Dan
-----Original Message-----
From: Phillip Rhodes [mailto:rhodespc@xxxxxxxxxxxx]
Sent: Saturday, August 25, 2001 3:56 PM
To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] call-template with-param problem.
I have a named template, that I invoke with a parameter. However, my
result always contains the literal "{$title}".
Thanks very much.
Phillip
<xsl:template name="header">
<h2>{$title}</h2>
</xsl:template>
<xsl:call-template name="header">
<xsl:with-param
name="title">
This is a test
</xsl:with-param>
</xsl:call-template>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] call-template with-param , Steven Noels | Thread | [xsl] Exclusive formatting.., J.Brown (Ender/Amigo |
| [xsl] call-template with-param prob, Phillip Rhodes | Date | Re: [xsl] call-template with-param , Steve Muench |
| Month |