XHTML 仍然有害吗? [英] XHTML still harmful?

查看:31
本文介绍了XHTML 仍然有害吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在启动一个项目,其中客户要求使用 XHTML 1.0 Strict.现在我想知道 将 XHTML 作为文本/html 认为有害 中描述的问题是否仍然存在以及我是否应该尝试让客户相信这个(非常强烈的)要求会适得其反.

I'm starting a project where the client has mandated the use of XHTML 1.0 Strict. Now I'm wondering whether the problems described in Sending XHTML as text/html Considered Harmful are still current and whether I should try to convince the client that this (very strongly stated) requirement is counterproductive.

Internet Explorer 现在是否正确处理application/xhtml+xml?

Does Internet explorer handle application/xhtml+xml correctly by now?

推荐答案

IE9 处理 application/xhtml+xml,其中包括 SVG,这是想要使用这种媒体类型的主要原因之一.(否则,到目前为止,使用它的意义相对较小,因为您会获得大量脚本更改以及 IE<9 不兼容,因此目前获得的性能提升相对较少.)

IE9 handles application/xhtml+xml, including SVG inside it, one of the main reasons to want to use this media type. (Otherwise, there's relatively little point in using it to date, as you get a bunch of scripting changes, and IE<9 incompatibility, in return for relatively little if any performance gain at the moment.)

我不同意 Hixie 的观点,即以 text/html 的形式提供 XHTML 已经 真的有害.使用 HTML 兼容性指南,XHTML 对自古老的 Netscape 4 以来的任何浏览器都没有问题.使用 XML 处理工具.并且 XML 语法规则比 HTML 更严格但更简单,适合创作;这让验证器有机会发现在 SGML/HTML 中是有效构造的错误,但几乎可以肯定不是你的意思.(另一方面,由于验证器不会强制执行 HTML 兼容性指南,因此它可以在一些地方通过格式良好但麻烦的标记,最常见的是自封闭

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