This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: call-template with-param problem.


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@telerama.com]
Sent: Saturday, August 25, 2001 3:56 PM
To: XSL-List@lists.mulberrytech.com
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]