[whatwg] Allow trailing slash in always-empty HTML5 elements?
Hallvord R M Steen
hallvors at gmail.com
Thu Nov 30 06:14:03 PST 2006
> The sense I am gathering is that the proposal is not obviously insane, and
> in fact is a bit novel in that such a narrowly scoped adoption of XML syntax
> -- i.e., only to the extent that it both reflects the web as widely
> practiced and only to the extent that doing such does not introduce
> ambiguity into the grammar -- had not been considered before.
FWIW, it sounds sane to me to align validation as much as possible
with the UA parsing in a way that issues that aren't really problems
for the UA aren't flagged as invalid. Closing slash on void elements
sounds like a good example of "this is invalid because we're sticking
to our fixed ideas"[1] rather than "this is invalid for technical
reasons like causing ambiguities in DOM parsing". So I support Sam's
approach.
That said, HTML5 must see
<input type="checkbox" checked/>
as a checkbox input with a "checked" attribute. Finding a "checked/"
attribute and not checking the checkbox is not compatible with the web
(learnt the hard way!). Perhaps finding a slash in "attribute name"
mode on void elements should be a parse error if the next character is
not > ? (Pretty certain the specs already disallow attribute names
starting with forward slash.)
[1] disclaimer: not intended as a flame-bait but probably is one.. :-ø
--
Hallvord R. M. Steen
More information about the whatwg
mailing list