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

problem passing parameters to template

Subject: problem passing parameters to template
From: James Williams - Sun East Coast IR Development <James.Williams@xxxxxxxxxxxx>
Date: Thu, 26 Aug 1999 18:42:13 -0400 (EDT)
xsl set param
I'm using XT Version 19990822, and
I'm trying to pass a parameter to a template using
er to a template using
<xsl:set-param>, but it isn't working. The template is
always using the default value for the parameter.

Here is a sample stylesheet:

<xsl:stylesheet	xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">
<xsl:output method="text"/>

<xsl:template match="test">
	<xsl:call-template name="letter">
		<xsl:set-param name="format">A</xsl:set-param>
	<xsl:call-template name="letter">
		<xsl:set-param name="format">B</xsl:set-param>

<xsl:template name="letter">
	<xsl:param name="format">Z</xsl:param>
	value of format = <xsl:value-of select="$format"/>


with the following XML source:

   <animal name="horse"/>
   <animal name="dog"/>
   <animal name="cat"/>
   <animal name="mouse"/>

I get the output:

        value of format = Z
        value of format = Z
Is this an XT bug or am I doing something wrong?
I expected to see

        value of format = A
        value of format = B

Jim Williams

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
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.