[whatwg] [html5] tags, elements and generated DOM

Olav Junker Kjær olav at olav.dk
Thu Apr 7 05:59:02 PDT 2005


Jim Ley wrote:
>>However, a
>>syntax error in the initial value of a date control *will* cause the
>>page to stop working as intended.
> 
> Could you describe how?  My reading of the error handling defined in
> the spec for that situation does not lead to the failure you describe.
>  However the unclosed <B> element does exactly that. (in the XHTML
> dialect)

The intention is that the control should show the default value. If the 
value contains a syntax error (e.g. a missing colon) the value will be 
ignored and the control will be empty (according to 
http://whatwg.org/specs/web-forms/current-work/#handling). More subtle 
errors will result if min or max attributes contain a syntax error. 
Depending on the type of application, the wrong or missing date might 
have serious consequences. (It wont prevent the page from showing up, 
though, it just wont work as intended - which in some circumstances 
might be worse).

The problem might be even more subtle if the date is syntactically 
correct but invalid, e.g. the 29. of February in a year that is not a 
leap year. Schema validation using regular expressions wont catch this.

A conformance checker should be able to flag these kinds of errors.

OTOH a missing </b> might be annoying but wont usually have serious 
consequences in HTML (XHTML is different, of course). Still, this is the 
only type of error DTD validation will catch.

regards
Olav Junker Kjær



More information about the whatwg mailing list