W3C home > Mailing lists > Public > public-html@w3.org > December 2009

Splitting HTML from the HTML DOM (was Re: Renamed topic: focus and length of HTML5)

From: Maciej Stachowiak <mjs@apple.com>
Date: Mon, 07 Dec 2009 08:49:43 -0800
Cc: Geoffrey Sneddon <gsneddon@opera.com>, Ian Hickson <ian@hixie.ch>, Julian Reschke <julian.reschke@gmx.de>, public-html <public-html@w3.org>
Message-id: <4156371A-C08E-4EBA-A15E-2A44A80BE5B7@apple.com>
To: Shelley Powers <shelley.just@gmail.com>

On Dec 7, 2009, at 8:41 AM, Shelley Powers wrote:

> On Mon, Dec 7, 2009 at 10:33 AM, Geoffrey Sneddon  
> <gsneddon@opera.com> wrote:
>> Shelley Powers wrote:
>>> On Sat, Dec 5, 2009 at 11:14 PM, Ian Hickson <ian@hixie.ch> wrote:
>>>> On Sat, 5 Dec 2009, Shelley Powers wrote:
>>>>> More importantly, more editors ensures an essential  
>>>>> comprehensiveness.
>>>> Actually in my experience it's the other way around -- editors  
>>>> tend to
>>>> silo themselves, leading to gaps between specs. For example,  
>>>> separating
>>>> HTML4, DOM2 HTML, and XHTML1 led to huge gaps in the specs that  
>>>> we spent
>>>> significant effort fixing in HTML5. Avoiding this has been one of  
>>>> the
>>>> important features of work with Adam, Anne, Lachlan, and Larry  
>>>> (who have
>>>> edited specifications spun out of HTML5), and it has not been  
>>>> easy. Ask
>>>> Anne, for example, about handling the event loop mechanism. Ask  
>>>> Adam or
>>>> Larry about ensuring that we keep a coherent interface between  
>>>> their
>>>> specs
>>>> and HTML5. It's easy to see how having more editors can quickly  
>>>> result in
>>>> a _loss_ of comprehensiveness -- quite the opposite of ensuring  
>>>> it, as
>>>> you
>>>> assert above.
>>> Huge gaps?
>> Find a normative requirement saying in what order should script  
>> elements be
>> executed. This, as in the example below, makes a fairly large  
>> change to the
>> semantics of the second, middle, script. What if I dynamically  
>> added these
>> scripts to the DOM to create something that should be serialized  
>> like this,
>> where is it defined when they should be executed?
>> <script type="text/javascript">
>> var a = 1;
>> </script>
>> <script type="text/javascript">
>> alert(a);
>> </script>
>> <script type="text/javascript">
>> var a = 2;
>> </script>
>> How should the following be specified? What part should go in an  
>> HTML spec
>> and what part in a DOM spec?
>> <script type="text/javascript">
>> document.write("<b>");
>> </script>
>> foobar</b>
>> What should the alert in the following? Again, where should the  
>> HTML and DOM
>> parts of this be split?
>> <iframe></iframe>
>> <script type="text/javascript">
>> var iframe = document.getElementsByTagName("iframe")[0];
>> iframe.src = "http://example.com/";
>> alert(iframe.getAttribute("src"));
>> </script>
>> Furthermore, if the HTML spec was entirely separate from DOM and  
>> defined in
>> terms of a character stream, HTML and XHTML would need entirely  
>> different
>> definitions (I'm also not sure how exactly you'd define the parser  
>> without
>> it parsing to some sort of tree model).
>> --
>> Geoffrey Sneddon  Opera Software
>> <http://gsnedders.com/>
>> <http://www.opera.com/>
> Is this a test? Do I get a gold star if I pass?
> Could you rephrase your quiz questions into assertions about the gaps,
> and how you feel they're best handled in HTML5, rather than another or
> separate specification, and how the fact that this material has not
> been included in HTML4 has adversely impacted on the development we
> have today. That way we can have a discussion.

I believe Geoffrey is correct that behavior in the scenarios he  
describes is not specified by the combination of HTML4.01 and DOM2  
HTML. I also believe that behavior in a number of these scenarios is  
important to interoperability, as I remember reverse-engineering other  
browsers to figure out how they should work.

That being said, I'm not sure that anyone is advocating splitting HTML  
from the HTML DOM. I'm not sure it's worth discussing in depth unless  
someone wants to propose doing it.

If anyone does want to make that case that some aspects of the HTML  
spec should be split from the spec for the HTML DOM, then the burden  
of proof would be on them to show that this is (a) feasible and (b) an  
overall improvement.


Received on Monday, 7 December 2009 16:50:18 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:45:04 UTC