Subject: RE: 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: 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
|