Re: XSL variable...

Subject: Re: XSL variable...
From: Mike Brown <mike@xxxxxxxx>
Date: Wed, 21 Jun 2000 10:00:45 -0600 (MDT)
> in one template I wrote
> 	<xsl:variable name="wasLeft" select="'0'"/>
> In other one
> 	<xsl:variable name="wasLeft" select="'1'"/>
> And further to test, with something like this :
> 	<xsl:when test="$wasLeft='1'">
> 		<!-- Doing something here -->
> 	</xsl:when>
> 		If anyone had a suggestion. Any help welcome.

You didn't say what the problem was! Also, what XSL processor are you

I can tell you that variables have scope only from where they are declared
and "below" in the tree. If you declare a variable in a template, it only
has scope in that template, from the place where it was declared on down,
but not outside of the element that contains the <xsl:variable .../>.

I can also say that xsl:when must be contained within an xsl:choose.

   - Mike
Mike J. Brown, software engineer at         My XML/XSL resources: in Denver, Colorado, USA 

 XSL-List info and archive:

Current Thread