>latest versions of Xalan-J use a new internal model, called the DTM. If
you
>pass in a DOM source, Xalan will build a DTM model of that DOM and
>transform the DTM, so you're right back where you started from since you
>still have two copies of the document.
Slight quibble: Xalan-J builds a DTM _proxy_ to the DOM. A fair amount of
information does wind up being replicated for speed-of-execution reasons,
but we do avoid recopying #PCDATA, and some of the other info is also
retrieved from the DOM only when needed. And we build the proxy
incrementally, which may allow us to avoid constructing all of it.
So DOM2DTM isn't really a "second copy" of the DOM document. But yes, the
proxy layer does impose a significant amount of overhead compared to the
"native" DTM.