Network Working Group                                           M. Baker
Request for Comments: 3236                              Planetfred, Inc.
Category: Informational                                         P. Stark
                                          Ericsson Mobile Communications
                                                            January 2002
        
Network Working Group                                           M. Baker
Request for Comments: 3236                              Planetfred, Inc.
Category: Informational                                         P. Stark
                                          Ericsson Mobile Communications
                                                            January 2002
        

The 'application/xhtml+xml' Media Type

“application/xhtml+xml”媒体类型

Status of this Memo

本备忘录的状况

This memo provides information for the Internet community. It does not specify an Internet standard of any kind. Distribution of this memo is unlimited.

本备忘录为互联网社区提供信息。它没有规定任何类型的互联网标准。本备忘录的分发不受限制。

Copyright Notice

版权公告

Copyright (C) The Internet Society (2002). All Rights Reserved.

版权所有(C)互联网协会(2002年)。版权所有。

Abstract

摘要

This document defines the 'application/xhtml+xml' MIME media type for XHTML based markup languages; it is not intended to obsolete any previous IETF documents, in particular RFC 2854 which registers 'text/html'.

本文档为基于xhtml的标记语言定义了“application/xhtml+xml”MIME媒体类型;它不打算废弃任何以前的IETF文档,特别是注册“text/html”的RFC 2854。

1. Introduction
1. 介绍

In 1998, the W3C HTML working group began work on reformulating HTML in terms of XML 1.0 [XML] and XML Namespaces [XMLNS]. The first part of that work concluded in January 2000 with the publication of the XHTML 1.0 Recommendation [XHTML1], the reformulation for HTML 4.01 [HTML401].

1998年,W3C HTML工作组开始根据XML1.0[XML]和XMLNamespaces[XMLNS]重新格式化HTML。这项工作的第一部分在2000年1月随着XHTML1.0建议[XHTML1]的发布而结束,该建议是对HTML4.01[HTML401]的重新格式化。

Work continues in the Modularization of XHTML Recommendation [XHTMLM12N], the decomposition of XHTML 1.0 into modules that can be used to compose new XHTML based languages, plus a framework for supporting this composition.

XHTML建议[XHTMLM12N]的模块化工作仍在继续,将XHTML1.0分解为可用于编写新的基于XHTML的语言的模块,以及支持这种编写的框架。

This document only registers a new MIME media type, 'application/xhtml+xml'. It does not define anything more than is required to perform this registration.

本文档仅注册一种新的MIME媒体类型“application/xhtml+xml”。它只定义了执行此注册所需的内容。

This document follows the convention set out in [XMLMIME] for the MIME subtype name; attaching the suffix "+xml" to denote that the entity being described conforms to the XML syntax as defined in XML 1.0 [XML].

本文档遵循[XMLMIME]中规定的MIME子类型名称的约定;附加后缀“+xml”表示所描述的实体符合xml 1.0[xml]中定义的xml语法。

This document was prepared by members of the W3C HTML working group based on the structure, and some of the content, of RFC 2854, the registration of 'text/html'. Please send comments to www-html@w3.org, a public mailing list (requiring subscription) with archives at <http://lists.w3.org/Archives/Public/www-html/>.

本文件由W3C HTML工作组成员根据RFC 2854的结构和部分内容编制,即“文本/HTML”的注册。请将意见发送至www-html@w3.org,一份公开邮件列表(需要订阅),其中包含<http://lists.w3.org/Archives/Public/www-html/>.

2. Registration of MIME media type application/xhtml+xml
2. 注册MIME媒体类型应用程序/xhtml+xml

MIME media type name: application MIME subtype name: xhtml+xml Required parameters: none Optional parameters:

MIME媒体类型名称:应用程序MIME子类型名称:xhtml+xml必需参数:无可选参数:

charset This parameter has identical semantics to the charset parameter of the "application/xml" media type as specified in [XMLMIME].

charset此参数与[XMLMIME]中指定的“application/xml”媒体类型的charset参数具有相同的语义。

profile See Section 8 of this document.

简介见本文件第8节。

Encoding considerations: See Section 4 of this document.

编码注意事项:参见本文档第4节。

Security considerations: See Section 7 of this document.

安全注意事项:见本文件第7节。

Interoperability considerations: XHTML 1.0 [XHTML10] specifies user agent conformance rules that dictate behaviour that must be followed when dealing with, among other things, unrecognized elements.

互操作性注意事项:XHTML1.0[XHTML10]指定了用户代理一致性规则,这些规则规定了在处理未识别的元素时必须遵循的行为。

