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

Re: Variables...

Subject: Re: Variables...
From: Steve Tinney <stinney@xxxxxxxxxxxxx>
Date: Thu, 24 Feb 2000 19:10:02 -0500
variable shadow in c
> I have got a global variable in XSL (declared at the begginning), how do I
> set it's value later on in the stylesheet.  If I use

You don't.  You can't.  Unless you use an XSL processor with an evil
extension like saxon:assign.

> <xsl:variable...></xsl:variable> then doesn't that just create a new local
> variable, instead of using the global one?

Yes, exactly.  A local variable may shadow a global one in XSL, but it
may not shadow another local one within the same template.

My experience is that if one is trying to solve a problem with
assignment, one is probably not thinking at the problem in the XSL way. 
I am not 100% convinced, though, that there are no problems out there
which really do need (at least in practical terms) assignment.

Perhaps if you illustrate the problem you're trying to solve someone can
suggest a more XSL-ish approach?

 Steve


 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.