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

Re: unefficiate xpaths

Subject: Re: unefficiate xpaths
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 9 Jun 2003 23:00:09 +0100
Re:  unefficiate xpaths
// is always expensive, especially using // inside a predicate.
Unless your XSLT engine is optimising things greatly it means to search
_every_ node in teh tree, and tehn while testing each node to search
_every_ node again, so it will grow as the square of the number of nodes
in the input tree.

<xsl:for-each select="//clients/client[count(commissions/commission[earnerId
= //earners/earner[type = $rptType]/id]) = 0 and <website=$prodClass)]">

I assume the < before website is a typo.
probably you want to use keys here and get rid of both // (and you can
always replace count(foo)=0 in a test by foo, there is no need to select
them all, count them, and then test if that is 0, you just want to test
if there are any.

I don't think I can quite guess the required key structure from the
amount of infor you posted, but someone may, and if not looking at the
faq and jeni's pages on keys may help...

David

 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.