<?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 xmlns:x="http://purl.org/net/xml2rfc/ext" xmlns:ed="http://greenbytes.de/2002/rfcedit" ipr="trust200902" docName="draft-brown-versioning-link-relations-05" category="info" xml:lang="en">
	<front>
		<title abbrev="Version Navigation Link Relations">Link Relations for Simple Version Navigation</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>US</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>US</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="December" year="2009" day="7"/>

		<abstract>
			<t>
        This specification defines Atom link relations for navigation between
        a resource and its versions.
			</t>
		</abstract>

    <note title="Editorial Note (To be removed by RFC Editor before publication)">
      <t>
        Please send comments to the Atom Syntax mailing list
        (<eref target="http://www.imc.org/atom-syntax/"/>).
      </t>

    <t>
      Note that although discussion takes place on the Atompub working
      group's mailing list, this is not a working group document.
    </t>
    <t>
      XML versions, latest edits and the issues list for this document
      are available from <eref target="http://greenbytes.de/tech/webdav/#draft-brown-versioning-link-relations"/>.
    </t>

    </note>

	</front>

	<middle>

<ed:issue name="edit" type="edit" status="closed">
  <ed:item entered-by="julian.reschke@greenbytes.de" date="2009-11-19">
    Umbrella issue for editorial fixes/enhancements.
  </ed:item>
</ed:issue>


<section title="Introduction" anchor="introduction">
<t>
  This specification defines link relations that may be used on a
  resource that exists in a system that supports versioning to navigate
  among the different resources available, such as past versions.
</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.1" x:fmt="of" target="CMIS" x:rel="#_Toc243712628"/> 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>

<ed:issue xmlns="http://www.w3.org/1999/xhtml" name="working-copy-of" type="change" status="closed" href="http://www.imc.org/atom-syntax/mail-archive/msg21350.html">
  <ed:item entered-by="algermissen1971@mac.com" date="2009-12-02">
...what is your opinion regarding the introduction of a link relation that is the opposite of working-copy in order to being able to find the versioned resource that the working copy I have is a working copy of?
<br/>
I am undecided regarding the necessity, but without a working-copy-of relation it seems the client would need to maintain that information (the relationship or the fact that a given resource is a working copy) across requests. 
  </ed:item>
</ed:issue>

<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 multiple 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 multiple 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 multiple of these link relations in the case of a
  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 multiple of these link relations in order to
  support branching.
</t>
</section>
</section>



<section title="IANA Considerations" anchor="iana">
<t>
  The link relations below are to be 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 relation<ed:replace ed:resolves="edit" datetime="2009-12-07"><ed:ins>s</ed:ins></ed:replace>
  cross<ed:replace ed:resolves="edit" datetime="2009-12-07"><ed:del>es</ed:del></ed:replace> 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>
</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."/>
    <author fullname="R. Sayre" surname="Sayre" initials="R."/>
    <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="draft-nottingham-http-link-header">
  <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="2009" month="July"/>
  </front>
  <seriesInfo name="Internet-Draft" value="draft-nottingham-http-link-header-06"/>
</reference>


<reference anchor="CMIS" target="http://docs.oasis-open.org/cmis/CMIS/v1.0/cd04/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 Muller" initials="F." surname="Muller">
      <organization>OpenText</organization>
    </author>
    <date year="2009" month="September"/>
  </front>
  <seriesInfo name="OASIS" value="CMIS v1.0 Committee Draft 04"/>
</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>
  <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#3.13.2.4%20Version%20History%20Reference"/>) for
  versionable nodes, the parent folder for version nodes.
  </t>
  </list>
</t>
<t>
  <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#3.13.2.5%20Base%20Version%20Reference"/>)
  for versionable nodes; for version nodes, a successor version that itself does
  not have any successors.
  </t>
  </list>
</t>
<t>
  <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>
  <x:h>working-copy-of</x:h>
</t>
<t>
  <list>
  <t>
  WebDAV: the resource identified by the 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#3.13.2.5%20Base%20Version%20Reference"/>).
  </t>
  </list>
</t>
<t>
  <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#3.13.3.3%20Predecessors"/>).
  </t>
  </list>
</t>
<t>
  <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#3.13.3.4%20Successors"/>).
  </t>
  </list>
</t>

<section title="Example: Use of Link Relations in HTTP Link Header">
<t>
  The "Web Linking" specification (<xref target="draft-nottingham-http-link-header"/>)
  generalizes Atom link relations, and also re-introduces 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 an VERSION-CONTROL request (<xref target="RFC3253" x:fmt="," x:sec="3.5"/>) could
  expose 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 200 OK
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>

    

		<section title="Change Log (to be removed by RFC Editor before publication)" anchor="changes">

<section title="Since draft-brown-link-relations-00">
  <t>
    Added Geoff Clemm as author.
  </t>
  <t>
    Renamed link relation "all-versions" to "version-history". Fixed
    description of "working-resource" relation to state that it appears
    on a version resource.
  </t>
</section>

<section title="Since draft-brown-link-relations-01">
  <t>
    Rewrite terminology and link relations using simpler definitions
    that can reflect versioning approaches different from WebDAV.
  </t>
  <t>
    Add JCR/WebDAV property table. And reference to Web Linking draft
    (for now informative) and examples showing use of the Link header.
  </t>
</section>

<section title="Since draft-brown-link-relations-02">
<t>
  Add and resolve issue "iana".
</t>
</section>

<section title="Since draft-brown-link-relations-03">
<t>
  Fix typo ("working-resource" instead of "working-copy").
  Add and resolve issues "checked-out", "cmis" and "working-copy-of".
</t>
</section>

<ed:replace datetime="2009-12-04" ed:resolves="edit"><ed:ins>
<section title="Since draft-brown-link-relations-04">
<t>
  Close issue "<ed:issueref>working-copy-of</ed:issueref>", which was really
  fixed in -04.
</t>
</section>
</ed:ins></ed:replace>

		</section>

	</back>

</rfc>