This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: : Finding the deepest node(s)
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Tue, 18 Jun 2002 14:11:00 +0100
- Subject: RE: [xsl]: Finding the deepest node(s)
- Reply-to: xsl-list at lists dot mulberrytech dot com
> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com] On Behalf Of
> TSchutzerWeissmann@uk.imshealth.com
> Sent: 18 June 2002 11:56
> To: xsl-list@lists.mulberrytech.com
> 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@ntlworld.com
work: Michael.Kay@softwareag.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list