Well, there are specs and then there's actual practice. Believe me, I've read every passage of the specs you've quoted, numerous times. But let's face it -- the most common user agent out there is the browser, and browsers have had to go to great lengths to accept and properly handle really bad HTML, far worse than what we're discussing here, so what Yaws has been producing via ehtml has been good enough to work pretty well in practice.

However, this is not to discount Garrett's point or say that it's not worth consideration. He's right that emitting what the specs say is almost always the best way to go, and he's right in his implication that the continued standards work on HTML could impact the ehtml status quo negatively in the future. The concern here is for achieving the best practical compatibility for various HTML versions without breaking ehtml itself or significantly changing it, and without breaking current uses of ehtml.

Garrett can attest to the fact that I sent him a prototype patch for this pretty quickly after his original email, but it's the backwards and forward compatibility I'm worried about, which is why I haven't pushed the changes yet.


On Tue, Jul 28, 2009 at 1:09 AM, Robert Schmersel <robert.schmersel@ericsson.com> wrote:
That is actually not correct! This is what the XHTML spec says on the

4.6. Empty Elements

Empty elements must either have an end tag or the start tag must end
with />. For instance, <br/> or <hr></hr>. See HTML Compatibility
Guidelines <http://www.w3.org/TR/xhtml1/#guidelines>  for information on
ways to ensure this is backward compatible with HTML 4 user agents.

HTML Compatibility guidelines

C.2. Empty Elements

Include a space before the trailing / and > of empty elements, e.g. <br
/>, <hr /> and <img src="karen.jpg" alt="Karen" />. Also, use the
minimized tag syntax for empty elements, e.g. <br />, as the alternative
syntax <br></br> allowed by XML gives uncertain results in many existing
user agents.

C.3. Element Minimization and Empty Element Content

Given an empty instance of an element whose content model is not EMPTY
(for example, an empty title or paragraph) do not use the minimized form
(e.g. use <p> </p> and not <p />).

And from the XHTML DTD (both STRICT and TRANSITIONAL we can see that :
<!ELEMENT input EMPTY>     <!-- form control -->

So XHTML spec's recommendation is to actually USE <input ... /> with a
space before the '/>' to ensure compatibility

For HTML 4.01 STRICT an end tag is forbidden and older HTML specs never
specified the end tag either


From: Steve Vinoski [mailto:vinoski@ieee.org]
Sent: Tuesday, July 28, 2009 12:34 PM
To: Garrett Smith
Cc: Yaws List
Subject: Re: [Erlyaws-list] input tag being closed

On Sat, Jul 25, 2009 at 8:29 PM, Steve Vinoski <vinoski@ieee.org> wrote:

       Garrett and I had an offline conversation about this because at
first I didn't see the issue, but he reminded me that in HTML the input
tag officially has no closing tag (sad but true). I don't think it's
really a problem in practice, given the huge amount of bad HTML out
there that browsers have to compensate for, but we should probably fix
this to make Yaws correct in this regard. I'll go ahead and fix it
unless someone knows of a good reason not to change it?

Replying to myself, I've gotten some private email stating concerns
about changing this, primarily because it would disallow the output from
being treated as XHTML or anything else besides strict HTML 4.01. I
think that's a valid concern, so perhaps the best course of action
really is to just leave it alone.