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

I'll be replying to the other parts of this thread in due course, but just 
to jump in here:

On Thu, 7 Apr 2005, Lachlan Hunt wrote:
> Olav Junker Kj?r wrote:
> >
> > Criteria that cannot be expressed by a DTD, but can still be checked 
> > by a machine.
> 
> Such as...? [...]
>
> Of course, schema's are also included within my use of DTD above when 
> talking about XML versions (though I was originally only referring to 
> SGML), so the above would be something that can be checked by a machine.

Here is something that could easily be checked by a machine but could not 
be checked by any of the above, to my knowledge:

   "The <foo> element must have three attributes, a, b, and c. The 
    attributes must have integer values. The total of the values
    given by a+b must equal c plus the number of <foo> elements in
    the document."

Ok, it's a contrived case. Here's a less contrived one: <input> elements 
with a "type" attribute set to "radio" are part of radio button groups 
that consist of all those <input type="radio"> elements that are 
associated with a particular form (either via the form="" attribute or by 
being descendants of a <form>) and that have the same value for their 
"name" attribute. Only one such <input> element per radio button group may 
have the "checked" attribute set.

The point is that while DTDs, schemas, and so forth, might be getting more 
expressive, at the end of the day they still can't express everything that 
the language might require.

A conformance checker that doesn't check for all the machine-checkable 
things is not compliant, just like a browser that doesn't support 
everything in the spec is not compliant. Existing DTD and schema languages 
can't express enough to be conformant conformance chckers on their own. 
That doesn't mean they can't be used as one part of a complete conformance 
checking solution, of course. But it does mean that as it stands now, 
validator.w3.org (or a version suitably altered to support HTML5 elements) 
could not be called a conformance checker for HTML5.

This is not a bad thing. One hopes that HTML5's more detailed conformance 
requirements will encourage the development of truly useful conformance 
checkers that don't mislead people into thinking they have written correct 
documents when in fact they have just fixed the small subset of errors 
that the limited validator catches.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Wednesday, 6 April 2005 17:01:13 UTC