* Peter da Silva <pe...@taronga.com> [2007-09-29 11:40]: > On 28-Sep-2007, at 23:23, A. Pagaltzis wrote: >> XHTML is indeed based on XML and therefore doesn't have `</>` >> any more than XML in general does. > > Then I guess that mustn't actually be enforced. What a > surprise. :)
That's if you send the document as text/html. In that case, the browser uses the tagsoup parser, regardless of what the document says about itself. Usually people use the Appendix C rules from the XHTML spec to make XHTML work with tagsoup parsing -- which only works because it doesn't follow SGML rules. If browsers used SGML parsers, then sending XHTML as text/html would fail. Basically everyone who puts a "Valid XHTML!" button on their site should really be using an "Invalid HTML 4.01!" button instead. However, if you send the page as application/xhtml+xml, then the browser *will* enforce XML well-formedness. Except that IE does not understand that MIME type (or XHTML, for that matter) and will throw up a download dialog instead of rendering the page. So no one except fringe lunatics like me does that. It's a giant bucket of suck, mostly because both MSFT and the W3C have been asleep at the wheel for almost a decade. Hate. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>