Subject: Re: [xsl] call-template with-param problem. From: "Steve Muench" <Steve.Muench@xxxxxxxxxx> Date: Sat, 25 Aug 2001 13:19:25 -0700 |
| 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] call-template with-param prob, Phillip Rhodes | Thread | Re: [xsl] call-template with-param , Steven Noels |
RE: [xsl] call-template with-param , Sullivan, Dan | Date | Re: [xsl] call-template with-param , Steven Noels |
Month |