浏览器中的DTD [英] DTD in browsers

查看:51
本文介绍了浏览器中的DTD的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



Randy Webb写道:


Randy Webb wrote:

VK在2006年5月2日上午9:48发表以下内容:
VK said the following on 5/2/2006 9:48 AM:
如果你的意思是 ;试图渲染它然后FF的行为与所有其他UA愿意使用(而不是W3C演示)的行为相同。如果文档以文本/ html的形式提供,FF无论如何都会以某种方式呈现它。
所以你说它完全忽视了DTD和来自
服务器的任何提示如何处理文档?
If you mean "trying to render it" then FF behavior is the same as for
all other UA''s willing to be in use (and not W3C demos). If document is
served as text/html, FF will render it somehow anyhow.
So you are saying it totally disregards the DTD and any hints from the
server how to handle the document?




除了服务器报告的Content-Type(text / plain,text / html,text / xml,

application / xhtml + xml等)

DTD字符串本身是无关紧要的(这个字符串本身不是来自服务器的提示,而是来自文档的提示)。 />



Except server reported Content-Type (text/plain, text/html, text/xml,
application/xhtml+xml etc.)
DTD string itself is irrelevant (and this string by itself is not a
"hint from the server" but a "hint from the document").

显然每次都没有连接到w3.org获取DTD,它使用
构建一个。
Obviously it doesn''t connect every time to w3.org to get a DTD, it uses
a build one.



所以你再次说DTD是不相关的?



So you are saying, again, that DTD''s are irrelevant?



从文档解析的角度来看:是的,绝对的无关。
他们对文档的索引和

搜索有一定的理论重要性。最重要的是DTD允许 - 到目前为止 - 将IE切换到W3C

盒模型(除非简短的HTML Transitional)。如果没有后者,他们的使用将仅限于ciwas和ciwah。


From the document parsing point of view: yes, absolutely irrelevant. They have some theoretical importance for documents'' indexing and
searching. Most importantly DTD allows - so far - to switch IE into W3C
box model (unless short HTML Transitional). Without the latter their
usage would be limited by ciwas and ciwah exclusively.

这将是另一个您的问题的一个方面:什么DTD /
标记数据库构建到FF?到目前为止只有一个:XHTML 1.0 HTML Firefox唯一知道的名称空间是
xmlns:html =" http://www.w3.org/1999/xhtml"
That would be another aspect of your question: what DTD/
tag database is build in into FF? Only one so far: XHTML 1.0 The only
namespace for HTML Firefox knows about is
xmlns:html="http://www.w3.org/1999/xhtml"



If that is true, then Firefox is not even close to Standards Compliant.




这是真的,但Firefox *符合*标准 - 如就像人类可能没有使UA变得无用并且保持它对潜在用户有吸引力一样。



It is true, but Firefox *is* Standards Compliant - as much as it''s
humanly possible without rendering a UA useless and by keeping it
attractive for potential users.

但是根据这个表做出什么决定 - 它完全取决于Content-Type。与
Content-Type text / html完全相同的内容会经历或调整,但使用
application / xhtml + xml会导致解析错误。
But what decision will it make based on this table - it depends
completely on the Content-Type. Say absolutely the same content with
Content-Type text/html will go through or get adjusted, but with
application/xhtml+xml will lead to a parsing error.



奇怪的行为,如果你告诉它text / html与4.01 DTD



Odd behavior if you tell it text/html with a 4.01 DTD




WWW不会通过扩展或正式的文件标志,从来没有和

永远不会。唯一重要的部分是Content-Type。它定义了

一切。



WWW doesn''t go by extensions or formal document signs, never did and
never will. The only important part is Content-Type. It defines
everything.

如果有人好奇:IE6的DTD构建是
< http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd>这是它所知道的唯一一个,也是它唯一使用的一个。 IE中存在的唯一
文档类型是<!DOCTYPE HTML PUBLIC" - // W3C // DTD
HTML 4.01 Transitional // EN">
And if anyone curious: the build in DTD of IE6 is
<http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd> This is the
only one it''s aware of and the only one it uses. Respectively the only
type of documents existing in IE is <!DOCTYPE HTML PUBLIC "-//W3C//DTD
HTML 4.01 Transitional//EN">



现在我不相信。



Now that I don''t believe.




如你所愿。但你相信或不相信这件事并没有改变任何事情。唯一的主要在IE7中预期的变化将是< abbr>

元素作为单独的实体添加(现在它作为synonim或< acronym>)。

当然IE知道一个bounch其他专有标签。它有行为表(< public>,< component>,< attach>等),VML表

(< v:group> ,< v:line>,< v:oval>等)等等。但谈到

*那些* DTD - 来自W3C - 上面提到的DTD是唯一的。



As you wish. But you believe or disbelieve doesn''t change anything in
this matter. The only "major" change expecting in IE7 will be <abbr>
element added as separate entity (now it goes as synonim or <acronym>).
Of course IE knows a bounch of other proprietary tags. It has tables
for behaviors (<public>, <component>, <attach> etc.), tables for VML
(<v:group>, <v:line>, <v:oval> etc.) and so on. But talking about
*those* DTD - from W3C - the above mentioned DTD is the only one.

