[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: call-template with-param problem.

Subject: Re: call-template with-param problem.
From: "Steve Muench" <Steve.Muench@xxxxxxxxxx>
Date: Sat, 25 Aug 2001 13:19:25 -0700
call template with param
| 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.