<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc subcompact="no"?>
<?rfc-ext allow-markup-in-artwork="yes"?>
<?rfc rfcedstyle="yes"?>

<rfc xmlns:x="http://purl.org/net/xml2rfc/ext" number="5829" category="info" xml:lang="en">
	<front>
		<title abbrev="Version Navigation Link Relations">Link Relation Types for Simple Version Navigation between Web Resources</title>

		<author initials="A. B." surname="Brown" fullname="Al Brown">
			<organization>IBM</organization>
			<address>
				<postal>
					<street>3565 Harbor Blvd</street>
					<city>Costa Mesa</city>
					<region>California</region>
					<code>92626</code>
					<country>USA</country>
				</postal>
				<email>albertcbrown@us.ibm.com</email>
			</address>
		</author>

    <author initials="G." surname="Clemm" fullname="Geoffrey Clemm">
      <organization>IBM</organization>
      <address>
        <postal>
          <street>20 Maguire Road</street>
          <city>Lexington</city>
          <region>MA</region>
          <code>02421</code>
					<country>USA</country>
        </postal>
        <email>geoffrey.clemm@us.ibm.com</email>
      </address>
    </author>
    
		<author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
			<organization abbrev="greenbytes">greenbytes GmbH</organization>
			<address>
				<postal>
					<street>Hafenweg 16</street>
					<city>Muenster</city>
					<region>NW</region>
					<code>48155</code>
					<country>Germany</country>
				</postal>
				<email>julian.reschke@greenbytes.de</email>
				<uri>http://greenbytes.de/tech/webdav/</uri>
			</address>
		</author>

		<date month="April" year="2010"/>

		<abstract>
			<t>
        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.
			</t>
		</abstract>

	</front>

	<middle>





<section title="Introduction" anchor="introduction">
<t>
  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.
</t>
<t>
  These link relations are used in the AtomPub (<xref target="RFC5023"/>) bindings
  of the "Content Management Interoperability Services" (CMIS). See
  <xref x:sec="3.4.3.3" x:fmt="of" target="CMIS" x:rel="#_Toc243905524"/> for
  further information.
</t>
</section>

<section title="Terminology" anchor="terminology">

<t>
  <x:dfn>Versioned Resource</x:dfn>
  <list>
    <t>
      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.
    </t>
  </list>
</t>
<t>
  <x:dfn>Version History</x:dfn>
  <list>
    <t>
      A "version history" resource is a resource that contains all the
      versions of a particular versioned resource.
    </t>
  </list>
</t>
<t>
  <x:dfn>Predecessor</x:dfn>, <x:dfn>Successor</x:dfn>
  <list>
    <t>
      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.
    </t>
  </list>
</t>
<t>
  <x:dfn>Working Copy</x:dfn>
  <list>
    <t>
      A "working copy" is a resource at a server-defined URL that can be
      used to create a new version of a versioned resource.
    </t>
  </list>
</t>
<t>
  <x:dfn>Checkout</x:dfn>
  <list>
    <t>
      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").
    </t>
  </list>
</t>
<t>
  <x:dfn>Checkin</x:dfn>
  <list>
    <t>
      A "checkin" is an operation on a working copy that creates a new version of
      its corresponding versioned resource.
    </t>
  </list>
</t>
<x:note>
  <t>
    <x:h>Note:</x:h> 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 <xref target="CMIS"/>,
    <xref target="RFC3253"/>, and <xref target="JSR-283"/> for examples.
  </t>
</x:note>

</section>



<section title="Link Relations" anchor="linkrelations">
<t>
  The following link relations are defined.
</t>

<section title="'version-history'" anchor="version-history">
  <t>
		When included on a versioned resource, this link points to a resource
    containing the version history for this resource.
  </t>
</section>

<section title="'latest-version'" anchor="latest-version">
<t>
  When included on a versioned resource, this link points to a resource
  containing the latest (e.g., current) version.
</t>
<t>
  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.
</t>
<t>
  Some systems may allow more than one of these link relations.
