[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
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
|