This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: change the variable value
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] change the variable value
- From: Gavin Corfield <gavin at twobluedots dot com dot au>
- Date: Fri, 15 Jun 2001 13:22:35 +0800
- Organization: two blue dots
- References: <711677989624D411B81E00300501625539E334@eccolcom01.colombo.eurocenter.lk>
- Reply-To: xsl-list at lists dot mulberrytech dot com
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