</t>
</section>

<section title="'working-copy'" anchor="working-copy">
<t>
  When included on a versioned resource, this link points to a working copy
  for this resource.
</t>
<t>
  Some systems may allow more than one of these link relations.
</t>
</section>

<section title="'working-copy-of'" anchor="working-copy-of">
<t>
  When included on a working copy, this link points to the versioned resource
  from which this working copy was obtained.
</t>
</section>

<section title="'predecessor-version'" anchor="predecessor-version">
<t>
  When included on a versioned resource, this link points to a resource
  containing the predecessor version in the version history.
</t>
<t>
  Some systems may allow more than one of these link relations in the case of 
  multiple branches merging.
</t>
</section>

<section title="'successor-version'" anchor="successor-version">
<t>
  When included on a versioned resource, this link points to a resource
  containing the successor version in the version history.
</t>
<t>    
  Some systems may allow more than one of these link relations in order to
  support branching.
</t>
</section>
</section>



<section title="IANA Considerations" anchor="iana">
<t>
  The link relations below have been registered by IANA per <xref target="RFC4287" x:fmt="of" x:sec="7.1"/>:
</t>
<section title="'version-history' Link Relation Registration">
<t>
  <list style="hanging">
    <x:lt hangText="Attribute Value:"><t>
      version-history
    </t></x:lt>
    <x:lt hangText="Description:"><t>
      See <xref target="version-history"/>.
    </t></x:lt>
    <x:lt hangText="Expected display characteristics:"><t>
      Undefined; this relation can be used for background processing or to provide
      extended functionality without displaying its value.
    </t></x:lt>
    <x:lt hangText="Security considerations:"><t>
      See <xref target="security"/>.
    </t></x:lt>
  </list>
</t>
</section>
<section title="'latest-version' Link Relation Registration">
<t>
  <list style="hanging">
    <x:lt hangText="Attribute Value:"><t>
      latest-version
    </t></x:lt>
    <x:lt hangText="Description:"><t>
      See <xref target="latest-version"/>.
    </t></x:lt>
    <x:lt hangText="Expected display characteristics:"><t>
      Undefined; this relation can be used for background processing or to provide
      extended functionality without displaying its value.
    </t></x:lt>
    <x:lt hangText="Security considerations:"><t>
      See <xref target="security"/>.
    </t></x:lt>
  </list>
</t>
</section>
<section title="'working-copy' Link Relation Registration">
<t>
  <list style="hanging">
    <x:lt hangText="Attribute Value:"><t>
      working-copy
    </t></x:lt>
    <x:lt hangText="Description:"><t>
      See <xref target="working-copy"/>.
    </t></x:lt>
    <x:lt hangText="Expected display characteristics:"><t>
      Undefined; this relation can be used for background processing or to provide
      extended functionality without displaying its value.
    </t></x:lt>
    <x:lt hangText="Security considerations:"><t>
      See <xref target="security"/>.
    </t></x:lt>
  </list>
</t>
</section>
<section title="'working-copy-of' Link Relation Registration">
<t>
  <list style="hanging">
    <x:lt hangText="Attribute Value:"><t>
      working-copy-of
    </t></x:lt>
    <x:lt hangText="Description:"><t>
      See <xref target="working-copy-of"/>.
    </t></x:lt>
    <x:lt hangText="Expected display characteristics:"><t>
      Undefined; this relation can be used for background processing or to provide
      extended functionality without displaying its value.
    </t></x:lt>
    <x:lt hangText="Security considerations:"><t>
      See <xref target="security"/>.
    </t></x:lt>
  </list>
</t>
</section>
<section title="'predecessor-version' Link Relation Registration">
<t>
  <list style="hanging">
    <x:lt hangText="Attribute Value:"><t>
      predecessor-version
    </t></x:lt>
    <x:lt hangText="Description:"><t>
      See <xref target="predecessor-version"/>.
    </t></x:lt>
    <x:lt hangText="Expected display characteristics:"><t>
      Undefined; this relation can be used for background processing or to provide
      extended functionality without displaying its value.
    </t></x:lt>
    <x:lt hangText="Security considerations:"><t>
      See <xref target="security"/>.
    </t></x:lt>
  </list>
