[whatwg] Parsing: Tokenisation - DOCTYPE State

Simon Pieters wrote:
> Hi,
> 
> From: Lachlan Hunt <lachlan.hunt at lachy.id.au>
>> As far as I can tell both of these DOCTYPEs are considered conformant, 
>> but shouldn't the first be an easy parse error?
>>
>>   <!DOCTYPEhtml>
>>   <!DOCTYPE html>
> 
> Why? Both trigger standards mode as far as I can tell. :-)

It did in the browsers I tested too, but that doesn't mean it works for 
all of them.  It just seems wrong to omit the space, but if Ian 
intentionally allowed it, then that's fine.

>> * Why is it marked as being error at that stage?  It doesn't seem to
>>   be necessary because of the last step in the DOCTYPE name state   
>> that says: [...]
> 
> You might not get to the doctype name state. (Consider <!DOCTYPE>.)

Then the '>' would get seen in the DOCTYPE state:
   U+003E GREATER-THAN SIGN (>)
       Easy parse error. Emit a DOCTYPE token whose name is the empty
       string and that is marked as being in error. Switch to the data
       state.

-- 
Lachlan Hunt
http://lachy.id.au/

Received on Sunday, 29 January 2006 02:40:40 UTC