DOM LS - DOMWriter

Hi,

The current interfaces provided in the working draft for DOM LS (25-20-2001) to 
create DOMWriter provides no information to the implementation as to what kind 
of DOM is to be serialized. e.g. Will this writer be used to serialize a DOM 
representing a xml, html or xhtml. OR is it that, there should be only one 
implementation of DOMWriter responsible for serialing a DOM representing xml, 
html or xhtml. OR is it that it is assumed that it is always a xml DOM.

The interface DOMImplementationLS has a method:
DOMWriter createDOMWriter();

which accepts no parameters.

Serializing a DOM representing a xml as compared to html may be different is 
some cases. A very small example could be: It is encouraged in the HTML spec 
that element names should be in upper case and attributes in lower for better 
readability, though HTML is case-insensitive. But, xml is case sensitive. So...

It seems from the interface that implementation has to take care of these 
differences. But, won't it be better, if the spec defines them?.

Cheers,
Rahul.

Sun Microsystems, Inc.

Received on Monday, 5 November 2001 13:44:11 UTC