With respect to XHTML Modularization [XHTMLMOD] and the existence of XHTML based languages (referred to as XHTML family members) that are not XHTML 1.0 conformant languages, it is possible that 'application/xhtml+xml' may be used to describe some of these documents. However, it should suffice for now for the purposes of interoperability that user agents accepting 'application/xhtml+xml' content use the user agent conformance rules in [XHTML1].

关于XHTML模块化[XHTMLMOD]和基于XHTML的语言(称为XHTML家族成员)的存在(这些语言不是符合XHTML1.0的语言),有可能使用“应用程序/XHTML+xml”来描述其中一些文档。但是,就互操作性而言,接受“应用程序/xhtml+xml”内容的用户代理使用[XHTML1]中的用户代理一致性规则就足够了。

Although conformant 'application/xhtml+xml' interpreters can expect that content received is well-formed XML (as defined in [XML]), it cannot be guaranteed that the content is valid XHTML (as defined in [XHTML1]). This is in large part due to the reasons in the preceding paragraph.

尽管一致的“应用程序/xhtml+xml”解释器可以预期收到的内容是格式良好的xml(如[xml]中所定义),但不能保证内容是有效的xhtml(如[XHTML1]中所定义)。这在很大程度上是由于上一段的原因。

Published specification: XHTML 1.0 is now defined by W3C Recommendation; the latest published version is [XHTML1]. It provides for the description of some types of conformant content as "text/html", but also doesn't disallow the use with other content types (effectively allowing for the possibility of this new type).

已发布的规范:XHTML1.0现在由W3C推荐定义;最新发布的版本是[XHTML1]。它将某些类型的一致性内容描述为“text/html”,但也不允许与其他内容类型一起使用(有效地允许使用这种新类型)。

Applications which use this media type: Some content authors have already begun hand and tool authoring on the Web with XHTML 1.0. However that content is currently described as "text/html", allowing existing Web browsers to process it without reconfiguration for a new media type.

使用这种媒体类型的应用程序:一些内容作者已经开始使用XHTML1.0在Web上手工和工具创作。然而,这些内容目前被描述为“文本/html”,允许现有的Web浏览器在不重新配置新媒体类型的情况下对其进行处理。

There is no experimental, vendor specific, or personal tree predecessor to 'application/xhtml+xml'. This new type is being registered in order to allow for the expected deployment of XHTML on the World Wide Web, as a first class XML application where authors can expect that user agents are conformant XML 1.0 [XML] processors.

“application/xhtml+xml”没有实验性的、特定于供应商的或个人的树的前身。注册这种新类型是为了允许在万维网上部署预期的XHTML,作为一个一流的XML应用程序,作者可以期望用户代理是符合XML 1.0[XML]处理器的。

Additional information:

其他信息:

Magic number: There is no single initial byte sequence that is always present for XHTML files. However, Section 5 below gives some guidelines for recognizing XHTML files. See also section 3.1 in [XMLMIME].

幻数:对于XHTML文件,没有始终存在的单个初始字节序列。但是,下面的第5节给出了一些识别XHTML文件的指南。另请参见[XMLMIME]中的第3.1节。

File extension: There are three known file extensions that are currently in use for XHTML 1.0; ".xht", ".xhtml", and ".html".

文件扩展名:目前有三个已知的文件扩展名用于XHTML1.0;.xht、.xhtml和.html。

It is not recommended that the ".xml" extension (defined in [XMLMIME]) be used, as web servers may be configured to distribute such content as type "text/xml" or "application/xml". [XMLMIME] discusses the unreliability of this approach in section 3. Of course, should the author desire this behaviour, then the ".xml" extension can be used.

不建议使用“.xml”扩展名(在[XMLMIME]中定义),因为web服务器可能配置为分发“text/xml”或“application/xml”类型的内容。[XMLMIME]在第3节中讨论了这种方法的不可靠性。当然,如果作者希望这种行为,那么可以使用“.xml”扩展名。

Macintosh File Type code: TEXT

Macintosh文件类型代码:文本

   Person & email address to contact for further information:
      Mark Baker <mark.baker@canada.sun.com>
        
   Person & email address to contact for further information:
      Mark Baker <mark.baker@canada.sun.com>
        

Intended usage: COMMON

预期用途:普通

Author/Change controller: The XHTML specifications are a work product of the World Wide Web Consortium's HTML Working Group. The W3C has change control over these specifications.

作者/变更控制者:XHTML规范是万维网联盟HTML工作组的工作成果。W3C对这些规范具有变更控制权。

3. Fragment identifiers
3. 片断标识

