| Subject: Re: [xsl] How to find the deepest node? From: David Carlisle <davidc@xxxxxxxxx> Date: Thu, 7 Apr 2005 17:07:28 +0100 | 
This is a grouping problem (where you only want one group)
<xsl:key name="t" select="title" use="count(ancestor::*)"/>
...
<xsl:for-each select="//title">
<xsl:sort data-type="number" select="count(ancestor::*)">
<xsl:if test="position()=last()">
<xsl:apply-templates select="key('t',count(ancestor::*))"/>
</xsl:if>
</xsl:for-each>
David
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| RE: [xsl] How to find the deepest n, Michael Kay | Thread | Re: [xsl] How to find the deepest n, Dimitre Novatchev | 
| RE: [xsl] How to find the deepest n, Michael Kay | Date | RE: [xsl] How to test if a value it, Jaime Stuardo | 
| Month |