|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Select parent node
you could do this is in a couple of ways..
do
select="icon[icon_nr = 2]/@id"
select="icon[icon_nr = 2]/icon_title"
or
Define a key..and use it..
like
<xsl:key match = "/icon" name = "icons" use = "icon_nr"/>
as a child of the xsl:stylesheet
and then in your template,
use
select="key('icons',1)/@id"
select="key('icons',2)/icon_title"
Vasu
----- Original Message -----
From: "Bart Claeys" <Bart.Claeys@xxxxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Monday, July 26, 2004 9:58 AM
Subject: Select parent node
> Hi there!
>
> I've got this, (probably simple) question selecting only one specific
node. Consider the following XML structure, how can I
> retrieve the values of the node where icon_nr = 2. I want to retrieve the
icon's ID and the icon_title.
>
> <icon id="2343">
> <icon_nr>1</icon_nr>
> <icon_title>Yesterday</icon_title>
> </icon>
> <icon id="3432">
> <icon_nr>2</icon_nr>
> <icon_title>Today</icon_title>
> </icon>
> <icon id="1023">
> <icon_nr>3</icon_nr>
> <icon_title>Tomorrow</icon_title>
> </icon>
>
>
> Thanks a lot!
> Grtz, Bart
>
****************************************************************************
*********************
> The contents of this email and any attachments are confidential.
> It is intended for the named recipient(s) only.
> If you have received this email in error please notify the system manager
or
> the sender immediately.
> Do not disclose the contents to anyone nor make copies of this mail.
>
****************************************************************************
*********************
|
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