URI references (Uniform Resource Identifiers, see [RFC2396] as updated by [RFC2732]) may contain additional reference information, identifying a certain portion of the resource. These URI references end with a number sign ("#") followed by an identifier for this portion (called the "fragment identifier"). Interpretation of fragment identifiers is dependent on the media type of the retrieval result.

URI引用(统一资源标识符,见[RFC2732]更新的[RFC2396])可能包含额外的引用信息,标识资源的特定部分。这些URI引用以数字符号(#)结尾,后跟该部分的标识符(称为“片段标识符”)。片段标识符的解释取决于检索结果的媒体类型。

For documents labeled as 'text/html', [RFC2854] specified that the fragment identifier designates the correspondingly named element, these were identified by either a unique id attribute or a name attribute for some elements. For documents described with the application/xhtml+xml media type, fragment identifiers share the same syntax and semantics with other XML documents, see [XMLMIME], section 5.

对于标记为“text/html”的文档,[RFC2854]指定片段标识符指定相应命名的元素,这些元素由某些元素的唯一id属性或名称属性标识。对于使用application/xhtml+xml媒体类型描述的文档,片段标识符与其他xml文档共享相同的语法和语义,请参见[XMLMIME],第5节。

At the time of writing, [XMLMIME] does not define syntax and semantics of fragment identifiers, but refers to "XML Pointer Language (XPointer)" for a future XML fragment identification mechanism. The current specification for XPointer is available at http://www.w3.org/TR/xptr. Until [XMLMIME] gets updated, fragment identifiers for XHTML documents designate the element with the corresponding ID attribute value (see [XML] section 3.3.1); any XHTML element with the "id" attribute.

在撰写本文时,[XMLMIME]没有定义片段标识符的语法和语义,但在未来的XML片段识别机制中提到了“XML指针语言(XPointer)”。XPointer的当前规范可在http://www.w3.org/TR/xptr. 在[XMLMIME]更新之前,XHTML文档的片段标识符用相应的ID属性值指定元素(参见[XML]第3.3.1节);具有“id”属性的任何XHTML元素。

4. Encoding considerations
4. 编码注意事项

By virtue of XHTML content being XML, it has the same considerations when sent as 'application/xhtml+xml' as does XML. See [XMLMIME], section 3.2.

由于XHTML内容是XML,所以当作为“应用程序/XHTML+XML”发送时,它与XML具有相同的考虑因素。见[XMLMIME],第3.2节。

5. Recognizing XHTML files
5. 识别XHTML文件

All XHTML documents will have the string "<html" near the beginning of the document. Some will also begin with an XML declaration which begins with "<?xml", though that alone does not indicate an XHTML document. All conforming XHTML 1.0 documents will include an XML document type declaration with the root element type 'html'.

所有XHTML文档的开头都会有字符串“<html”。有些还将以一个以“<?XML”开头的XML声明开始,尽管这本身并不表示XHTML文档。所有符合标准的XHTML1.0文档都将包含根元素类型为“html”的XML文档类型声明。

XHTML Modularization provides a naming convention by which a public identifier for an external subset in the document type declaration of a conforming document will contain the string "//DTD XHTML". And while some XHTML based languages require the doctype declaration to occur within documents of that type, such as XHTML 1.0, or XHTML Basic (http://www.w3.org/TR/xhtml-basic), it is not the case that all XHTML based languages will include it.

XHTML模块化提供了一种命名约定,根据该约定,一致性文档的文档类型声明中外部子集的公共标识符将包含字符串“//DTD XHTML”。虽然一些基于XHTML的语言要求doctype声明出现在该类型的文档中,如XHTML 1.0或XHTML Basic(http://www.w3.org/TR/xhtml-basic),并非所有基于XHTML的语言都会包含它。

All XHTML files should also include a declaration of the XHTML namespace. This should appear shortly after the string "<html", and should read 'xmlns="http://www.w3.org/1999/xhtml"'.

所有XHTML文件还应该包含XHTML名称空间的声明。这应该出现在字符串“<html”之后不久,应该是“xmlns=”http://www.w3.org/1999/xhtml"'.

6. Charset default rules
6. 字符集默认规则

By virtue of all XHTML content being XML, it has the same considerations when sent as 'application/xhtml+xml' as does XML. See [XMLMIME], section 3.2.

由于所有XHTML内容都是XML,所以当作为“应用程序/XHTML+XML”发送时,它与XML具有相同的考虑因素。见[XMLMIME],第3.2节。

7. Security Considerations
7. 安全考虑

The considerations for "text/html" as specified in [TEXTHTML] and and for 'application/xml' as specified in [XMLMIME], also hold for 'application/xhtml+xml'.

[TEXTHTML]中指定的“text/html”和[XMLMIME]中指定的“application/xml”的注意事项也适用于“application/xhtml+xml”。

In addition, because of the extensibility features for XHTML as provided by XHTML Modularization, it is possible that 'application/xhtml+xml' may describe content that has security implications beyond those described here. However, if the user agent follows the user agent conformance rules in [XHTML1], this content will be ignored. Only in the case where the user agent recognizes and processes the additional content, or where further processing of that content is dispatched to other processors, would security issues potentially arise. And in that case, they would fall outside the domain of this registration document.

此外,由于XHTML模块化为XHTML提供了可扩展性特性,“应用程序/XHTML+xml”可能描述的内容具有此处所述内容以外的安全含义。但是,如果用户代理遵循[XHTML1]中的用户代理一致性规则,则将忽略此内容。只有在用户代理识别并处理附加内容的情况下,或者在将该内容的进一步处理分派给其他处理器的情况下,才可能出现安全问题。在这种情况下,它们将不属于本注册文件的范围。

8. The "profile" optional parameter
8. “profile”可选参数

This parameter is meant to solve the short-term problem of using MIME media type based content negotiation (such as that done with the HTTP "Accept" header) to negotiate for a variety of XHTML based languages. It is intended to be used only during content negotiation. It is not expected that it be used to deliver content, or that origin web servers have any knowledge of it (though they are welcome to). It is primarily targeted for use on the network by proxies in the HTTP chain that manipulate data formats (such as transcoders).

此参数旨在解决使用基于MIME媒体类型的内容协商(例如使用HTTP“Accept”头完成的协商)来协商各种基于XHTML的语言的短期问题。仅在内容协商期间使用。不希望它被用于交付内容,也不希望原始web服务器了解它(尽管欢迎他们使用)。它主要用于HTTP链中操纵数据格式(如转码器)的代理在网络上使用。

The parameter is intended to closely match the semantics of the "profile" attribute of the HEAD element as defined in [HTML401] (section 7.4.4.3), except it is applied to the document as a whole rather than just the META elements. More specifically, the value of the profile attribute is a URI that can be used as a name to identify a language. Though the URI need not be resolved in order to be useful as a name, it could be a namespace, schema, or a language specification.

该参数旨在与[HTML401](第7.4.4.3节)中定义的HEAD元素的“profile”属性的语义紧密匹配,除非它应用于整个文档,而不仅仅是元元素。更具体地说,profile属性的值是一个URI,可以用作标识语言的名称。虽然URI不需要解析才能用作名称,但它可以是名称空间、模式或语言规范。

As an example, user agents supporting only XHTML Basic (see http://www.w3.org/TR/xhtml-basic) currently have no standard means to convey their inability to support the additional functionality in XHTML 1.0 [XHTML1] that is not found in XHTML Basic. While XHTML Basic user agent conformance rules (which are identical to XHTML 1.0) provide some guidance to its user agent implementators for handling some additional content, the additional content in XHTML 1.0 that is not part of XHTML Basic is substantial, making those conformance rules insufficient for practical processing and rendering to the end user. There is also the matter of the potentially substantial burden on the user agent in receiving and parsing this additional content.

例如,用户代理仅支持XHTML Basic(请参阅http://www.w3.org/TR/xhtml-basic)目前还没有标准的方法来表达他们无法支持XHTML1.0[XHTML1]中没有的附加功能。虽然XHTML基本用户代理一致性规则(与XHTML 1.0相同)为其用户代理实现者处理一些附加内容提供了一些指导,但XHTML 1.0中不属于XHTML基本的附加内容是大量的,使这些一致性规则不足以对最终用户进行实际处理和呈现。还有一个问题是,用户代理在接收和解析这些额外内容时可能会承受巨大的负担。

The functionality afforded by this parameter can also be achieved with at least two other more general content description frameworks; the "Content-features" MIME header described in RFC 2912, and UAPROF from the WAPforum (see http://www.wapforum.org/what/technical.htm). At this time, choosing one of these solutions would require excluding the other, as interoperability between the two has not been defined. For this reason, it is suggested that this parameter be used until such time as that issue has been addressed.

该参数提供的功能还可以通过至少两个其他更通用的内容描述框架来实现;RFC2912中描述的“内容特性”MIME头,以及WAPforum中的UAPROF(参见http://www.wapforum.org/what/technical.htm). 目前,选择其中一种解决方案需要排除另一种,因为两者之间的互操作性尚未定义。因此,建议在解决该问题之前使用该参数。

An example use of this parameter as part of a HTTP GET transaction would be;

将此参数用作HTTP GET事务的一部分的示例如下:;

      Accept: application/xhtml+xml;
        profile="http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd"
        
      Accept: application/xhtml+xml;
        profile="http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd"
        
9. Author's Address
9. 作者地址

Mark A. Baker Planetfred, Inc. 44 Byward Market, Suite 240 Ottawa, Ontario, CANADA. K1N 7A2 Phone: +1-613-789-1818 EMail: mbaker@planetfred.com EMail: distobj@acm.org

Mark A.Baker Planetfred,Inc.加拿大安大略省渥太华市拜沃德市场44号240室。K1N 7A2电话:+1-613-789-1818电子邮件:mbaker@planetfred.com电邮:distobj@acm.org

Peter Stark Ericsson Mobile Communications Phone: +464-619-3000 EMail: Peter.Stark@ecs.ericsson.com

Peter Stark爱立信移动通信电话:+464-619-3000电子邮件:Peter。Stark@ecs.ericsson.com

10. References
10. 工具书类

[HTML401] Raggett, D., et al., "HTML 4.01 Specification", W3C Recommendation. Available at <http://www.w3.org/TR/html401> (or <http://www.w3.org/TR/1999/REC-html401-19991224>).

[HTML401]Raggett,D.,等,“HTML4.01规范”,W3C建议。可在<http://www.w3.org/TR/html401>(或<http://www.w3.org/TR/1999/REC-html401-19991224>).

[MIME] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types", RFC 2046, November 1996.

[MIME]Freed,N.和N.Borenstein,“多用途互联网邮件扩展(MIME)第二部分:媒体类型”,RFC 20461996年11月。

[URI] Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform Resource Identifiers (URI): Generic Syntax", RFC 2396, August 1998.

[URI]Berners Lee,T.,Fielding,R.和L.Masinter,“统一资源标识符(URI):通用语法”,RFC 2396,1998年8月。

[XHTML1] "XHTML 1.0: The Extensible HyperText Markup Language: A Reformulation of HTML 4 in XML 1.0", W3C Recommendation. Available at <http://www.w3.org/TR/xhtml1>.

[XHTML1]“XHTML1.0:可扩展超文本标记语言:XML1.0中HTML4的重新表述”,W3C建议。可在<http://www.w3.org/TR/xhtml1>.

[XML] "Extensible Markup Language (XML) 1.0", W3C Recommendation. Available at <http://www.w3.org/TR/REC-xml> (or <http://www.w3.org/TR/2000/REC-xml-20001006>).

[XML]“可扩展标记语言(XML)1.0”,W3C建议。可在<http://www.w3.org/TR/REC-xml>(或<http://www.w3.org/TR/2000/REC-xml-20001006>).

[TEXTHTML] Connolly, D. and L. Masinter, "The 'text/html' Media Type", RFC 2854, June 2000.

[TEXTHTML]Connolly,D.和L.Masinter,“文本/html”媒体类型”,RFC 28542000年6月。

[XMLMIME] Murata, M., St.Laurent, S. and D. Kohn, "XML Media Types", RFC 3023, January 2001.

[XMLMIME]Murata,M.,St.Laurent,S.和D.Kohn,“XML媒体类型”,RFC 3023,2001年1月。

   [XHTMLM12N] "Modularization of XHTML", W3C Recommendation. Available
               at: <http://www.w3.org/TR/xhtml-modularization>
        
   [XHTMLM12N] "Modularization of XHTML", W3C Recommendation. Available
               at: <http://www.w3.org/TR/xhtml-modularization>
        
11. Full Copyright Statement
11. 完整版权声明

Copyright (C) The Internet Society (2002). All Rights Reserved.

版权所有(C)互联网协会(2002年)。版权所有。

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.

本文件及其译本可复制并提供给他人,对其进行评论或解释或协助其实施的衍生作品可全部或部分编制、复制、出版和分发,不受任何限制,前提是上述版权声明和本段包含在所有此类副本和衍生作品中。但是,不得以任何方式修改本文件本身,例如删除版权通知或对互联网协会或其他互联网组织的引用,除非出于制定互联网标准的需要,在这种情况下,必须遵循互联网标准过程中定义的版权程序,或根据需要将其翻译成英语以外的其他语言。

The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.

上述授予的有限许可是永久性的,互联网协会或其继承人或受让人不会撤销。

This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

本文件和其中包含的信息是按“原样”提供的,互联网协会和互联网工程任务组否认所有明示或暗示的保证,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。

Acknowledgement

确认

Funding for the RFC Editor function is currently provided by the Internet Society.

RFC编辑功能的资金目前由互联网协会提供。