xsl-list
[Top] [All Lists]

Re: Getting the first preceding-sibling with a specific child element

2005-01-26 05:28:21
Thank you, David

   preceding-sibling::x[title][1]

This will select the first x element (counting backwards) that has a title. (so will return at most 1 node)

Don't know why, but I thought that this one would return the first one in document order, but I guess that would have been (preceding-sibling::x[title])[1]

Regards,
Ragulf Pickaxe :-)

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>