[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Child Node Attribute


Subject: RE: [xsl] Child Node Attribute
From: "Martinez, Brian" <brian.martinez@xxxxxxxx>
Date: Tue, 11 Feb 2003 09:05:06 -0700

> From: neelkamal.shaikh@xxxxxxxxxxxxxx
> [mailto:neelkamal.shaikh@xxxxxxxxxxxxxx]
> Sent: Tuesday, February 11, 2003 8:41 AM
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] Child Node Attribute
>
> I need to get handle of the child nodes attribute i.e. value 
> of "b" = box
> in the below xml.
> 
> Say
> <abc a="apple">
>       <child b="box">
>       </child>
> </abc>

Assuming you want the value when the attribute 'a' of <abc> is equal to
'apple':

<xsl:value-of select="abc[@a='apple']/child/@b"/>

cheers,
b.

| brian martinez                              brian.martinez@xxxxxxxx |
| senior gui programmer                                  303.708.7248 |
| trip network, inc.                                 fax 303.790.9350 |
| 6436 s. racine cir.                             englewood, co 80111 |
| http://www.cheaptickets.com/                   http://www.trip.com/ |


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread