To me, '</' or '/>' mean the tag's done.  Therefore, '<select
/>...</select>' (or anything similar) is just plain wrong -- that would be a
select list with nothing in it, then some options that are hanging out
somewhere on their own, then an unmatched closing select.  This shouldn't
validate, serializers shouldn't allow it, and deserializers should simply
ignore the options and '</select>' (or maybe dump the options' text to the
output and just ignore the '</select>').

Now this, '<img src="..." />' -- which is what I thought this discussion was
about initially -- is perfectly valid; it's nothing more than a tag without
content.


On 11/29/06, Stewart Brodie <[EMAIL PROTECTED]> wrote:

"Robert Sayre" <[EMAIL PROTECTED]> wrote:

> On 11/29/06, Lachlan Hunt <[EMAIL PROTECTED]> 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

Reply via email to