IE对XHTML 1.0 Transitional和HTML Transitional有同样的问题吗? [英] Does IE have the same problems with XHTML 1.0 Transitional as it does with HTML Transitional?

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

问题描述

你好,


我已经读过IE在使用HTML文档类型时遇到的问题

4.01 Transitional。我被建议尽可能使用Strict。


我的问题是,这同样适用于XHTML 1.0 Transitional吗?我使用ASP.NET开发了

站点,它发出了有效的XHTML 1.0 Transitional,但没有

XHTML 1.0严格(例如,它包含一个带有
_VIEWSTATE的名称,在Strict无效,但在

Transitional)。


任何评论?框架很棒,但是我有点卡住

试图生成100%有效的代码。我可能有任何浏览器

XHTML 1.0 Transitional的问题吗?


TIA


-

Alan Silver

(此行下面添加的任何内容都与我无关)

Hello,

I have read about the problems that IE has when using a doctype of HTML
4.01 Transitional. I was advised to use Strict wherever possible.

My question is, does the same apply to XHTML 1.0 Transitional? I develop
sites using ASP.NET, which emits valid XHTML 1.0 Transitional, but not
XHTML 1.0 Strict (for example, it includes a hidden form field with the
name of _VIEWSTATE, which isn''t valid in Strict, but is in
Transitional).

Anyone any comments? The framework is brilliant, but I''m a bit stuck
trying to produce 100% valid code. Am I likely to have any browser
problems with XHTML 1.0 Transitional?

TIA

--
Alan Silver
(anything added below this line is nothing to do with me)

推荐答案

Alan Silver写道:
Alan Silver wrote:
我读过IE在使用HTML文档类型时所遇到的问题
4.01 Transitional。我被建议尽可能使用Strict。


大概你在谈论doctype嗅探? IE6可以通过以下两种方式之一呈现

文档:Quirks模式,它模拟了IE5的缺陷和IE5的标准模式。


Quirks模式由HTML 4.01 Transitional doctype触发,没有

