|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: call-template with-param problem.
| I have a named template, that I invoke with a parameter. However, my
| result always contains the literal "{$title}".
|
| <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>
You need to tweak these two examples to look like this:
<xsl:template name="header">
<!-- declare the parameter inside the template -->
<xsl:param name="title"/>
<!-- Use xsl:value-of since {} Attr Value Templates are only
allowed in attribute values, not element content -->
<h2><xsl:value-of select="$title"/></h2>
</xsl:template>
_____________________________________________________________________
Steve Muench - Developer, Product Manager, XML Evangelist, Author
"Building Oracle XML Applications" - www.oreilly.com/catalog/orxmlapp
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
|

Cart








