[whatwg] text/html flavor conformance checkers and <foo />

fantasai fantasai.lists at inkedblade.net
Tue Apr 26 18:13:44 PDT 2005


Henri Sivonen wrote:
> On Apr 26, 2005, at 19:08, fantasai wrote:
> 
>> Henri Sivonen wrote:
>>
>>> What do you suggest the parser layer of an text/html conformance 
>>> checker say about <input checkbox ...>?
>>> 1. Silently treat as <input type="checkbox" ...>?
>>> 2. Treat as <input type="checkbox" ...> but warn?
>>> 3. Treat as <input checkbox="checkbox" ...> causing an error to be 
>>> reported on a higher layer?
>>> 4. Treat as fatal error in the parser?
>>> I'm inclined to choose 3.
>>
>>
>> *Why?* Why of all things would you choose to interpret it like /that/?
>> It's neither reporting a useful error, nor handling it per SGML rules.
> 
> To make the separation of concerns similar to what it would be on the 
> XML side while being real about SGMLness being fiction. That is, the 
> parser does not need to know if an attribute is allowed. That's a job 
> for a higher layer.

I still don't understand how this interpretation is useful or required.
If you want to make <input checkbox> invalid, handle it the same way
you'd handle <input foo>. Expanding the attribute from checked to
checked="checked" is neither conforming to SGML parsing rules nor helping
the author understand what was wrong.

I mean, I understand you're disillusioned with the state of HTML parsing
in the world, but it doesn't mean you need to be /reactionary/ about it.

~fantasai



More information about the whatwg mailing list