xml-xalan-c-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David N Bertoni/Cambridge/IBM <david_n_bert...@us.ibm.com>
Subject Re: AW: Xerces 2.1 and interim build
Date Thu, 06 Feb 2003 16:47:29 GMT




> Basically I need to know what the new sample code is for working with
> Xerces documents - what the replacement classes are, etc.
> I've found, for instance, XercesDocumentWrapper, but does that replace
> XercesDOMWrapperParsedSource? (Evidently not as giving the
> XercesDocumentWrapper.getDocumentElement() to
> XalanTransformer.compileStylesheet() kills it.)

The new wrapper classes are not a substitute for
XercesDOMWrapperParsedSource.  They are the classes we use to wrap the
Xerces DOM for transformations.  XercesDOMWrapperParsedSource encapsulates
all of the things necessary for doing a transformation, since we need more
than just the document.

> Also, for the resulting document (which I retrieve from a , what is its
> in-memory life-span? When will it get destroyed by the (IMO, somewhat
bizarre)
> Xerces 2.x memory management system?

>From where do you get the document?  If it came from a XercesDOMParser
instance, it's lifetime is controlled by that instance, unless you detach
it by calling XercesDOMParser::adoptDocument().  For more details, you can
post questions to the Xerces mailing list.

> P.S. If anyone knew what the motivation for not giving XalanTransformer a
> DOMDocument *transform( DOMDocument *, DOMDocument *) method is, that
> would be interesting, too, as I continually wonder why one doesn't exist.

Xalan's underlying data model is not the DOM, so using the Xerces DOM for
transformations is sub-optimal at best.  We also do not want to be tied
directly to the Xerces interfaces.  Finally, Xerces latest DOM
implementation is fairly new, so we waited until it stabilized to start
supporting it.

Dave


Mime
View raw message