原文在 XHTML Considered Harmful,大致罪状有8条,不管对错,至少可以参考:

1. document.write is not supported

严格的 xhtml(包含正确的MIME类型)不支持 document.write()。原因在于“可能”会导致不完整标签(比如script中write一个

开始,而结束

直接写在 html 代码中)。

2. iframes are not supported

不支持 iframe,看昨天文章,可用 object 替代。

3. Custom attributes are sinful

自定义属性有罪。

4. The XHTML layout engines are slower and buggier

XHTML框架的(浏览器)引擎又慢问题又多

5. Internet Explorer does not support XHTML

IE不支持真正的(MIME为application/xhtml+xml)XHTML。文中还说
中 斜线和br 之间的空格就是写给IE看的。

6. XHTML has to be sent using incorrect MIME types

只能提供不正确的MIME类型。(目前大多都提供的是 text/html)

7. The W3C’s MITization of the web is not a good thing

(不知如何翻译,总之,历数W3C这些年提供技术规范的漏洞百出)

8. XHTML provides no benefits

xhtml没任何好处。

最后,作者总结了这么一句话:

Well designed, semantic HTML is enough.

guoshuang2005-11-13+可是假如不 xhtml 化,xml类应用(比如feed,foaf)怎么玩?

[Edit on 2005-11-13 12:10:21 By guoshuang]