W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2002

LS: DOMWriter DOM Level 1 vs DOM Level 2 Nodes

From: Glenn Adams <glenn@xfsi.com>
Date: Sat, 9 Feb 2002 14:15:32 -0500
To: "Www-Dom@W3.Org" <www-dom@w3.org>
Message-ID: <000a01c1b19e$25a983e0$0201a8c0@xfsi.com>
Under the description of DOMWriter appears the following:
 
"When serializing a document the DOMWriter checks to see if the document element in the document is a DOM Level 1 element or a DOM Level 2 (or higher) element (this check is done by looking at the localName of the root element). If the root element is a DOM Level 1 element then the DOMWriter will issue an error if a DOM Level 2 (or higher) element is found while serializing. Likewise if the document element is a DOM Level 2 (or higher) element and the DOMWriter sees a DOM Level 1 element an error is issued. Mixing DOM Level 1 elements with DOM Level 2 (or higher) is not supported."
 
I'm not sure what this is saying. Is it describing a scenario where multiple implementations are simultaneously used with a single API and a document which was instantiated by a Level 1 implementation has an element which was instantiated by a Level 2 implementation? Wouldn't it be an error to import a Level 2 node into a Level 1 document in the first place? Or wouldn't such an import effectively downcast that Level 2 node to its Level 1 counterpart?
 
If, on the othe hand, this language is not talking about multiple implementations, then how is it possible to have a Level 2 implementation create a Level 1 element? Any element created by a Level 2 implementation will be a Level 2 element.
 
Regards,
Glenn Adams
 
 
 
Received on Saturday, 9 February 2002 14:15:18 GMT

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