Altova Mailing List Archives

Re: [xsl] change the variable value

From: Gavin Corfield <gavin@------------------>
Date: 6/14/2001 9:22:00 PM
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" />

if you are wanting to mimic  a loop put a conditional branch before the


>  XSL-List info and archive:

 XSL-List info and archive:


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.