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

Re: Change the value of global variables/params ??

Subject: Re: Change the value of global variables/params ??
From: Paul Levin <plevin@xxxxxxx>
Date: Tue, 07 Dec 1999 14:59:49 -0500
changing global variable in xsl
The first (changing the value of a global variable) can not be done.

The second works fine (changing the value of a local variable).

<xsl:template name="sub">
    <xsl:variable name="foo" select="'abc'"/>
    <xsl:value-of select="$foo"/>
    <xsl:variable name="foo" select="'def'"/>
    <xsl:value-of select="$foo"/>
</xsl:template>

Calling this template will output  --   abcdef

Note that replacing   xsl:variable   with   xsl:param   will produce the
same result.

    Paul

David Carlisle wrote:

> > LotusXsl does allow a local variable (a variable inside of a template)
> > to have it's value changed.  A "feature" I depend on.
>
> do you mean that the local variable in the template can have a value
> different from the value of a global variable of the same name, or do
> you mean that in the same template you can set it and then change the
> value. The first is allowed, the second is not. (What could be the
> syntax for that anyway?)
>
> David
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 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.