You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Stan <sy...@oblix.com> on 2001/03/16 00:10:47 UTC

Re: Working with DOM input and output destroyed, XalanSourceTreeParserLiaison::createDocument has now void argument list.

Hi,

    If you wrap through the XercesParserLiaison::CreateDocument, you would be
going through the SAX1 interface, and therefore can't get namespaces, right ?
Is there some kind of bridge between XalanSourceTreeParserLiaison
(or SAX2XMLReader) and DOM_Document ?

-Stan

David_N_Bertoni@lotus.com wrote:

> Let me clarify this, since I'm not sure I understand your question.  You
> can use the Xalan source tree, or you can use the Xerces DOM.  They both
> represent the input XML for the transformation.  The Xalan source tree is
> much more efficient than using the Xerces DOM, although for small
> documents, you won't see as big a difference.  However, for large
> documents, the difference is quite dramatic, both in parsing and
> transformation time.
>
> The _only_ reason to use Xerces DOM through Xalan's bridge is if you have
> already parsed an XML document outside of Xalan and/or your use case
> involves programmatically modifying the input XML after you parse it, but
> before you transform it.
>
> Another use case would be that you are building the document using the DOM
> APIs, rather than using SAX2.  Since the Xalan source tree does not support
> the mutating DOM APIs, it's difficult to use it for this purpose.
>
> Dave
>
>
>                     Dave Connet
>                     <connet@entel        To:     "'xalan-dev@xml.apache.org'" <xa...@xml.apache.org>
>                     os.com>              cc:     (bcc: David N Bertoni/CAM/Lotus)
>                                          Subject:     RE: Working with DOM input and output destroyed,
>                     03/07/2001           XalanSourceTreeP  arserLiaison::createDocument has now void argument
>                     02:05 PM             list.
>                     Please
>                     respond to
>                     xalan-dev
>
>
>
> > If you want to use the Xerces DOM, you need to wrap it with a
> > Xalan DOM
> > instance -- This is essentially how we used to do things.  So use
> > XercesParserLiaison and XercesDOMSupport instances instead of the
> > corresponding XalanSourceTree... instances.  Then, ask the
> > XercesParserLiaison to create a corresponding wrapper.  See
> > XercesParserLiaison::createDocument() for more information.
>
> Dave, is using those two classes more efficient than using the
> XalanSourceTree... with:
>            //...DOM_Document fDoc;....
>            XercesDocumentBridge domBridge(fDoc, true);
>            XSLTInputSource theInputSource(domBridge.getDocumentElement());
> If so, I'll convert to those instead...
>
> Dave Connet