xsl-list
[Top] [All Lists]

Re: [xsl] First ancestor with a specific attribute

2011-07-01 07:18:12
That does the trick, thanks Martin!


XSLT 2.0:
 select="ancestor::*[exists(@name)][1]/@name"

Desired effect: return the first ancestor that has a 'name' element.



       Martin Honnen --- MVP Data Platform Development
       http://msmvps.com/blogs/martin_honnen/


--~------------------------------------------------------------------
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>