[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSL variable...

Subject: Re: XSL variable...
From: Mike Brown <mike@xxxxxxxx>
Date: Wed, 21 Jun 2000 10:00:45 -0600 (MDT)
philippe d hont
> 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.