</t>
</section>
<section title="'successor-version' Link Relation Registration">
<t>
  <list style="hanging">
    <x:lt hangText="Attribute Value:"><t>
      successor-version
    </t></x:lt>
    <x:lt hangText="Description:"><t>
      See <xref target="successor-version"/>.
    </t></x:lt>
    <x:lt hangText="Expected display characteristics:"><t>
      Undefined; this relation can be used for background processing or to provide
      extended functionality without displaying its value.
    </t></x:lt>
    <x:lt hangText="Security considerations:"><t>
      See <xref target="security"/>.
    </t></x:lt>
  </list>
</t>
</section>
</section>

<section title="Security Considerations" anchor="security">
<t>
  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.
</t>
<t>
  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
  <xref target="RFC3253" x:fmt="of" x:sec="16.2"/> for a similar consideration
  in WebDAV Versioning).
  Note that this applies to exposing link metadata in general,
  not only to links related to versioning. 
</t>
</section>


<section title="Acknowledgments" anchor="ack">
<t>
  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. 
</t>
</section>
    

	</middle>
	<back>

<references title="Normative References">

<reference anchor="RFC4287">
  <front>
    <title>The Atom Syndication Format</title>
    <author fullname="M. Nottingham" surname="Nottingham" initials="M." role="editor"/>
    <author fullname="R. Sayre" surname="Sayre" initials="R." role="editor"/>
    <date month="December" year="2005"/>
  </front>
  <seriesInfo name="RFC" value="4287"/>
</reference>

</references>

<references title="Informative References">

<reference anchor="RFC3253">
  <front>
  	<title>Versioning Extensions to WebDAV (Web Distributed
  		Authoring and Versioning)</title>
  	<author fullname="G. Clemm" surname="Clemm" initials="G.">
  		<organization>Rational Software (IBM)</organization>
  	</author>
  	<author fullname="J. Amsden" surname="Amsden" initials="J."/>
  	<author fullname="T. Ellison" surname="Ellison" initials="T.">
  		<organization>IBM</organization>
  	</author>
  	<author fullname="C. Kaler" surname="Kaler" initials="C.">
  		<organization>Microsoft</organization>
  	</author>
  	<author fullname="J. Whitehead" surname="Whitehead" initials="J.">
  		<organization>U.C. Santa Cruz</organization>
  	</author>
  	<date month="March" year="2002"/>
  </front>
  <seriesInfo name="RFC" value="3253"/>
</reference>

<reference anchor="RFC5023">
  <front>
    <title>The Atom Publishing Protocol</title>
    <author initials="J." surname="Gregorio" fullname="J. Gregorio">
      <organization>Google</organization>
      <address>
        <email>joe@bitworking.org</email>
      </address>
    </author>
    <author initials="B." surname="de hOra" fullname="B. de hOra">
      <organization>NewBay Software</organization>
      <address>
        <email>bill@dehora.net</email>
      </address>
    </author>
    <date year="2007" month="October"/>
  </front>
  <seriesInfo name="RFC" value="5023"/>
</reference>

<reference anchor="JSR-283" target="http://www.day.com/specs/jcr/2.0/">
  <front>
  	<title>Content Repository API for Java(tm) Technology Specification</title>
        <author>
          <organization>Day Software</organization>
        </author>
        <author fullname="David Nuescheler" surname="Nuescheler" initials="D.">
          <organization>Day Software</organization>
        </author>
        <author fullname="Peeter Piegaze" surname="Piegaze" initials="P.">
          <organization>Day Software</organization>
        </author>
  	<date month="August" year="2009"/>
  </front>
  <seriesInfo name="Java Specification Request" value="283"/>
</reference>

