RE: [xsl]: Finding the deepest node(s)

Subject: RE: [xsl]: Finding the deepest node(s)
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Tue, 18 Jun 2002 14:11:00 +0100
> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> TSchutzerWeissmann@xxxxxxxxxxxxxxxx
> Sent: 18 June 2002 11:56
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl]: Finding the deepest node(s)
> 
> 
> Is there an XPath to find the deepest node(s) in some xml, ie 
> the node(s) with more parents than any others?

Not in a single XPath expression, because existential quantification is
only available when comparing nodes according to their string-value.

Try the higher-order Saxon extension functions:

saxon:highest(//node(), saxon:expr('count(ancestor::*)')

or check Dimitre's dynamic templates.

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 


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


Current Thread