xsl-list
[Top] [All Lists]

RE: [xsl] XSLT for Mashups

2010-03-05 11:22:03
  And yes, side-effects are a key point.  I think XSLT has 
all the machinery to handle them (like the output state)

Not quite *all" the machinery!

The guarantee offered by "output state" is that instructions reached
directly from the stylesheet entry point by call-template or apply-templates
(and not via function calls or while evaluating variables, sort keys, etc)
will be executed with some measure of predictability. We actually only rely
on it being predictable that an instruction is executed or not executed, on
the assumption that there are no errors. It wouldn't be difficult to extend
this to a guarantee of sequential execution for such instructions, but I
think we would have to ask users to state that they require sequential
execution, as this would prevent some optimizations (like the parallel
processing that I've been adding to Saxon over the last few days).

A limitation of this approach is that multi-phase stylesheets rely on
variables, and the current mechanism gives no guarantees while you are
evaluating a variable. One might need to offer a way of structuring a
multi-phase stylesheet that extends the guarantees available for sequential
execution. But the more you go in this direction, the more you start
reinventing XProc.

Keeping the semantics predictable in the face of errors, especially with the
addition of try/catch, adds further complications.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 



--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>