W3C home > Mailing lists > Public > public-html@w3.org > November 2008

Re: An HTML language specification

From: Mark Baker <distobj@acm.org>
Date: Thu, 20 Nov 2008 16:22:24 -0500
Message-ID: <e9dffd640811201322j6a232b04qadd3d31da0834547@mail.gmail.com>
To: "Henri Sivonen" <hsivonen@iki.fi>
Cc: "Boris Zbarsky" <bzbarsky@mit.edu>, public-html@w3.org

On Thu, Nov 20, 2008 at 11:45 AM, Henri Sivonen <hsivonen@iki.fi> wrote:
> On Nov 20, 2008, at 18:08, Mark Baker wrote:
>
>> Once a document.write() occurs, from my POV you've got a brand new
>> HTML document with a different meaning than the one it "replaced".
>
> What's an "HTML document" in your opinion? Neither the network byte stream
> nor the object implementing the Document DOM interface go away and get
> replaced.

The document is the byte stream.

Your definition of "go away" is implementation dependent.  Consider a
(admittedly very inefficient) implementation which rewrote the byte
stream and then reparsed it after a document.write().

> There is exactly one sequence of characters that gets examined by
> the tokenizer. There might have been a different sequence of characters if
> scripting had been turned off, but that sequence was never examined by the
> tokenizer.
>
> What's the old document? What's the new one?

The old document is the one before document.write() happened.  The new
one is the document after.

>
>> Someplace else other than the language specification, you could
>> specify the exact state machine that describes how a processor manages
>> the transition between these two documents.
>
> How is the current spec not sufficiently describing the relationship of
> document.write and the parser state machine?

I didn't say it wasn't.

Mark.
Received on Thursday, 20 November 2008 21:22:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:25 GMT