The XSLT processing model assumes that the source tree will not be altered.
This permits optimizations in both how that data is stored and how it's
processed which couldn't be applied if the document was mutable.

If you really need to do this, there are a couple of approaches you might
try. One is to have the stylesheet actually generate a document which
describes how to patch the source, then run a post-processing stage which
interprets and applies those patch requests. (Of course you'd need to find
or create that patch interpreter.) Another would be to create a non-XSLT
tool which uses our XPath engine to find the nodes you're interested in and
runs its own code to apply the changes... but note that you've probably
have to use a non-cached XPath interpreter to keep the changes made after
one query from breaking future queries. (The experimental DOM2DTM2 code
attempts to avoid that need to flush and rebuild the document model, but is
Not Ready For Prime Time; due to time constraints we had to set it aside
while still in the proof-of-concept stage. I'm hoping to revive that
approach before the end of the year, but no promises...)

In the longer term... The XQuery working group has considered giving that
language the ability to update its source data. If that happens, using an
XQuery rather than XSLT might address your needs; the two languages have
similar capabilites though they're biased in different directions.

______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"The world changed profoundly and unpredictably the day Tim Berners Lee
got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk

Reply via email to