xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Hodges <harmo...@swbell.net>
Subject Re: Yet another question about creating a Document
Date Fri, 20 Oct 2000 00:09:26 GMT

----- Original Message -----
From: "Ed Staub" <estaub@kana.com>
To: <general@xml.apache.org>
Sent: Thursday, October 19, 2000 4:56 PM
Subject: RE: Yet another question about creating a Document


> We ran into this issue also.
> It was a while ago, so my memory is iffy.
> If you're writing "end-user" code, sure, there's no problem.
> The problem occurs when you're writing general-purpose code above the DOM,
> not application-specific code as in Arnaud's use cases.
>
> I think the main issue was that we had methods which created elements,
which
> might or might not be at the top of a document.  We wanted to be able to
> hand them a parent node, which might be the document.  I believe we ended
up
> with a "if parent is document, remove child element if any first" hack.
>
> It might be worth examining other general-purpose code to see whether
> requiring the top element at document creation is awkward.  I notice that
> Xalan dodges the issue by
> new org.apache.xerces.dom.DocumentImpl();
> but I'm sure there are other reasons in Xalan's case as well.

Really?  So Xalan has to use Xerces?  We can't tie ourselves to one DOM
parser like that.  That's why we've been trying to use the DOM API, so we
can swap parsers at any time.



Mime
View raw message