伪XHTML的时尚性 [英] Trendiness of pseudo-XHTML

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

问题描述

我碰巧看了很多网站的源代码

最近,并注意到他们包含的一个令人沮丧的倾向

pseudo- XHTML语法(例如,以/>结尾的标签),即使DOCTYPE

声明实际上是非XHTML声明(例如HTML 4.01),或者是

完全没有,或者是错位的。 (DOCTYPES有时可以在

中找到所有错误的地方......我已经在表格单元格中找到它们,因为

实例。)通常,不是*全部*空标签(需要

XHTML中的/>语法)是如此标记,但有一个随机的

分类的XHTML-在任何DOCTYPE下,样式和HTML样式的标签都是无效的(或者

具有与作者意图不同的真实含义)。


我的结论是当今许多开发人员(和/或他们的b $ b boss或客户)已经吸收了一些关于

XML(和XHTML)的流行语炒作,并且一些模糊的概念,它比某种方式更好于HTML,没有任何关于XHTML实际上是什么的最简单的理解,或者主要原因(理论上是
)XHTML实际上可能优于HTML,因为它被认为需要

来解析很多str icter语法要求,没有留下任何东西

浏览器修复。


因此,他们把它视为另一种香料,折腾到了一点点

味道他们的标签汤。


-

== Dan ==

Dan'的邮件格式网站: http://mailformat.dan.info/

Dan的网页提示: http://webtips.dan.info/

Dan的域名网站: http://domains.dan.info /

I''ve happened to look at the source code to a number of Web sites
lately, and have noticed a distressing tendency for them to include
pseudo-XHTML syntax (e.g., tags ending with "/>") even when the DOCTYPE
declaration is actually a non-XHTML one (such as HTML 4.01), or is
absent altogether, or is misplaced. (DOCTYPES can sometimes be found in
all the wrong places... I''ve found them within table cells, for
instance.) Usually, not *all* of the empty tags (which would require
the "/>" syntax in XHTML) are so marked, but there is instead a random
assortment of XHTML-style and HTML-style tags that would be invalid (or
have a real meaning unlike that intended by the author) under any DOCTYPE.

My conclusion is that lots of current-day developers (and/or their
bosses or clients) have absorbed some of the buzzword hype surrounding
XML (and XHTML) these days, and have some vague concept that it''s
somehow better than HTML, unaccompanied by the slightest understanding
of what XHTML actually is, or that the main reason that (theoretically
at least) XHTML might actually be superior to HTML is that it''s supposed
to be parsed with much stricter syntax requirements, leaving nothing to
browser fixup.

Thus, they treat it as another bit of spice, tossing in a pinch to
flavor their tag soup.

--
== Dan ==
Dan''s Mail Format Site: http://mailformat.dan.info/
Dan''s Web Tips: http://webtips.dan.info/
Dan''s Domain Site: http://domains.dan.info/

推荐答案



Daniel R. Tobias写道:

Daniel R. Tobias wrote:

我最近碰巧看了很多网站的源代码

,并注意到他们要包含的令人沮丧的倾向

伪XHTML语法
I''ve happened to look at the source code to a number of Web sites
lately, and have noticed a distressing tendency for them to include
pseudo-XHTML syntax



最近& QUOT;你的意思是从2002年左右开始的?

By "lately" you mean from some time around 2002 ?


" Daniel R. Tobias" < da*@tobias.namewrote:
"Daniel R. Tobias" <da*@tobias.namewrote:

>我的结论是很多当今的开发者(和/或他们的老板或客户)已经吸收了一些围绕着XML(和XHTML)的流行语炒作,并且有一些模糊的概念,它以某种方式比HTML更好,没有任何一点点的理解
XHTML实际上是,或者说理论上(理论上至少)XHTML可能实际上优于HTML的主要原因是它被认为需要用更严格的语法要求进行解析,不留任何东西<浏览器修复。
>My conclusion is that lots of current-day developers (and/or their
bosses or clients) have absorbed some of the buzzword hype surrounding
XML (and XHTML) these days, and have some vague concept that it''s
somehow better than HTML, unaccompanied by the slightest understanding
of what XHTML actually is, or that the main reason that (theoretically
at least) XHTML might actually be superior to HTML is that it''s supposed
to be parsed with much stricter syntax requirements, leaving nothing to
browser fixup.



