Subject: RE: Incremental Update: change a portion of the XML and the XSLT operates on just that portion
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 20 Jan 2010 20:06:30 -0000
|
I think incremental transformation was one of the motivations for making
XSLT a declarative, function language. There has been research work to try
and make this a reality, sufficient to prove that it can be done: see for
example
http://www.research.ibm.com/people/v/villard/Papiers/incxslt/incXSLT.html
but it has not found its way into mainstream products. One reason, I think,
is that experience has shown that with modern hardware, "rendering"
stylesheets are usually extremely fast on the kind of documents that are
viewed interactively, and re-rendering the entire document is a feasible
proposition, meaning there is not much incentive to make it faster.
Regards,
Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay
> -----Original Message-----
> From: Costello, Roger L. [mailto:costello@xxxxxxxxx]
> Sent: 20 January 2010 16:25
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Incremental Update: change a portion of the
> XML and the XSLT operates on just that portion
>
> Hi Folks,
>
> On page 987 of the book, "XSLT 2.0 and XPath 2.0" the author
> Michael Kay discusses the advantages of functional
> programming. One of the main benefits, he argues, is the
> ability to do incremental updates. Here is a paragraph that
> really captured my interest:
>
> ------------------------------------------------------
> We want to get away from static pages; if you're showing a
> map of traffic congestion hotspots in your area, then when
> the data for a particular road junction changes, you want the
> map updated in real time, and it should be possible to do
> this without recalculating and redrawing the whole map. This
> is possible if there's a direct relationship--a
> function--between what's shown at a particular place on the
> map display and a particular data item in the underlying
> database. So if a program is decomposed into a set of
> smaller, independent functions, each relating one piece of
> the output to one piece of the input, then we have the
> potential to do this on-the-fly updating.
> ------------------------------------------------------
>
> Wow! I want to do that. But how?
>
> Suppose that I have an XML document and an XSLT transform.
> The XSLT transform processes the entire document and outputs,
> say, an HTML document. Later, I update one portion of of the
> XML document. How do I get the XSLT to operate on just the
> updated portion? And how does the XSLT update just the
> relevant portion of the HTML document?
>
> /Roger
|