From: David G. <go...@us...> - 2002-08-02 03:17:10
|
[Adam] >> No, the output is *not* legal HTML 4 since it is in a XML syntax, >> not SGML one. There are some differences between XML and SGML in >> what is allowed. For example empty tags like <this/> do not exist >> in SGML, and therefore browsers that don't support XHTML (and >> hence XML) might get confused. [Dethe] > While this is true, browsers specifically ignore attributes they > don't recognize. By putting a space between the final attribute or > tagname and the trailing slash (like <this /> or <this > example="true" /> instead of <this/> older browsers will treat it as > an unknown attribute and ignore it. Thanks for clearing that up, Dethe, from a practical angle I hadn't heard before. So although perhaps not strictly legal HTML, XHTML is compatible with HTML 4. (I won't get into how XML is supposed to be legal SGML [given suitable low-level magic].) I was asked to make the writer XHTML-compliant some time ago and didn't see any harm. It probably doesn't matter either way; by their very nature, browsers (and any software dealing with HTML) have to be lenient and forgiving. Until there's a concrete example of a modern browser (one which supports HTML 4 & CSS) which does *not* support XHTML, I'm not concerned. I doubt if I'll be concerned even if there *is* such an example. ;-) -- David Goodger <go...@us...> Open-source projects: - Python Docutils: http://docutils.sourceforge.net/ (includes reStructuredText: http://docutils.sf.net/rst.html) - The Go Tools Project: http://gotools.sourceforge.net/ |