xsl-list
[Top] [All Lists]

Re: [xsl] Multiple elements condition

2007-08-31 02:11:44
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 


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--