|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How to assign a value and reuse a global variable
On Monday 11 February 2002 18:51, Khalid wrote:
>. . .
> now in my temlates at run time I want to assign this variable a value
> <xsl:variable name = "$monday" select = "'Monday'"/>
>. . .
Your problem is that XSLT variables are not modifiable - coming from a
java/C++ background we'd have called them constants instead.
There is an excellent discussion of this ("programming without
assignement statements") in Mike Kay's book "XSLT programmer's
reference".
In your case, you might want to use <xsl:with-param> instead to call a
template with "Monday" as the parameter value.
--
-- Bertrand Delacrétaz, www.codeconsult.ch
-- web technologies consultant - OO, Java, XML, C++
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
|

Cart








