Internet Engineering Task Force (IETF) A. Brown Request for Comments: 5829 G. Clemm Category: Informational IBM ISSN: 2070-1721 J. Reschke, Ed. greenbytes April 2010
Internet Engineering Task Force (IETF) A. Brown Request for Comments: 5829 G. Clemm Category: Informational IBM ISSN: 2070-1721 J. Reschke, Ed. greenbytes April 2010
Link Relation Types for Simple Version Navigation between Web Resources
Web资源之间用于简单版本导航的链接关系类型
Abstract
摘要
This specification defines a set of link relation types that may be used on Web resources for navigation between a resource and other resources related to version control, such as past versions and working copies.
本规范定义了一组链接关系类型,这些类型可用于Web资源,以便在资源和与版本控制相关的其他资源(如过去的版本和工作副本)之间导航。
Status of This Memo
关于下段备忘
This document is not an Internet Standards Track specification; it is published for informational purposes.
本文件不是互联网标准跟踪规范;它是为了提供信息而发布的。
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). Not all documents approved by the IESG are a candidate for any level of Internet Standard; see Section 2 of RFC 5741.
本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。并非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/rfc5829.
有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问http://www.rfc-editor.org/info/rfc5829.
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许可证中所述的无担保。
Table of Contents
目录
1. Introduction ....................................................3 2. Terminology .....................................................3 3. Link Relations ..................................................4 3.1. 'version-history' ..........................................4 3.2. 'latest-version' ...........................................4 3.3. 'working-copy' .............................................4 3.4. 'working-copy-of' ..........................................4 3.5. 'predecessor-version' ......................................4 3.6. 'successor-version' ........................................5 4. IANA Considerations .............................................5 4.1. 'version-history' Link Relation Registration ...............5 4.2. 'latest-version' Link Relation Registration ................5 4.3. 'working-copy' Link Relation Registration ..................5 4.4. 'working-copy-of' Link Relation Registration ...............6 4.5. 'predecessor-version' Link Relation Registration ...........6 4.6. 'successor-version' Link Relation Registration .............6 5. Security Considerations .........................................6 6. Acknowledgments .................................................7 7. References ......................................................7 7.1. Normative References .......................................7 7.2. Informative References .....................................7 Appendix A. Relationship to Java Content Repository (JCR) and WebDAV ................................................9 A.1. Example: Use of Link Relations in HTTP Link Header .......10
1. Introduction ....................................................3 2. Terminology .....................................................3 3. Link Relations ..................................................4 3.1. 'version-history' ..........................................4 3.2. 'latest-version' ...........................................4 3.3. 'working-copy' .............................................4 3.4. 'working-copy-of' ..........................................4 3.5. 'predecessor-version' ......................................4 3.6. 'successor-version' ........................................5 4. IANA Considerations .............................................5 4.1. 'version-history' Link Relation Registration ...............5 4.2. 'latest-version' Link Relation Registration ................5 4.3. 'working-copy' Link Relation Registration ..................5 4.4. 'working-copy-of' Link Relation Registration ...............6 4.5. 'predecessor-version' Link Relation Registration ...........6 4.6. 'successor-version' Link Relation Registration .............6 5. Security Considerations .........................................6 6. Acknowledgments .................................................7 7. References ......................................................7 7.1. Normative References .......................................7 7.2. Informative References .....................................7 Appendix A. Relationship to Java Content Repository (JCR) and WebDAV ................................................9 A.1. Example: Use of Link Relations in HTTP Link Header .......10
This specification defines a set of link relation types that may be used on Web resources that exist in a system that supports versioning to navigate among the different resources available, such as past versions and working copies.
本规范定义了一组链接关系类型,这些类型可用于支持版本控制的系统中存在的Web资源,以在不同的可用资源(如过去的版本和工作副本)之间导航。
These link relations are used in the AtomPub ([RFC5023]) bindings of the "Content Management Interoperability Services" (CMIS). See Section 3.4.3.3 of [CMIS] for further information.
这些链接关系用于“内容管理互操作性服务”(CMIS)的AtomPub([RFC5023])绑定。更多信息,请参见[CMIS]第3.4.3.3节。
Versioned Resource
版本化资源
When a resource is put under version control, it becomes a "versioned resource". Many servers protect versioned resources from modifications by considering them "checked in", and by requiring a "checkout" operation before modification, and a "checkin" operation to get back to the "checked-in" state. Other servers allow modification, in which case the checkout/checkin operation may happen implicitly.
当资源置于版本控制之下时,它将成为“版本化资源”。许多服务器通过将受版本控制的资源视为“已签入”,并在修改之前要求执行“签出”操作,以及执行“签入”操作以返回“已签入”状态,从而保护受版本控制的资源不受修改的影响。其他服务器允许修改,在这种情况下,签出/签入操作可能会隐式发生。
Version History
版本历史
A "version history" resource is a resource that contains all the versions of a particular versioned resource.
“版本历史记录”资源是包含特定版本资源的所有版本的资源。
Predecessor, Successor
前任、继任者
When a versioned resource is checked out and then subsequently checked in, the version that was checked out becomes a "predecessor" of the version created by the checkin. A client can specify multiple predecessors for a new version if the new version is logically a merge of those predecessors. The inverse of the predecessor relation is the "successor" relation. Therefore, if X is a predecessor of Y, then Y is a successor of X.
签出并随后签入版本化资源时,签出的版本将成为签入创建的版本的“前置版本”。如果新版本在逻辑上是多个前置版本的合并,则客户端可以为新版本指定多个前置版本。前任关系的逆关系是“继任者”关系。因此,如果X是Y的前辈,那么Y是X的后辈。
Working Copy
工作副本
A "working copy" is a resource at a server-defined URL that can be used to create a new version of a versioned resource.
“工作副本”是服务器定义的URL上的资源,可用于创建版本化资源的新版本。
Checkout
结账
A "checkout" is an operation on a versioned resource that creates a working copy, or changes the versioned resource to be a working copy as well ("in-place versioning").
“签出”是对版本化资源的操作,它创建工作副本,或将版本化资源更改为工作副本(“就地版本化”)。
Checkin
签到
A "checkin" is an operation on a working copy that creates a new version of its corresponding versioned resource.
“签入”是对工作副本执行的操作,该操作创建其相应版本化资源的新版本。
Note: the operations for putting a resource under version control and for checking in and checking out depend on the protocol in use and are beyond the scope of this document; see [CMIS], [RFC3253], and [JSR-283] for examples.
注意:将资源置于版本控制之下以及签入和签出的操作取决于正在使用的协议,并且超出了本文档的范围;有关示例,请参见[CMIS]、[RFC3253]和[JSR-283]。
The following link relations are defined.
定义了以下链接关系。
When included on a versioned resource, this link points to a resource containing the version history for this resource.
当包含在版本化资源中时,此链接指向包含此资源的版本历史记录的资源。
When included on a versioned resource, this link points to a resource containing the latest (e.g., current) version.
当包含在版本化资源中时,此链接指向包含最新(如当前)版本的资源。
The latest version is defined by the system. For linear versioning systems, this is probably the latest version by timestamp. For systems that support branching, there will be multiple latest versions, one for each branch in the version history.
最新版本由系统定义。对于线性版本控制系统,这可能是时间戳的最新版本。对于支持分支的系统,将有多个最新版本,版本历史记录中每个分支对应一个版本。
Some systems may allow more than one of these link relations.
某些系统可能允许这些链接关系中的一种以上。
When included on a versioned resource, this link points to a working copy for this resource.
当包含在版本化资源中时,此链接指向此资源的工作副本。
Some systems may allow more than one of these link relations.
某些系统可能允许这些链接关系中的一种以上。
When included on a working copy, this link points to the versioned resource from which this working copy was obtained.
当包含在工作副本中时,此链接指向从中获取此工作副本的版本化资源。
When included on a versioned resource, this link points to a resource containing the predecessor version in the version history.
当包含在版本化资源中时,此链接指向版本历史记录中包含前置版本的资源。
Some systems may allow more than one of these link relations in the case of multiple branches merging.
在多个分支合并的情况下,某些系统可能允许多个链接关系。
When included on a versioned resource, this link points to a resource containing the successor version in the version history.
当包含在版本化资源中时,此链接指向版本历史记录中包含后续版本的资源。
Some systems may allow more than one of these link relations in order to support branching.
一些系统可能允许这些链接关系中的一个以上,以支持分支。
The link relations below have been registered by IANA per Section 7.1 of [RFC4287]:
IANA已根据[RFC4287]第7.1节注册了以下链接关系:
Attribute Value: version-history
属性值:版本历史记录
Description: See Section 3.1.
说明:见第3.1节。
Expected display characteristics: Undefined; this relation can be used for background processing or to provide extended functionality without displaying its value.
预期显示特性:未定义;此关系可用于后台处理或提供扩展功能,而不显示其值。
Security considerations: See Section 5.
安全注意事项:见第5节。
Attribute Value: latest-version
属性值:最新版本
Description: See Section 3.2.
说明:见第3.2节。
Expected display characteristics: Undefined; this relation can be used for background processing or to provide extended functionality without displaying its value.
预期显示特性:未定义;此关系可用于后台处理或提供扩展功能,而不显示其值。
Security considerations: See Section 5.
安全注意事项:见第5节。
Attribute Value: working-copy
属性值:工作副本
Description: See Section 3.3.
说明:见第3.3节。
Expected display characteristics: Undefined; this relation can be used for background processing or to provide extended functionality without displaying its value.
预期显示特性:未定义;此关系可用于后台处理或提供扩展功能,而不显示其值。
Security considerations: See Section 5.
安全注意事项:见第5节。
Attribute Value: working-copy-of
属性值:的工作副本
Description: See Section 3.4.
说明:见第3.4节。
Expected display characteristics: Undefined; this relation can be used for background processing or to provide extended functionality without displaying its value.
预期显示特性:未定义;此关系可用于后台处理或提供扩展功能,而不显示其值。
Security considerations: See Section 5.
安全注意事项:见第5节。
Attribute Value: predecessor-version
属性值:前置版本
Description: See Section 3.5.
说明:见第3.5节。
Expected display characteristics: Undefined; this relation can be used for background processing or to provide extended functionality without displaying its value.
预期显示特性:未定义;此关系可用于后台处理或提供扩展功能,而不显示其值。
Security considerations: See Section 5.
安全注意事项:见第5节。
Attribute Value: successor-version
属性值:后续版本
Description: See Section 3.6.
说明:见第3.6节。
Expected display characteristics: Undefined; this relation can be used for background processing or to provide extended functionality without displaying its value.
预期显示特性:未定义;此关系可用于后台处理或提供扩展功能,而不显示其值。
Security considerations: See Section 5.
安全注意事项:见第5节。
Automated agents should take care when these relations cross administrative domains (e.g., the URI has a different authority than the current document). Such agents should also take care to detect circular references.
当这些关系跨管理域时(例如,URI与当前文档具有不同的权限),自动化代理应该注意。此类代理还应注意检测循环引用。
Care should be applied when versioned resources are subject to differing access policies. In this case, exposing links may leak information even if the linked resource itself is properly secured. In particular, the syntax of the link target could expose sensitive information (see Section 16.2 of [RFC3253] for a similar consideration in WebDAV Versioning). Note that this applies to exposing link metadata in general, not only to links related to versioning.
当版本化资源受到不同访问策略的约束时,应小心。在这种情况下,即使链接资源本身得到了适当的保护,公开链接也可能泄漏信息。特别是,链接目标的语法可能会暴露敏感信息(请参见[RFC3253]第16.2节,了解WebDAV版本控制中的类似考虑)。请注意,这通常适用于公开链接元数据,而不仅仅是与版本控制相关的链接。
Thanks to the members of Content Management Interoperability Services (CMIS) Technical Committee (TC) at OASIS for the initial proposal, and to Jan Algermissen for feedback during IETF review.
感谢OASIS内容管理互操作性服务(CMIS)技术委员会(TC)成员的初步提案,感谢Jan Algermissen在IETF审查期间的反馈意见。
[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月。
[CMIS] Brown, A., Gur-Esh, E., McVeigh, R., and F. Mueller, "Content Management Interoperability Services (CMIS) Version 1.0", OASIS Content Management Interoperability Services (CMIS) Version 1.0 Committee Specification 01, March 2010, <http://docs.oasis-open.org/cmis/CMIS/ v1.0/cs01/cmis-spec-v1.0.html>.
[CMIS]Brown,A.,Gur Esh,E.,McVeigh,R.,和F.Mueller,“内容管理互操作性服务(CMIS)1.0版”,OASIS内容管理互操作性服务(CMIS)1.0版委员会规范01,2010年3月<http://docs.oasis-open.org/cmis/CMIS/ v1.0/cs01/cmis-spec-v1.0.html>。
Latest version available at <http://docs.oasis-open.org/cmis/CMIS/v1.0/ cmis-spec-v1.0.html>
Latest version available at <http://docs.oasis-open.org/cmis/CMIS/v1.0/ cmis-spec-v1.0.html>
[JSR-283] Day Software, Nuescheler, D., and P. Piegaze, "Content Repository API for Java(tm) Technology Specification", Java Specification Request 283, August 2009, <http://www.day.com/specs/jcr/2.0/>.
[JSR-283]Day Software,Nuescheler,D.和P.Piegaze,“Java(tm)技术规范的内容存储库API”,Java规范请求283,2009年8月<http://www.day.com/specs/jcr/2.0/>.
[RFC3253] Clemm, G., Amsden, J., Ellison, T., Kaler, C., and J. Whitehead, "Versioning Extensions to WebDAV (Web Distributed Authoring and Versioning)", RFC 3253, March 2002.
[RFC3253]Clemm,G.,Amsden,J.,Ellison,T.,Kaler,C.,和J.Whitehead,“WebDAV的版本控制扩展(Web分布式创作和版本控制)”,RFC 3253,2002年3月。
[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月。
[WEB-LINKING] Nottingham, M., "Web Linking", Work in Progress, March 2010.
[网络链接]诺丁汉,M.,“网络链接”,正在进行的工作,2010年3月。
Appendix A. Relationship to Java Content Repository (JCR) and WebDAV
附录A.与Java内容存储库(JCR)和WebDAV的关系
The link relations defined in Section 3 correspond to various properties used in WebDAV Versioning [RFC3253] and JCR [JSR-283]:
第3节中定义的链接关系对应于WebDAV版本控制[RFC3253]和JCR[JSR-283]中使用的各种属性:
version-history
版本历史
WebDAV: the resource identified by the DAV:version-history property ([RFC3253], Sections 5.2.1 and 5.3.1).
WebDAV:由DAV:version history属性([RFC3253],第5.2.1和5.3.1节)标识的资源。
JCR: the node identified by jcr:versionHistory property ([JSR-283], Section 3.13.2.4) for versionable nodes, the parent folder for version nodes.
JCR:由JCR:versionHistory属性([JSR-283],第3.13.2.4节)为可版本化节点标识的节点,版本节点的父文件夹。
latest-version
最新版本
WebDAV: for version-controlled resources, DAV:checked-in ([RFC3253], Section 3.2.1) or DAV:checked-out ([RFC3253], Section 3.3.1), depending on checkin state. For version resources, a successor version that itself does not have any successors.
WebDAV:对于版本控制资源,DAV:签入([RFC3253],第3.2.1节)或DAV:签出([RFC3253],第3.3.1节),具体取决于签入状态。对于版本资源,为本身没有任何后续版本的后续版本。
JCR: the version node identified by the jcr:baseVersion property ([JSR-283], Section 3.13.2.5) for versionable nodes; for version nodes, a successor version that itself does not have any successors.
JCR:由JCR:baseVersion属性([JSR-283],第3.13.2.5节)为可版本节点标识的版本节点;对于版本节点,为本身没有任何后续版本的后续版本。
working-copy
工作副本
WebDAV: for version-controlled resources that are checked-out in place: the resource itself. For version resources: each resource identified by a member of the DAV:checkout-set property (see [RFC3253], Section 3.4.3).
WebDAV:对于就地签出的版本控制资源:资源本身。对于版本资源:由DAV:checkout set属性的成员标识的每个资源(请参见[RFC3253],第3.4.3节)。
JCR: for checked-out versionable nodes: the node itself.
JCR:对于签出的可版本化节点:节点本身。
working-copy-of
工作副本
WebDAV: the resource identified by the DAV:checked-out property (see [RFC3253], Section 3.3.1).
WebDAV:由DAV:checked-out属性标识的资源(参见[RFC3253],第3.3.1节)。
JCR: for checked-out versionable nodes: the node identified by the jcr:baseVersion property ([JSR-283], Section 3.13.12.5).
JCR:对于签出的可版本化节点:由JCR:baseVersion属性([JSR-283],第3.13.12.5节)标识的节点。
predecessor-version
前身版本
WebDAV: each resource identified by a member of DAV:predecessor-set ([RFC3253], Sections 3.3.2 and 3.4.1).
WebDAV:由DAV成员标识的每个资源:前置集([RFC3253],第3.3.2节和第3.4.1节)。
JCR: each node identified by a member of jcr:predecessors ([JSR-283], Section 3.13.3.3).
JCR:由JCR:Preferences成员标识的每个节点([JSR-283],第3.13.3.3节)。
successor-version
后继版本
WebDAV: each resource identified by a member of DAV:successor-set ([RFC3253], Section 3.4.2).
WebDAV:由DAV成员标识的每个资源:后续集([RFC3253],第3.4.2节)。
JCR: each node identified by a member of jcr:successors ([JSR-283], Section 3.13.3.4).
JCR:由JCR:继任者成员标识的每个节点([JSR-283],第3.13.3.4节)。
The "Web Linking" specification ([WEB-LINKING]) generalizes Atom link relations, and also reintroduces the HTTP "Link" header as a way to expose link relations in HTTP responses. This will make it possible to expose version links independently from a specific vocabulary, be it the Atom Feed Format ([RFC4287]) or WebDAV properties ([RFC3253]).
“Web链接”规范([Web-Linking])概括了Atom链接关系,还重新引入了HTTP“link”头,作为在HTTP响应中公开链接关系的一种方式。这将使得独立于特定词汇表公开版本链接成为可能,无论是Atom提要格式([RFC4287])还是WebDAV属性([RFC3253])。
For instance, a response to a VERSION-CONTROL request ([RFC3253], Section 3.5) could expose a newly created version-history and checked-in version as link relations:
例如,对版本控制请求的响应([RFC3253],第3.5节)可能会公开新创建的版本历史记录和作为链接关系签入的版本:
>> Request:
>>请求:
VERSION-CONTROL /docs/test.txt HTTP/1.1 Host: example.net
VERSION-CONTROL /docs/test.txt HTTP/1.1 Host: example.net
>> Response:
>>答复:
HTTP/1.1 204 No Content Link: </system/v/84345634/1>; rel=latest-version; anchor=</docs/test.txt> Link: </system/vh/84345634>; rel=version-history; anchor=</docs/test.txt>
HTTP/1.1 204 No Content Link: </system/v/84345634/1>; rel=latest-version; anchor=</docs/test.txt> Link: </system/vh/84345634>; rel=version-history; anchor=</docs/test.txt>
(Note that in this case, the anchor parameter is used, as the response to a VERSION-CONTROL request is not a representation of the resource at the Request-URI.)
(请注意,在这种情况下,将使用anchor参数,因为对版本控制请求的响应不是请求URI处资源的表示。)
A subsequent HEAD request on that resource could expose the version-history and latest-version relations as well:
对该资源的后续HEAD请求也可能公开版本历史记录和最新版本关系:
>> Request:
>>请求:
HEAD /docs/test.txt HTTP/1.1 Host: example.net
HEAD /docs/test.txt HTTP/1.1 Host: example.net
>> Response:
>>答复:
HTTP/1.1 200 OK Content-Type: text/plain; charset=UTF-8 Content-Length: 12345 Link: </system/v/84345634/1>; rel=latest-version Link: </system/vh/84345634>; rel=version-history
HTTP/1.1 200 OK Content-Type: text/plain; charset=UTF-8 Content-Length: 12345 Link: </system/v/84345634/1>; rel=latest-version Link: </system/vh/84345634>; rel=version-history
After creating more versions, following the latest-version would then expose predecessors of a version:
创建更多版本后,遵循最新版本将公开版本的前身:
>> Request:
>>请求:
HEAD /system/v/84345634/3 HTTP/1.1 Host: example.net
HEAD /system/v/84345634/3 HTTP/1.1 Host: example.net
>> Response:
>>答复:
HTTP/1.1 200 OK Content-Type: text/plain; charset=UTF-8 Content-Length: 12323 Link: </system/v/84345634/2>; rel=predecessor-version
HTTP/1.1 200 OK Content-Type: text/plain; charset=UTF-8 Content-Length: 12323 Link: </system/v/84345634/2>; rel=predecessor-version
Authors' Addresses
作者地址
Al Brown IBM 3565 Harbor Blvd Costa Mesa, California 92626 USA
美国加利福尼亚州科斯塔梅萨港大道3565号艾尔布朗IBM 92626
EMail: albertcbrown@us.ibm.com
EMail: albertcbrown@us.ibm.com
Geoffrey Clemm IBM 20 Maguire Road Lexington, MA 02421 USA
美国马萨诸塞州列克星敦马圭尔路20号杰弗里·克莱姆IBM 02421
EMail: geoffrey.clemm@us.ibm.com
EMail: geoffrey.clemm@us.ibm.com
Julian F. Reschke (editor) greenbytes GmbH Hafenweg 16 Muenster, NW 48155 Germany
Julian F.Reschke(编辑)greenbytes GmbH Hafenweg 16 Muenster,西北48155德国
EMail: julian.reschke@greenbytes.de URI: http://greenbytes.de/tech/webdav/
EMail: julian.reschke@greenbytes.de URI: http://greenbytes.de/tech/webdav/