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 using? 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: webb.net in Denver, Colorado, USA http://www.skew.org/xml/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
XSL variable..., Philippe D'Hont | Thread | Re: XSL variable..., Philippe D'Hont |
Re: Variables and inherited attribu, Jeni Tennison | Date | Re: How is this part of the XSLT sp, Mike Brown |
Month |