[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Finding deepest node

Subject: Re: Finding deepest node
From: marcus <m-lists@xxxxxxxxxx>
Date: Fri, 02 Dec 2005 22:01:07 +0100
dom4j count nodes
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.