This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: : Finding the deepest node(s)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]