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

Re: following-sibling is evil

Subject: Re: following-sibling is evil
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 6 Jul 2014 19:39:54 -0000
Re:  following-sibling is evil
Michael Kay
+44 (0118) 946 5893

On 6 Jul 2014, at 20:01, Dimitre Novatchev dnovatchev@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

>> <xsl:if test="following-sibling::Book[Title eq $currentAuthor][Genre eq
> Why not the obviously more-efficient -- especially for a naive
> processor that you describe -- code:
>    following-sibling::Book[Title eq $currentAuthor and Genre eq
> $currentGenre][1]

I can't see why that's obviously more efficient. They look identical to me.
> or probably even better (as a hint to the optimizer):
>    exists(head(following-sibling::Book[Title eq $currentAuthor and
> Genre eq $currentGenre]))

Again, it's still quadratic performance if your evaluate this for every Book.

Michael Kay

Current Thread


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.
First Name
Last Name
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.