This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Seeking XPATH
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: Re: [xsl] Seeking XPATH
- From: "Derek Ngok" <derek dot ngok at objectvalley dot com>
- Date: Tue, 6 Mar 2001 10:57:34 +0800
- Organization: Object Valley (Asia Pacific) Ltd.
- References: <005b01c0a59f$3442ccb0$433c8dcc@8g69901>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi,
Try to append "/.." at the end, e.g. A/B[@NM = "case3"]/..
Derek
----- Original Message -----
From: "Paul" <pbell@syncsort.com>
To: <XSL-List@lists.mulberrytech.com>
Sent: Tuesday, March 06, 2001 2:07 AM
Subject: [xsl] Seeking XPATH
> Hi All,
>
> Suppose an XML DOM containing something like
>
> <ROOT>
>
> <A>
> <B NM="case1">abc</B>
> <B NM="case2">xyz</B>
> ---
> </A>
>
> <A>
> <B NM="case3">abc</B>
> <B NM="case4">def</B>
> ----
> </A>
>
> <A>
> <B NM="case5">lmn</B>
> <B NM="case6">qrs</B>
> ----
> </A>
>
> </ROOT>
>
> Can someone propose an XPATH expression that will find 'A' nodes that have
> 'B' nodes with matching attribute values? In the above data data, such an
> expression would match the first two A nodes because in first A - A/B[@NM
=
> "case1"] has the same node value as the second A's A/B[@NM = "case3"].
Each
> has the value 'abc'.
>
> Thanks for your help.
>
> Cordially,
>
> Paul
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list