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

Re: change the variable value

Subject: Re: change the variable value
From: Gavin Corfield <gavin@xxxxxxxxxxxxxxxxxx>
Date: Fri, 15 Jun 2001 13:22:35 +0800
change of variable
Jayaranga Subasinghe wrote:
> 
> i want to change the variable value during the processing of xsl; when
> different templates processing.
> can anybody give me a solution?

You can't, once the value of a variable is declared in a specific scope
it is fixed, depending on what you want to do, you can use a recursive
call to the same template:

<xsl:template name="whatever">
	<xsl:with-param name="variable" />
	do some stuff which may use $variable
	<xsl:call-template name="whatever">
		<xsl:with-param name="variable">
			<xsl:value-of select="whatever it has changed to" />
		</xsl:with-param>
	</xsl:call-template>
</xsl:template>

if you are wanting to mimic  a loop put a conditional branch before the
call-template.  

gavin

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

 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.