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.
See http://www.dpawson.co.uk/xsl/sect2/N2193.html#d3377e91
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[(_at_)a = 'avalue']/@id
[not(count(ancestor::*) lt $start//node[(_at_)a =
'avalue']/@id/count(ancestor::*))]
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?
Thanks
/Marcus
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--