Re: Identifying (X)HTML without MIME

Asbjørn Ulsberg wrote:
> Isn't it a problem that valid XHTML is invalid HTML? Won't that make it  
> invalid SGML as well?
> 
> <url: http://annevankesteren.nl/archives/2004/06/invalid-html>

No, it's still valid SGML.  The problem is that the empty element syntax 
in XML means something different in SGML.  In SGML, an element like 
<br/> is actually equivalent to writing <br>&gt;

It's called SHORTTAG NET, but it has not been implemented in any popular 
UA, and is highly unlikely to be implemented in Mozilla anytime soon [1].

That's why it's still valid SGML, even with all the empty elements, 
though it's invalid HTML because it violates in the HTML DTD. Jukka has 
written a much better explanation [2] of the validation problems.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=94284
[2] http://www.cs.tut.fi/~jkorpela/html/empty.html

-- 
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/    Rediscover the Web
http://SpreadFirefox.com/   Igniting the Web

Received on Tuesday, 9 November 2004 07:29:42 UTC