W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2011

Re: [DOMCore] createElement() and HTML-specific element interfaces

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 9 Aug 2011 20:55:41 +0000 (UTC)
To: David Flanagan <dflanagan@mozilla.com>
cc: Ms2ger <ms2ger@gmail.com>, www-dom@w3.org
Message-ID: <Pine.LNX.4.64.1108092054290.22648@ps20323.dreamhostps.com>
On Tue, 9 Aug 2011, David Flanagan wrote:
>
> I get that part.  I was confused about the interaction between the specs 
> and which spec is allowed to extend the other.  I get it now.  HTML 
> includes and extends the DOM. If I'm implementing the DOM spec as part 
> of my implementation of the HTML spec, then obviously I give the HTML 
> spec priority.

Well it's just a matter of picking which specs you want to implement, and 
then applying them all. They should not contradict each other.


> > > Note that since DOM already defines a flag that creates a 
> > > distinction between HTML documents and XML documents.  It will be 
> > > very confusing if createDocument() returns an "XML document" that 
> > > implements the methods of HTMLDocument!
> >
> > Why would that be confusing? HTMLDocument's APIs apply in XHTML and 
> > HTML equally. In fact the API is (mostly) serialisation-agnostic. 
> > There might not even be a serialisation.
> 
> The terminology is confusing because we can have an object that 
> implements HTMLDocument but is not "flagged as an HTML document".  All 
> documents are HTML documents but some are more HTML than others and get 
> special uppercasing and lowercasing behavior of their tagnames.  Since 
> the primary consumer of the DOM spec is the HTML spec, I think the 
> editors of the DOM spec might want to change the phrase "flagged as an 
> HTML document" since the term "html document" gets overridden by the 
> HTML spec :-)

The term "HTML document" actually comes from the HTML spec originally. The 
term as used in the HTML spec is the same.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 9 August 2011 20:56:07 GMT

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