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

"Robert Sayre" <sayrer at gmail.com> wrote:

> On 11/29/06, Lachlan Hunt <lachlan.hunt at lachy.id.au> wrote:
> >
> > I do not think it's a good idea to make the trailing slash conforming.
> > Although it is harmless, it provides no additional benefit at all and it
> > creates the false impression that the syntax actually does something.
> 
> It does do something, in systems that think they are using XML
> (whether they actually are is another matter). It's possible it will
> prevent  many information-free validation errors, and give the HTML5
> more credibility as a result. Warning people about <img /> in the
> validator is a waste of their time.
> 
> > It's not a
> > good idea to confuse them any more by giving the impression that it
> > works for some elements but not others.  It's better to just say it
> > doesn't work at all and forbid it in all cases.
> >
> 
> Better? This is an opinion, and it's not backed up by data. So far, it
> looks like Sam has the data on his side. People do it, and it tends to
> work interoperably.

Except when it doesn't.

For example, here's a fragment of hotmail.com's signup page, served as
"text/html".  It's the only example I've come across to date:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
  Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
...
<select id="iRegion" name="pff00000000010004" />
  <script>...</script>
</select>
...


The script just document.write's loads of option tags (it's the country
menu).  It's hard to know what the author thought was going on.  Did they
think it was XHTML and just got stymied by the server configuration?

I'm still in favour of permitting the trailing slash, personally.


-- 
Stewart Brodie
Software Engineer
ANT Software Limited

Received on Wednesday, 29 November 2006 07:51:14 UTC