This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: variable
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] variable
- From: James Melton <james dot melton at cylogix dot com>
- Date: Wed, 01 Aug 2001 17:00:46 -0400
- References: <sb683332.078@smtp.liscnet.org>
- Reply-To: xsl-list at lists dot mulberrytech dot com
No, variables are immutable. You can try a recursive style where a
parameter is recalculated as you recurse. Or if its a matter of
end-cases as your example implies you can call a template with a
parameter whose value is conditionally specified.
Jim.
Eric Schenfeld wrote:
>
> is there a way to change the value of a parameter or a variable after it's been declared? like with an if statement?
>
> CODE:
>
> <xsl:param name="color">123456</xsl:param>
> <xsl:if test="ancestor::top_bar">
> <xsl:param name="color">ffffff</xsl:param>
> </xsl:if>
> <xsl:if test="ancestor::bottom_bar">
> <xsl:param name="color">000000</xsl:param>
> </xsl:if>
>
> It doesn't seem to work with variables or parameters. is there some other way?
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
--
____________________________________________________________
James Melton CyLogix
609.750.5190 609.750.5100
james.melton@cylogix.com www.cylogix.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list