This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
xpath expression - select first node from last parent
- From: "Andrew Welch" <andrew at thebristoldirectory dot com>
- To: "XSL-List (E-mail)" <XSL-List at lists dot mulberrytech dot com>
- Date: Tue, 29 Jan 2002 11:30:37 -0000
- Subject: [xsl] xpath expression - select first node from last parent
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi,
I would like an generic Xpath expression that will match the first child of
a parent that is positionally last.
For example, using this highly descriptive piece of ascii art:
a---a---a---a---a
|
b---b---b---b
^
All 'b' elements are children of the last 'a' element. I want to be able to
recognise when Im at the first b of the last 'a'.
Something like:
*[position()=1]
and
parent::*[postion()=last()]
combined.
cheers
andrew
===
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list