This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: change the variable value


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]