Re: [xsl] Multiple elements condition

Subject: Re: [xsl] Multiple elements condition
From: Florent Georges <lists@xxxxxxxxxxxx>
Date: Fri, 31 Aug 2007 11:11:42 +0200 (CEST)
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