>For the moment, the DTM is not updatable.

DTM is not intended to be mutable; that's part of the performance/storage
tradeoff we accepted in switching to this API. For now, the right answer is
to let Xalan build a new DTM for your altered document. That isn't a lot of
work for the programmer -- just pass in a DOMSource and let Xalan do the
right thing for you automatically -- but it does mean we've given up
efficiency in repeatedly processing similar documents in order to gain
efficiency when processing documents we don't know are similar.

I don't think we have any plans to change this design point at this time.

> Or maybe it could be interesting to propose several implementations of
> XPATH, one for the DTM and the other for DOM?

Maintaining these two versions would be a _LOT_ of work, which is why we
went with the solution of presenting the DOM via a DOM2DTM wrapper -- that
hides the difference from the rest of the code.

If you really need a mutable source document, the best solution I can come
up with would be to write a data model which simultaneously implements DTM
and the DOM APIs -- essentially, take DOM2DTM and integrate it back into a
DOM tree. Could be done, but it'd be a significant programming investment.

Reply via email to