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

Re: Passing XSL variable to Javascript!

Subject: Re: Passing XSL variable to Javascript!
From: "Michael Beddow" <mbnospam@xxxxxxxxxxx>
Date: Fri, 10 Aug 2001 07:32:19 +0100
passing xsl variables to javascript
On Friday, August 10, 2001 2:28 AM
Syed Abuthaheer wrote:

> thanks a lot. it's working fine.
> regards,
> syed.
> ----- Original Message -----
> From: "Rosa I-Ting Cheng" <Rosa@xxxxxxxxxxxxx>
> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
> Sent: Friday, August 10, 2001 9:19 AM
> Subject: RE:  Passing XSL variable to Javascript!
>
>
> > I haven't tested it, but try putting in braces {$temp} instead of
just
> > $temp.
> >

In case you're wondering why it works, the braces tell the XSLT
processor to evaluate the variable $temp before building the rest of the
attribute value that you're putting into the output tree. Otherwise, as
you found, it treats $temp as a literal string and passes it through.

The bad news is that such Attribute Value Templates aren't quite the
magic spell for forcing evaluation of variables that people sometimes
think when they first discover them. They are indeed intended for the
specific task of building the values of attributes, and the processor is
obliged to be very picky about their use in any other context. See the
list archives for related tales of woe.

Michael
---------------------------------------------------------
Michael Beddow   http://www.mbeddow.net/
XML and the Humanities page:  http://xml.lexilog.org.uk/
---------------------------------------------------------


 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.