Re: Cleaning House

On Mon, 17 Nov 2008, Jim Jewett wrote:
> > 
> > Could you elaborate on why you think that it is bad to have tags be 
> > omitted?
> 
> I think I dropped this at the time, because I couldn't easily explain it 
> except in terms of cleanliness, or safety margins.
> 
> But it started bugging me again when I read
> 
> http://www.w3.org/html/wg/markup-spec/
> 
> Section 3.6 would be much simpler if it didn't have to worry about 
> optional and implied tags.
> 
> Section 3.8 would almost disappear.

Why does the size of the spec matter? Surely the benefit to authors far, 
far outweigh the benefits to the spec community?


> At the very least, it would be nice to simplify the rules regarding
> when a tag could be omitted.  For example:
> 
> """
> A body element's end tag may be omitted if the body element is not
> immediately followed by a comment and the element is either not empty
> or its start tag has not been omitted.
> """
> 
> Why so much work to avoid moving a comment from after the body to 
> inside?

It's not much work, it's a single sentence. It's there so that the markup 
reflects the syntax. If we did it the other way around, you'd be 
complaining that this:

   <body></body><!---->

...represented a body element containing a comment, whe it obviously 
doesn't.


> If body can be omitted, then why can't an empty body by omitted?

Oops. This is an error. It used to be that omitting the element's tags 
altogether wouldn't imply the element, but we've changed that now. Also 
fixed for </html>.

Cheers,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 17 November 2008 22:38:56 UTC