XHTML 1.1作为text / html [英] XHTML 1.1 as text/html

查看:54
本文介绍了XHTML 1.1作为text / html的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现了一些我想要解决的矛盾。


< http://www.w3.org/MarkUp/2004/xhtml-faq#mime11states:


为什么不允许将XHTML 1.1文档作为text / html发送?


XHTML 1.1是纯XML,仅用于打算是XML。它不能可靠地发送到旧版浏览器。因此,XHTML 1.1文件必须与XML相关的媒体类型一起发送,例如

application / xhtml + xml。



我已经注意到_disallowed_ text / html和_must_发送与

XML相关的媒体类型这里强烈要求。


另一方面,目前的XHTML 1.1草案

< http://www.w3.org/TR/2007/ WD-xhtml11-20070216 / conformance.html#strict>

状态(在本节末尾):


XHTML 1.1文档应该是什么标有[RFC2854]中定义的互联网媒体类型

text / html或[RFC3236]中定义的application / xhtml + xml

。有关使用XHTML使用媒体类型

的更多信息,请参阅信息性说明[XHTMLMIME]。



之前的XHTML 1.1建议不包括这一段

(或者应该是MIME类型)但是;应该标记

with text / html"声明给了我一个强烈的建议,我可以作为text / html服务。

XHTML 1.1。哪个事实上是正确的?


进一步在引用的[XHTMLMIME]中我看到一张表

< http://www.w3.org/TR / xhtml-media-types /#summarywhich建议我

" SHOULD NOT"将text / html与XHTML 1.1文档一起使用,但不是
表示强烈的绝不。需求。在3.1。 ''text / html''"

< http://www.w3.org/TR/xhtml-media-types/#text-htmlsection我没有

看到XHTML 1.1的任何提及。


鉴于最后一个文件是最老的我没看到必要的

逻辑开发:< 2002年8月
:不支持XHTML 1.1的text / html;

2004年7月:不允许使用XHTML 1.1的text / html;

2007年2月:允许使用XHTML 1.1的text / html(如果不鼓励的话)。


-

Stanimir

解决方案




2008年6月24日星期二23:52:17 + 0300,Stanimir Stamenkov写道:


我发现了一些我想要解决的矛盾。


< http://www.w3.org/MarkUp/2004/xhtml -faq #mime11states:


> XHTML 1.1 ...必须与XML相关的媒体类型一起发送


另一方面,当前的XHTML 1.1草案声明


> XHTML 1.1文档应该标记为...... text / html



不要指望w3c对mime类型有一点点线索。

他们基本上只是随着时间的推移弥补并定期得到它

完全错误。我的意思是,html4和其他标准声明CSS

应该是text / css!


这是完全错误的,尽管他们试图通过

发布信息 (不是标准的)rfc(2318),事实是

css不是自然语言文本,因此不能用任何文本/ *

MIME类型来描述。 />

所以基本上,答案是,忽略w3c上的僵尸程序,并测试一下b $ b浏览器以查看哪些有效,以及它们是否被区别对待。使用你的

判断。我会说根据rfc2046 3(1)你应该

可能使用text / *类型。如果你应该使用text / *

进行酸测试是如果它显示为text / plain会不会被读取?


HTH

viza


.. oO(viza)


>这个是完全错误的,虽然他们试图通过发布信息来使其标准化。 (不是标准的)rfc(2318),事实是
css不是自然语言文本,所以不能用任何文本/ *
MIME类型来描述。



谁说文本/ *必须是自然语言文本?


Micha





周五,2008年6月27日11:44:43 +0200,Michael Fesser写道:


.oO(viza)


>这是完全错误的,虽然他们试图通过发布信息来使其标准化。 (不是标准的)rfc(2318),事实是,css不是自然语言文本,所以不能用任何
text / * MIME类型来描述。



谁说文本/ *必须是自然语言文本?



我已经说过,但你剪了它:

http://tools.ietf.org/html/rfc2046#section-3


HTH

viza


I''ve found some contradiction I want to resolve.

<http://www.w3.org/MarkUp/2004/xhtml-faq#mime11states:

Why is it disallowed to send XHTML 1.1 documents as text/html?

XHTML 1.1 is pure XML, and only intended to be XML. It cannot
reliably be sent to legacy browsers. Therefore XHTML 1.1 documents
must be sent with an XML-related media type, such as
application/xhtml+xml.

I''ve noted "_disallowed_ text/html" and "_must_ be sent with an
XML-related media type" here as strong requirement.

On the other hand the current XHTML 1.1 draft
<http://www.w3.org/TR/2007/WD-xhtml11-20070216/conformance.html#strict>
states (at the end of the section):

XHTML 1.1 documents SHOULD be labeled with the Internet Media Type
text/html as defined in [RFC2854] or application/xhtml+xml as
defined in [RFC3236]. For further information on using media types
with XHTML, see the informative note [XHTMLMIME].

The previous XHTML 1.1 recommendation doesn''t include this paragraph
(or what should be the MIME type at all) but the "SHOULD be labeled
with text/html" statment gives me a strong suggestion I can serve
XHTML 1.1 as text/html. Which is de facto correct?

Further in the referenced [XHTMLMIME] I see a table
<http://www.w3.org/TR/xhtml-media-types/#summarywhich suggest I
"SHOULD NOT" use text/html with XHTML 1.1 documents, but doesn''t
state a strong "MUST NOT" requirement. In the "3.1. ''text/html''"
<http://www.w3.org/TR/xhtml-media-types/#text-htmlsection I don''t
see any mention of XHTML 1.1.

Given the last document is the oldest I don''t see a necessary
logical development:

August 2002: text/html for XHTML 1.1 is discouraged;
July 2004: text/html for XHTML 1.1 is disallowed;
February 2007: text/html for XHTML 1.1 is permitted (if not encouraged).

--
Stanimir

解决方案

Hi

On Tue, 24 Jun 2008 23:52:17 +0300, Stanimir Stamenkov wrote:

I''ve found some contradiction I want to resolve.

<http://www.w3.org/MarkUp/2004/xhtml-faq#mime11states:

>XHTML 1.1 ... must be sent with an XML-related media type

On the other hand the current XHTML 1.1 draft states

>XHTML 1.1 documents SHOULD be labeled ... text/html

Don''t expect the w3c to have the slightest bit of clue about mime types.
They basically just make it up as they go along and regularly get it
completely wrong. I mean, html4 and other standards state that CSS
should be text/css!

This is completely wrong and although they tried to make it standard by
publishing an "informational" (not standard) rfc (2318), the fact is that
css is not natural language text and so cannot be described by any text/*
MIME type.

So basically, the answer is, ignore the botchers at the w3c, and test
browsers to see what works and if it is treated differently. Use your
judgement. I would say that according to rfc2046 3(1) you should
probably use a text/* type. The acid test for if you should use text/*
is "can it be read if it was displayed as text/plain?".

HTH
viza


..oO(viza)

>This is completely wrong and although they tried to make it standard by
publishing an "informational" (not standard) rfc (2318), the fact is that
css is not natural language text and so cannot be described by any text/*
MIME type.

Who says that text/* has to be natural language text?

Micha


Hi

On Fri, 27 Jun 2008 11:44:43 +0200, Michael Fesser wrote:

.oO(viza)

>This is completely wrong and although they tried to make it standard by
publishing an "informational" (not standard) rfc (2318), the fact is
that css is not natural language text and so cannot be described by any
text/* MIME type.


Who says that text/* has to be natural language text?

I already said, but you snipped it:

http://tools.ietf.org/html/rfc2046#section-3

HTH
viza


这篇关于XHTML 1.1作为text / html的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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