<reference anchor="WEB-LINKING">
  <front>
    <title>Web Linking</title>
    <author fullname="Mark Nottingham" initials="M." surname="Nottingham">
      <address>		
    	  <email>mnot@mnot.net</email>	
    	  <uri>http://www.mnot.net/</uri>		
    	</address>
    </author>
    <date year="2010" month="March"/>
  </front>
  <x:prose>Work in Progress</x:prose>
</reference>

<reference anchor="CMIS" target="http://docs.oasis-open.org/cmis/CMIS/v1.0/cs01/cmis-spec-v1.0.html">
  <front>
    <title>Content Management Interoperability Services (CMIS) Version 1.0</title>
    <author fullname="Al Brown" initials="A." surname="Brown">
      <organization>IBM</organization>
    </author>
    <author fullname="Ethan Gur-Esh" initials="E." surname="Gur-Esh">
      <organization>Microsoft</organization>
    </author>
    <author fullname="Ryan McVeigh" initials="R." surname="McVeigh">
      <organization>Oracle</organization>
    </author>
    <author fullname="Florian Mueller" initials="F." surname="Mueller">
      <organization>OpenText</organization>
    </author>
    <date year="2010" month="March"/>
  </front>
  <seriesInfo name="OASIS" value="Content Management Interoperability Services (CMIS) Version 1.0 Committee Specification 01"/>
  <annotation>Latest version available at <eref target="http://docs.oasis-open.org/cmis/CMIS/v1.0/cmis-spec-v1.0.html"/></annotation>
</reference>

</references>

<section title="Relationship to Java Content Repository (JCR) and WebDAV">
<t>
  The link relations defined in <xref target="linkrelations"/> correspond to
  various properties used in WebDAV Versioning <xref target="RFC3253"/>
  and JCR <xref target="JSR-283"/>:
</t>
<t><?rfc needLines="4"?>
  <x:h>version-history</x:h>
</t>
<t>
  <list>
  <t>
  WebDAV: the resource identified by the DAV:version-history property
  (<xref target="RFC3253"/>, Sections <xref target="RFC3253" x:fmt="number" x:sec="5.2.1"/> and <xref target="RFC3253" x:fmt="number" x:sec="5.3.1"/>).
  </t>
  <t>
  JCR: the node identified by jcr:versionHistory
  property (<xref target="JSR-283" x:fmt="," x:sec="3.13.2.4" x:rel="3_Repository_Model.html#VersionHistoryReference"/>) for
  versionable nodes, the parent folder for version nodes.
  </t>
  </list>
</t>
<t><?rfc needLines="4"?>
  <x:h>latest-version</x:h>
</t>
<t>
  <list>
  <t>
  WebDAV: for version-controlled resources, DAV:checked-in (<xref target="RFC3253" x:fmt="," x:sec="3.2.1"/>) or
    DAV:checked-out (<xref target="RFC3253" x:fmt="," x:sec="3.3.1"/>), depending
    on checkin state. For version resources, a successor version that itself does
    not have any successors.
  </t>
  <t>
  JCR: the version node identified by the jcr:baseVersion property (<xref target="JSR-283" x:fmt="," x:sec="3.13.2.5" x:rel="3_Repository_Model.html#BaseVersionReference"/>)
  for versionable nodes; for version nodes, a successor version that itself does
  not have any successors.
  </t>
  </list>
</t>
<t><?rfc needLines="4"?>
  <x:h>working-copy</x:h>
</t>
<t>
  <list>
  <t>
  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 <xref target="RFC3253" x:fmt="," x:sec="3.4.3"/>).
  </t>
  <t>
  JCR: for checked-out versionable nodes: the node itself.
  </t>
  </list>
</t>
<t><?rfc needLines="4"?>
  <x:h>working-copy-of</x:h>
</t>
<t>
  <list>
  <t>
  WebDAV: the resource identified by the DAV:checked-out
  property (see <xref target="RFC3253" x:fmt="," x:sec="3.3.1"/>).
  </t>
  <t>
  JCR: for checked-out versionable nodes: the node identified by the
  jcr:baseVersion property (<xref target="JSR-283" x:fmt="," x:sec="3.13.12.5" x:rel="3_Repository_Model.html#BaseVersionReference"/>).
  </t>
  </list>
