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

Re: Select parent node

Subject: Re: Select parent node
From: "Vasu Chakkera" <vasucv@xxxxxxxxxxx>
Date: Mon, 26 Jul 2004 14:14:55 +0100
xsl select parent
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.
>
****************************************************************************
*********************

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.