通过提供其他DTD,可以在CSS1Compat中切换IE。模式,但它只是对Unknown DTD的正式反应。编程到
浏览器中,DTD本身永远不会改变。
By providing other DTD''s one can switch IE in "CSS1Compat" mode, but
it''s just a formal reaction on "Unknown DTD" programmed into the
browser, DTD itself never changes.



你能证明吗?



Can you prove that?




哦com' '上!再次:证明我天空是蓝色的 ? :-)


<!DOCTYPE FOOBAR" Micro $ oft必须死!">

< html>

< head>

< title> Untitled Document< / title>

< meta http-equiv =" Content-Type"

content =" text / html; charset = iso-8859-1">

< / head>

< body onload =" alert(document.compatMode)">

< / body>

< / html>



Oh com''on! Again: "prove me that the sky is blue" ? :-)

<!DOCTYPE FOOBAR "Micro$oft must die!">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
</head>
<body onload="alert(document.compatMode)">
</body>
</html>

说你可以通过放置IE进入CSS1Compat模式:
<!DOCTYPE FOOBAR" Micro $ oft必须死!">
Say you can put IE into CSS1Compat mode by placing instead:
<!DOCTYPE FOOBAR "Micro$oft must die!">



乐趣永远不会结束?



Does the fun never end?




见上文

document.doctype在Firefox中提供了一些简洁的信息。



See above
document.doctype gives some neat info in Firefox though.




document.doctype只是方便访问提供的DTD

字符串,否则几乎无法访问(因为它正式位于任何文档块之外的
,甚至在
documentElement之外。在所有HTML文档的IE document.doctype == null中 -

我不想让DTD用户太烦恼。



document.doctype is just a convenience access to the provided DTD
string wich is hardly accessible otherwise (because it''s formally
located outside of any document blocks, even outside of
documentElement). In IE document.doctype==null for all HTML documents -
to not make DTD users too much upset I guess.

推荐答案

oft必须死!">

< html>

< head>

< title> ; Untitled Document< / title>

< meta http-equiv =" Content-Type"

content =" text / html; charset = iso-8859-1">

< / head>

< body onload =" alert(document.compatMode)">

< / body>

< / html>

oft must die!">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
</head>
<body onload="alert(document.compatMode)">
</body>
</html>

说你可以通过放置IE进入CSS1Compat模式:
<!DOCTYPE FOOBAR" Micro
Say you can put IE into CSS1Compat mode by placing instead:
<!DOCTYPE FOOBAR "Micro


oft must die!">
oft must die!">


<有趣的事情永远不会结束吗?



Does the fun never end?




见上文

document.doctype在Firefox中给出了一些简洁的信息。



See above
document.doctype gives some neat info in Firefox though.




document.doctype只是方便访问提供的DTD

字符串,否则几乎无法访问(因为它是正式的

位于任何文档块之外,甚至在
documentElement之外。在所有HTML文档的IE document.doctype == null中 -

我不想让DTD用户太烦恼。



document.doctype is just a convenience access to the provided DTD
string wich is hardly accessible otherwise (because it''s formally
located outside of any document blocks, even outside of
documentElement). In IE document.doctype==null for all HTML documents -
to not make DTD users too much upset I guess.


" VK" < SC ********** @ yahoo.com>写道:
"VK" <sc**********@yahoo.com> writes:
Randy Webb写道:
Randy Webb wrote:
所以你再次说DTD'的是不相关的?
So you are saying, again, that DTD''s are irrelevant?



从文档解析的角度来看:是的,绝对不相关。



From the document parsing point of view: yes, absolutely irrelevant.




文档类型声明子集ist绝对相关如果

文档实例没有完全或充分标记,并且绝对

与渲染无关。


对于HTML在野外的UAs,当然是另一种方式;但是像往常一样,b $ b并不是很清楚你真正的意思,这似乎是你的一般性讨论策略。

他们对文档的索引和搜索有一定的理论重要性。


?? Que?

最重要的是DTD允许 - 到目前为止 - 将IE切换到W3C
盒子模型(除非简短的HTML Transitional)。如果没有后者,他们的使用将受到ciwas和ciwah的限制。


试着弄清楚线索; DTD用户的目标受众范围不是特定的新闻组,而只是那些关心使用

软件的人可以处理的声明子集*创作*

进程,它属于。



The document type declaration subset ist absolutely relevant if the
document instance is not fully- or amply-tagged and absolutely
irrelevant for rendering.

For HTML as of UAs in the wild it''s the other way around of course; but
as usual, it''s not really clear what you actually mean, which seems to
be your general discussion strategy.
They have some theoretical importance for documents'' indexing and
searching.
??Que?
Most importantly DTD allows - so far - to switch IE into W3C
box model (unless short HTML Transitional). Without the latter their
usage would be limited by ciwas and ciwah exclusively.
Try to get a clue; the target audience scope of ''DTD users'' is not a
particular news group but simply those people who care to employ
software that can process the declaration subset in the *authoring*
process, where it belongs.

如果有人好奇: IE6的DTD版本是
< http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd>
And if anyone curious: the build in DTD of IE6 is
<http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd>




1)澄清你的意思,如果有的话

2)请完成第1步第1页

3)提供证据

<!DOCTYPE FOOBAR" Micro



1) Clarify what you mean by that, if anything
2) Please finish step 1 1st
3) Provide evidence
<!DOCTYPE FOOBAR "Micro


这篇关于浏览器中的DTD的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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