xsl-list
[Top] [All Lists]

Re: XPath expression for finding out the depth of a given node?

2002-11-17 13:17:35


Is there a XPath expression for finding out the depth of a given node (or
just the context node) in the document?

count(ancestor::*)

maybe + 1 depending on how you want to count.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



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