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

RE: xpath // query

Subject: RE: xpath // query
From: "Aleksander Dye" <aleksander@xxxxxxxxxxxxxx>
Date: Wed, 24 Apr 2002 14:26:50 +0200
c xpath query
select="A//C"

Gets every C under the path of an A, this is the slowest and will get every
C
any different to:

select="A//B//C"
Gets every C under the path of any B that is under the path of an A, this is
the fastest and will get every C under any B that is under an A

-Aleksander

-----------
Hi list,

If I know that the element I am looking for will have a two certain
ancestors, but an unknown number of elements in between, can I improve the
xpath to reach the element by including the middle element?

For example, is:

select="A//C"

any different to:

select="A//B//C"

when I know that <B> is *guranteed* to be there (both select the same
nodes).  By adding the test for <B>, will it make the selection any faster?

After thinking for a while, Im guessing it makes no difference to the
selection time as the same number of nodes still need to be traversed.
Theoretically, it may be slower as it involves an extra test.  Is this
correct?  (or too insignificant to worry about)...

cheers
andrew













---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.350 / Virus Database: 196 - Release Date: 17/04/2002



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.