|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Get value from $Variable
XSL-List wrote:
Hi,
BTW, the name XSL-List, I thought that was Tommie writing...
> <xsl:value-of select="$Language/Weekdays/Weekday[@Wd_Id = @Id]"/>
> I get the same day of the week (1) with this query. Is it
> possible to get it some other way without the Variable?
That's because '[' changes the current item. So [@Wd_Id = @Id] accesses two
attributes, named Wd_Id and Id, from the same node. There are two solutions:
using a variable, or using current(). current() returns the context node at
the beginning of the XPath expression (right before evaluating $Language in
your example):
$Language/Weekdays/Weekday[@Wd_Id = current()/@Id]
Regards,
--
Florent Georges
http://www.fgeorges.org/
|
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








