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

Re: Multiple elements condition

Subject: Re: Multiple elements condition
From: Florent Georges <lists@xxxxxxxxxxxx>
Date: Fri, 31 Aug 2007 11:11:42 +0200 (CEST)
Re:  Multiple elements condition
David Carlisle wrote:

  Hi

> > exists(para[2]) and not(exists(para[3]))
> > or
> > exists(para[2]) and empty(para[3])

> they both always look for the 2nd and 3rd element but you
> don't need t0 look for the 3rd if the 2nd isn't there....

  I am not sure what you mean by /always/.  I expect my
processor to use short-cut boolean connectors.  And if I
understand correctly net.sf.saxon.expr.BooleanExpression,
Saxon does so.

  On the other hand, it seems (if I understand correctly the
code) that the optimizer will rewrite:

    xxx and my:user-function(yyy)

into:

    if (xxx) then my:user-function(yyy) else false()

  I don't understand why this rewrite is intended to, except
for optimization, but if we have short-cut evaluation yet I
don't see the point here...

  I should have missed something.

  Regards,

--drkm
























      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 

Current Thread

Back To School Sale!

Save 30% off all Stylus Studio 2008 Products when you purchase from our Online Shop.

Offer ends August 31, 2008.

Coupon Code
TRTY-C4JV-OFF

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-2007 All Rights Reserved.