URL(即<!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01

Transitional // EN">) - 请注意,它只是触发

切换到怪癖模式的doctype。实际HTML是否与doctype匹配

不是因素。


标准模式由HTML 4.01 Transitional doctype触发,带有

URL(即<!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01

Transitional // EN"" http://www.w3.org/TR/ html4 / loose.dtd">)和HTML

4.01严格的文档类型。

XHTML 1.0(严格或过渡)触发标准模式,除非有

是一个XML声明(例如<?xml version =" 1.0" encoding =" UTF-8"?>)

在它之前,在这种情况下Quirks模式触发。

我的问题是,这同样适用于XHTML 1.0 Transitional吗?我使用ASP.NET开发了
站点,它发出了有效的XHTML 1.0 Transitional,但没有
XHTML 1.0严格


应该可以使.net挤出任何东西您想要的代码

to。它是一个相当废话的工具,如果它不是。

(例如,它包含一个隐藏的表单字段,其名称为_VIEWSTATE,在Strict中无效,但是在过渡时期。


Eh?


我刚刚上传


<!DOCTYPE html PUBLIC" - // W3C // DTD XHTML 1.0 Strict // EN"

" http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

< html xmlns =" http://www.w3.org/1999/xhtml">

< head>

< title> Test Doc< / title>

< / head>

< body>

< form action =" /" ;>< div>< input type =" hidden" name =" _VIEWSTATE"

value =" foo" />< / div>< / form>

< / body>

< / html>


到验证器并且它通过了。你得到的实际错误是什么?

(请注意,在Strict,HTML 4.01或XHTML 1.0中,表单输入必须是

块级元素的子级比如p,div或fieldset而不能

是形式的直接孩子。

任何评论?框架很棒,但我有点卡住了尝试生成100%有效的代码。我可能在XHTML 1.0 Transitional中遇到任何浏览器问题吗?
I have read about the problems that IE has when using a doctype of HTML
4.01 Transitional. I was advised to use Strict wherever possible.
Presumably you''re talking about doctype sniffing? IE6 can render a
document in one of two ways: Quirks mode which emulates the flaws of
IE5 and Standards mode which doesn''t.

Quirks mode is triggered by a HTML 4.01 Transitional doctype without an
URL (i.e. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN">) - note that it is merely the doctype that triggers
the switch to quirks mode. Whether the actual HTML matches the doctype
isn''t a factor.

Standards mode is triggered by a HTML 4.01 Transitional doctype with a
URL (i.e. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">) and by HTML
4.01 Strict doctypes.

XHTML 1.0 (Strict or Transitional) triggers Standards mode unless there
is an XML declaration (e.g. <?xml version="1.0" encoding="UTF-8"?>)
preceeding it in which case Quirks mode is triggered.
My question is, does the same apply to XHTML 1.0 Transitional? I develop
sites using ASP.NET, which emits valid XHTML 1.0 Transitional, but not
XHTML 1.0 Strict
It should be possible to make .net extrude whatever code you want it
to. It''s a fairly crap tool if it doesn''t.
(for example, it includes a hidden form field with the
name of _VIEWSTATE, which isn''t valid in Strict, but is in
Transitional).
Eh?

I just uploaded

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test Doc</title>
</head>
<body>
<form action="/"><div><input type="hidden" name="_VIEWSTATE"
value="foo" /></div></form>
</body>
</html>

to the validator and it passed. What''s the actual error you''re getting?
(Note that in Strict, HTML 4.01 or XHTML 1.0, form inputs must be
children of block level elements such as p, div or fieldset and can not
be direct children of form.
Anyone any comments? The framework is brilliant, but I''m a bit stuck
trying to produce 100% valid code. Am I likely to have any browser
problems with XHTML 1.0 Transitional?




不是真的。假设.net挤出附录C兼容XHTML

风味标签汤作为text / html,然后浏览器将其视为

Quirks Mode(X)HTML标签汤或标准模式(X)HTML标签汤

与HTML 4.01相同。


Steve



Not really. Assuming .net extrudes "Appendix C compliant XHTML
flavoured tag soup served as text/html", then browsers will treat it as
either Quirks Mode (X)HTML tag soup or Standards Mode (X)HTML tag soup
just the same as they would do with HTML 4.01.

Steve


在文章< 11 ********************** @ g44g2000cwa.googlegroups .com>,

Steve Pugh< st ********** @ gmail.com>写道
In article <11**********************@g44g2000cwa.googlegroups .com>,
Steve Pugh <st**********@gmail.com> writes
Alan Silver写道:
Alan Silver wrote:
我读过IE在使用HTML文档类型时所遇到的问题
4.01 Transitional。我被建议尽可能使用Strict。
大概你在谈论doctype嗅探? IE6可以通过以下两种方式之一呈现
文档:模拟IE5的缺陷的Quirks模式和不能的标准模式。
I have read about the problems that IE has when using a doctype of HTML
4.01 Transitional. I was advised to use Strict wherever possible.
Presumably you''re talking about doctype sniffing? IE6 can render a
document in one of two ways: Quirks mode which emulates the flaws of
IE5 and Standards mode which doesn''t.




呃,这里是我的无知开始显示的地方!我在谈论

避免怪异模式,我明白这是相当邪恶的。

怪癖模式是由没有
URL的HTML 4.01 Transitional doctype触发的( ie<!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01
Transitional // EN">) - 请注意,它只是触发切换到怪癖模式的doctype。实际HTML是否与doctype匹配
不是因素。

标准模式由带有
URL的HTML 4.01 Transitional doctype触发(即<!DOCTYPE HTML PUBLIC " - // W3C // DTD HTML 4.01
Transitional // EN"" http://www.w3.org/TR/html4/loose.dtd">)和HTML
4.01严格的doctypes。


啊,我显然错了。我认为这是Transitional,

将IE发送到quirks模式而Strict则没有。感谢

澄清,这让生活变得更加轻松。

XHTML 1.0(严格或过渡)触发标准模式,除非
是XML声明(例如< ;?xml version =" 1.0" encoding =" UTF-8"?>)
在它之前触发Quirks模式。



Erm, here''s where my ignorance begins to show!! I was talking about
avoiding quirks mode, which I understand to be fairly evil.
Quirks mode is triggered by a HTML 4.01 Transitional doctype without an
URL (i.e. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN">) - note that it is merely the doctype that triggers
the switch to quirks mode. Whether the actual HTML matches the doctype
isn''t a factor.

Standards mode is triggered by a HTML 4.01 Transitional doctype with a
URL (i.e. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">) and by HTML
4.01 Strict doctypes.
Ah, I obviously got the story wrong. I thought it was Transitional that
sent IE into quirks mode and Strict that didn''t. Thanks for the
clarification, that makes life much easier.
XHTML 1.0 (Strict or Transitional) triggers Standards mode unless there
is an XML declaration (e.g. <?xml version="1.0" encoding="UTF-8"?>)
preceeding it in which case Quirks mode is triggered.




所以,如果我有这样的doctype ......


<!DOCTYPE html PUBLIC" - // W3C // DTD XHTML 1.0 Transitional // EN"

" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


这会给我标准模式?如果是这样,那么我想我已经解决了我的

问题。



So, if I have a doctype like this...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

will this give me standards mode? If so, then I think I have solved my
problem.

我的问题是,这同样适用于XHTML 1.0过渡?我使用ASP.NET开发了
站点,它发出了有效的XHTML 1.0 Transitional,但没有
XHTML 1.0 Strict
My question is, does the same apply to XHTML 1.0 Transitional? I develop
sites using ASP.NET, which emits valid XHTML 1.0 Transitional, but not
XHTML 1.0 Strict



应该可以使.net挤出任何东西代码你想要它
。如果它不是,这是一个相当废话的工具。



It should be possible to make .net extrude whatever code you want it
to. It''s a fairly crap tool if it doesn''t.




有可能,我不知道。我知道默认情况下它会发出XHTML

1.0 Transitional(显然不像我发布的那样严格)。我用b $ b没问题,所以我还没有真正探索改变它的可能性。



It may be possible, I don''t know. I know that by default it emits XHTML
1.0 Transitional (apparently not Strict as I thought when I posted). I
don''t have a problem using that, so I haven''t really explored the
possibilities of changing it.

(例如,它包含一个隐藏的表单字段,其名称为_VIEWSTATE,在Strict中无效,但在过渡时间内有效)。
(for example, it includes a hidden form field with the
name of _VIEWSTATE, which isn''t valid in Strict, but is in
Transitional).



嗯?



Eh?



< snip>


好​​吧,我本可以得到那么厉害错误。我知道当我第一次开始修理一些代码时,我遇到了这类问题,但也许我现在感到很困惑。我需要回去再检查一下。


<snip>

OK, I could have got that badly wrong. I know that when I first started
fixing some code, I was getting problems of this sort, but maybe I''m
getting confused now. I''ll need to go back and check it again.

任何评论?框架很棒,但是我有点卡住
试图生成100%有效的代码。我可能在XHTML 1.0 Transitional中遇到任何浏览器问题吗?
Anyone any comments? The framework is brilliant, but I''m a bit stuck
trying to produce 100% valid code. Am I likely to have any browser
problems with XHTML 1.0 Transitional?



不是真的。假设.net挤出附录C兼容的XHTML
风味标签汤作为text / html,则浏览器会将其视为Quirks Mode(X)HTML标签汤或标准模式(X)HTML标签汤
与HTML 4.01一样。



Not really. Assuming .net extrudes "Appendix C compliant XHTML
flavoured tag soup served as text/html", then browsers will treat it as
either Quirks Mode (X)HTML tag soup or Standards Mode (X)HTML tag soup
just the same as they would do with HTML 4.01.




好​​吧,据我所知,它发出100%有效的XHTML 1.0 Transitional ,

排除奇怪的错误!!


非常感谢您的回复。我想你的澄清已经把我分类了

out。


-

Alan Silver

(这行下面添加的任何内容都与我无关。



Well, as far as I know, it sends out 100% valid XHTML 1.0 Transitional,
excluding the odd bug!!

Thanks very much for the reply. I think your clarification has sorted me
out.

--
Alan Silver
(anything added below this line is nothing to do with me)


Alan Silver写道:
Alan Silver wrote:
XHTML 1.0(严格或过渡)触发标准模式
XHTML 1.0 (Strict or Transitional) triggers Standards mode
<!DOCTYPE html PUBLIC" - // W3C // DTD XHTML 1.0 Transitional // EN"
" ; http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

这会给我标准模式吗?如果是这样,那么我认为我已经解决了我的问题。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

will this give me standards mode? If so, then I think I have solved my
problem.




是的......但是客户端XHTML充其量只是愚蠢[1],过去包含但是严格的HTML并不是几乎完全遗留的垃圾

应该避免的。



Yes ... but client-side XHTML is silly at best[1], and the bits of HTML that
Transitional includes but Strict doesn''t are almost entirely legacy junk
that should be avoided.

我的问题是,这同样适用于XHTML 1.0 Transitional吗?我使用ASP.NET开发了
站点,它发出了有效的XHTML 1.0 Transitional,但没有发布XHTML 1.0 Strict


我听说过ASP.NET的一切说要避免使用其内置的标记

生成代码(由于其质量低)。我建议你找到其他选择。

任何评论?框架很棒,但是我有点卡住
试图生成100%有效的代码。我可能在XHTML 1.0 Transitional中遇到任何浏览器问题吗?
My question is, does the same apply to XHTML 1.0 Transitional? I develop
sites using ASP.NET, which emits valid XHTML 1.0 Transitional, but not
XHTML 1.0 Strict
Everything I''ve heard about ASP.NET says to avoid using its built in markup
generating code (due to its low quality). I suggest you find alternatives.
Anyone any comments? The framework is brilliant, but I''m a bit stuck
trying to produce 100% valid code. Am I likely to have any browser
problems with XHTML 1.0 Transitional?




可能?不,但确实存在。 (问题是由于XHTML位

而不是过渡位)。


[1]嗯,有一些例外,但它们是非常罕见。

-

David Dorward< http://blog.dorward.me.uk/> < http://dorward.me.uk/>

首页是〜/ .bashrc的位置



Likely? No, but they do exist. (The problems there are due to the XHTML bit
rather than the Transitional bit though).

[1] Well, there are some exceptions, but they are exceptionally rare.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is


这篇关于IE对XHTML 1.0 Transitional和HTML Transitional有同样的问题吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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