XHTML问题 [英] XHTML Problems

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

问题描述

我对构成,提供和呈现XHTML的问题采取的措施

文档/网页:


1.典型的尽责的网络作者正在制作XHTML文档(Web

页面)具有有效标记和内容(MIME)类型

指定为text / html

http://keystonewebsites.com/articles/mime_type.php) 。这些页面是

然后加载到他们的服务器,在那里他们被提供给渲染

代理(浏览器)作为HTML(SGML应用程序)文档没有问题

- 大多数Web服务提供者实现将HTML文档

与内容(MIME)类型text / html相关联。所有现存的图形浏览器都成功地渲染了这些页面 - 但它们不是XHTML

文档 - 它们是没有XML功能的HTML文档

http://hixie.ch/advocacy/xhtml) 。包含DocType

声明的HTML文档以标准模式显示 - 那些不显示在

quirks(非标准)模式中的文档。 MSIE浏览器呈现XHTML文档,其中包括quirks中的XML声明。模式,因此,对于作为HTML的XHTML文档,似乎应该省略

声明 -

虽然W3C在他们的主页上没有这样做。 2. b $ b 2.生成XHTML文档(网页)的Web作者,其中包含

有效标记和内容(MIME)类型指定为

application / xhtml + xml(由W3C规定)不可避免地面临严重的问题( http://www.w3.org/International/arti...erving-xhtml/)

大多数Web服务提供程序实现无法识别此内容

(MIME)类型。在这种情况下,网络作者必须联系他或她的Web

服务提供商,试图说服他们采用

application / xhtml + xml作为内容(MIME)类型联系

XHTML文档。如果这不起作用 - 而且它通常不会 - 那么

网络作者面临的任务是生成并加载服务器的.htaccess文件提供关联 - 对于许多网络作者来说,这是一个棘手的问题。但问题并没有就此结束。

当前符合XML标准的浏览器,如Mozilla,Netscape,Opera等等。

检索并呈现这些页面没有问题。然而,旧的

浏览器 - 更重要的是到目前为止 - 目前最常用的

图形浏览器 - MSIE 5.x / 6.x - 不会正确渲染这些

文档。 MSIE将它们显示为下载文件,并且

没有旧版浏览器的向后兼容性

http://www.w3.org/People/mimasa/test...-types/results


3.对于网络作者和W3C来说,这种情况是一个两难选择。 W3C

试图通过在他们的服务器上安装一个名为

Content-Negotiation的设施(作为其他人的模型?)来解决这种情况。

应该向浏览器提供内容(MIME)类型text / html或

application / xhtml + xml XHTML文档的选择,以便他们可以使用
渲染它们根据他们的能力

http://www.w3.org/2003/01/xhtml-mime...t-negotiation)

的想法是为旧浏览器提供向后兼容性,并且
适用于当前不符合XML的MSIE浏览器。当然,所有

这些都是HTML文档 - 而不是XHTML文档。理论上,XML

兼容的浏览器将提供功能齐全的XHTML文档。

W3C将其主页作为此功能的示例。

顺便说一下,W3C内容协商页面只针对Apache Server

实现深度解决,Jigsaw只是简单地解决了其他问题,例如Zeus

根本没有。


4.上述程序对我不起作用。该页面在我的(符合XML的)Mozilla Firefox浏览器中正确显示

,但当我通过W3C Markup验证器运行

时,Content-Type显示为

text / html - 它没有像预期的那样作为XHTML文档提供。

当然,如果W3C修复工作确实有效,页面仍然只会是

作为HTML提供。在我看来,这些问题必须由W3C尽快解决 - 当然在他们发布XHTML 2.0之前。现在,如果只是

Microsoft将生成一个浏览器(并提供对其现有的b / b
的修改)以识别内容(MIME)类型application / xhtml + xml

并提供真正的XHTML文档 - 就像Firefox,Opera等。做!


詹姆斯皮克林

皮克林页面
http://www.jp29.org/

My take on problems composing, serving and rendering XHTML
documents/web pages:

1. Typical conscientious web authors are producing XHTML documents (Web
pages) that feature valid Markup and with the content (MIME) type
specified as text/html
(http://keystonewebsites.com/articles/mime_type.php). These pages are
then loaded on to their Server where they are served to Rendering
Agents (browsers) as HTML (SGML application) documents with no problem
-- most Web Service Provider implementations associate HTML documents
with the content (MIME) type text/html. These pages are rendered
successfully by all extant graphical browsers -- but they are not XHTML
documents -- they are HTML documents without XML functionality
(http://hixie.ch/advocacy/xhtml). HTML documents that include DocType
declarations display in standards mode -- those that do not display in
"quirks (non-standard) mode. MSIE browsers render XHTML documents that
include the XML declaration in "quirks" mode, therefor, it seems the
declaration should be omitted for XHTML documents served as HTML --
although the W3C doesn''t do so on their Home page.

2. Web authors who produce XHTML documents (Web pages) that feature
valid Markup and with the content (MIME) type specified as
application/xhtml+xml (prescribed by the W3C) inevitably face serious
problems (http://www.w3.org/International/arti...erving-xhtml/).
Most Web Service Provider implementations do not recognize this content
(MIME) type. In that event, the web author must contact his or her Web
Service Provider to try and convince them to adopt
application/xhtml+xml as the content (MIME) type to associate with
XHTML documents.If that doesn''t work -- and it often doesn''t -- then
the web author is faced with the task of producing and loading up to
the server a .htaccess file that provides the association -- a tricky
endeavor for many web authors. But the problems do not end there.
Current XML compliant browsers such as Mozilla, Netscape, Opera, et al.
retrieve and render these pages with no problem. However, older
browsers -- and more importantly by far -- the most frequently used
graphical browsers today -- MSIE 5.x/6.x -- will not render these
documents correctly. MSIE presents them as Down Load files and there is
no backward compatibility for older browsers
(http://www.w3.org/People/mimasa/test...-types/results)

3. This situation is a dilemma for web authors -- and the W3C. The W3C
has attempted to resolve this situation by installing a facility called
Content-Negotiation on their Server (to be a model for others?) that is
supposed to offer a choice of content (MIME) type text/html or
application/xhtml+xml XHTML documents to browsers so that they can
render them according to their capabilities
(http://www.w3.org/2003/01/xhtml-mime...t-negotiation). The
idea is to provide backward compatibility for older browsers and
accommodate current non XML compliant MSIE browsers. Of course, all
these would be HTML documents -- not XHTML documents. In theory, XML
compliant browsers would be served fully functional XHTML documents.
The W3C offers their Home page as an exemplar of this functionality.
BTW, the W3C Content Negotiation page only addresses the Apache Server
implementation in depth, Jigsaw only briefly and others such as Zeus
not at all.

4. The above procedure is not working for me. The page displays
correctly in my (XML compliant) Mozilla Firefox browser, but when I run
it through the W3C Markup validator the Content-Type displays as
text/html -- it is not being served as an XHTML document as intended.
Of course, if the W3C fix did work, the pages would still only be
served as HTML. It seems to me these problems must be sorted out ASAP
by the W3C -- certainly before they release XHTML 2.0. Now if only
Microsoft would produce a browser (and offer modifications to their
existing ones) to recognize content (MIME) type application/xhtml+xml
and serve real XHTML documents -- just like Firefox, Opera, et al. do!

James Pickering
Pickering Pages
http://www.jp29.org/

推荐答案

jp ** @ cox.net 写道:
jp**@cox.net wrote:
我对构成,提供和渲染XHTML的问题采取了>文档/网页:

1.典型的尽职的网络作者正在制作XHTML文档(Web页面),其中包含有效的标记和内容(MIME)类型
指定为text / html
http://keystonewebsites.com/articles/mime_type .PHP)。这些页面然后被加载到他们的服务器上,在那里他们被提供给渲染代理(浏览器)作为HTML(SGML应用程序)文档没有问题
- 大多数Web服务提供者实现关联HTML文档
内容(MIME)类型text / html。这些页面由所有现存的图形浏览器成功呈现 - 但它们不是XHTML
文档 - 它们是没有XML功能的HTML文档
http://hixie.ch/advocacy/xhtml) 。包含DocType
声明的HTML文档以标准模式显示 - 那些不以怪癖(非标准)模式显示的模式。 MSIE浏览器呈现XHTML文档,其中包括quirks中的XML声明。模式,因此,对于作为HTML的XHTML文档,似乎应该省略
声明 -
虽然W3C在他们的主页上没有这样做。

2 。制作XHTML文档(网页)的网络作者,其中包含有效标记和指定为
application / xhtml + xml(由W3C规定)的内容(MIME)类型,不可避免地面临严重的问题。 >问题( http://www.w3.org/International /arti...erving-xhtml/)
大多数Web服务提供程序实现都不识别此内容
(MIME)类型。在这种情况下,网络作者必须联系他或她的Web服务提供商,试图说服他们采用
application / xhtml + xml作为内容(MIME)类型来关联。
XHTML如果那不起作用 - 而且往往不行 - 那么网络作者面临着生成和加载服务器的任务.htaccess文件提供协会 - 对许多网络作者来说是一项棘手的努力。但问题并没有就此结束。
当前符合XML标准的浏览器,如Mozilla,Netscape,Opera等,
检索并呈现这些页面没有问题。然而,旧的
浏览器 - 更重要的是到目前为止 - 当今最常用的图形浏览器 - MSIE 5.x / 6.x - 将无法正确呈现这些
文档。 MSIE将它们显示为下载文件,并且没有旧版浏览器的向后兼容性
http://www.w3.org/People/mimasa/test...-types/results

对于网络作者和W3C来说,这种情况是一个两难选择。 W3C已经尝试通过在他们的服务器上安装一个名为
Content-Negotiation的工具(作为其他人的模型?)来解决这种情况,该工具应该提供内容选择( MIME)键入text / html或
application / xhtml + xml XHTML文档到浏览器,以便他们可以根据自己的能力渲染它们( http://www.w3.org/2003/01/xhtml-mime...t-协商)
的想法是为旧版浏览器提供向后兼容性,并适应当前不符合XML的MSIE浏览器。当然,所有这些都是HTML文档 - 而不是XHTML文档。理论上,XML
兼容的浏览器将提供功能齐全的XHTML文档。
W3C将其主页作为此功能的示例。
BTW,W3C内容协商页面仅针对Apache服务器
实施深入,Jigsaw只是简单而其他如Zeus
根本没有。

4.上述程序对我不起作用。该页面在我的(符合XML的)Mozilla Firefox浏览器中正确显示,但当我通过W3C Markup验证器运行它时,Content-Type显示为
text / html - 它不是正如预期的那样,作为XHTML文档提供。
当然,如果W3C修复工作正常,那么页面仍然只能作为HTML提供。在我看来,这些问题必须由W3C尽快解决 - 当然在它们发布XHTML 2.0之前。现在,如果只有微软会生产一个浏览器(并提供对其现有的浏览器的修改)来识别内容(MIME)类型application / xhtml + xml
并提供真正的XHTML文档 - 就像Firefox,Opera等。 do!
My take on problems composing, serving and rendering XHTML
documents/web pages:

1. Typical conscientious web authors are producing XHTML documents (Web
pages) that feature valid Markup and with the content (MIME) type
specified as text/html
(http://keystonewebsites.com/articles/mime_type.php). These pages are
then loaded on to their Server where they are served to Rendering
Agents (browsers) as HTML (SGML application) documents with no problem
-- most Web Service Provider implementations associate HTML documents
with the content (MIME) type text/html. These pages are rendered
successfully by all extant graphical browsers -- but they are not XHTML
documents -- they are HTML documents without XML functionality
(http://hixie.ch/advocacy/xhtml). HTML documents that include DocType
declarations display in standards mode -- those that do not display in
"quirks (non-standard) mode. MSIE browsers render XHTML documents that
include the XML declaration in "quirks" mode, therefor, it seems the
declaration should be omitted for XHTML documents served as HTML --
although the W3C doesn''t do so on their Home page.

2. Web authors who produce XHTML documents (Web pages) that feature
valid Markup and with the content (MIME) type specified as
application/xhtml+xml (prescribed by the W3C) inevitably face serious
problems (http://www.w3.org/International/arti...erving-xhtml/).
Most Web Service Provider implementations do not recognize this content
(MIME) type. In that event, the web author must contact his or her Web
Service Provider to try and convince them to adopt
application/xhtml+xml as the content (MIME) type to associate with
XHTML documents.If that doesn''t work -- and it often doesn''t -- then
the web author is faced with the task of producing and loading up to
the server a .htaccess file that provides the association -- a tricky
endeavor for many web authors. But the problems do not end there.
Current XML compliant browsers such as Mozilla, Netscape, Opera, et al.
retrieve and render these pages with no problem. However, older
browsers -- and more importantly by far -- the most frequently used
graphical browsers today -- MSIE 5.x/6.x -- will not render these
documents correctly. MSIE presents them as Down Load files and there is
no backward compatibility for older browsers
(http://www.w3.org/People/mimasa/test...-types/results)

3. This situation is a dilemma for web authors -- and the W3C. The W3C
has attempted to resolve this situation by installing a facility called
Content-Negotiation on their Server (to be a model for others?) that is
supposed to offer a choice of content (MIME) type text/html or
application/xhtml+xml XHTML documents to browsers so that they can
render them according to their capabilities
(http://www.w3.org/2003/01/xhtml-mime...t-negotiation). The
idea is to provide backward compatibility for older browsers and
accommodate current non XML compliant MSIE browsers. Of course, all
these would be HTML documents -- not XHTML documents. In theory, XML
compliant browsers would be served fully functional XHTML documents.
The W3C offers their Home page as an exemplar of this functionality.
BTW, the W3C Content Negotiation page only addresses the Apache Server
implementation in depth, Jigsaw only briefly and others such as Zeus
not at all.

4. The above procedure is not working for me. The page displays
correctly in my (XML compliant) Mozilla Firefox browser, but when I run
it through the W3C Markup validator the Content-Type displays as
text/html -- it is not being served as an XHTML document as intended.
Of course, if the W3C fix did work, the pages would still only be
served as HTML. It seems to me these problems must be sorted out ASAP
by the W3C -- certainly before they release XHTML 2.0. Now if only
Microsoft would produce a browser (and offer modifications to their
existing ones) to recognize content (MIME) type application/xhtml+xml
and serve real XHTML documents -- just like Firefox, Opera, et al. do!




AFAIK内容协商只是XHTML 1.0的一个问题 - XHTML 1.1及以上

需要作为application / xhtml提供+ xml。


我没有看到W3C应该解决的任何问题。恕我直言这是一个错误

建议使用XHTML作为text / html - 只要你(作为一个

网站管理员)不能假设大多数用户代理解析它作为XML

根本没有使用XHTML 1.0的意义(在XHTML1.0和HTML4.01之间没有真正的差异

)。

如果你想要使用XHTML,那么正确的网站管理员工作是正确设置

服务器(或生成动态页面的软件)。这不是W3C的工作。


-

Benjamin Niemann

电子邮件:粉红色at odahoda dot de

WWW: http:// www.odahoda.de/


jp ** @ cox.net 写道:
jp**@cox.net wrote:
http://www.w3.org/2003/01/xhtml-mime...nt-negotiation
当我通过W3C Markup验证器运行Content-Type显示
as text / html


标记验证器似乎没有发送一个接受标题...但是后来它

不会无论如何,IIRC有一个合适的XML解析器。

在我看来,这些问题必须由W3C尽快解决 - 当然在它们发布XHTML 2.0之前。


欢迎您下载验证器的来源并提供补丁。

现在,如果只有微软会生产一个浏览器(并提供对其现有内容的修改,以识别内容(MIME)类型application / xhtml + xml
并提供真实的XHTML文档 - 就像Firefox,Opera等。 do!
(http://www.w3.org/2003/01/xhtml-mime...nt-negotiation) when I run it through the W3C Markup validator the Content-Type displays
as text/html
The markup validator does not appear to send an accept header... but then it
doesn''t, IIRC, have a proper XML parser anyway.
It seems to me these problems must be sorted out ASAP
by the W3C -- certainly before they release XHTML 2.0.
You''re welcome to download the source of the validator and offer a patch.
Now if only
Microsoft would produce a browser (and offer modifications to their
existing ones) to recognize content (MIME) type application/xhtml+xml
and serve real XHTML documents -- just like Firefox, Opera, et al. do!




是的,好吧,GoogleBot,Safari,Konqueror,Links,Lynx和W3M都不支持

XHTML AFAIK。


-

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

首页是〜/ .bashrc的位置



Yes, well, GoogleBot, Safari, Konqueror, Links, Lynx, and W3M don''t support
XHTML yet either AFAIK.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is




jp**@cox.net 写道:


jp**@cox.net wrote:
当前符合XML标准的浏览器正如Mozilla,Netscape,Opera等人那样检索和呈现这些页面没有任何问题。
Current XML compliant browsers such as Mozilla, Netscape, Opera, et al.
retrieve and render these pages with no problem.




XHTML作为application / xhtml + xml支持改进但是那里肯定是

仍然存在问题,特别是在网络上你不能指望任何用户使用最新版本的Opera和Mozilla来获得
。例如,Opera 7.xy发布的一半

不支持

application / xhtml + xml文档中的脚本。或者Mozilla确实渲染了文档但是

与text / html文档相比没有增量,这相当于

缺点:

< http:/ /www.mozilla.org/docs/web-developer/faq.html#xhtmldiff>


-


Martin Honnen http://JavaScript.FAQTs.com/


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

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