[whatwg] Allow trailing slash in always-empty HTML5 elements?

Simon Pieters zcorpan at hotmail.com
Thu Nov 30 07:19:20 PST 2006


Hi,

From: Ian Hickson <ian at hixie.ch>
>I think basically the argument is "it would help people" and the counter
>argument is "it would confuse people". We need evidence to back up these
>arguments so we can make a solid decision. The only relevant data I have
>is that 50% of the web uses trailing slashes, and only 17% uses XHTML.
>This could be used to back up either argument: "clearly people think that
>trailing slashes are allowed, so we should allow them", and "clearly
>people are confused about trailing slashes, so we should get rid of them
>altogether". I don't know which is best.

Previously I thought trailing slashes should be disallowed in HTML5, mostly 
because it means something different in SGML using the SGML declaration for 
HTML4. But now we don't care about compatibility with SGML, so this point is 
irrelevant.

If we disallow it, authors who use tag soup systems that emit "XHTML" today 
and want to convert to HTML5 will probably just do a search and replace 
either in the files directly or with a script before serving. Such string 
substitution is not safe because it might lead to /> being replaced with > 
in other places than intended, e.g. in comments, attribute values, style 
sheets, scripts, content, XML files, etc. Additionally, replacing /> with > 
even if done carefully or safely does not add any value, because it is 
already handled interoperably. That this has happened on blog.whatwg.org is 
not an isolated example; I've seen XHTML to HTML4 scripts using string 
substitution all over the place -- I've even written one myself in the past 
-- and they are completely useless because they require that the input 
already works as text/html without any conversion.

So now I'm starting to think that trailing slashes for void elements should 
be allowed in HTML5.

Regards,
Simon Pieters

_________________________________________________________________
Facklor och eldar i trädgården http://alltombostad.msn.se/




More information about the whatwg mailing list