[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSL variable...
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|