Re: Tags lacking a terminating '>' are spotted

I wrote:
	>The SGML declarations in the HTML 3.2 and HTML 4.0 specifications
	>very clearly disallow this (leaving out the > at the end of a tag
	>when there is a following <).
	
bfowler@ewitness.co.uk (ewitness - Ben Fowler) very properly challenged
this:

	Do you have a URL for this?
	
The relevant part is section 20.1 "SGML Declaration"
of http://www.w3.org/TR/html4/sgml/sgmldecl.html

The SHORTTAG feature of SGML controls three things:
    (1) Empty tags <> and </>, where the generic identifier is inferred;
        empty end-tags make a lot of sense, but the rules for empty
        start-tags are sufficiently involved, not to say weird, that
        even a die-hard SGMLer would be wary of them.

    (2) Unclosed tags <foo<... </foo<...        
	where the > that closes a tag may be omitted "when it is followed
	immediately by another tag".

    (3) Null end tags <foo/..../ where the start-tag ends with / and the
        end-tag is then simply /.  I am very fond of these; I'd _much_
        rather write <em/this/ than <em>that</em>.

Now section B.3.7 says to avoid all of these things, and the simple
way for the HTML designers to have been serious about that would have
been for them to put "SHORTTAG NO" in the SGML declaration.  It would
have made it easy for people to check that their documents didn't use
these features.

In fact my local copy of HTML.dcl _was_ hacked to say SHORTTAG NO.
Trouble is, I'm the one that hacked it, and I'd forgotten that.
The _official_ SGML declaration says "SHORTTAG YES", thus explicitly
requiring HTML processors to support these features that B.3.7 says not
to use.

Is it just me, or is that odd?

Received on Tuesday, 12 February 2002 18:43:17 UTC