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

Re: variable attribute value

Subject: Re: variable attribute value
From: Mansour <mansour77@xxxxxxxxx>
Date: Sat, 29 Mar 2008 18:45:22 -0300
Re:  variable attribute value
Yes, it did help.
Thank you so much.


G. Ken Holman wrote:
At 2008-03-29 17:55 -0300, Mansour wrote:
Is there a way to set the value of the attribute fro ma variable ?

for example:

<xsl:variable name="var"   select="@name" />
<xsl:apply-template select="someTag[@attr='$var'] />

I am trying it and it's not working. When I remove the variable $var and specify a value, it works fine.
I tried using {$var}. Nothing worked.


Any ideas ?

You have quotes around your variable reference, which makes it a string and not a variable reference.


Try: someTag[@attr=$var]

I hope this helps.

. . . . . . . . . . Ken


-- Upcoming: UBL Apr.22,24; genericode code lists Apr.23; Rome,Italy World-wide corporate, govt. & user group XML, XSL and UBL training RSS feeds: publicly-available developer resources and training G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal

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.