Re: An HTML language specification

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 UTC