</t>
<t><?rfc needLines="4"?>
  <x:h>predecessor-version</x:h>
</t>
<t>
  <list>
  <t>
  WebDAV: each resource identified by a member of DAV:predecessor-set (<xref target="RFC3253"/>, Sections <xref target="RFC3253" x:fmt="number" x:sec="3.3.2"/> and <xref target="RFC3253" x:fmt="number" x:sec="3.4.1"/>).
  </t>
  <t>
  JCR: each node identified by a member of jcr:predecessors (<xref target="JSR-283" x:fmt="," x:sec="3.13.3.3" x:rel="3_Repository_Model.html#Predecessors"/>).
  </t>
  </list>
</t>
<t><?rfc needLines="4"?>
  <x:h>successor-version</x:h>
</t>
<t>
  <list>
  <t>
  WebDAV: each resource identified by a member of DAV:successor-set (<xref target="RFC3253" x:fmt="," x:sec="3.4.2"/>).
  </t>
  <t>
  JCR: each node identified by a member of jcr:successors (<xref target="JSR-283" x:fmt="," x:sec="3.13.3.4" x:rel="3_Repository_Model.html#Successors"/>).
  </t>
  </list>
</t>

<section title="Example: Use of Link Relations in HTTP Link Header">
<t>
  The "Web Linking" specification (<xref target="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 (<xref target="RFC4287"/>) or WebDAV properties
  (<xref target="RFC3253"/>).
</t>
<t>
  For instance, a response to a VERSION-CONTROL request (<xref target="RFC3253" x:fmt="," x:sec="3.5"/>) could
  expose a newly created version-history and checked-in version as link relations:
</t>
<figure><preamble>
&gt;&gt; Request:</preamble>
<artwork type="message/http; msgtype=&#34;request&#34;">
VERSION-CONTROL /docs/test.txt HTTP/1.1
Host: example.net

</artwork></figure>
<figure><preamble>
&gt;&gt; Response:</preamble>
<artwork type="message/http; msgtype=&#34;response&#34;">
HTTP/1.1 204 No Content
Link: &lt;/system/v/84345634/1&gt;; rel=latest-version;
      anchor=&lt;/docs/test.txt&gt;
Link: &lt;/system/vh/84345634&gt;; rel=version-history;
      anchor=&lt;/docs/test.txt&gt;

</artwork>
<postamble>(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.)</postamble>
</figure>
<t>
  A subsequent HEAD request on that resource could expose the version-history
  and latest-version relations as well:
</t>
<figure><preamble>
&gt;&gt; Request:</preamble>
<artwork type="message/http; msgtype=&#34;request&#34;">
HEAD /docs/test.txt HTTP/1.1
Host: example.net

</artwork></figure>
<figure><preamble>
&gt;&gt; Response:</preamble>
<artwork type="message/http; msgtype=&#34;response&#34;">
HTTP/1.1 200 OK
Content-Type: text/plain; charset=UTF-8
Content-Length: 12345
Link: &lt;/system/v/84345634/1&gt;; rel=latest-version
Link: &lt;/system/vh/84345634&gt;; rel=version-history

</artwork></figure>
<t>
  After creating more versions, following the latest-version would then expose
  predecessors of a version:
</t>
<figure><preamble>
&gt;&gt; Request:</preamble>
<artwork type="message/http; msgtype=&#34;request&#34;">
HEAD /system/v/84345634/3 HTTP/1.1
Host: example.net

</artwork></figure>
<figure><preamble>
&gt;&gt; Response:</preamble>
<artwork type="message/http; msgtype=&#34;response&#34;">
HTTP/1.1 200 OK
Content-Type: text/plain; charset=UTF-8
Content-Length: 12323
Link: &lt;/system/v/84345634/2&gt;; rel=predecessor-version

</artwork></figure>

</section>


</section>

	</back>

</rfc>