[Home] [By Thread] [By Date] [Recent Entries]
> Interesting. I guess I should have said that all browser *implementations* of XSLT run the transform to completion and don't make it possible to update the output incrementally by changing the input incrementally and I shouldn't have claimed anything about *design*. > > Which implementations support a reflecting incremental input updates in the output? Given everything that XSLT lets you do, how can the contribution of a piece of input to the output be tracked in a practical way? > XSLT 1.0's restriction to a single transformation pass certainly makes this kind of thing a lot easier, though experience has definitely shown that the restriction is too heavy a price to pay. There's a question about whether incremental transformation is really worth doing, when re-transforming the entire document is often so fast that no-one will notice the difference (transforming a document of modest size usually takes less than 50ms, so it's quite possible to do it once per keystroke). I suspect this is the main reason it hasn't been done. But it would be nice to be less wasteful of battery-power... I've been thinking a bit over the last year whether the analysis we do for XSLT streamability in XSLT 3.0 is usefully similar to the analysis that needs to be done to enable incremental transformation. I think it almost certainly is. If a template rule is streamable, then there is a guarantee that it only sees/consumes the part of the input tree rooted at the node which it matches, so if you know that a subtree of the input has changed, then you only need to re-apply the template rule for the root element of that region. This is only useful, of course, if the result of the transformation still exists as a tree (unlikely if it's multi-phase) and if you know the relationship of nodes in the result tree to the nodes in the source tree from which they derived: but the backmapping available in XSLT debuggers is a reasonable existence proof that this part is doable. So I think it can be done, the question is whether there is sufficient incentive to do it. Michael Kay Saxonica
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |

Cart



