Re: [xsl] Finding deepest node

Subject: Re: [xsl] Finding deepest node
From: marcus <m-lists@xxxxxxxxxx>
Date: Fri, 02 Dec 2005 22:01:07 +0100
Michael Kay wrote:
The subject says "deepest" rather than "farthest", so I suspect the meaning
is the node with maximum depth.

Okay. I really meant "deepest". Didn't think about there being a difference.


Since I don't execute this in the context of an XSLT (should have told you) but with a DOM (dom4j) most of the answers don't apply.

$start//node[@a = 'avalue']/@id
  [not(count(ancestor::*) lt $start//node[@a =

I'll try this one. I think I can bind a node to a variable using Jaxen.

Btw, do you have any idea how dom4j/jaxen would compare to using [some other DOM (XOM maybe)]/Saxon XQuery performance wise? It's in a context where I will be doing the same query over and over against a non-changing (possibly big) document. Is it possible to "compile" a query with Saxon against a document or can you just compile the expression (as you can with Jaxen)? Do I make myself even remotely understandable?



Current Thread