You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xerces.apache.org by Paul Levin <pl...@bii.com> on 2000/02/01 15:47:14 UTC
Re: question about Parser Liaison and Documents
Scott,
Thank you for the information.
Thanks again,
Paul
Scott Boag/CAM/Lotus wrote:
> (Seems like this should have gone to the xalan list, which may be why I
> missed it...)
>
> > I need to be able to instantiate a Document without parsing, so it looks
> like my only
> > choice is the Xerces classes, even though they are slower than the DTM.
> Again, please comment.
>
> Yes, you need to use the Xerces liaison... liaison's tightly couple to a
> given DOM implementation.
>
> The only real reason the Xerces dom liaison is a disadvantage in terms of
> speed is node-order sorting and on-the-fly namespace resolution, since the
> DOM is already parsed, and incrementality and memory use (in terms of the
> size of the DOM, since it is already constructed) aren't factors for your
> case. The node order sorting we hope to solve with a new search algorithm
> we are working on. The namespace resolution might be better with some of
> the work they've been putting into the Xerces DOM lately (I have to go back
> and re-investigate this). For certain operations (non-union selections),
> the DOM will actually be a tiny bit faster.
>
> So, my advice would be to go ahead and use the Xerces liaison, and the
> performance differences that are applicable to your case will be resolved
> over the next few weeks.
>
> -scott
>
>
> Paul Levin
> <plevin@bii.c To: xerces-dev@xml.apache.org
> om> cc: (bcc: Scott Boag/CAM/Lotus)
> Subject: Re: question about Parser Liaison and Documents
> 01/31/00
> 01:51 PM
> Please
> respond to
> xerces-dev
>
>
>
> Can someone please comment on this. I posted this last Thursday, and no
> one has made any comments.
> Thanks,
> Paul
>
> Paul Levin wrote:
> I realize that the Document implementation class used, and the
> ParserLiaison class used, are tightly coupled.
> I notice, in the latest Xalan distribution, that there are 2 significant
> Liaison/Document packages --
>
> |-------------------------------------------+---------------------------------------|
> | ParsserLiaison Class | Document Impl Class |
> |-------------------------------------------+---------------------------------------|
> | org.apache.xalan.xpath.xdom.XercesLiaison | org.apache.xerces.dom.DocumentImpl |
> |-------------------------------------------+---------------------------------------|
> | org.apache.xalan.xpath.dtm.DTMLiaison | org.apache.xalan.xpath.dtm.DTMProxy |
> |-------------------------------------------+---------------------------------------|
>
> I am trying to understand some pros and cons of these 2 choices.
> It seems that the DTM classes are supposed to be faster than the
> Xerces classes.
> The Xerces DocumentImpl class has a constructor (so a document
> can be made without having to parse a file); where as the
> DTMProxy class has no constructor.
> Would people please comment on these findings, and correct me where I
> am wrong,
>
> I need to be able to instantiate a Document without parsing, so it
> looks like my only choice is the Xerces classes, even though they are
> slower than the DTM. Again, please comment.
>
> Thanks