W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2006

[whatwg] Standard DOM Serialization? [was :Common Subset]

From: Sam Ruby <rubys@intertwingly.net>
Date: Sat, 09 Dec 2006 18:29:03 -0500
Message-ID: <457B46BF.7020405@intertwingly.net>
Michel Fortin wrote:
> 
> I've started a wiki page about the common subset:
> <http://wiki.whatwg.org/wiki/Common_Subset>

I'd like to explore this from a different angle.

Libraries (like html5lib) will likely provide a means to serialize a 
DOM, and will presumably have unit tests.

The question is: does it make sense to standardize what such a method 
produces?  HTML allows variations on the case of elements, single vs. 
double vs. no quoting of attributes, etc.

If such were standardized, how would the HTML5 canonical serialization 
differ from the XHTML5 canonical serialization (in fact, must they be 
different at all?)

In any case, a desirable feature of such a serialization would be the 
ability to round trip.  For HTML5, this would only apply to all valid 
HTML5 documents: as an example, one could artificially produce a DOM 
which contains a <h1> inside the <head> element; if such a DOM were 
serialized and then parsed by an HTML5 parser, the DOM produced would 
differ, as well it should.

If there is no interest in standardizing a serialization (or separate 
standard serializations form HTML5 and XHTML5), then this discussion 
belongs on implementorsr at whatwg.org mailing list.

- Sam Ruby
Received on Saturday, 9 December 2006 15:29:03 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:31 UTC