Re: DocumentLS may be more than just a convenience

This has been corrected in the spec (not yet avilable to the public), 
the current proposal is to support what you can do with 
DocumentLS.load[XML]() using DOMBuilder.parseWithContext().

Steve Schafer wrote:

> The description of the DOM3 Load and Save "convenience interfaces"
> states that "The interfaces in this section provide no direct
> functionality that can not be achieved with the load and save interfaces
> defined in the earlier sections of this specification." But that doesn't
> appear to be quite true. DocumentLS.load() and DocumentLS.loadXML() both
> replace the contents of an existing document object with the results of
> the parse. On the other hand, DOMBuilder.parse() and
> DOMBuilder.parseURI() both return newly-instantiated document objects.
> 
> It would seem that DOMBuilder.parseWithContext() is capable of doing the
> job, but the description of the "is" parameter explicitly states that
> "The source document must be an XML fragment, i.e. anything except a
> complete XML document."
> 
> So there doesn't seem to be any way of using the basic DOMBuilder
> interface to replace the contents of an existing document object, short
> of creating an entirely new document object and then importing all of
> its nodes into the original document. And even that won't work if the
> original document's DTD isn't the same as the new one's.
> 
> Steve Schafer
> Fenestra Technologies Corp.
> http://www.fenestra.com/
> 

-- 
jst

Received on Friday, 9 May 2003 19:44:20 UTC