W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2003

Re: DocumentLS may be more than just a convenience

From: Johnny Stenback <jst@netscape.com>
Date: Fri, 09 May 2003 14:00:58 -0700
Message-ID: <3EBC170A.3090002@netscape.com>
To: steve@fenestra.com
CC: www-dom@w3.org

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:57 GMT