Internet Engineering Task Force (IETF) M. Nottingham Request for Comments: 5988 October 2010 Updates: 4287 Category: Standards Track ISSN: 2070-1721
Internet Engineering Task Force (IETF) M. Nottingham Request for Comments: 5988 October 2010 Updates: 4287 Category: Standards Track ISSN: 2070-1721
Web Linking
网页链接
Abstract
摘要
This document specifies relation types for Web links, and defines a registry for them. It also defines the use of such links in HTTP headers with the Link header field.
本文档指定Web链接的关系类型,并为它们定义一个注册表。它还通过linkheader字段定义了在HTTP头中使用此类链接。
Status of This Memo
关于下段备忘
This is an Internet Standards Track document.
这是一份互联网标准跟踪文件。
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.
本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。有关互联网标准的更多信息,请参见RFC 5741第2节。
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc5988.
有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问http://www.rfc-editor.org/info/rfc5988.
Copyright Notice
版权公告
Copyright (c) 2010 IETF Trust and the persons identified as the document authors. All rights reserved.
版权所有(c)2010 IETF信托基金和确定为文件作者的人员。版权所有。
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
本文件受BCP 78和IETF信托有关IETF文件的法律规定的约束(http://trustee.ietf.org/license-info)自本文件出版之日起生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。从本文件中提取的代码组件必须包括信托法律条款第4.e节中所述的简化BSD许可证文本,并提供简化BSD许可证中所述的无担保。
This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.
本文件可能包含2008年11月10日之前发布或公开的IETF文件或IETF贡献中的材料。控制某些材料版权的人员可能未授予IETF信托允许在IETF标准流程之外修改此类材料的权利。在未从控制此类材料版权的人员处获得充分许可的情况下,不得在IETF标准流程之外修改本文件,也不得在IETF标准流程之外创建其衍生作品,除了将其格式化以RFC形式发布或将其翻译成英语以外的其他语言。
Table of Contents
目录
1. Introduction ....................................................3 2. Notational Conventions ..........................................3 3. Links ...........................................................4 4. Link Relation Types .............................................5 4.1. Registered Relation Types ..................................5 4.2. Extension Relation Types ...................................6 5. The Link Header Field ...........................................6 5.1. Target IRI .................................................7 5.2. Context IRI ................................................7 5.3. Relation Type ..............................................8 5.4. Target Attributes ..........................................8 5.5. Examples ...................................................9 6. IANA Considerations ............................................10 6.1. Link HTTP Header Registration .............................10 6.2. Link Relation Type Registry ...............................10 6.2.1. Registering New Link Relation Types ................11 6.2.2. Initial Registry Contents ..........................12 6.3. Link Relation Application Data Registry ...................16 7. Security Considerations ........................................17 8. Internationalisation Considerations ............................18 9. References .....................................................18 9.1. Normative References ......................................18 9.2. Informative References ....................................19 Appendix A. Notes on Using the Link Header with the HTML4 Format ...............................................21 Appendix B. Notes on Using the Link Header with the Atom Format ...............................................22 Appendix C. Acknowledgements .....................................23
1. Introduction ....................................................3 2. Notational Conventions ..........................................3 3. Links ...........................................................4 4. Link Relation Types .............................................5 4.1. Registered Relation Types ..................................5 4.2. Extension Relation Types ...................................6 5. The Link Header Field ...........................................6 5.1. Target IRI .................................................7 5.2. Context IRI ................................................7 5.3. Relation Type ..............................................8 5.4. Target Attributes ..........................................8 5.5. Examples ...................................................9 6. IANA Considerations ............................................10 6.1. Link HTTP Header Registration .............................10 6.2. Link Relation Type Registry ...............................10 6.2.1. Registering New Link Relation Types ................11 6.2.2. Initial Registry Contents ..........................12 6.3. Link Relation Application Data Registry ...................16 7. Security Considerations ........................................17 8. Internationalisation Considerations ............................18 9. References .....................................................18 9.1. Normative References ......................................18 9.2. Informative References ....................................19 Appendix A. Notes on Using the Link Header with the HTML4 Format ...............................................21 Appendix B. Notes on Using the Link Header with the Atom Format ...............................................22 Appendix C. Acknowledgements .....................................23
A means of indicating the relationships between resources on the Web, as well as indicating the type of those relationships, has been available for some time in HTML [W3C.REC-html401-19991224], and more recently in Atom [RFC4287]. These mechanisms, although conceptually similar, are separately specified. However, links between resources need not be format specific; it can be useful to have typed links that are independent of their serialisation, especially when a resource has representations in multiple formats.
在HTML[W3C.REC-html401-19991224]和最近的Atom[RFC4287]中,一种指示Web上资源之间关系以及这些关系类型的方法已经出现了一段时间。这些机制虽然在概念上相似,但单独指定。然而,资源之间的链接不需要特定于格式;具有独立于序列化的类型化链接非常有用,尤其是当资源具有多种格式的表示时。
To this end, this document defines a framework for typed links that isn't specific to a particular serialisation or application. It does so by redefining the link relation registry established by Atom to have a broader domain, and adding to it the relations that are defined by HTML.
为此,本文档定义了一个类型化链接的框架,该框架不是特定于特定序列化或应用程序的。它通过重新定义Atom建立的链接关系注册表来实现这一点,使其具有更广阔的领域,并向其中添加由HTML定义的关系。
Furthermore, an HTTP header field for conveying typed links was defined in Section 19.6.2.4 of [RFC2068], but removed from [RFC2616], due to a lack of implementation experience. Since then, it has been implemented in some User Agents (e.g., for stylesheets), and several additional use cases have surfaced.
此外,在[RFC2068]的第19.6.2.4节中定义了用于传输类型化链接的HTTP头字段,但由于缺乏实施经验,从[RFC2616]中删除了该字段。从那时起,它已经在一些用户代理(例如样式表)中实现,并且出现了几个额外的用例。
Because it was removed, the status of the Link header is unclear, leading some to consider minting new application-specific HTTP headers instead of reusing it. This document addresses this by re-specifying the Link header as one such serialisation, with updated but backwards-compatible syntax.
因为它被删除,所以链接头的状态不清楚,导致一些人考虑使用新的特定于应用程序的HTTP报头,而不是重用它。本文档通过使用更新但向后兼容的语法将链接头重新指定为此类序列化来解决此问题。
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14, [RFC2119], as scoped to those conformance targets.
本文件中的关键词“必须”、“不得”、“要求”、“应”、“不得”、“应”、“不应”、“建议”、“可”和“可选”应按照BCP 14、[RFC2119]中的描述进行解释,并适用于这些合规性目标。
This document uses the Augmented Backus-Naur Form (ABNF) notation of [RFC2616], and explicitly includes the following rules from it: quoted-string, token, SP (space), LOALPHA, DIGIT.
本文档使用[RFC2616]的增广巴科斯诺尔形式(ABNF)表示法,并明确包含以下规则:带引号的字符串、令牌、SP(空格)、LOALPHA、数字。
Additionally, the following rules are included from [RFC3986]: URI and URI-Reference; from [RFC4288]: type-name and subtype-name; from [W3C.REC-html401-19991224]: MediaDesc; from [RFC5646]: Language-Tag; and from [RFC5987], ext-value and parmname.
此外,[RFC3986]还包括以下规则:URI和URI引用;from[RFC4288]:类型名称和子类型名称;来自[W3C.REC-html401-19991224]:MediaDesc;来自[RFC5646]:语言标记;以及[RFC5987]中的ext value和parmname。
In this specification, a link is a typed connection between two resources that are identified by Internationalised Resource Identifiers (IRIs) [RFC3987], and is comprised of:
在本规范中,链接是由国际化资源标识符(IRIs)[RFC3987]标识的两个资源之间的类型化连接,包括:
o A context IRI,
o 上下文IRI,
o a link relation type (Section 4),
o 链接关系类型(第4节),
o a target IRI, and
o 目标IRI,以及
o optionally, target attributes.
o 或者,选择目标属性。
A link can be viewed as a statement of the form "{context IRI} has a {relation type} resource at {target IRI}, which has {target attributes}".
链接可以被看作是一个形式为“{context-IRI}在{target-IRI}上有一个{relation-type}资源,它有{target-attributes}”的语句。
Note that in the common case, the context IRI will also be a URI [RFC3986], because many protocols (such as HTTP) do not support dereferencing IRIs. Likewise, the target IRI will be converted to a URI (see [RFC3987], Section 3.1) in serialisations that do not support IRIs (e.g., the Link header).
请注意,在常见情况下,上下文IRI也将是URI[RFC3986],因为许多协议(如HTTP)不支持取消对IRI的引用。同样,目标IRI将在不支持IRI的序列化中转换为URI(参见[RFC3987],第3.1节)(例如链接头)。
This specification does not place restrictions on the cardinality of links; there can be multiple links to and from a particular IRI, and multiple links of different types between two given IRIs. Likewise, the relative ordering of links in any particular serialisation, or between serialisations (e.g., the Link header and in-content links) is not specified or significant in this specification; applications that wish to consider ordering significant can do so.
本规范不限制链接的基数;与特定IRI之间可以有多个链接,与特定IRI之间也可以有多个不同类型的链接。同样,本规范中未规定或说明任何特定序列化中或序列化之间(例如,链接头和内容链接中)链接的相对顺序;希望考虑重要性的应用程序可以做到这一点。
Target attributes are a set of key/value pairs that describe the link or its target; for example, a media type hint. This specification does not attempt to coordinate their names or use, but does provide common target attributes for use in the Link HTTP header.
目标属性是一组描述链接或其目标的键/值对;例如,媒体类型提示。此规范不尝试协调它们的名称或使用,但提供了在链接HTTP头中使用的公共目标属性。
Finally, this specification does not define a general syntax for expressing links, nor does it mandate a specific context for any given link; it is expected that serialisations of links will specify both aspects. One such serialisation is communication of links through HTTP headers, specified in Section 5.
最后,本规范没有定义表示链接的通用语法,也没有为任何给定链接指定特定上下文;预期链接的序列化将指定这两个方面。其中一种串行化是通过HTTP头进行链接通信,如第5节所述。
In the simplest case, a link relation type identifies the semantics of a link. For example, a link with the relation type "copyright" indicates that the resource identified by the target IRI is a statement of the copyright terms applying to the current context IRI.
在最简单的情况下,链接关系类型标识链接的语义。例如,关系类型为“版权”的链接表示目标IRI标识的资源是适用于当前上下文IRI的版权条款的声明。
Link relation types can also be used to indicate that the target resource has particular attributes, or exhibits particular behaviours; for example, a "service" link implies that the identified resource is part of a defined protocol (in this case, a service description).
链接关系类型还可用于指示目标资源具有特定属性或表现出特定行为;例如,“服务”链接意味着标识的资源是已定义协议的一部分(在本例中为服务描述)。
Relation types are not to be confused with media types [RFC4288]; they do not identify the format of the representation that results when the link is dereferenced. Rather, they only describe how the current context is related to another resource.
关系类型不能与媒体类型混淆[RFC4288];它们不标识链接取消引用时产生的表示形式的格式。相反,它们只描述当前上下文如何与另一个资源相关。
Relation types SHOULD NOT infer any additional semantics based upon the presence or absence of another link relation type, or its own cardinality of occurrence. An exception to this is the combination of the "alternate" and "stylesheet" registered relation types, which has special meaning in HTML4 for historical reasons.
关系类型不应基于另一个链接关系类型的存在或不存在或其自身的发生基数来推断任何附加语义。其中一个例外是“alternate”和“stylesheet”注册关系类型的组合,由于历史原因,这在HTML4中具有特殊意义。
There are two kinds of relation types: registered and extension.
有两种关系类型:registered和extension。
Well-defined relation types can be registered as tokens for convenience and/or to promote reuse by other applications. This specification establishes an IANA registry of such relation types; see Section 6.2.
定义良好的关系类型可以注册为令牌,以方便和/或促进其他应用程序的重用。本规范建立了此类关系类型的IANA注册表;见第6.2节。
Registered relation type names MUST conform to the reg-rel-type rule, and MUST be compared character-by-character in a case-insensitive fashion. They SHOULD be appropriate to the specificity of the relation type; i.e., if the semantics are highly specific to a particular application, the name should reflect that, so that more general names are available for less specific use.
注册的关系类型名称必须符合reg rel type规则,并且必须以不区分大小写的方式逐字符进行比较。它们应该适合关系类型的特殊性;i、 例如,如果语义非常特定于特定应用程序,则名称应反映这一点,以便更通用的名称可用于不太特定的用途。
Registered relation types MUST NOT constrain the media type of the context IRI, and MUST NOT constrain the available representation media types of the target IRI. However, they can specify the behaviours and properties of the target resource (e.g., allowable HTTP methods, request and response media types that must be supported).
注册的关系类型不得约束上下文IRI的媒体类型,也不得约束目标IRI的可用表示媒体类型。但是,它们可以指定目标资源的行为和属性(例如,允许的HTTP方法、必须支持的请求和响应媒体类型)。
Additionally, specific applications of linking may require additional data to be included in the registry. For example, Web browsers might want to know what kinds of links should be downloaded when they archive a Web page; if this application-specific information is in the registry, new link relation types can control this behaviour without unnecessary coordination.
此外,链接的特定应用可能需要在注册表中包含其他数据。例如,Web浏览器可能想知道在归档网页时应该下载哪些类型的链接;如果此特定于应用程序的信息在注册表中,则新的链接关系类型可以控制此行为,而无需进行不必要的协调。
To accommodate this, per-entry application data can be added to the Link Relation Type registry, by registering it in the Link Relation Application Data registry (Section 6.3).
为了适应这种情况,可以通过在链接关系应用程序数据注册表中注册每个条目的应用程序数据,将其添加到链接关系类型注册表中(第6.3节)。
Applications that don't wish to register a relation type can use an extension relation type, which is a URI [RFC3986] that uniquely identifies the relation type. Although the URI can point to a resource that contains a definition of the semantics of the relation type, clients SHOULD NOT automatically access that resource to avoid overburdening its server.
不希望注册关系类型的应用程序可以使用扩展关系类型,它是唯一标识关系类型的URI[RFC3986]。尽管URI可以指向包含关系类型语义定义的资源,但客户端不应自动访问该资源以避免服务器负担过重。
When extension relation types are compared, they MUST be compared as strings (after converting to URIs if serialised in a different format, such as a Curie [W3C.CR-curie-20090116]) in a case-insensitive fashion, character-by-character. Because of this, all-lowercase URIs SHOULD be used for extension relations.
在比较扩展关系类型时,必须将它们作为字符串进行比较(如果以不同格式序列化,则转换为URI后,如Curie[W3C.CR-Curie-20090116]),不区分大小写,逐字符进行比较。因此,所有小写URI都应该用于扩展关系。
Note that while extension relation types are required to be URIs, a serialisation of links can specify that they are expressed in another form, as long as they can be converted to URIs.
请注意,虽然扩展关系类型必须是URI,但链接的序列化可以指定它们以另一种形式表示,只要它们可以转换为URI即可。
The Link entity-header field provides a means for serialising one or more links in HTTP headers. It is semantically equivalent to the <LINK> element in HTML, as well as the atom:link feed-level element in Atom [RFC4287].
“链接实体头”字段提供了在HTTP头中序列化一个或多个链接的方法。它在语义上等同于HTML中的<LINK>元素,以及atom[RFC4287]中的atom:LINK提要级别元素。
Link = "Link" ":" #link-value link-value = "<" URI-Reference ">" *( ";" link-param ) link-param = ( ( "rel" "=" relation-types ) | ( "anchor" "=" <"> URI-Reference <"> ) | ( "rev" "=" relation-types ) | ( "hreflang" "=" Language-Tag ) | ( "media" "=" ( MediaDesc | ( <"> MediaDesc <"> ) ) ) | ( "title" "=" quoted-string ) | ( "title*" "=" ext-value ) | ( "type" "=" ( media-type | quoted-mt ) ) | ( link-extension ) ) link-extension = ( parmname [ "=" ( ptoken | quoted-string ) ] ) | ( ext-name-star "=" ext-value ) ext-name-star = parmname "*" ; reserved for RFC2231-profiled ; extensions. Whitespace NOT ; allowed in between. ptoken = 1*ptokenchar ptokenchar = "!" | "#" | "$" | "%" | "&" | "'" | "(" | ")" | "*" | "+" | "-" | "." | "/" | DIGIT | ":" | "<" | "=" | ">" | "?" | "@" | ALPHA | "[" | "]" | "^" | "_" | "`" | "{" | "|" | "}" | "~" media-type = type-name "/" subtype-name quoted-mt = <"> media-type <"> relation-types = relation-type | <"> relation-type *( 1*SP relation-type ) <"> relation-type = reg-rel-type | ext-rel-type reg-rel-type = LOALPHA *( LOALPHA | DIGIT | "." | "-" ) ext-rel-type = URI
Link = "Link" ":" #link-value link-value = "<" URI-Reference ">" *( ";" link-param ) link-param = ( ( "rel" "=" relation-types ) | ( "anchor" "=" <"> URI-Reference <"> ) | ( "rev" "=" relation-types ) | ( "hreflang" "=" Language-Tag ) | ( "media" "=" ( MediaDesc | ( <"> MediaDesc <"> ) ) ) | ( "title" "=" quoted-string ) | ( "title*" "=" ext-value ) | ( "type" "=" ( media-type | quoted-mt ) ) | ( link-extension ) ) link-extension = ( parmname [ "=" ( ptoken | quoted-string ) ] ) | ( ext-name-star "=" ext-value ) ext-name-star = parmname "*" ; reserved for RFC2231-profiled ; extensions. Whitespace NOT ; allowed in between. ptoken = 1*ptokenchar ptokenchar = "!" | "#" | "$" | "%" | "&" | "'" | "(" | ")" | "*" | "+" | "-" | "." | "/" | DIGIT | ":" | "<" | "=" | ">" | "?" | "@" | ALPHA | "[" | "]" | "^" | "_" | "`" | "{" | "|" | "}" | "~" media-type = type-name "/" subtype-name quoted-mt = <"> media-type <"> relation-types = relation-type | <"> relation-type *( 1*SP relation-type ) <"> relation-type = reg-rel-type | ext-rel-type reg-rel-type = LOALPHA *( LOALPHA | DIGIT | "." | "-" ) ext-rel-type = URI
Each link-value conveys one target IRI as a URI-Reference (after conversion to one, if necessary; see [RFC3987], Section 3.1) inside angle brackets ("<>"). If the URI-Reference is relative, parsers MUST resolve it as per [RFC3986], Section 5. Note that any base IRI from the message's content is not applied.
每个链接值在尖括号(“<>”)内传递一个目标IRI作为URI引用(如有必要,转换为一个后;参见[RFC3987],第3.1节)。如果URI引用是相对的,解析器必须根据[RFC3986]第5节解析它。请注意,不应用来自消息内容的任何基本IRI。
By default, the context of a link conveyed in the Link header field is the IRI of the requested resource.
默认情况下,链接头字段中传输的链接的上下文是所请求资源的IRI。
When present, the anchor parameter overrides this with another URI, such as a fragment of this resource, or a third resource (i.e., when the anchor value is an absolute URI). If the anchor parameter's
当存在时,锚参数将使用另一个URI(例如此资源的片段)或第三个资源(即,当锚值是绝对URI)覆盖此URI。如果锚参数
value is a relative URI, parsers MUST resolve it as per [RFC3986], Section 5. Note that any base URI from the body's content is not applied.
值是一个相对URI,解析器必须根据[RFC3986]第5节对其进行解析。请注意,不会应用主体内容中的任何基本URI。
Consuming implementations can choose to ignore links with an anchor parameter. For example, the application in use may not allow the context IRI to be assigned to a different resource. In such cases, the entire link is to be ignored; consuming implementations MUST NOT process the link without applying the anchor.
消费实现可以选择忽略带有锚参数的链接。例如,正在使用的应用程序可能不允许将上下文IRI分配给其他资源。在这种情况下,整个链接将被忽略;消费实现必须在不应用锚的情况下处理链接。
Note that depending on HTTP status code and response headers, the context IRI might be "anonymous" (i.e., no context IRI is available). For instance, this is the case on a 404 response to a GET request.
注意,根据HTTP状态代码和响应头,上下文IRI可能是“匿名的”(即,没有上下文IRI可用)。例如,对GET请求的404响应就是这种情况。
The relation type of a link is conveyed in the "rel" parameter's value. The "rel" parameter MUST NOT appear more than once in a given link-value; occurrences after the first MUST be ignored by parsers.
链接的关系类型以“rel”参数的值表示。“rel”参数在给定链接值中不得出现多次;解析器必须忽略第一个事件之后出现的事件。
The "rev" parameter has been used in the past to indicate that the semantics of the relationship are in the reverse direction. That is, a link from A to B with REL="X" expresses the same relationship as a link from B to A with REV="X". "rev" is deprecated by this specification because it often confuses authors and readers; in most cases, using a separate relation type is preferable.
“rev”参数过去曾被用来表示关系的语义是反向的。也就是说,使用REL=“X”表示从a到B的链接与使用REV=“X”表示从B到a的链接具有相同的关系。本规范不推荐使用“rev”,因为它经常混淆作者和读者;在大多数情况下,最好使用单独的关系类型。
Note that extension relation types are REQUIRED to be absolute URIs in Link headers, and MUST be quoted if they contain a semicolon (";") or comma (",") (as these characters are used as delimiters in the header itself).
请注意,扩展关系类型必须是链接头中的绝对URI,如果它们包含分号(;)或逗号(,),则必须使用引号(因为这些字符在头本身中用作分隔符)。
The "hreflang", "media", "title", "title*", "type", and any link-extension link-params are considered to be target attributes for the link.
“hreflang”、“media”、“title”、“title*”、“type”和任何链接扩展链接参数都被视为链接的目标属性。
The "hreflang" parameter, when present, is a hint indicating what the language of the result of dereferencing the link should be. Note that this is only a hint; for example, it does not override the Content-Language header of a HTTP response obtained by actually following the link. Multiple "hreflang" parameters on a single link-value indicate that multiple languages are available from the indicated resource.
“hreflang”参数(如果存在)是一个提示,指示取消引用链接的结果的语言应该是什么。请注意,这只是一个提示;例如,它不会覆盖通过实际跟踪链接获得的HTTP响应的内容语言头。单个链接值上的多个“hreflang”参数表示可以从指定的资源中使用多种语言。
The "media" parameter, when present, is used to indicate intended destination medium or media for style information (see [W3C.REC-html401-19991224], Section 6.13). Note that this may be updated by [W3C.CR-css3-mediaqueries-20090915]). Its value MUST be quoted if it contains a semicolon (";") or comma (","), and there MUST NOT be more than one "media" parameter in a link-value.
“媒体”参数(如果存在)用于指示预期的目标媒体或样式信息的媒体(参见[W3C.REC-html401-19991224],第6.13节)。请注意,这可能由[W3C.CR-css3-mediaqueries-20090915]更新。如果其值包含分号(;)或逗号(,),则必须将其引用,并且链接值中不能有多个“媒体”参数。
The "title" parameter, when present, is used to label the destination of a link such that it can be used as a human-readable identifier (e.g., a menu entry) in the language indicated by the Content-Language header (if present). The "title" parameter MUST NOT appear more than once in a given link-value; occurrences after the first MUST be ignored by parsers.
“title”参数(当存在时)用于标记链接的目的地,以使其可用作内容语言标题(如果存在)所指示语言中的人类可读标识符(例如,菜单项)。“title”参数在给定链接值中不得出现多次;解析器必须忽略第一个事件之后出现的事件。
The "title*" parameter can be used to encode this label in a different character set, and/or contain language information as per [RFC5987]. The "title*" parameter MUST NOT appear more than once in a given link-value; occurrences after the first MUST be ignored by parsers. If the parameter does not contain language information, its language is indicated by the Content-Language header (when present).
“title*”参数可用于以不同字符集对该标签进行编码,和/或包含[RFC5987]规定的语言信息。“title*”参数在给定链接值中不得出现多次;解析器必须忽略第一个事件之后出现的事件。如果参数不包含语言信息,则其语言由内容语言标题(如果存在)指示。
If both the "title" and "title*" parameters appear in a link-value, processors SHOULD use the "title*" parameter's value.
如果链接值中同时出现“title”和“title*”参数,则处理器应使用“title*”参数的值。
The "type" parameter, when present, is a hint indicating what the media type of the result of dereferencing the link should be. Note that this is only a hint; for example, it does not override the Content-Type header of a HTTP response obtained by actually following the link. There MUST NOT be more than one type parameter in a link-value.
“type”参数(如果存在)是一个提示,指示取消引用链接的结果的媒体类型。请注意,这只是一个提示;例如,它不会覆盖通过实际跟踪链接获得的HTTP响应的内容类型头。链接值中不能有多个类型参数。
For example:
例如:
Link: <http://example.com/TheBook/chapter2>; rel="previous"; title="previous chapter"
Link: <http://example.com/TheBook/chapter2>; rel="previous"; title="previous chapter"
indicates that "chapter2" is previous to this resource in a logical navigation path.
指示“chapter2”位于逻辑导航路径中此资源的前面。
Similarly,
同样地,
Link: </>; rel="http://example.net/foo"
Link: </>; rel="http://example.net/foo"
indicates that the root resource ("/") is related to this resource with the extension relation type "http://example.net/foo".
指示根资源(“/”)与扩展关系类型为“”的此资源相关http://example.net/foo".
The example below shows an instance of the Link header encoding multiple links, and also the use of RFC 2231 encoding to encode both non-ASCII characters and language information.
下面的示例显示了对多个链接进行链接头编码的实例,以及使用RFC 2231编码对非ASCII字符和语言信息进行编码的方法。
Link: </TheBook/chapter2>; rel="previous"; title*=UTF-8'de'letztes%20Kapitel, </TheBook/chapter4>; rel="next"; title*=UTF-8'de'n%c3%a4chstes%20Kapitel
Link: </TheBook/chapter2>; rel="previous"; title*=UTF-8'de'letztes%20Kapitel, </TheBook/chapter4>; rel="next"; title*=UTF-8'de'n%c3%a4chstes%20Kapitel
Here, both links have titles encoded in UTF-8, use the German language ("de"), and the second link contains the Unicode code point U+00E4 ("LATIN SMALL LETTER A WITH DIAERESIS").
这里,两个链接的标题都用UTF-8编码,使用德语(“de”),第二个链接包含Unicode代码点U+00E4(“带分音符的拉丁小写字母A”)。
Note that link-values can convey multiple links between the same target and context IRIs; for example:
注意,链接值可以在同一目标和上下文之间传递多个链接;例如:
Link: <http://example.org/>; rel="start http://example.net/relation/other"
Link: <http://example.org/>; rel="start http://example.net/relation/other"
Here, the link to "http://example.org/" has the registered relation type "start" and the extension relation type "http://example.net/relation/other".
在这里,链接到“http://example.org/具有注册关系类型“开始”和扩展关系类型http://example.net/relation/other".
This specification updates the Message Header registry entry for "Link" in HTTP [RFC3864] to refer to this document.
本规范更新了HTTP[RFC3864]中“Link”的消息头注册表项,以参考本文档。
Header field: Link Applicable protocol: http Status: standard Author/change controller: IETF (iesg@ietf.org) Internet Engineering Task Force Specification document(s): [RFC5988]
标题字段:链接适用协议:http状态:标准作者/变更控制器:IETF(iesg@ietf.org)互联网工程任务组规范文件:[RFC5988]
This specification establishes the Link Relation Type registry, and updates Atom [RFC4287] to refer to it in place of the "Registry of Link Relations".
本规范建立链接关系类型注册表,并更新Atom[RFC4287]以引用它来代替“链接关系注册表”。
The underlying registry data (e.g., the XML file) must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions (<http://trustee.ietf.org/license-info>).
基础注册表数据(如XML文件)必须包括简化的BSD许可证文本,如信托法律条款第4.e节所述(<http://trustee.ietf.org/license-info>).
Relation types are registered on the advice of a Designated Expert (appointed by the IESG or their delegate), with a Specification Required (using terminology from [RFC5226]).
根据指定专家(由IESG或其代表任命)的建议注册关系类型,并提供所需规范(使用[RFC5226]中的术语)。
The requirements for registered relation types are described in Section 4.1.
第4.1节描述了注册关系类型的要求。
Registration requests consist of the completed registration template below, typically published in an RFC or Open Standard (in the sense described by [RFC2026], Section 7). However, to allow for the allocation of values prior to publication, the Designated Expert may approve registration once they are satisfied that a specification will be published.
注册请求包括以下完整的注册模板,通常以RFC或开放标准发布(在[RFC2026]第7节所述的意义上)。但是,为了允许在发布前分配值,指定专家可在其确信规范将发布后批准注册。
Note that relation types can be registered by third parties, if the Designated Expert determines that an unregistered relation type is widely deployed and not likely to be registered in a timely manner.
请注意,如果指定的专家确定未注册的关系类型已广泛部署且不可能及时注册,则第三方可以注册关系类型。
The registration template is:
注册模板为:
o Relation Name:
o 关系名称:
o Description:
o 说明:
o Reference:
o 参考:
o Notes: [optional]
o 注:[可选]
o Application Data: [optional]
o 应用程序数据:[可选]
Registration requests should be sent to the link-relations@ietf.org mailing list, marked clearly in the subject line (e.g., "NEW RELATION - example" to register an "example" relation type).
注册请求应发送到链接-relations@ietf.org邮件列表,在主题行中清楚标记(例如,“新关系-示例”以注册“示例”关系类型)。
Within at most 14 days of the request, the Designated Expert(s) will either approve or deny the registration request, communicating this decision to the review list and IANA. Denials should include an explanation and, if applicable, suggestions as to how to make the request successful.
在申请后最多14天内,指定专家将批准或拒绝注册申请,并将此决定告知审查名单和IANA。拒绝应包括解释,以及(如适用)关于如何使请求成功的建议。
Decisions (or lack thereof) made by the Designated Expert can be first appealed to Application Area Directors (contactable using app-ads@tools.ietf.org email address or directly by looking up their email addresses on http://www.iesg.org/ website) and, if the appellant is not satisfied with the response, to the full IESG (using the iesg@iesg.org mailing list).
指定专家做出的决定(或缺乏决定)可首先上诉至应用区域主管(可使用app联系)-ads@tools.ietf.org电子邮件地址,或直接在http://www.iesg.org/ 网站),如果上诉人对答复不满意,则提交完整的IESG(使用iesg@iesg.org邮件列表)。
IANA should only accept registry updates from the Designated Expert(s), and should direct all requests for registration to the review mailing list.
IANA应只接受指定专家的注册表更新,并应将所有注册请求发送至审查邮件列表。
The Link Relation Type registry's initial contents are:
链接关系类型注册表的初始内容为:
o Relation Name: alternate o Description: Designates a substitute for the link's context. o Reference: [W3C.REC-html401-19991224]
o 关系名称:alternate o Description:指定链接上下文的替代项。o参考文献:[W3C.REC-html401-19991224]
o Relation Name: appendix o Description: Refers to an appendix. o Reference: [W3C.REC-html401-19991224]
o 关系名称:附录o描述:指附录。o参考文献:[W3C.REC-html401-19991224]
o Relation Name: bookmark o Description: Refers to a bookmark or entry point. o Reference: [W3C.REC-html401-19991224]
o 关系名称:书签o说明:指书签或入口点。o参考文献:[W3C.REC-html401-19991224]
o Relation Name: chapter o Description: Refers to a chapter in a collection of resources. o Reference: [W3C.REC-html401-19991224]
o 关系名称:第o章描述:指资源集合中的一章。o参考文献:[W3C.REC-html401-19991224]
o Relation Name: contents o Description: Refers to a table of contents. o Reference: [W3C.REC-html401-19991224]
o 关系名称:contents o Description:指目录。o参考文献:[W3C.REC-html401-19991224]
o Relation Name: copyright o Description: Refers to a copyright statement that applies to the link's context. o Reference: [W3C.REC-html401-19991224]
o 关系名称:copyright o Description:指适用于链接上下文的版权声明。o参考文献:[W3C.REC-html401-19991224]
o Relation Name: current o Description: Refers to a resource containing the most recent item(s) in a collection of resources. o Reference: [RFC5005]
o 关系名称:current o Description:指资源集合中包含最新项的资源。o参考文献:[RFC5005]
o Relation Name: describedby o Description: Refers to a resource providing information about the link's context. o Documentation: <http://www.w3.org/TR/powder-dr/#assoc-linking>
o 关系名称:describedby o Description:指提供链接上下文信息的资源。o文件:<http://www.w3.org/TR/powder-dr/#assoc-链接>
o Relation Name: edit o Description: Refers to a resource that can be used to edit the link's context. o Reference: [RFC5023]
o 关系名称:编辑o描述:指可用于编辑链接上下文的资源。o参考:[RFC5023]
o Relation Name: edit-media o Description: Refers to a resource that can be used to edit media associated with the link's context. o Reference: [RFC5023]
o 关系名称:编辑媒体o说明:指可用于编辑与链接上下文关联的媒体的资源。o参考:[RFC5023]
o Relation Name: enclosure o Description: Identifies a related resource that is potentially large and might require special handling. o Reference: [RFC4287]
o 关系名称:enclosure o Description:标识可能较大且可能需要特殊处理的相关资源。o参考文献:[RFC4287]
o Relation Name: first o Description: An IRI that refers to the furthest preceding resource in a series of resources. o Reference: [RFC5988] o Notes: this relation type registration did not indicate a reference. Originally requested by Mark Nottingham in December 2004.
o 关系名称:first o Description:指一系列资源中最远的前一个资源的IRI。o引用:[RFC5988]o注意:此关系类型注册未指示引用。最初由马克·诺丁汉于2004年12月提出要求。
o Relation Name: glossary o Description: Refers to a glossary of terms. o Reference: [W3C.REC-html401-19991224]
o 关系名称:术语表o描述:指术语表。o参考文献:[W3C.REC-html401-19991224]
o Relation Name: help o Description: Refers to a resource offering help (more information, links to other sources information, etc.) o Reference: [W3C.REC-html401-19991224]
o 关系名称:帮助o说明:指提供帮助的资源(更多信息、指向其他源信息的链接等)o参考:[W3C.REC-html401-19991224]
o Relation Name: hub o Description: Refers to a hub that enables registration for notification of updates to the context. o Reference: <http://pubsubhubbub.googlecode.com/> <http:// pubsubhubbub.googlecode.com/svn/trunk/pubsubhubbub-core-0.3.html> o Notes: this relation type was requested by Brett Slatkin.
o 关系名称:hub o Description:指的是一个能够注册以通知上下文更新的中心。o参考:<http://pubsubhubbub.googlecode.com/><http://pubsubbub.googlecode.com/svn/trunk/pubsubbub-core-0.3.html>o注意:此关系类型是由Brett Slatkin请求的。
o Relation Name: index o Description: Refers to an index. o Reference: [W3C.REC-html401-19991224]
o 关系名称:索引o描述:指一个索引。o参考文献:[W3C.REC-html401-19991224]
o Relation Name: last o Description: An IRI that refers to the furthest following resource in a series of resources. o Reference: [RFC5988] o Notes: this relation type registration did not indicate a reference. Originally requested by Mark Nottingham in December 2004.
o 关系名称:last o Description:一个IRI,它引用一系列资源中最远的后续资源。o引用:[RFC5988]o注意:此关系类型注册未指示引用。最初由马克·诺丁汉于2004年12月提出要求。
o Relation Name: latest-version o Description: Points to a resource containing the latest (e.g., current) version of the context. o Reference: [RFC5829]
o 关系名称:最新版本o说明:指向包含上下文的最新(例如,当前)版本的资源。o参考文献:[RFC5829]
o Relation Name: license o Description: Refers to a license associated with the link's context. o Reference: [RFC4946]
o 关系名称:许可证o说明:指与链接上下文关联的许可证。o参考文献:[RFC4946]
o Relation Name: next o Description: Refers to the next resource in a ordered series of resources. o Reference: [W3C.REC-html401-19991224]
o 关系名称:next o Description:指有序资源系列中的下一个资源。o参考文献:[W3C.REC-html401-19991224]
o Relation Name: next-archive o Description: Refers to the immediately following archive resource. o Reference: [RFC5005]
o 关系名称:下一个存档o说明:指紧随其后的存档资源。o参考文献:[RFC5005]
o Relation Name: payment o Description: indicates a resource where payment is accepted. o Reference: [RFC5988] o Notes: this relation type registration did not indicate a reference. Requested by Joshua Kinberg and Robert Sayre. It is meant as a general way to facilitate acts of payment, and thus this specification makes no assumptions on the type of payment or transaction protocol. Examples may include a Web page where donations are accepted or where goods and services are available for purchase. rel="payment" is not intended to initiate an automated transaction. In Atom documents, a link element with a rel="payment" attribute may exist at the feed/channel level and/or the entry/item level. For example, a rel="payment" link at the feed/channel level may point to a "tip jar" URI, whereas an entry/ item containing a book review may include a rel="payment" link that points to the location where the book may be purchased through an online retailer.
o 关系名称:付款o说明:表示接受付款的资源。o引用:[RFC5988]o注意:此关系类型注册未指示引用。约书亚·金伯格和罗伯特·赛尔要求。本规范旨在促进支付行为,因此本规范不对支付类型或交易协议进行假设。示例可能包括接受捐赠或可购买商品和服务的网页。rel=“payment”不用于启动自动交易。在Atom文档中,具有rel=“payment”属性的链接元素可能存在于提要/渠道级别和/或条目/项目级别。例如,提要/渠道级别的rel=“payment”链接可能指向“tip jar”URI,而包含书评的条目/项目可能包括rel=“payment”链接,该链接指向可以通过在线零售商购买书籍的位置。
o Relation Name: prev o Description: Refers to the previous resource in an ordered series of resources. Synonym for "previous". o Reference: [W3C.REC-html401-19991224]
o 关系名称:prev o Description:指有序资源系列中的上一个资源。“先前”的同义词。o参考文献:[W3C.REC-html401-19991224]
o Relation Name: predecessor-version o Description: Points to a resource containing the predecessor version in the version history. o Reference: [RFC5829]
o 关系名称:前置版本o说明:指向版本历史记录中包含前置版本的资源。o参考文献:[RFC5829]
o Relation Name: previous o Description: Refers to the previous resource in an ordered series of resources. Synonym for "prev". o Reference: [W3C.REC-html401-19991224]
o 关系名称:previous o Description:指有序资源系列中的上一个资源。“prev”的同义词。o参考文献:[W3C.REC-html401-19991224]
o Relation Name: prev-archive o Description: Refers to the immediately preceding archive resource. o Reference: [RFC5005]
o 关系名称:prev archive o Description:指紧挨着前面的存档资源。o参考文献:[RFC5005]
o Relation Name: related o Description: Identifies a related resource. o Reference: [RFC4287]
o 关系名称:相关o描述:标识相关资源。o参考文献:[RFC4287]
o Relation Name: replies o Description: Identifies a resource that is a reply to the context of the link. o Reference: [RFC4685]
o 关系名称:reply o Description:标识作为对链接上下文的回复的资源。o参考文献:[RFC4685]
o Relation Name: section o Description: Refers to a section in a collection of resources. o Reference: [W3C.REC-html401-19991224]
o 关系名称:section o Description:引用资源集合中的节。o参考文献:[W3C.REC-html401-19991224]
o Relation Name: self o Description: Conveys an identifier for the link's context. o Reference: [RFC4287]
o 关系名称:self o Description:传递链接上下文的标识符。o参考文献:[RFC4287]
o Relation Name: service o Description: Indicates a URI that can be used to retrieve a service document. o Reference: [RFC5023] o Notes: When used in an Atom document, this relation type specifies Atom Publishing Protocol service documents by default. Requested by James Snell.
o 关系名称:service o Description:表示可用于检索服务文档的URI。o参考:[RFC5023]o注意:在Atom文档中使用时,此关系类型默认指定Atom发布协议服务文档。詹姆斯·斯内尔要求。
o Relation Name: start o Description: Refers to the first resource in a collection of resources. o Reference: [W3C.REC-html401-19991224]
o 关系名称:start o Description:指资源集合中的第一个资源。o参考文献:[W3C.REC-html401-19991224]
o Relation Name: stylesheet o Description: Refers to an external style sheet. o Reference: [W3C.REC-html401-19991224]
o 关系名称:样式表o说明:指外部样式表。o参考文献:[W3C.REC-html401-19991224]
o Relation Name: subsection o Description: Refers to a resource serving as a subsection in a collection of resources. o Reference: [W3C.REC-html401-19991224]
o 关系名称:subsection o Description:指在资源集合中用作子部分的资源。o参考文献:[W3C.REC-html401-19991224]
o Relation Name: successor-version o Description: Points to a resource containing the successor version in the version history. o Reference: [RFC5829]
o 关系名称:后续版本o说明:指向版本历史记录中包含后续版本的资源。o参考文献:[RFC5829]
o Relation Name: up o Description: Refers to a parent document in a hierarchy of documents. o Reference: [RFC5988] o Notes: this relation type registration did not indicate a reference. Requested by Noah Slater.
o 关系名称:up o Description:指文档层次结构中的父文档。o引用:[RFC5988]o注意:此关系类型注册未指示引用。诺亚·斯莱特要求的。
o Relation Name: version-history o Description: points to a resource containing the version history for the context. o Reference: [RFC5829]
o 关系名称:版本历史o说明:指向包含上下文版本历史的资源。o参考文献:[RFC5829]
o Relation Name: via o Description: Identifies a resource that is the source of the information in the link's context. o Reference: [RFC4287]
o 关系名称:via o Description:标识作为链接上下文中信息源的资源。o参考文献:[RFC4287]
o Relation Name: working-copy o Description: Points to a working copy for this resource. o Reference: [RFC5829]
o 关系名称:工作副本o说明:指向此资源的工作副本。o参考文献:[RFC5829]
o Relation Name: working-copy-of o Description: Points to the versioned resource from which this working copy was obtained. o Reference: [RFC5829]
o 关系名称:o的工作副本描述:指向从中获取此工作副本的版本化资源。o参考文献:[RFC5829]
This specification also establishes the Link Relation Application Field registry, to allow entries in the Link Relation Type registry to be extended with application-specific data (hereafter, "app data") specific to all instances of a given link relation type.
本规范还建立了链接关系应用程序字段注册表,以允许使用特定于给定链接关系类型的所有实例的应用程序特定数据(以下简称“应用程序数据”)扩展链接关系类型注册表中的条目。
Application data is registered on the advice of a Designated Expert (appointed by the IESG or their delegate), with a Specification Required (using terminology from [RFC5226]).
根据指定专家(由IESG或其代表任命)的建议注册应用数据,并提供所需的规范(使用[RFC5226]中的术语)。
Registration requests consist of the completed registration template below:
注册请求包括以下完整的注册模板:
o Application Name:
o 应用程序名称:
o Description:
o 说明:
o Default Value:
o 默认值:
o Notes: [optional]
o 注:[可选]
The Description SHOULD identify the value space of the app data. The Default Value MUST be appropriate to entries to which the app data does not apply.
描述应标识应用程序数据的值空间。默认值必须适用于应用程序数据不适用的条目。
Entries that pre-date the addition of app data will automatically be considered to have the default value for that app data; if there are exceptions, the modification of such entries should be coordinated by the Designated Expert(s), in consultation with the author of the proposed app data as well as the registrant of the existing entry (if possible).
添加应用程序数据之前的条目将自动被视为具有该应用程序数据的默认值;如果有例外情况,此类条目的修改应由指定专家协调,并与拟定应用程序数据的作者以及现有条目的注册人协商(如有可能)。
Registration requests should be sent to the link-relations@ietf.org mailing list, marked clearly in the subject line (e.g., "NEW APP DATA - example" to register "example" app data).
注册请求应发送到链接-relations@ietf.org邮件列表,在主题行中清楚标记(例如,“新应用程序数据-示例”以注册“示例”应用程序数据)。
Within at most 14 days of the request, the Designated Expert will either approve or deny the registration request, communicating this decision to the review list. Denials should include an explanation and, if applicable, suggestions as to how to make the request successful. Registration requests that are undetermined for a period longer than 21 days can be brought to the IESG's attention (using the iesg@iesg.org mailing list) for resolution.
在提出申请后最多14天内,指定专家将批准或拒绝注册申请,并将该决定告知审查名单。拒绝应包括解释,以及(如适用)关于如何使请求成功的建议。超过21天未确定的注册请求可提请IESG注意(使用iesg@iesg.org邮件列表)以供解决。
When a registration request is successful, the Designated Expert will forward it to IANA for publication. IANA should only accept registry updates from the Designated Expert(s), and should direct all requests for registration to the review mailing list.
注册申请成功后,指定专家将其转发给IANA发布。IANA应只接受指定专家的注册表更新,并应将所有注册请求发送至审查邮件列表。
The content of the Link header field is not secure, private or integrity-guaranteed, and due caution should be exercised when using it. Use of Transport Layer Security (TLS) with HTTP ([RFC2818] and [RFC2817]) is currently the only end-to-end way to provide such protection.
链接头字段的内容不安全、不私有或不保证完整性,使用时应谨慎。通过HTTP([RFC2818]和[RFC2817])使用传输层安全性(TLS)是目前提供此类保护的唯一端到端方式。
Applications that take advantage of typed links should consider the attack vectors opened by automatically following, trusting, or otherwise using links gathered from HTTP headers. In particular, Link headers that use the "anchor" parameter to associate a link's context with another resource should be treated with due caution.
利用类型化链接的应用程序应该考虑通过自动跟踪、信任或以其他方式使用从HTTP报头收集的链接来打开攻击向量。特别是,使用“anchor”参数将链接的上下文与另一个资源关联的链接头应该谨慎对待。
The Link entity-header field makes extensive use of IRIs and URIs. See [RFC3987] for security considerations relating to IRIs. See [RFC3986] for security considerations relating to URIs. See [RFC2616] for security considerations relating to HTTP headers.
链接实体头字段广泛使用IRI和URI。有关IRIs的安全注意事项,请参见[RFC3987]。有关URI的安全注意事项,请参见[RFC3986]。有关HTTP头的安全注意事项,请参见[RFC2616]。
Target IRIs may need to be converted to URIs in order to express them in serialisations that do not support IRIs. This includes the Link HTTP header.
目标虹膜可能需要转换为URI,以便在不支持虹膜的序列化中表达它们。这包括链接HTTP头。
Similarly, the anchor parameter of the Link header does not support IRIs, and therefore IRIs must be converted to URIs before inclusion there.
类似地,链接头的锚参数不支持IRIs,因此在包含IRIs之前,必须将IRIs转换为URI。
Relation types are defined as URIs, not IRIs, to aid in their comparison. It is not expected that they will be displayed to end users.
关系类型定义为URI,而不是IRI,以帮助进行比较。预计它们不会显示给最终用户。
[RFC2026] Bradner, S., "The Internet Standards Process -- Revision 3", BCP 9, RFC 2026, October 1996.
[RFC2026]Bradner,S.,“互联网标准过程——第3版”,BCP 9,RFC 2026,1996年10月。
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。
[RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
[RFC2616]菲尔丁,R.,盖蒂斯,J.,莫卧儿,J.,弗莱斯蒂克,H.,马斯特,L.,利奇,P.,和T.伯纳斯李,“超文本传输协议——HTTP/1.1”,RFC 2616,1999年6月。
[RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration Procedures for Message Header Fields", BCP 90, RFC 3864, September 2004.
[RFC3864]Klyne,G.,Nottingham,M.和J.Mogul,“消息头字段的注册程序”,BCP 90,RFC 3864,2004年9月。
[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, January 2005.
[RFC3986]Berners Lee,T.,Fielding,R.,和L.Masinter,“统一资源标识符(URI):通用语法”,STD 66,RFC 3986,2005年1月。
[RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource Identifiers (IRIs)", RFC 3987, January 2005.
[RFC3987]Duerst,M.和M.Suignard,“国际化资源标识符(IRIs)”,RFC 3987,2005年1月。
[RFC4288] Freed, N. and J. Klensin, "Media Type Specifications and Registration Procedures", BCP 13, RFC 4288, December 2005.
[RFC4288]Freed,N.和J.Klensin,“介质类型规范和注册程序”,BCP 13,RFC 4288,2005年12月。
[RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 5226, May 2008.
[RFC5226]Narten,T.和H.Alvestrand,“在RFCs中编写IANA注意事项部分的指南”,BCP 26,RFC 5226,2008年5月。
[RFC5646] Phillips, A. and M. Davis, "Tags for Identifying Languages", BCP 47, RFC 5646, September 2009.
[RFC5646]Phillips,A.和M.Davis,“识别语言的标记”,BCP 47,RFC 5646,2009年9月。
[RFC5987] Reschke, J., "Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters", RFC 5987, August 2010.
[RFC5987]Reschke,J.,“超文本传输协议(HTTP)头字段参数的字符集和语言编码”,RFC 5987,2010年8月。
[RFC2068] Fielding, R., Gettys, J., Mogul, J., Nielsen, H., and T. Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", RFC 2068, January 1997.
[RFC2068]菲尔丁,R.,盖蒂,J.,莫格尔,J.,尼尔森,H.,和T.伯纳斯李,“超文本传输协议——HTTP/1.1”,RFC 2068,1997年1月。
[RFC2817] Khare, R. and S. Lawrence, "Upgrading to TLS Within HTTP/1.1", RFC 2817, May 2000.
[RFC2817]Khare,R.和S.Lawrence,“在HTTP/1.1中升级到TLS”,RFC 28172000年5月。
[RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000.
[RFC2818]Rescorla,E.,“TLS上的HTTP”,RFC2818,2000年5月。
[RFC4287] Nottingham, M., Ed. and R. Sayre, Ed., "The Atom Syndication Format", RFC 4287, December 2005.
[RFC4287]诺丁汉,M.,Ed.和R.Sayre,Ed.,“原子联合格式”,RFC 4287,2005年12月。
[RFC4685] Snell, J., "Atom Threading Extensions", RFC 4685, September 2006.
[RFC4685]Snell,J.,“Atom线程扩展”,RFC4685,2006年9月。
[RFC4946] Snell, J., "Atom License Extension", RFC 4946, July 2007.
[RFC4946]Snell,J.,“原子许可证扩展”,RFC 49462007年7月。
[RFC5005] Nottingham, M., "Feed Paging and Archiving", RFC 5005, September 2007.
[RFC5005]诺丁汉,M.,“提要分页和归档”,RFC 50052007年9月。
[RFC5023] Gregorio, J. and B. de hOra, "The Atom Publishing Protocol", RFC 5023, October 2007.
[RFC5023]Gregorio,J.和B.de hOra,“原子发布协议”,RFC 5023,2007年10月。
[RFC5829] Brown, A., Clemm, G., and J. Reschke, "Link Relation Types for Simple Version Navigation between Web Resources", RFC 5829, April 2010.
[RFC5829]Brown,A.,Clemm,G.,和J.Reschke,“Web资源之间简单版本导航的链接关系类型”,RFC 58292010年4月。
[W3C.CR-css3-mediaqueries-20090915] van Kesteren, A., Glazman, D., Lie, H., and T. Celik, "Media Queries", W3C Candidate Recommendation CR-css3- mediaqueries-20090915, September 2009, <http://www.w3.org/TR/2009/ CR-css3-mediaqueries-20090915/>.
[W3C.CR-css3-mediaqueries-20090915]van Kesteren,A.,Glazman,D.,Lie,H.,和T.Celik,“媒体查询”,W3C候选建议CR-css3-mediaqueries-20090915,2009年9月<http://www.w3.org/TR/2009/ CR-css3-mediaqueries-20090915/>。
Latest version available at <http://www.w3.org/TR/css3-mediaqueries/>.
最新版本可于<http://www.w3.org/TR/css3-mediaqueries/>.
[W3C.CR-curie-20090116] Birbeck, M. and S. McCarron, "CURIE Syntax 1.0", W3C Candidate Recommendation CR-curie-20090116, January 2009, <http://www.w3.org/TR/2009/CR-curie-20090116>.
[W3C.CR-curie-20090116]Birbeck,M.和S.McCarron,“居里语法1.0”,W3C候选推荐CR-curie-20090116,2009年1月<http://www.w3.org/TR/2009/CR-curie-20090116>.
Latest version available at <http://www.w3.org/TR/curie>.
最新版本可于<http://www.w3.org/TR/curie>.
[W3C.REC-html401-19991224] Le Hors, A., Raggett, D., and I. Jacobs, "HTML 4.01 Specification", W3C Recommendation REC-html401-19991224, December 1999, <http://www.w3.org/TR/1999/REC-html401-19991224>.
[W3C.REC-html401-19991224]Le Hors,A.,Raggett,D.和I.Jacobs,“HTML 4.01规范”,W3C建议REC-html401-19991224,1999年12月<http://www.w3.org/TR/1999/REC-html401-19991224>.
Latest version available at <http://www.w3.org/TR/html401>.
最新版本可于<http://www.w3.org/TR/html401>.
[W3C.REC-rdfa-syntax-20081014] Adida, B., Birbeck, M., McCarron, S., and S. Pemberton, "RDFa in XHTML: Syntax and Processing", W3C Recommendation REC-rdfa-syntax-20081014, October 2008, <http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014>.
[W3C.REC-rdfa-syntax-20081014]Adida,B.,Birbeck,M.,McCarron,S.,和S.Pemberton,“XHTML中的rdfa:语法和处理”,W3C建议REC-rdfa-syntax-20081014,2008年10月<http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014>.
Latest version available at <http://www.w3.org/TR/rdfa-syntax>.
最新版本可于<http://www.w3.org/TR/rdfa-syntax>.
[W3C.REC-xhtml-basic-20080729] Baker, M., Ishikawa, M., Stark, P., Matsui, S., Wugofski, T., and T. Yamakami, "XHTML[TM] Basic 1.1", W3C Recommendation REC-xhtml-basic-20080729, July 2008, <http://www.w3.org/TR/2008/REC-xhtml-basic-20080729>.
[W3C.REC-xhtml-basic-20080729]Baker,M.,Ishikawa,M.,Stark,P.,Matsui,S.,Wugofski,T.,和T.Yamakami,“xhtml[TM]basic 1.1”,W3C建议REC-xhtml-basic-20080729,2008年7月<http://www.w3.org/TR/2008/REC-xhtml-basic-20080729>.
Latest version available at <http://www.w3.org/TR/xhtml-basic>.
最新版本可于<http://www.w3.org/TR/xhtml-basic>.
HTML motivated the original syntax of the Link header, and many of the design decisions in this document are driven by a desire to stay compatible with these uses.
HTML激发了链接头的原始语法,本文档中的许多设计决策都是为了与这些用途保持兼容。
In HTML4, the link element can be mapped to links as specified here by using the "href" attribute for the target URI, and "rel" to convey the relation type, as in the Link header. The context of the link is the URI associated with the entire HTML document.
在HTML4中,链接元素可以映射到此处指定的链接,方法是使用目标URI的“href”属性和“rel”来传递关系类型,如链接头中所示。链接的上下文是与整个HTML文档关联的URI。
All of the link relation types defined by HTML4 have been included in the Link Relation Type registry, so they can be used without modification. However, there are several potential ways to serialise extension relation types into HTML4, including
HTML4定义的所有链接关系类型都包含在链接关系类型注册表中,因此它们可以不经修改地使用。然而,有几种可能的方法可以将扩展关系类型序列化到HTML4中,包括
o As absolute URIs,
o 作为绝对URI,
o using the document-wide "profile" attribute's URI as a prefix for relation types, or
o 使用文档范围的“profile”属性的URI作为关系类型的前缀,或
o using the RDFa [W3C.REC-rdfa-syntax-20081014] convention of mapping token prefixes to URIs (in a manner similar to XML name spaces) (note that RDFa is only defined to work in XHTML [W3C.REC-xhtml-basic-20080729], but is sometimes used in HTML4).
o 使用RDFa[W3C.REC-RDFa-syntax-20081014]将令牌前缀映射到URI的约定(以类似于XML名称空间的方式)(注意,RDFa仅定义为在XHTML[W3C.REC-XHTML-basic-20080729]中工作,但有时在HTML4中使用)。
Individual applications of linking will therefore need to define how their extension links should be serialised into HTML4.
因此,链接的各个应用程序需要定义如何将其扩展链接序列化为HTML4。
Surveys of existing HTML content have shown that unregistered link relation types that are not URIs are (perhaps inevitably) common. Consuming HTML implementations should not consider such unregistered short links to be errors, but rather relation types with a local scope (i.e., their meaning is specific and perhaps private to that document).
对现有HTML内容的调查表明,非URI的未注册链接关系类型(可能不可避免)很常见。使用HTML实现不应认为这些未注册的短链接是错误的,而是关系类型与局部范围(即,它们的含义是特定的,可能是私有的)。
HTML4 also defines several attributes on links that are not explicitly defined by the Link header. These attributes can be serialised as link-extensions to maintain fidelity.
HTML4还定义了链接头未明确定义的几个属性。这些属性可以序列化为链接扩展,以保持逼真度。
Finally, the HTML4 specification gives a special meaning when the "alternate" and "stylesheet" relation types coincide in the same link. Such links should be serialised in the Link header using a single list of relation-types (e.g., rel="alternate stylesheet") to preserve this relationship.
最后,当“alternate”和“stylesheet”关系类型在同一链接中重合时,HTML4规范给出了一个特殊的含义。此类链接应在链接头中使用单一关系类型列表(例如,rel=“alternate stylesheet”)序列化,以保留此关系。
Atom conveys links in the atom:link element, with the "href" attribute indicating the target IRI and the "rel" attribute containing the relation type. The context of the link is either a feed IRI or an entry ID, depending on where it appears; generally, feed-level links are obvious candidates for transmission as a Link header.
Atom在Atom:link元素中传递链接,其中“href”属性表示目标IRI,“rel”属性包含关系类型。链接的上下文是提要IRI或条目ID,具体取决于它出现的位置;通常,馈送级链路是作为链路头传输的明显候选链路。
When serialising an atom:link into a Link header, it is necessary to convert target IRIs (if used) to URIs.
将atom:link序列化为链接头时,需要将目标IRI(如果使用)转换为URI。
Atom defines extension relation types in terms of IRIs. This specification re-defines them as URIs, to simplify and reduce errors in their comparison.
Atom根据IRI定义扩展关系类型。本规范将它们重新定义为URI,以简化和减少比较中的错误。
Atom allows registered link relation types to be serialised as absolute URIs. Such relation types SHOULD be converted to the appropriate registered form (e.g., "http://www.iana.org/assignments/relation/self" to "self") so that they are not mistaken for extension relation types.
Atom允许将已注册的链接关系类型序列化为绝对URI。此类关系类型应转换为适当的注册形式(例如“http://www.iana.org/assignments/relation/self,这样它们就不会被误认为是扩展关系类型。
Furthermore, Atom link relation types are always compared in a case-sensitive fashion; therefore, registered link relation types SHOULD be converted to their registered form (usually, lowercase) when serialised in an Atom document.
此外,原子链接关系类型总是以区分大小写的方式进行比较;因此,在Atom文档中序列化时,应将已注册的链接关系类型转换为其已注册的形式(通常为小写)。
Note also that while the Link header allows multiple relations to be serialised in a single link, atom:link does not. In this case, a single link-value may map to several atom:link elements.
还请注意,虽然Link头允许在单个链接中序列化多个关系,但atom:Link不允许。在这种情况下,单个链接值可能映射到多个atom:link元素。
As with HTML, atom:link defines some attributes that are not explicitly mirrored in the Link header syntax, but they can also be used as link-extensions to maintain fidelity.
与HTML一样,atom:link定义了一些未在链接头语法中显式镜像的属性,但它们也可以用作链接扩展以保持逼真度。
This specification lifts the idea and definition for the Link header from RFC 2068; credit for it belongs entirely to the authors of and contributors to that document. The link relation type registrations themselves are sourced from several documents; see the applicable references.
本规范从RFC 2068中提出了链路头的概念和定义;这完全归功于该文件的作者和贡献者。链接关系类型注册本身来源于多个文档;请参阅适用的参考资料。
The author would like to thank the many people who commented upon, encouraged and gave feedback to this specification, especially including Frank Ellermann, Roy Fielding, Eran Hammer-Lahav, and Julian Reschke.
作者要感谢对本规范发表评论、给予鼓励和反馈的许多人,特别是Frank Ellerman、Roy Fielding、Eran Hammer Lahav和Julian Reschke。
Author's Address
作者地址
Mark Nottingham
马克诺丁汉
EMail: mnot@mnot.net URI: http://www.mnot.net/
EMail: mnot@mnot.net URI: http://www.mnot.net/