打哈欠。


搞定程序,这个趋势已存在很久了,问题

http://www.hixie.ch/advocacy/专门评论xhtml

更广泛的服务XHTML作为text / html讨论死亡的后果。


请不要再讨论这个,阅读档案。


-

Spartanicus

Yawn.

Get with the program, this trend has existed for a long time, the issue
specifically commented on by http://www.hixie.ch/advocacy/xhtml and the
wider ramifications of serving XHTML as text/html discussed to death.

Kindly spare us another iteration of discussing this, read the archives.

--
Spartanicus


Daniel R. Tobias写道:
Daniel R. Tobias wrote:

我最近碰巧看了很多网站的源代码

,并注意到它们包含的令人沮丧的倾向

伪XHTML语法(例如,以/>结尾的标签),即使DOCTYPE

声明实际上是非XHTML声明(例如HTML) 4.01),或者完全不存在或者是错误放置的b $ b。 (DOCTYPES有时可以在

中找到所有错误的地方......我已经在表格单元格中找到它们,因为

实例。)通常,不是*全部*空标签(需要

XHTML中的/>语法)是如此标记,但有一个随机的

分类的XHTML-在任何DOCTYPE下,样式和HTML样式的标签都是无效的(或者

具有与作者意图不同的真实含义)。


我的结论是当今许多开发人员(和/或他们的b $ b boss或客户)已经吸收了一些关于

XML(和XHTML)的流行语炒作,并且一些模糊的概念,它比某种方式更好于HTML,没有任何关于XHTML实际上是什么的最简单的理解,或者主要原因(理论上是

至少)XHTML实际上可能优于HTML,因为它被认为需要

来解析多少stri cter语法要求,没有留下任何东西

浏览器修复。


因此,他们把它视为另一种香料,折腾到一点点

味道他们的标签汤。
I''ve happened to look at the source code to a number of Web sites
lately, and have noticed a distressing tendency for them to include
pseudo-XHTML syntax (e.g., tags ending with "/>") even when the DOCTYPE
declaration is actually a non-XHTML one (such as HTML 4.01), or is
absent altogether, or is misplaced. (DOCTYPES can sometimes be found in
all the wrong places... I''ve found them within table cells, for
instance.) Usually, not *all* of the empty tags (which would require
the "/>" syntax in XHTML) are so marked, but there is instead a random
assortment of XHTML-style and HTML-style tags that would be invalid (or
have a real meaning unlike that intended by the author) under any DOCTYPE.

My conclusion is that lots of current-day developers (and/or their
bosses or clients) have absorbed some of the buzzword hype surrounding
XML (and XHTML) these days, and have some vague concept that it''s
somehow better than HTML, unaccompanied by the slightest understanding
of what XHTML actually is, or that the main reason that (theoretically
at least) XHTML might actually be superior to HTML is that it''s supposed
to be parsed with much stricter syntax requirements, leaving nothing to
browser fixup.

Thus, they treat it as another bit of spice, tossing in a pinch to
flavor their tag soup.



另一种可能性:使用内容管理系统维护网站

系统,其中页面模板是手工编码的(因此是

可能是直接HTML),而每个页面的内容部分是使用构建DOM片段的WYSIWYG组件输入的
,验证

它,以及将它存储在XML中,然后在页面部署

时将其吐出。 (这不是猜想 - 它是真实的体验。)

Another possibility: a site is maintained using a content management
system in which page templates are hand-coded (and are therefore
probably in straight HTML) while the content portion of each page is
entered using a WYSIWYG component that builds a DOM fragment, validates
it, and stores it in XML, and then spits it out as such when the page is
deployed. (This isn''t conjecture--it''s real-life experience.)


这篇关于伪XHTML的时尚性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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