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