[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Finding deepest node
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[@a = 'avalue']/@id [not(count(ancestor::*) lt $start//node[@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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|