xsl-list
[Top] [All Lists]

Re: Is it possible to know position of ancestor?

2002-10-17 11:53:00

We are in tag "b",
note that xslt works on elements (element nodes) not tags, and importat
distinction. 

 We want to find out what is position of our ancestor 
in their ancestor.

I think you mean parent rather than ancestor:

 select="count(../preceding-sibing::* + 1)"


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