[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Side-effect and PROGN, example JDBC in XSLT


Subject: RE: [xsl] Side-effect and PROGN, example JDBC in XSLT
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Fri, 20 Jun 2003 12:06:33 +0100

> 
> Hi, on the issue of side-effects, I rediscovered the PROGN 
> form that we know from LISP as the thing that's needed in 
> order to handle inevitable side-effects in non-trivial XSLT 
> applicaitons.

Yes: at some stage I think it may become necessary to introduce a
construct that requires sequential execution, but for the moment, you
can usually get by without it.
 
> 
> PS: Interestingly even Saxon 7.5.1 sometimes
> evaluates variables/@select expressions even though the 
> variable is never actually referenced. But I would never 
> exploit such odd behavior, actually it is now even hurting me.

Good, because the time will come when it no longer happens!

I think that unreferenced global variables are common, and it makes
sense to avoid evaluating them. Unreferenced local variables seem to
have no practical use case. Most of my optimization work is driven by
things I actually encounter in real stylesheets.

Michael Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords