xsl-list
[Top] [All Lists]

Re: Recursion (I think)

2005-09-26 04:35:29
On 26/09/2005, at 8:59 PM, David Carlisle wrote:



How do you do that if you don't know how far back up the tree they are?


ancestor-or-self::*[(_at_)id][1]/@id

selects the nearest id attribute.

Ok, thanks. Does that mean it finds the nearest id attribute for any node? Can I specify that it's the id attribute from the nearest "ObjectType" node?

Would that be

ancestor-or-self::*[ObjectType][1]/@id

What purpose does the [1] serve?

Thanks again,
Nick


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