<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc-ext authors-section="end" ?>
<?rfc-ext allow-markup-in-artwork="yes" ?>
<?rfc-ext include-references-in-index="yes" ?>

<!DOCTYPE rfc [
  <!ENTITY MAY "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MAY</bcp14>">
  <!ENTITY MUST "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MUST</bcp14>">
  <!ENTITY MUST-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MUST NOT</bcp14>">
  <!ENTITY OPTIONAL "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>OPTIONAL</bcp14>">
  <!ENTITY RECOMMENDED "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>RECOMMENDED</bcp14>">
  <!ENTITY REQUIRED "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>REQUIRED</bcp14>">
  <!ENTITY SHALL "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHALL</bcp14>">
  <!ENTITY SHALL-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHALL NOT</bcp14>">
  <!ENTITY SHOULD "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHOULD</bcp14>">
  <!ENTITY SHOULD-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHOULD NOT</bcp14>">
]>
<rfc number="3253" category="std" xmlns:x='http://purl.org/net/xml2rfc/ext'>
<front>
	<title abbrev="Versioning Extensions to WebDAV">Versioning Extensions to WebDAV (Web&#160;Distributed&#160;Authoring&#160;and&#160;Versioning)</title>
  <author initials="G." surname="Clemm" fullname="Geoffrey Clemm">
    <organization>Rational Software</organization>
    <address>
      <postal>
        <street>20 Maguire Road</street>
        <city>Lexington</city>
        <region>MA</region>
        <code>02421</code>
        <country>US</country>
      </postal>
      <email>geoffrey.clemm@rational.com</email>
    </address>
  </author>
  <author initials="J." surname="Amsden" fullname="Jim Amsden">
    <organization>IBM</organization>
    <address>
      <postal>
        <street>3039 Cornwallis</street>
        <street>Research Triangle Park</street>
        <region>NC</region>
        <code>27709</code>
        <country>US</country>
      </postal>
      <email>jamsden@us.ibm.com</email>
    </address>
  </author>
  <author initials="T." surname="Ellison" fullname="Tim Ellison">
    <organization>IBM</organization>
    <address>
      <postal>
        <street>Hursley Park</street>
        <city>Winchester</city>
        <code>S021 2JN</code>
        <country>UK</country>
      </postal>
      <email>tim_ellison@uk.ibm.com</email>
    </address>
  </author>
  <author initials="C." surname="Kaler" fullname="Christopher Kaler">
    <organization>Microsoft</organization>
    <address>
      <postal>
        <street>One Microsoft Way</street>
        <city>Redmond</city>
        <region>WA</region>
        <code>90852</code>
        <country>US</country>
      </postal>
      <email>ckaler@microsoft.com</email>
    </address>
  </author>
  <author initials="J." surname="Whitehead" fullname="Jim Whitehead">
    <organization abbrev="U.C. Santa Cruz">UC Santa Cruz, Dept. of Computer Science</organization>
    <address>
      <postal>
        <street>1156 High Street</street>
        <city>Santa Cruz</city>
        <region>CA</region>
        <code>95064</code>
        <country>US</country>
      </postal>
      <email>ejw@cse.ucsc.edu</email>
    </address>
  </author>
  <date month="March" year="2002"/>
  <abstract>
<t>
   This document specifies a set of methods, headers, and resource types
   that define the WebDAV (Web Distributed Authoring and Versioning)
   versioning extensions to the HTTP/1.1 protocol.  WebDAV versioning
   will minimize the complexity of clients that are capable of
   interoperating with a variety of versioning repository managers, to
   facilitate widespread deployment of applications capable of utilizing
   the WebDAV Versioning services.  WebDAV versioning includes automatic
   versioning for versioning-unaware clients, version history
   management, workspace management, baseline management, activity
   management, and URL namespace versioning.
</t>
  </abstract>
</front>

<middle>

<section title="Introduction">
<t>
   This document specifies a set of methods, headers, and properties
   that define the WebDAV (Web Distributed Authoring and Versioning)
   versioning extensions to the HTTP/1.1 protocol.  Versioning is
   concerned with tracking and accessing the history of important states
   of a web resource, such as a standalone web page.  The benefits of
   versioning in the context of the worldwide web include:
</t>
<t>
  <list style="symbols">
    <t>A resource has an explicit history and a persistent identity
      across the various states it has had during the course of that
      history.  It allows browsing through past and alternative versions
      of a resource.  Frequently the modification and authorship history
      of a resource is critical information in itself.</t>
    <t>Resource states (versions) are given stable names that can support
      externally stored links for annotation and link server support.
      Both annotation and link servers frequently need to store stable
      references to portions of resources that are not under their
      direct control.  By providing stable states of resources, version
      control systems allow not only stable pointers into those
      resources, but also well defined methods to determine the
      relationships of those states of a resource.</t>
    </list>
</t>
<t>
   WebDAV Versioning defines both basic and advanced versioning
   functionality.
</t>
<t>
   Basic versioning allows users to:
  <list style="symbols">
     <t>Put a resource under version control</t>
     <t>Determine whether a resource is under version control</t>
      <t>Determine whether a resource update will automatically be captured
      as a new version</t>
     <t>Create and access distinct versions of a resource</t>
  </list>
</t>
<t>
   Advanced versioning provides additional functionality for parallel
   development and configuration management of sets of web resources.
</t>
<t>
   This document will first define the properties and method semantics
   for the basic versioning features, and then define the additional
   properties and method semantics for the advanced versioning features.
   An implementer that is only interested in basic versioning should
   skip the advanced versioning sections (<xref target="advanced.versioning.features"/>
   to <xref target="version-controlled-collection.feature"/>).
</t>

<section title="Relationship to WebDAV">
<t>
   To maximize interoperability and the use of existing protocol
   functionality, versioning support is designed as extensions to the
   WebDAV protocol <xref target="RFC2518"/>, which itself is an extension to the HTTP
   protocol <xref target="RFC2616"/>.  All method marshalling and postconditions
   defined by RFC 2518 and RFC 2616 continue to hold, to ensure that
   versioning unaware clients can interoperate successfully with
   versioning servers.  Although the versioning extensions are designed
   to be orthogonal to most aspects of the WebDAV and HTTP protocols, a
   clarification to RFC 2518 is required for effective interoperable
   versioning.  This clarification is described in
   <xref target="clarification.of.copy.semantics.with.overwrite-t"/>.
</t>
</section>

<section title="Notational Conventions">
<t>
   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 <xref target="RFC2119" x:fmt="none">RFC 2119</xref>.
</t>
<t>
   The term "protected" is placed in parentheses following the
   definition of a protected property (see <xref target="protected.property.value"/>).
</t>
<t>
   The term "computed" is placed in parentheses following the definition
   of a computed property (see <xref target="computed.property.value"/>).
</t>
<t>
   When an XML element type in the "DAV:" namespace is referenced in
   this document outside of the context of an XML fragment, the string
   "DAV:" will be prefixed to the element type.
</t>
<t>
   When a method is defined in this document, a list of preconditions
   and postconditions will be defined for that method.  If the semantics
   of an existing method is being extended, a list of additional
   preconditions and postconditions will be defined.  A precondition or
   postcondition is prefixed by a parenthesized XML element type that
   identifies that precondition or postcondition (see
   <xref target="method.preconditions.and.postconditions"/>).
</t>
</section>

<section title="Terms">
<t>
   This document uses the terms defined in RFC 2616, in RFC 2518, and in
   this section.  <xref target="basic.versioning.semantics"/> defines the
   semantic versioning model underlying this terminology.
</t>
<t>
  <x:dfn>Version Control</x:dfn><iref item="Version Control"/>, <x:dfn>Checked-In</x:dfn><iref item="Checked-In"/>, <x:dfn>Checked-Out</x:dfn><iref item="Checked-Out"/>
  <list>
    <t>
      "Version control" is a set of constraints on how a resource can be
      updated.  A resource under version control is either in a
      "checked-in" or "checked-out" state, and the version control
      constraints apply only while the resource is in the checked-in
      state.
    </t>
  </list>
</t>
<t>
  <x:dfn>Versionable Resource</x:dfn><iref item="Versionable Resource"/>
  <list>  
    <t>
      A "versionable resource" is a resource that can be put under
      version control.
    </t>
  </list>
</t>
<t><x:dfn>Version-Controlled Resource</x:dfn><iref item="Version-Controlled Resource"/>
  <list>
    <t>
      When a versionable resource is put under version control, it
      becomes a "version-controlled resource".  A version-controlled
      resource can be "checked out" to allow modification of its content
      or dead properties by standard HTTP and WebDAV methods.
    </t>
  </list>
</t>
<t><x:dfn>Checked-Out Resource</x:dfn><iref item="Checked-Out Resource"/>
  <list>
    <t>
      A "checked-out resource" is a resource under version control that
      is in the checked-out state.
    </t>
  </list>
</t>
<t><x:dfn>Version Resource</x:dfn><iref item="Version Resource"/>
  <list>
    <t>
      A "version resource", or simply "version", is a resource that
      contains a copy of a particular state (content and dead
      properties) of a version-controlled resource.  A version is
      created by "checking in" a checked-out resource.  The server
      allocates a distinct new URL for each new version, and this URL
      will never be used to identify any resource other than that
      version.  The content and dead properties of a version never
      change.
    </t>
  </list>
</t>
<t><x:dfn>Version History Resource</x:dfn><iref item="Version History Resource"/>
  <list>
    <t>
      A "version history resource", or simply "version history", is a
      resource that contains all the versions of a particular version-controlled
      resource.
    </t>
  </list>
</t>
<t><x:dfn>Version Name</x:dfn><iref item="Version Name"/>
  <list>
    <t>
      A "version name" is a string chosen by the server to distinguish
      one version of a version history from the other versions of that
      version history.  Versions from different version histories may
      have the same version name.
    </t>
  </list>
</t>
<t><x:dfn>Predecessor</x:dfn><iref item="Predecessor"/>, <x:dfn>Successor</x:dfn><iref item="Successor"/>, <x:dfn>Ancestor</x:dfn><iref item="Ancestor"/>, <x:dfn>Descendant</x:dfn><iref item="Descendant"/>
  <list>
    <t>
      When a version-controlled 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.  When a
      version is connected to another version by traversing one or more
      predecessor relations, it is called an "ancestor" of that version.
      The inverse of the predecessor and ancestor relations are the
      "successor" and "descendant" relations.  Therefore, if X is a
      predecessor of Y, then Y is a successor of X, and if X is an
      ancestor of Y, then Y is a descendant of X.
    </t>
  </list>
</t>
<t><x:dfn>Root Version Resource</x:dfn><iref item="Root Version Resource"/>
  <list>
    <t>
      The "root version resource", or simply "root version", is the
      version in a version history that is an ancestor of every other
      version in that version history.
    </t>
  </list>
</t>
<t><x:dfn>Workspace Resource</x:dfn><iref item="Workspace Resource"/>
  <list>
    <t>
      A "workspace resource", or simply "workspace", is a collection
      that contains at most one version-controlled resource for a given
      version history (see <xref target="workspace.feature"/>).
    </t>
  </list>
</t>
<t><x:dfn>Working Resource</x:dfn><iref item="Working Resource"/>
  <list>
    <t>
      A "working resource" is a checked-out resource created by the
      server at a server-defined URL when a version (instead of a
      version-controlled resource) is checked out.  Unlike a checked-out
      version-controlled resource, a working resource is deleted when it
      is checked in.
    </t>
  </list>
</t>
<t><x:dfn>Fork</x:dfn><iref item="Fork"/>, <x:dfn>Merge</x:dfn><iref item="Merge"/>
  <list>
    <t>
      When a second successor is added to a version, this creates a
      "fork" in the version history.  When a version is created with
      multiple predecessors, this creates a "merge" in the version
      history.  A server may restrict the version history to be linear
      (with no forks or merges), but an interoperable versioning client
      should be prepared to deal with both forks and merges in the
      version history.
    </t>
  </list>
</t>
<t>
   The following diagram illustrates several of the previous
   definitions.  Each box represents a version and each line between two
   boxes represents a predecessor/successor relationship.  For example,
   it shows V3 is a predecessor of V5, V7 is a successor of V5, V1 is an
   ancestor of V4, and V7 is a descendant of V4.  It also shows that
   there is a fork at version V2 and a merge at version V7.
</t>
<figure>
<preamble>History of foo.html</preamble>
<artwork type="drawing">
                 

                         <x:bt>+---+</x:bt>
   Root Version -------&gt; <x:bc>|   |</x:bc> V1
                         <x:bb>+---+</x:bb>           ^
                           |             |
                           |             |
                         <x:bt>+---+</x:bt>           |
   Version Name ----&gt; V2 <x:bc>|   |</x:bc>           | Ancestor
                         <x:bb>+---+</x:bb>           |
                         /    \          |
                        /      \         |
                   <x:bt>+---+</x:bt>       <x:bt>+---+</x:bt>
                   <x:bc>|   |</x:bc> V3    <x:bc>|   |</x:bc> V4
                ^  <x:bb>+---+</x:bb>       <x:bb>+---+</x:bb>
                |    |           |       |
   Predecessor  |    |           |       |
                   <x:bt>+---+</x:bt>       <x:bt>+---+</x:bt>     |
                   <x:bc>|   |</x:bc> V5    <x:bc>|   |</x:bc> V6  | Descendant
                   <x:bb>+---+</x:bb>       <x:bb>+---+</x:bb>     |
   Successor    |       \      /         |
                |        \    /          |
                v        <x:bt>+---+</x:bt>           v
                         <x:bc>|   |</x:bc> V7
                         <x:bb>+---+</x:bb>
</artwork>
</figure>
<t><x:dfn>Label</x:dfn><iref item="Label"/>
  <list>
    <t>
      A "label" is a name that can be used to select a version from a
      version history.  A label can be assigned by either a client or
      the server.  The same label can be used in different version
      histories.
    </t>
  </list>
</t>
</section>

<section title="Property Values">

<section title="Initial Property Value">
<t>
   Unless an initial value of a property of a given type is defined by
   this document, the initial value of a property of that type is
   implementation dependent.
</t>
</section>

<section title="Protected Property Value" anchor="protected.property.value">
<t>
   When a property of a specific kind of resource is "protected", the
   property value cannot be updated on that kind of resource except by a
   method explicitly defined as updating that specific property.  In
   particular, a protected property cannot be updated with a PROPPATCH
   request.  Note that a given property can be protected on one kind of
   resource, but not protected on another kind of resource.
</t>
</section>

<section title="Computed Property Value" anchor="computed.property.value">
<t>
   When a property is "computed", its value is defined in terms of a
   computation based on the content and other properties of that
   resource, or even of some other resource.  When the semantics of a
   method is defined in this document, the effect of that method on
   non-computed properties will be specified; the effect of that method
   on computed properties will not be specified, but can be inferred
   from the computation defined for those properties.  A computed
   property is always a protected property.
</t>
</section>

<section title="Boolean Property Value">
<t>
   Some properties take a Boolean value of either "false" or "true".
</t>
</section>

<section title="DAV:href Property Value">
<t>
   The DAV:href XML element is defined in RFC 2518, <xref target="RFC2518" x:fmt="sec" x:sec="12.3"/>.
</t>
</section>
</section>

<section title="DAV Namespace XML Elements in Request and Response Bodies">
<t>
   Although WebDAV request and response bodies can be extended by
   arbitrary XML elements, which can be ignored by the message
   recipient, an XML element in the DAV namespace &MUST-NOT; be used in
   the request or response body of a versioning method unless that XML
   element is explicitly defined in an IETF RFC.
</t>
</section>

<section title="Method Preconditions and Postconditions" anchor="method.preconditions.and.postconditions">
<t>
   A "precondition" of a method describes the state of the server that
   must be true for that method to be performed.  A "postcondition" of a
   method describes the state of the server that must be true after that
   method has been completed.  If a method precondition or postcondition
   for a request is not satisfied, the response status of the request
   MUST be either 403 (Forbidden) if the request should not be repeated
   because it will always fail, or 409 (Conflict) if it is expected that
   the user might be able to resolve the conflict and resubmit the
   request.
</t>
<t>
   In order to allow better client handling of 403 and 409 responses, a
   distinct XML element type is associated with each method precondition
   and postcondition of a request.  When a particular precondition is
   not satisfied or a particular postcondition cannot be achieved, the
   appropriate XML element MUST be returned as the child of a top-level
   DAV:error element in the response body, unless otherwise negotiated
   by the request.  In a 207 Multi-Status response, the DAV:error
   element would appear in the appropriate DAV:responsedescription
   element.
</t>

<section title="Example - CHECKOUT request with DAV:must-be-checked-in response">
<figure><preamble>&gt;&gt;REQUEST</preamble><artwork type='message/http; msgtype="request"'>
CHECKOUT /foo.html HTTP/1.1
Host: www.webdav.org
</artwork></figure><figure><preamble>&gt;&gt;RESPONSE</preamble><artwork type='message/http; msgtype="response"'>
HTTP/1.1 409 Conflict
Content-Type: text/xml; charset="utf-8"
Content-Length: xxxx

&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;D:error xmlns:D="DAV:"&gt;
 &lt;D:must-be-checked-in/&gt;
&lt;/D:error&gt;
</artwork>
</figure>
<t>
   In this example, the request to CHECKOUT /foo.html fails because
   /foo.html is not checked in.
</t>
</section>
</section>

<section title="Clarification of COPY Semantics with Overwrite:T" anchor="clarification.of.copy.semantics.with.overwrite-t">
<t>
   RFC 2518, <xref target="RFC2518" x:fmt="sec" x:sec="8.8.4"/> states:
</t>
<t>
   "If a resource exists at the destination and the Overwrite header is
   "T" then prior to performing the copy the server MUST perform a
   DELETE with "Depth: infinity" on the destination resource."
</t>
<t>
   The purpose of this sentence is to ensure that following a COPY, all
   destination resources have the same content and dead properties as
   the corresponding resources identified by the request-URL (where a
   resource with a given name relative to the Destination URL
   "corresponds" to a resource with the same name relative to the
   request-URL).  If at the time of the request, there already is a
   resource at the destination that has the same resource type as the
   corresponding resource at the request-URL, that resource &MUST-NOT; be
   deleted, but MUST be updated to have the content and dead properties
   of its corresponding member.  If a client wishes all resources at the
   destination to be deleted prior to the COPY, it MUST explicitly issue
   a DELETE request.
</t>
<t>
   The difference between updating a resource and replacing a resource
   with a new resource is especially important when resource history is
   being maintained (the former adds to an existing history, while the
   latter creates a new history).  In addition, locking and access
   control constraints might allow you to update a resource, but not
   allow you to delete it and create a new one in its place.
</t>
<t>
   Note that this clarification does not apply to a MOVE request.  A
   MOVE request with Overwrite:T MUST perform the DELETE with
   "Depth:infinity" on the destination resource prior to performing the
   MOVE.
</t>
</section>

<section title="Versioning Methods and Write Locks">
<t>
   If a write-locked resource has a non-computed property defined by
   this document, the property value &MUST-NOT; be changed by a request
   unless the appropriate lock token is included in the request.  Since
   every method introduced in this document other than REPORT modifies
   at least one property defined by this document, every versioning
   method other than REPORT is affected by a write lock.  In particular,
   the method MUST fail with a 423 (Locked) status if the resource is
   write-locked and the appropriate token is not specified in an If
   request header.
</t>

</section>
</section>

<section title="Basic Versioning Features">
<t>
   Each basic versioning feature defines extensions to existing HTTP and
   WebDAV methods, as well as new resource types, live properties, and
   methods.
</t>

<section title="Basic Versioning Packages">
<t>
   A server &MAY; support any combination of versioning features.
   However, in order to minimize the complexity of a WebDAV basic
   versioning client, a WebDAV basic versioning server &SHOULD; support
   one of the following three "packages" (feature sets):
</t>
<t>
  <list style="symbols">
    <t>Core-Versioning Package: version-control</t>
    <t>Basic-Server-Workspace Package: version-control, workspace,
      version-history, checkout</t>
    <t>Basic-Client-Workspace Package: version-control, working-resource,
    update, label</t>
  </list>
</t>
<t>
   The core-versioning package supports linear versioning by both
   versioning-aware and versioning-unaware clients.  A versioning-aware
   client can use reports and properties to access previous versions of
   a version-controlled resource.
</t>
<t>
   The basic workspace packages support parallel development of
   version-controlled resources.  Each client has its own configuration
   of the shared version-controlled resources, and can make changes to
   its configuration without disturbing that of another client.
</t>
<t>
   In the basic-server-workspace package, all persistent state is
   maintained on the server.  Each client has its own workspace resource
   allocated on the server, where each workspace identifies a
   configuration of the shared version-controlled resources.  Each
   client makes changes to its workspace, and can transfer changes when
   appropriate from one workspace to another.  The server workspace
   package is appropriate for clients with no local persistent state, or
   for clients that wish to expose their working configurations to other
   clients.
</t>
<t>
   In the basic-client-workspace package, each client maintains in local
   persistent storage the state for its configuration of the shared
   version-controlled resources.  When a client is ready to make its
   changes visible to other clients, it allocates a set of "working
   resources" on the server, updates the content and dead properties of
   these working resources, and then uses the set of working resources
   to update the version-controlled resources.  The working resources
   are used, instead of directly updating the version-controlled
   resources, so that sets of consistent updates can be prepared in
   parallel by multiple clients.  Also, a working resource allows a
   client to prepare a single update that requires multiple server
   requests (e.g. updating both the content and dead properties of a
   resource requires both a PUT and a PROPPATCH).  The client workspace
   package simplifies the server implementation by requiring each client
   to maintain its own namespace, but this requires that the clients
   have local persistent state, and does not allow clients to expose
   their working configurations to other clients.
</t>
<t>
   A server that supports both basic workspace packages will
   interoperate with all basic versioning clients.
</t>
</section>

<section title="Basic Versioning Semantics" anchor="basic.versioning.semantics">

<section title="Creating a Version-Controlled Resource" anchor="creating.a.version-controlled.resource">
<t>
   In order to track the history of the content and dead properties of a
   versionable resource, a user can put the resource under version
   control with a VERSION-CONTROL request.  A VERSION-CONTROL request
   performs three distinct operations:
</t>
<t>
  <list style="numbers">
    <t>It creates a new "version history resource".  In basic versioning,
      a version history resource is not assigned a URL, and hence is not
      visible in the http scheme URL space.  However, when the version-history
      feature (see <xref target="version-history.feature"/>) is supported, this changes, and
      each version history resource is assigned a new distinct and
      unique server-defined URL.</t>
    <t>It creates a new "version resource" and adds it to the new version
      history resource.  The body and dead properties of the new version
      resource are a copy of those of the versionable resource.
      The server assigns the new version resource a new distinct and
      unique URL.</t>
    <t>It converts the versionable resource into a "version-controlled
      resource".  The version-controlled resource continues to be
      identified by the same URL that identified it as a versionable
      resource.  As part of this conversion, it adds a DAV:checked-in
      property, whose value contains the URL of the new version
      resource.</t>
  </list>
</t>
<t> 
   Note that a versionable resource and a version-controlled resource
   are not new types of resources (i.e. they introduce no new
   DAV:resourcetype), but rather they are any type of resource that
   supports the methods and live properties defined for them in this
   document, in addition to all the methods and live properties implied
   by their DAV:resourcetype.  For example, a collection (whose
   DAV:resourcetype is DAV:collection) is a versionable resource if it
   supports the VERSION-CONTROL method, and is a version-controlled
   resource if it supports the version-controlled resource methods and
   live properties.
</t>
<t>
   In the following example, foo.html is a versionable resource that is
   put under version control.  After the VERSION-CONTROL request
   succeeds, there are two additional resources: a new version history
   resource and a new version resource in that version history.  The
   versionable resource is converted into a version-controlled resource,
   whose DAV:checked-in property identifies the new version resource.
   The content and dead properties of a resource are represented by the
   symbol appearing inside the box for that resource (e.g., "S1" in the
   following example).
</t>
<figure><artwork type="drawing">
      ===VERSION-CONTROL==&gt;

                |                       <x:bt>+----+</x:bt> version
                |   version-            <x:bc>|    |</x:bc> history
   versionable  |   controlled          <x:bb>+----+</x:bb> resource
   resource     |   resource              |
   /foo.html    |   /foo.html             |
                |                         v
     <x:bt>+----+</x:bt>     |     <x:bt>+----+</x:bt> checked-in <x:bt>+----+</x:bt> version
     <x:bc>| S1 |</x:bc>     |     <x:bc>| S1 |</x:bc>-----------&gt;<x:bc>| S1 |</x:bc> resource
     <x:bb>+----+</x:bb>     |     <x:bb>+----+</x:bb>            <x:bb>+----+</x:bb> /his/73/ver/1
</artwork></figure>
<t>
   Thus, whereas before the VERSION-CONTROL request there was only one,
   non-version-controlled resource, after VERSION-CONTROL there are
   three separate, distinct resources, each containing its own state and
   properties: the version-controlled resource, the version resource,
   and the version history resource.  Since the version-controlled
   resource and the version resource are separate, distinct resources,
   when a method is applied to a version-controlled resource, it is only
   applied to that version-controlled resource, and is not applied to
   the version resource that is currently identified by the
   DAV:checked-in property of that version-controlled resource.
   Although the content and dead properties of a checked-in version-controlled
   resource are required to be the same as those of its
   current DAV:checked-in version, its live properties may differ.  An
   implementation may optimize storage by retrieving the content and
   dead properties of a checked-in version-controlled resource from its
   current DAV:checked-in version rather than storing them in the
   version-controlled resource, but this is just an implementation
   optimization.
</t>
<t>
   Normally, a resource is placed under version control with an explicit
   VERSION-CONTROL request.  A server &MAY; automatically place every new
   versionable resource under version control.  In this case, the
   resulting state on the server MUST be the same as if the client had
   explicitly applied a VERSION-CONTROL request to the versionable
   resource.
</t>
</section>

<section title="Modifying a Version-Controlled Resource">
<t>
   In order to use methods like PUT and PROPPATCH to directly modify the
   content or dead properties of a version-controlled resource, the
   version-controlled resource must first be checked out.  When the
   checked-out resource is checked in, a new version is created in the
   version history of that version-controlled resource.  The version
   that was checked out is remembered as the predecessor of the new
   version.
</t>
<t>
   The DAV:auto-version property (see <xref target="PROPERTY_auto-version"/>) of a checked-in
   version-controlled resource determines how it responds to a method
   that attempts to modify its content or dead properties.  Possible
   responses include:
</t>
<t>
  <list style="symbols">
    <t>Fail the request.  The resource requires an explicit CHECKOUT
      request for it to be modified (see Sections
      <xref target="checkout-in-place.feature" format="counter"/> and
      <xref target="PROPERTY_auto-update" format="counter"/>).</t>

    <t>Automatically checkout the resource, perform the modification, and
      automatically checkin the resource.  This ensures that every state
      of the resource is tracked by the server, but can result in an
      excessive number of versions being created.</t>

    <t>Automatically checkout the resource, perform the modification, and
      then if the resource is not write-locked, automatically checkin
      the resource.  If the resource is write-locked, it remains
      checked-out until the write-lock is removed (either explicitly
      through a subsequent UNLOCK request or implicitly through a time-out
      of the write-lock).  This helps a locking client avoid the
      proliferation of versions, while still allowing a non-locking
      client to update the resource.</t>

    <t>Automatically checkout the resource, perform the modification, and
      then leave the resource checked out.  If the resource is write-locked,
      it will be automatically checked in when the write-lock is
      removed, but an explicit CHECKIN operation (see
      <xref target="checkin.method.applied.to.a.version-controlled.resource"/>) is
      required for a non-write-locked resource.  This minimizes the
      number of new versions that will be created by a versioning
      unaware client, but only a versioning aware client can create new
      versions of a non-write-locked resource.</t>

    <t>Fail the request unless the resource is write-locked.  If it is
      write-locked, automatically checkout the resource and perform the
      modification.  The resource is automatically checked in when the
      write-lock is removed.  This minimizes the number of new versions
      that will be created by a versioning unaware client, but never
      automatically checks out a resource that will not subsequently be
      automatically checked in.</t>
  </list>
</t>
<t>
   The following diagram illustrates the effect of the checkout/checkin
   process on a version-controlled resource and its version history.
   The symbol inside a box (S1, S2, S3) represents the current content
   and dead properties of the resource represented by that box.  The
   symbol next to a box (V1, V2, V3) represents the URL for that
   resource.
</t>
<figure><artwork type="drawing">
        ===checkout==&gt;     ===PUT==&gt;     ===checkin==&gt;


     /foo.html (version-controlled resource)

      <x:bt>+----+</x:bt>    |    <x:bt>+----+</x:bt>    |    <x:bt>+----+</x:bt>    |    <x:bt>+----+</x:bt>
      <x:bc>| S2 |</x:bc>    |    <x:bc>| S2 |</x:bc>    |    <x:bc>| S3 |</x:bc>    |    <x:bc>| S3 |</x:bc>
      <x:bb>+----+</x:bb>    |    <x:bb>+----+</x:bb>    |    <x:bb>+----+</x:bb>    |    <x:bb>+----+</x:bb>
   Checked-In=V2|Checked-Out=V2|Checked-Out=V2|Checked-In=V3


     /his/73 (version history for /foo.html)

     <x:bt>+----+</x:bt>     |   <x:bt>+----+</x:bt>     |   <x:bt>+----+</x:bt>     |   <x:bt>+----+</x:bt>
     <x:bc>| S1 |</x:bc> V1  |   <x:bc>| S1 |</x:bc> V1  |   <x:bc>| S1 |</x:bc> V1  |   <x:bc>| S1 |</x:bc> V1
     <x:bb>+----+</x:bb>     |   <x:bb>+----+</x:bb>     |   <x:bb>+----+</x:bb>     |   <x:bb>+----+</x:bb>
        |       |      |       |      |       |      |
        |       |      |       |      |       |      |
     <x:bt>+----+</x:bt>     |   <x:bt>+----+</x:bt>     |   <x:bt>+----+</x:bt>     |   <x:bt>+----+</x:bt>
     <x:bc>| S2 |</x:bc> V2  |   <x:bc>| S2 |</x:bc> V2  |   <x:bc>| S2 |</x:bc> V2  |   <x:bc>| S2 |</x:bc> V2
     <x:bb>+----+</x:bb>     |   <x:bb>+----+</x:bb>     |   <x:bb>+----+</x:bb>     |   <x:bb>+----+</x:bb>
                |              |              |      |
                |              |              |      |
                |              |              |   <x:bt>+----+</x:bt>
                |              |              |   <x:bc>| S3 |</x:bc> V3
                |              |              |   <x:bb>+----+</x:bb>
</artwork></figure>
<t>
   Note that a version captures only a defined subset of the state of a
   resource.  In particular, a version of a basic resource captures its
   content and dead properties, but not its live properties.
</t>
</section>

<section title="Reporting">
<t>
   Some versioning information about a resource requires that parameters
   be specified along with that request for information.  Included in
   basic versioning is the required support for an extensible reporting
   mechanism, which includes a REPORT method as well as a live property
   for determining what reports are supported by a particular resource.
   The REPORT method is required by versioning, but it can be used in
   non-versioning WebDAV extensions.
</t>
<t>
   To allow a client to query the properties of all versions in the
   version history of a specified version-controlled resource, basic
   versioning provides the DAV:version-tree report (see <xref target="REPORT_version-tree"/>).  A
   more powerful version history reporting mechanism is provided by
   applying the DAV:expand-property report (see <xref target="REPORT_expand-property"/>) to a
   version history resource (see <xref target="version-history.feature"/>).
</t>
</section>
</section>
</section>


<section title="Version-Control Feature">
<iref item="Features" subitem="Version-Control Feature" primary="true"/>
<iref item="Version-Control Feature" primary="true"/>
<t>
   The version-control feature provides support for putting a resource
   under version control, creating an associated version-controlled
   resource and version history resource as described in <xref target="creating.a.version-controlled.resource"/>.
   A server indicates that it supports the version-control feature by
   including the string "version-control" as a field in the DAV header
   in the response to an OPTIONS request.  The version-control feature
   MUST be supported if any other versioning feature is supported.
</t>

<section title="Additional Resource Properties">
<t>
   The version-control feature introduces the following &REQUIRED;
   properties for any WebDAV resource.
</t>

<section title="DAV:comment" anchor="PROPERTY_comment">
<iref item="DAV:comment property" primary="true"/>
<iref item="Properties" subitem="DAV:comment" primary="true"/>
<t>
   This property is used to track a brief comment about a resource that
   is suitable for presentation to a user.  The DAV:comment of a version
   can be used to indicate why that version was created.
</t>
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT comment (#PCDATA)&gt;
PCDATA value: string
</artwork></figure>
</section>

<section title="DAV:creator-displayname" anchor="PROPERTY_creator-displayname">
<iref item="DAV:creator-displayname property" primary="true"/>
<iref item="Properties" subitem="DAV:creator-displayname" primary="true"/>
<t>
   This property contains a description of the creator of the resource
   that is suitable for presentation to a user.  The DAV:creator-displayname
   of a version can be used to indicate who created that
   version.
</t>
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT creator-displayname (#PCDATA)&gt;
PCDATA value: string
</artwork></figure>
</section>

<section title="DAV:supported-method-set (protected)" anchor="PROPERTY_supported-method-set">
<iref item="DAV:supported-method-set property" primary="true"/>
<iref item="Properties" subitem="DAV:supported-method-set" primary="true"/>
<t>
   This property identifies the methods that are supported by the
   resource.  A method is supported by a resource if there is some state
   of that resource for which an application of that method will
   successfully satisfy all postconditions of that method, including any
   additional postconditions added by the features supported by that
   resource.
</t>
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT supported-method-set (supported-method*)&gt;
&lt;!ELEMENT supported-method ANY&gt;
&lt;!ATTLIST supported-method name NMTOKEN #REQUIRED&gt;
name value: a method name
</artwork></figure>
</section>

<section title="DAV:supported-live-property-set (protected)" anchor="PROPERTY_supported-live-property-set">
<iref item="DAV:supported-live-property-set property" primary="true"/>
<iref item="Properties" subitem="DAV:supported-live-property-set" primary="true"/>
<t>
   This property identifies the live properties that are supported by
   the resource.  A live property is supported by a resource if that
   property has the semantics defined for that property.  The value of
   this property MUST identify all live properties defined by this
   document that are supported by the resource, and &SHOULD; identify all
   live properties that are supported by the resource.
</t>
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT supported-live-property-set (supported-live-property*)&gt;
&lt;!ELEMENT supported-live-property name&gt;
&lt;!ELEMENT prop ANY&gt;
ANY value: a property element type
</artwork></figure>
</section>

<section title="DAV:supported-report-set (protected)" anchor="PROPERTY_supported-report-set">
<iref item="DAV:supported-report-set property" primary="true"/>
<iref item="Properties" subitem="DAV:supported-report-set" primary="true"/>
<t>
   This property identifies the reports that are supported by the
   resource.
</t>
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT supported-report-set (supported-report*)&gt;
&lt;!ELEMENT supported-report report&gt;
&lt;!ELEMENT report ANY&gt;
ANY value: a report element type
</artwork></figure>
</section>
</section>

<section title="Version-Controlled Resource Properties">
<t>
   The version-control feature introduces the following &REQUIRED;
   properties for a version-controlled resource.
</t>

<section title="DAV:checked-in (protected)" anchor="PROPERTY_checked-in">
<iref item="DAV:checked-in property" primary="true"/>
<iref item="Properties" subitem="DAV:checked-in" primary="true"/>
<t>
   This property appears on a checked-in version-controlled resource,
   and identifies a version that has the same content and dead
   properties as the version-controlled resource.  This property is
   removed when the resource is checked out, and then added back
   (identifying a new version) when the resource is checked back in.
</t>
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT checked-in (href)&gt;
</artwork></figure>
</section>

<section title="DAV:auto-version" anchor="PROPERTY_auto-version">
<iref item="DAV:auto-version property" primary="true"/>
<iref item="Properties" subitem="DAV:auto-version" primary="true"/>
<t>
   If the DAV:auto-version value is DAV:checkout-checkin, when a
   modification request (such as PUT/PROPPATCH) is applied to a
   checked-in version-controlled resource, the request is automatically
   preceded by a checkout and followed by a checkin operation.
</t>
<t>
   If the DAV:auto-version value is DAV:checkout-unlocked-checkin, when
   a modification request is applied to a checked-in version-controlled
   resource, the request is automatically preceded by a checkout
   operation.  If the resource is not write-locked, the request is
   automatically followed by a checkin operation.
</t>
<t>
   If the DAV:auto-version value is DAV:checkout, when a modification
   request is applied to a checked-in version-controlled resource, the
   request is automatically preceded by a checkout operation.
</t>
<t>
   If the DAV:auto-version value is DAV:locked-checkout, when a
   modification request is applied to a write-locked checked-in
   version-controlled resource, the request is automatically preceded by
   a checkout operation.
</t>
<t>
   If an update to a write-locked checked-in resource is automatically
   preceded by a checkout of that resource, the checkout is associated
   with the write lock.  When this write lock is removed (e.g. from an
   UNLOCK or a lock timeout), if the resource has not yet been checked
   in, the removal of the write lock is automatically preceded by a
   checkin operation.
</t>
<t>
   A server &MAY; refuse to allow the value of the DAV:auto-version
   property to be modified, or &MAY; only support values from a subset of
   the valid values.
</t>
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT auto-version (checkout-checkin | checkout-unlocked-checkin
 | checkout | locked-checkout)? &gt;
&lt;!ELEMENT checkout-checkin EMPTY&gt;
&lt;!ELEMENT checkout-unlocked-checkin EMPTY&gt;
&lt;!ELEMENT checkout EMPTY&gt;
&lt;!ELEMENT locked-checkout EMPTY&gt;
</artwork></figure>
</section>
</section>

<section title="Checked-Out Resource Properties">
<t>
   The version-control feature introduces the following &REQUIRED;
   properties for a checked-out resource.
</t>

<section title="DAV:checked-out (protected)" anchor="PROPERTY_checked-out">
<iref item="DAV:checked-out property" primary="true"/>
<iref item="Properties" subitem="DAV:checked-out" primary="true"/>
<t>
   This property identifies the version that was identified by the
   DAV:checked-in property at the time the resource was checked out.
   This property is removed when the resource is checked in.
</t>
<figure><artwork type="application/xml-dtd">
   &lt;!ELEMENT checked-out (href)&gt;
</artwork></figure>
</section>

<section title="DAV:predecessor-set" anchor="PROPERTY_predecessor-set">
<iref item="DAV:predecessor-set property" primary="true"/>
<iref item="Properties" subitem="DAV:predecessor-set" primary="true"/>
<t>
   This property determines the DAV:predecessor-set property of the
   version that results from checking in this resource.
</t>
<t>
   A server &MAY; reject attempts to modify the DAV:predecessor-set of a
   version-controlled resource.
</t>
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT predecessor-set (href+)&gt;
</artwork></figure>
</section>
</section>

<section title="Version Properties">
<t>
   The version-control feature introduces the following &REQUIRED;
   properties for a version.
</t>

<section title="DAV:predecessor-set (protected)">
<iref item="DAV:predecessor-set property" primary="true"/>
<iref item="Properties" subitem="DAV:predecessor-set" primary="true"/>
<t>
   This property identifies each predecessor of this version.  Except
   for the root version, which has no predecessors, each version has at
   least one predecessor.
</t>
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT predecessor-set (href*)&gt;
</artwork></figure>
</section>

<section title="DAV:successor-set (computed)" anchor="PROPERTY_successor-set">
<iref item="DAV:successor-set property" primary="true"/>
<iref item="Properties" subitem="DAV:successor-set" primary="true"/>
<t>
   This property identifies each version whose DAV:predecessor-set
   identifies this version.
</t>
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT successor-set (href*)&gt;
</artwork></figure>
</section>

<section title="DAV:checkout-set (computed)" anchor="PROPERTY_checkout-set">
<iref item="DAV:checkout-set property" primary="true"/>
<iref item="Properties" subitem="DAV:checkout-set" primary="true"/>
<t>
   This property identifies each checked-out resource whose
   DAV:checked-out property identifies this version.
</t>
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT checkout-set (href*)&gt;
</artwork></figure>
</section>

<section title="DAV:version-name (protected)" anchor="PROPERTY_version-name">
<iref item="DAV:version-name property" primary="true"/>
<iref item="Properties" subitem="DAV:version-name" primary="true"/>
<t>
   This property contains a server-defined string that is different for
   each version in a given version history.  This string is intended for
   display for a user, unlike the URL of a version, which is normally
   only used by a client and not displayed for a user.
</t>
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT version-name (#PCDATA)&gt;
PCDATA value: string
</artwork></figure>
</section>
</section>

<section title="VERSION-CONTROL Method" anchor="METHOD_VERSION-CONTROL">
<iref item="VERSION-CONTROL method" primary="true"/>
<iref item="Methods" subitem="VERSION-CONTROL" primary="true"/>
<t>
   A VERSION-CONTROL request can be used to create a version-controlled
   resource at the request-URL.  It can be applied to a versionable
   resource or to a version-controlled resource.
</t>
<t>
   If the request-URL identifies a versionable resource, a new version
   history resource is created, a new version is created whose content
   and dead properties are copied from the versionable resource, and the
   resource is given a DAV:checked-in property that is initialized to
   identify this new version.
</t>
<t>
   If the request-URL identifies a version-controlled resource, the
   resource just remains under version-control.  This allows a client to
   be unaware of whether or not a server automatically puts a resource
   under version control when it is created.
</t>
<t>
   If a VERSION-CONTROL request fails, the server state preceding the
   request MUST be restored.
</t>
<t>
   <iref item="VERSION-CONTROL method" subitem="Marshalling"/>
   <x:h>Marshalling:</x:h>
<list>
<t>
      If a request body is included, it MUST be a DAV:version-control
      XML element.
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT version-control ANY&gt;
</artwork></figure>
</t>
<t>
      If a response body for a successful request is included, it MUST
      be a DAV:version-control-response XML element.  Note that this
      document does not define any elements for the VERSION-CONTROL
      response body, but the DAV:version-control-response element is
      defined to ensure interoperability between future extensions that
      do define elements for the VERSION-CONTROL response body.
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT version-control-response ANY&gt;
</artwork></figure>
</t>
</list>
</t>
<t>
   <iref item="VERSION-CONTROL method" subitem="Postconditions"/>
   <x:h>Postconditions:</x:h>
<list>
  <t>
    <iref item="DAV:put-under-version-control postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:put-under-version-control (post)" primary="true"/>
      (DAV:put-under-version-control): If the request-URL identified a
      versionable resource at the time of the request, the request MUST
      have created a new version history and MUST have created a new
      version resource in that version history.  The resource MUST have
      a DAV:checked-in property that identifies the new version.  The
      content, dead properties, and DAV:resourcetype of the new version
      MUST be the same as those of the resource.  Note that an
      implementation can choose to locate the version history and
      version resources anywhere that it wishes.  In particular, it
      could locate them on the same host and server as the version-controlled
      resource, on a different virtual host maintained by the
      same server, on the same host maintained by a different server, or
      on a different host maintained by a different server.
  </t>
  <t>
    <iref item="DAV:must-not-change-existing-checked-in-out postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:must-not-change-existing-checked-in-out (post)" primary="true"/>
      (DAV:must-not-change-existing-checked-in-out): If the request-URL
      identified a resource already under version control at the time of
      the request, the request &MUST-NOT; change the DAV:checked-in or
      DAV:checked-out property of that version-controlled resource.
  </t>
</list>
</t>

<section title="Example - VERSION-CONTROL">
<figure><preamble>&gt;&gt;REQUEST</preamble><artwork type='message/http; msgtype="request"'>
VERSION-CONTROL /foo.html HTTP/1.1
Host: www.webdav.org
Content-Length: 0
</artwork></figure>
<figure><preamble>&gt;&gt;RESPONSE</preamble><artwork type='message/http; msgtype="response"'>
HTTP/1.1 200 OK
</artwork></figure>
<t>
   In this example, /foo.html is put under version control.  A new
   version history is created for it, and a new version is created that
   has a copy of the content and dead properties of /foo.html.  The
   DAV:checked-in property of /foo.html identifies this new version.
</t>
</section>
</section>

<section title="REPORT Method" anchor="METHOD_REPORT">
<iref item="REPORT method" primary="true"/>
<iref item="Methods" subitem="REPORT" primary="true"/>
<t>
   A REPORT request is an extensible mechanism for obtaining information
   about a resource.  Unlike a resource property, which has a single
   value, the value of a report can depend on additional information
   specified in the REPORT request body and in the REPORT request
   headers.
</t>
<t>
   <iref item="REPORT method" subitem="Marshalling"/>
   <x:h>Marshalling:</x:h>
<list>
<t>
      The body of a REPORT request specifies which report is being
      requested, as well as any additional information that will be used
      to customize the report.
</t>
<t>
      The request &MAY; include a Depth header.  If no Depth header is
      included, Depth:0 is assumed.
</t>
<t>
      The response body for a successful request MUST contain the
      requested report.
</t>
<t>
      If a Depth request header is included, the response MUST be a 207
      Multi-Status.  The request MUST be applied separately to the
      collection itself and to all members of the collection that
      satisfy the Depth value.  The DAV:prop element of a DAV:response
      for a given resource MUST contain the requested report for that
      resource.
</t>
</list>
</t>
<t>
   <iref item="REPORT method" subitem="Preconditions"/>
   <x:h>Preconditions:</x:h>
<list>
  <t>
    <iref item="DAV:supported-report precondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:supported-report (pre)" primary="true"/>
      (DAV:supported-report): The specified report MUST be supported by
      the resource identified by the request-URL.
  </t>
</list>
</t>
<t>
   <iref item="REPORT method" subitem="Postconditions"/>
   <x:h>Postconditions:</x:h>
<list>
  <t>
    <iref item="DAV:no-modification postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:no-modification (post)" primary="true"/>
      (DAV:no-modification): The REPORT method &MUST-NOT; have changed the
      content or dead properties of any resource.
  </t>
</list>
</t>
</section>

<section title="DAV:version-tree Report" anchor="REPORT_version-tree">
<iref item="DAV:version-tree report" primary="true"/>
<iref item="Reports" subitem="DAV:version-tree" primary="true"/>
<t>
   The DAV:version-tree report describes the requested properties of all
   the versions in the version history of a version.  If the report is
   requested for a version-controlled resource, it is redirected to its
   DAV:checked-in or DAV:checked-out version.
</t>
<t>
   The DAV:version-tree report MUST be supported by all version
   resources and all version-controlled resources.
</t>
<t>
   <iref item="DAV:version-tree report" subitem="Marshalling"/>
   <x:h>Marshalling:</x:h>
<list>
<t>
      The request body MUST be a DAV:version-tree XML element.
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT version-tree ANY&gt;
ANY value: a sequence of zero or more elements, with at most one
DAV:prop element.
prop: see RFC 2518, <xref target="RFC2518" x:fmt="sec" x:sec="12.11"/>
</artwork></figure>
</t>
<t>
      The response body for a successful request MUST be a
      DAV:multistatus XML element.
<figure><artwork type="application/xml-dtd">
multistatus: see RFC 2518, <xref target="RFC2518" x:fmt="sec" x:sec="12.9"/>
</artwork></figure>
</t>
<t>
      The response body for a successful DAV:version-tree REPORT request
      MUST contain a DAV:response element for each version in the
      version history of the version identified by the request-URL.
</t>
</list>
</t>

<section title="Example - DAV:version-tree Report">
<t>
   The version history drawn below would produce the following version
   tree report.
</t>
<figure><artwork type="drawing">
                  foo.html History

                       <x:bt>+---+</x:bt>
                       <x:bc>|   |</x:bc> V1
                       <x:bb>+---+</x:bb>
                      /     \
                     /       \
                 <x:bt>+---+</x:bt>       <x:bt>+---+</x:bt>
                 <x:bc>|   |</x:bc> V2    <x:bc>|   |</x:bc> V2.1.1
                 <x:bb>+---+</x:bb>       <x:bb>+---+</x:bb>
</artwork></figure>
<figure><preamble>&gt;&gt;REQUEST</preamble><artwork type='message/http; msgtype="request"'>
REPORT /foo.html HTTP/1.1
Host: www.webdav.org
Content-Type: text/xml; charset="utf-8"
Content-Length: xxxx

&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;D:version-tree xmlns:D="DAV:"&gt;
 &lt;D:prop&gt;
   &lt;D:version-name/&gt;
   &lt;D:creator-displayname/&gt;
   &lt;D:successor-set/&gt;
 &lt;/D:prop&gt;
&lt;/D:version-tree&gt;
</artwork></figure>
<figure><preamble>&gt;&gt;RESPONSE</preamble><artwork type='message/http; msgtype="response"'>
HTTP/1.1 207 Multi-Status
Content-Type: text/xml; charset="utf-8"
Content-Length: xxxx

&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;D:multistatus xmlns:D="DAV:"&gt;
 &lt;D:response&gt;
   &lt;D:href&gt;http://repo.webdav.org/his/23/ver/V1&lt;/D:href&gt;
   &lt;D:propstat&gt;
     &lt;D:prop&gt;
       &lt;D:version-name&gt;V1&lt;/D:version-name&gt;
       &lt;D:creator-displayname&gt;Fred&lt;/D:creator-displayname&gt;
       &lt;D:successor-set&gt;
         &lt;D:href&gt;http://repo.webdav.org/his/23/ver/V2&lt;/D:href&gt;
         &lt;D:href&gt;http://repo.webdav.org/his/23/ver/V2.1.1&lt;/D:href&gt;
       &lt;/D:successor-set&gt;
     &lt;/D:prop&gt;
     &lt;D:status&gt;HTTP/1.1 200 OK&lt;/D:status&gt;
   &lt;/D:propstat&gt;
 &lt;/D:response&gt;
 &lt;D:response&gt;
   &lt;D:href&gt;http://repo.webdav.org/his/23/ver/V2&lt;/D:href&gt;
   &lt;D:propstat&gt;
     &lt;D:prop&gt;
       &lt;D:version-name&gt;V2&lt;/D:version-name&gt;
       &lt;D:creator-displayname&gt;Fred&lt;/D:creator-displayname&gt;
       &lt;D:successor-set/&gt;
     &lt;/D:prop&gt;
     &lt;D:status&gt;HTTP/1.1 200 OK&lt;/D:status&gt;
   &lt;/D:propstat&gt;
 &lt;/D:response&gt;
 &lt;D:response&gt;
   &lt;D:href&gt;http://repo.webdav.org/his/23/ver/V2.1.1&lt;/D:href&gt;
   &lt;D:propstat&gt;
     &lt;D:prop&gt;
       &lt;D:version-name&gt;V2.1.1&lt;/D:version-name&gt;
       &lt;D:creator-displayname&gt;Sally&lt;/D:creator-displayname&gt;
       &lt;D:successor-set/&gt;
     &lt;/D:prop&gt;
     &lt;D:status&gt;HTTP/1.1 200 OK&lt;/D:status&gt;
   &lt;/D:propstat&gt;
 &lt;/D:response&gt;
&lt;/D:multistatus&gt;
</artwork></figure>
</section>
</section>

<section title="DAV:expand-property Report" anchor="REPORT_expand-property">
<iref item="DAV:expand-property report" primary="true"/>
<iref item="Reports" subitem="DAV:expand-property" primary="true"/>
<t>
   Many property values are defined as a DAV:href, or a set of DAV:href
   elements.  The DAV:expand-property report provides a mechanism for
   retrieving in one request the properties from the resources
   identified by those DAV:href elements.  This report not only
   decreases the number of requests required, but also allows the server
   to minimize the number of separate read transactions required on the
   underlying versioning store.
</t>
<t>
   The DAV:expand-property report &SHOULD; be supported by all resources
   that support the REPORT method.
</t>
<t>
   <iref item="DAV:expand-property report" subitem="Marshalling"/>
   <x:h>Marshalling:</x:h>
<list>
<t>
      The request body MUST be a DAV:expand-property XML element.
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT expand-property (property*)&gt;
&lt;!ELEMENT property (property*)&gt;
&lt;!ATTLIST property name NMTOKEN #REQUIRED&gt;
name value: a property element type
&lt;!ATTLIST property namespace NMTOKEN "DAV:"&gt;
namespace value: an XML namespace
</artwork></figure>
</t>
<t>
      The response body for a successful request MUST be a
      DAV:multistatus XML element.
<figure><artwork type="application/xml-dtd">
multistatus: see RFC 2518, <xref target="RFC2518" x:fmt="sec" x:sec="12.9"/>
</artwork></figure>
</t>
<t>
      The properties reported in the DAV:prop elements of the
      DAV:multistatus element MUST be those identified by the
      DAV:property elements in the DAV:expand-property element.  If
      there are DAV:property elements nested within a DAV:property
      element, then every DAV:href in the value of the corresponding
      property is replaced by a DAV:response element whose DAV:prop
      elements report the values of the properties identified by the
      nested DAV:property elements.  The nested DAV:property elements
      can in turn contain DAV:property elements, so that multiple levels
      of DAV:href expansion can be requested.
</t>
<t>
      Note that a validating parser MUST be aware that the DAV:expand-property
      report effectively modifies the DTD of every property by
      replacing every occurrence of "href" in the DTD with "href |
      response".
</t>
</list>
</t>

<section title="Example - DAV:expand-property">
<t>
   This example describes how to query a version-controlled resource to
   determine the DAV:creator-display-name and DAV:activity-set of every
   version in the version history of that version-controlled resource.
   This example assumes that the server supports the version-history
   feature (see <xref target="version-history.feature"/>).
</t>
<figure><preamble>&gt;&gt;REQUEST</preamble><artwork type='message/http; msgtype="request"'>
REPORT /foo.html HTTP/1.1
Host: www.webdav.org
Content-Type: text/xml; charset="utf-8"
Content-Length: xxxx

&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;D:expand-property xmlns:D="DAV:"&gt;
 &lt;D:property name="version-history"&gt;
   &lt;D:property name="version-set"&gt;
     &lt;D:property name="creator-displayname"/&gt;
     &lt;D:property name="activity-set"/&gt;
   &lt;/D:property&gt;
 &lt;/D:property&gt;
&lt;/D:expand-property&gt;
</artwork></figure>
<figure><preamble>&gt;&gt;RESPONSE</preamble><artwork type='message/http; msgtype="response"'>
HTTP/1.1 207 Multi-Status
Content-Type: text/xml; charset="utf-8"
Content-Length: xxxx

&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;D:multistatus xmlns:D="DAV:"&gt;
 &lt;D:response&gt;
   &lt;D:href&gt;http://www.webdav.org/foo.html&lt;/D:href&gt;
   &lt;D:propstat&gt;
     &lt;D:prop&gt;
       &lt;D:version-history&gt;
         &lt;D:response&gt;
           &lt;D:href&gt;http://repo.webdav.org/his/23&lt;/D:href&gt;
           &lt;D:propstat&gt;
             &lt;D:prop&gt;
               &lt;D:version-set&gt;
                 &lt;D:response&gt;
&lt;D:href&gt;http://repo.webdav.org/his/23/ver/1&lt;/D:href&gt;
                   &lt;D:propstat&gt;
                     &lt;D:prop&gt;
&lt;D:creator-displayname&gt;Fred&lt;/D:creator-displayname&gt;
                       &lt;D:activity-set&gt; &lt;D:href&gt;
                         http://www.webdav.org/ws/dev/sally
                       &lt;/D:href&gt; &lt;/D:activity-set&gt; &lt;/D:prop&gt;
                     &lt;D:status&gt;HTTP/1.1 200 OK&lt;/D:status&gt;
                   &lt;/D:propstat&gt; &lt;/D:response&gt;
                 &lt;D:response&gt;
&lt;D:href&gt;http://repo.webdav.org/his/23/ver/2&lt;/D:href&gt;
                   &lt;D:propstat&gt;
                     &lt;D:prop&gt;
&lt;D:creator-displayname&gt;Sally&lt;/D:creator-displayname&gt;
                       &lt;D:activity-set&gt;
&lt;D:href&gt;http://repo.webdav.org/act/add-refresh-cmd&lt;/D:href&gt;
                       &lt;/D:activity-set&gt; &lt;/D:prop&gt;
                     &lt;D:status&gt;HTTP/1.1 200 OK&lt;/D:status&gt;
                   &lt;/D:propstat&gt; &lt;/D:response&gt;
               &lt;/D:version-set&gt; &lt;/D:prop&gt;
             &lt;D:status&gt;HTTP/1.1 200 OK&lt;/D:status&gt;
           &lt;/D:propstat&gt; &lt;/D:response&gt;
       &lt;/D:version-history&gt; &lt;/D:prop&gt;
     &lt;D:status&gt;HTTP/1.1 200 OK&lt;/D:status&gt;
   &lt;/D:propstat&gt; &lt;/D:response&gt;
&lt;/D:multistatus&gt;
</artwork></figure>
<t>
   In this example, the DAV:creator-displayname and DAV:activity-set
   properties of the versions in the DAV:version-set of the
   DAV:version-history of http://www.webdav.org/foo.html are reported.
</t>
</section>
</section>


<section title="Additional OPTIONS Semantics">
<iref item="OPTIONS method" subitem="additional semantics with Version-Control Feature"/>
<iref item="DAV header" subitem="compliance class 'version-control'" primary="true"/>
<t>
   If the server supports the version-control feature, it MUST include
   "version-control" as a field in the DAV response header from an
   OPTIONS request on any resource that supports any versioning
   properties, reports, or methods.
</t>
</section>

<section title="Additional PUT Semantics" anchor="additional.put.semantics">
<iref item="PUT method" subitem="additional semantics with Version-Control Feature"/>
<t>
   <iref item="PUT method" subitem="Additional Preconditions"/>
   <x:h>Additional Preconditions:</x:h>
<list>
  <t>
    <iref item="DAV:cannot-modify-version-controlled-content precondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:cannot-modify-version-controlled-content (pre)" primary="true"/>
      (DAV:cannot-modify-version-controlled-content): If the request-URL
      identifies a resource with a DAV:checked-in property, the request
      MUST fail unless DAV:auto-version semantics will automatically
      check out the resource.
  </t>
  <t>
    <iref item="DAV:cannot-modify-version precondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:cannot-modify-version (pre)" primary="true"/>
      (DAV:cannot-modify-version): If the request-URL identifies a
      version, the request MUST fail.
  </t>
  <t>
      If the request creates a new resource that is automatically placed
      under version control, all preconditions for VERSION-CONTROL apply
      to the request.
  </t>
</list>
</t>
<t>
   <iref item="PUT method" subitem="Additional Postconditions"/>
   <x:h>Additional Postconditions:</x:h>
<list>
  <t>
    <iref item="DAV:auto-checkout postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:auto-checkout (post)" primary="true"/>
      (DAV:auto-checkout): If the resource was a checked-in version-controlled
      resource whose DAV:auto-version property indicates it
      should be automatically checked out but not automatically checked
      in for a modification request, then the server MUST have
      automatically checked out the resource prior to executing the
      request.  In particular, the value of the DAV:checked-out property
      of the resource MUST be that of the DAV:checked-in property prior
      to the request, the DAV:checked-in property MUST have been
      removed, and the DAV:predecessor-set property MUST be initialized
      to be the same as the DAV:checked-out property.  If any part of
      the checkout/update sequence failed, the status from the failed
      part of the request MUST be returned, and the server state
      preceding the request sequence MUST be restored.
  </t>
  <t>
    <iref item="DAV:auto-checkout-checkin postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:auto-checkout-checkin (post)" primary="true"/>
      (DAV:auto-checkout-checkin): If the resource was a checked-in
      version-controlled resource whose DAV:auto-version property
      indicates it should be automatically checked out and automatically
      checked in for a modification request, then the server MUST have
      automatically checked out the resource prior to executing the
      request and automatically checked it in after the request.  In
      particular, the DAV:checked-in property of the resource MUST
      identify a new version whose content and dead properties are the
      same as those of the resource.  The DAV:predecessor-set of the new
      version MUST identify the version identified by the DAV:checked-in
      property prior to the request.  If any part of the
      checkout/update/checkin sequence failed, the status from the
      failed part of the request MUST be returned, and the server state
      preceding the request sequence MUST be restored.
  </t>
  <t>
      If the request creates a new resource, the new resource &MAY; have
      automatically been placed under version control, and all
      postconditions for VERSION-CONTROL apply to the request.
</t>
</list>
</t>
</section>

<section title="Additional PROPFIND Semantics">
<iref item="PROPFIND method" subitem="additional semantics with Version-Control Feature"/>
<t>
   A DAV:allprop PROPFIND request &SHOULD-NOT; return any of the
   properties defined by this document.  This allows a versioning server
   to perform efficiently when a naive client, which does not understand
   the cost of asking a server to compute all possible live properties,
   issues a DAV:allprop PROPFIND request.
</t>
<t>
   <iref item="PROPFIND method" subitem="Additional Preconditions"/>
   <x:h>Additional Preconditions:</x:h>
<list>
  <t>
    <iref item="DAV:supported-live-property precondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:supported-live-property (pre)" primary="true"/>
      (DAV:supported-live-property): If the request attempts to access a
      property defined by this document, the semantics of that property
      MUST be supported by the server.
  </t>
</list>
</t>
</section>

<section title="Additional PROPPATCH Semantics">
<iref item="PROPPATCH method" subitem="additional semantics with Version-Control Feature"/>
<t>
   <iref item="PROPPATCH method" subitem="Additional Preconditions"/>
   <x:h>Additional Preconditions:</x:h>
<list>
  <t>
    <iref item="DAV:cannot-modify-version-controlled-property precondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:cannot-modify-version-controlled-property (pre)" primary="true"/>
      (DAV:cannot-modify-version-controlled-property): If the request
      attempts to modify a dead property, same semantics as PUT (see
      <xref target="additional.put.semantics"/>).
  </t>
  <t>
    <iref item="DAV:cannot-modify-version precondition" primary="false"/>
    <iref item="Condition Names" subitem="DAV:cannot-modify-version (pre)" primary="false"/>
      (DAV:cannot-modify-version): If the request attempts to modify a
      dead property, same semantics as PUT (see <xref target="additional.put.semantics"/>).
  </t>
  <t>
    <iref item="DAV:cannot-modify-protected-property precondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:cannot-modify-protected-property (pre)" primary="true"/>
      (DAV:cannot-modify-protected-property): An attempt to modify a
      property that is defined by this document, as being protected for
      that kind of resource, MUST fail.
  </t>
  <t>
    <iref item="DAV:supported-live-propertyprecondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:supported-live-property (pre)" primary="true"/>
      (DAV:supported-live-property): An attempt to modify a property
      defined by this document, but whose semantics are not enforced by
      the server, MUST fail.  This helps ensure that a client will be
      notified when it is trying to use a property whose semantics are
      not supported by the server.
</t>
</list>
</t>
<t>
   <iref item="PROPFIND method" subitem="Additional Postconditions"/>
   <x:h>Additional Postconditions:</x:h>
<list>
  <t>
    <iref item="DAV:auto-checkout postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:auto-checkout (post)" primary="true"/>
      (DAV:auto-checkout): If the request modified a dead property, same
      semantics as PUT (see <xref target="additional.put.semantics"/>).
  </t>
  <t>
    <iref item="DAV:auto-checkout-checkin postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:auto-checkout-checkin (post)" primary="true"/>
      (DAV:auto-checkout-checkin): If the request modified a dead
      property, same semantics as PUT (see <xref target="additional.put.semantics"/>).
</t>
</list>
</t>
</section>

<section title="Additional DELETE Semantics" anchor="additional.delete.semantics">
<iref item="DELETE method" subitem="additional semantics with Version-Control Feature"/>
<t>
   <iref item="DELETE method" subitem="Additional Preconditions"/>
   <x:h>Additional Preconditions:</x:h>
<list>
  <t>
    <iref item="DAV:no-version-delete precondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:no-version-delete (pre)" primary="true"/>
      (DAV:no-version-delete): A server &MAY; fail an attempt to DELETE a
      version.
  </t>
</list>
</t>
<t>
   <iref item="DELETE method" subitem="Additional Postconditions"/>
   <x:h>Additional Postconditions:</x:h>
<list>
  <t>
    <iref item="DAV:update-predecessor-set postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:update-predecessor-set (post)" primary="true"/>
      (DAV:update-predecessor-set): If a version was deleted, the server
      MUST have replaced any reference to that version in a
      DAV:predecessor-set by a copy of the DAV:predecessor-set of the
      deleted version.
  </t>
</list>
</t>
</section>

<section title="Additional COPY Semantics">
<iref item="COPY method" subitem="additional semantics with Version-Control Feature"/>
<t>
   <iref item="COPY method" subitem="Additional Preconditions"/>
   <x:h>Additional Preconditions:</x:h>
<list>
  <t>
      If the request creates a new resource that is automatically placed
      under version control, all preconditions for VERSION-CONTROL apply
      to the request.
  </t>
</list>
</t>
<t>
   <iref item="COPY method" subitem="Additional Postconditions"/>
    <x:h>Additional Postconditions:</x:h>
<list>
  <t>
    <iref item="DAV:must-not-copy-versioning-property postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:must-not-copy-versioning-property (post)" primary="true"/>
      (DAV:must-not-copy-versioning-property): A property defined by
      this document &MUST-NOT; have been copied to the new resource
      created by this request, but instead that property of the new
      resource MUST have the default initial value it would have had if
      the new resource had been created by a non-versioning method such
      as PUT or a MKCOL.
  </t>
  <t>
    <iref item="DAV:auto-checkout postcondition" primary="false"/>
    <iref item="Condition Names" subitem="DAV:auto-checkout (post)" primary="false"/>
      (DAV:auto-checkout): If the destination is a version-controlled
      resource, same semantics as PUT (see <xref target="additional.put.semantics"/>).
  </t>
  <t>
    <iref item="DAV:auto-checkout-checkin postcondition" primary="false"/>
    <iref item="Condition Names" subitem="DAV:auto-checkout-checkin (post)" primary="false"/>
      (DAV:auto-checkout-checkin): If the destination is a version-controlled
      resource, same semantics as PUT (see <xref target="additional.put.semantics"/>).
  </t>
  <t>
    <iref item="DAV:copy-creates-new-resource postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:copy-creates-new-resource (post)" primary="true"/>
      (DAV:copy-creates-new-resource): If the source of a COPY is a
      version-controlled resource or version, and if there is no
      resource at the destination of the COPY, then the COPY creates a
      new non-version-controlled resource at the destination of the
      COPY.  The new resource &MAY; automatically be put under version
      control, but the resulting version-controlled resource MUST be
      associated with a new version history created for that new
      version-controlled resource, and all postconditions for
      VERSION-CONTROL apply to the request.
  </t>
</list>
</t>
</section>

<section title="Additional MOVE Semantics">
<iref item="MOVE method" subitem="additional semantics with Version-Control Feature"/>
<t>
   <iref item="MOVE method" subitem="Additional Preconditions"/>
   <x:h>Additional Preconditions:</x:h>
<list>
  <t>
    <iref item="DAV:cannot-rename-version precondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:cannot-rename-version (pre)" primary="true"/>
      (DAV:cannot-rename-version): If the request-URL identifies a
      version, the request MUST fail.
  </t>
</list>
</t>
<t>
   <iref item="MOVE method" subitem="Additional Postconditions"/>
   <x:h>Additional Postconditions:</x:h>
<list>
  <t>
    <iref item="DAV:preserve-versioning-properties postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:preserve-versioning-properties (post)" primary="true"/>
      (DAV:preserve-versioning-properties): When a resource is moved
      from a source URL to a destination URL, a property defined by this
      document MUST have the same value at the destination URL as it had
      at the source URL.
  </t>
</list>
</t>
</section>

<section title="Additional UNLOCK Semantics">
<iref item="UNLOCK method" subitem="additional semantics with Version-Control Feature"/>
<t>
   Note that these semantics apply both to an explicit UNLOCK request,
   as well as to the removal of a lock because of a lock timeout.  If a
   precondition or postcondition cannot be satisfied, the lock timeout
   &MUST-NOT; occur.
</t>
<t>
   <iref item="UNLOCK method" subitem="Additional Preconditions"/>
   <x:h>Additional Preconditions:</x:h>
<list>
  <t>
    <iref item="DAV:version-history-is-tree precondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:version-history-is-tree (pre)" primary="true"/>
      (DAV:version-history-is-tree): If the request-URL identifies a
      checked-out version-controlled resource that will be automatically
      checked in when the lock is removed, then the versions identified
      by the DAV:predecessor-set of the checked-out resource MUST be
      descendants of the root version of the version history for the
      DAV:checked-out version.
  </t>
</list>
</t>
<t>
   <iref item="UNLOCK method" subitem="Additional Postconditions"/>
   <x:h>Additional Postconditions:</x:h>
<list>
  <t>
    <iref item="DAV:auto-checkin postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:auto-checkin (post)" primary="true"/>
      (DAV:auto-checkin): If the request-URL identified a checked-out
      version-controlled resource that had been automatically checked
      out because of its DAV:auto-version property, the request MUST
      have created a new version in the version history of the
      DAV:checked-out version.  The request MUST have allocated a URL
      for the version that &MUST-NOT; have previously identified any other
      resource, and &MUST-NOT; ever identify a resource other than this
      version.  The content, dead properties, DAV:resourcetype, and
      DAV:predecessor-set of the new version MUST be copied from the
      checked-out resource.  The DAV:version-name of the new version
      MUST be set to a server-defined value distinct from all other
      DAV:version-name values of other versions in the same version
      history.  The request MUST have removed the DAV:checked-out
      property of the version-controlled resource, and MUST have added a
      DAV:checked-in property that identifies the new version.
  </t>
</list>
</t>
</section>
</section>

<section title="CHECKOUT-IN-PLACE FEATURE" anchor="checkout-in-place.feature">
<t>
   With the version-control feature, WebDAV locking can be used to avoid
   the proliferation of versions that would result if every modification
   to a version-controlled resource produced a new version.  The
   checkout-in-place feature provides an alternative mechanism that
   allows a client to explicitly check out and check in a resource to
   create a new version.
</t>

<section title="Additional Version Properties">
<t>
   The checkout-in-place feature introduces the following &REQUIRED;
   properties for a version.
</t>

<section title="DAV:checkout-fork" anchor="PROPERTY_checkout-fork">
<iref item="DAV:checkout-fork property" primary="true"/>
<iref item="Properties" subitem="DAV:checkout-fork" primary="true"/>
<t>
   This property controls the behavior of CHECKOUT when a version
   already is checked out or has a successor.  If the DAV:checkout-fork
   of a version is DAV:forbidden, a CHECKOUT request MUST fail if it
   would result in that version appearing in the DAV:predecessor-set or
   DAV:checked-out property of more than one version or checked-out
   resource.  If DAV:checkout-fork is DAV:discouraged, such a CHECKOUT
   request MUST fail unless DAV:fork-ok is specified in the CHECKOUT
   request body.
</t><t>
   A server &MAY; reject attempts to modify the DAV:checkout-fork of a
   version.
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT checkout-fork ANY&gt;
ANY value: A sequence of elements with at most one DAV:discouraged
or DAV:forbidden element.
&lt;!ELEMENT discouraged EMPTY&gt;
&lt;!ELEMENT forbidden EMPTY&gt;
</artwork></figure>
</t>
</section>

<section title="DAV:checkin-fork" anchor="PROPERTY_checkin-fork">
<iref item="DAV:checkin-fork property" primary="true"/>
<iref item="Properties" subitem="DAV:checkin-fork" primary="true"/>
<t>
   This property controls the behavior of CHECKIN when a version already
   has a successor.  If the DAV:checkin-fork of a version is
   DAV:forbidden, a CHECKIN request MUST fail if it would result in that
   version appearing in the DAV:predecessor-set of more than one
   version.  If DAV:checkin-fork is DAV:discouraged, such a CHECKIN
   request MUST fail unless DAV:fork-ok is specified in the CHECKIN
   request body.
</t><t>
   A server &MAY; reject attempts to modify the DAV:checkout-fork of a
   version.
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT checkin-fork ANY&gt;
ANY value: A sequence of elements with at most one DAV:discouraged
or DAV:forbidden element.
&lt;!ELEMENT discouraged EMPTY&gt;
&lt;!ELEMENT forbidden EMPTY&gt;
</artwork></figure>
</t>
</section>
</section>

<section title="Checked-Out Resource Properties">
<t>
   The checkout-in-place feature introduces the following &REQUIRED;
   properties for a checked-out resource.
</t>

<section title="DAV:checkout-fork">
<iref item="DAV:checkout-fork property" primary="true"/>
<iref item="Properties" subitem="DAV:checkout-fork" primary="true"/>
<t>
   This property determines the DAV:checkout-fork property of the
   version that results from checking in this resource.
</t>
</section>

<section title="DAV:checkin-fork">
<iref item="DAV:checkin-fork property" primary="true"/>
<iref item="Properties" subitem="DAV:checkin-fork" primary="true"/>
<t>
   This property determines the DAV:checkin-fork property of the version
   that results from checking in this resource.
</t>
</section>
</section>

<section title="CHECKOUT Method (applied to a version-controlled resource)" anchor="checkout.method.applied.to.a.version-controlled.resource">
<iref item="CHECKOUT method" subitem="(applied to a version-controlled resource)" primary="true"/>
<iref item="Methods" subitem="CHECKOUT" primary="true"/>
<t>
   A CHECKOUT request can be applied to a checked-in version-controlled
   resource to allow modifications to the content and dead properties of
   that version-controlled resource.
</t><t>
   If a CHECKOUT request fails, the server state preceding the request
   MUST be restored.
</t>
<t>
   <iref item="CHECKOUT method" subitem="Marshalling"/>
   <x:h>Marshalling:</x:h>
<list>
  <t>If a request body is included, it MUST be a DAV:checkout XML
      element.
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT checkout ANY&gt;
</artwork></figure>
  </t><t>
      ANY value: A sequence of elements with at most one DAV:fork-ok
      element.
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT fork-ok EMPTY&gt;
</artwork></figure>
  </t><t>
      If a response body for a successful request is included, it MUST
      be a DAV:checkout-response XML element.
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT checkout-response ANY&gt;
</artwork></figure>
  </t><t>
      The response MUST include a Cache-Control:no-cache header.
  </t>
</list>
</t>
<t>
   <iref item="CHECKOUT method" subitem="Preconditions"/>
   <x:h>Preconditions:</x:h>
<list>
  <t>
    <iref item="DAV:must-be-checked-in precondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:must-be-checked-in (pre)" primary="true"/>
      (DAV:must-be-checked-in): If a version-controlled resource is
      being checked out, it MUST have a DAV:checked-in property.
  </t>
  <t>
    <iref item="DAV:checkout-of-version-with-descendant-is-forbidden precondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:checkout-of-version-with-descendant-is-forbidden (pre)" primary="true"/>
      (DAV:checkout-of-version-with-descendant-is-forbidden): If the
      DAV:checkout-fork property of the version being checked out is
      DAV:forbidden, the request MUST fail if a version identifies that
      version in its DAV:predecessor-set.
  </t>
  <t>
    <iref item="DAV:checkout-of-version-with-descendant-is-discouraged precondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:checkout-of-version-with-descendant-is-discouraged (pre)" primary="true"/>
      (DAV:checkout-of-version-with-descendant-is-discouraged): If the
      DAV:checkout-fork property of the version being checked out is
      DAV:discouraged, the request MUST fail if a version identifies
      that version in its DAV:predecessor-set unless DAV:fork-ok is
      specified in the request body.
  </t>
  <t>
    <iref item="DAV:checkout-of-checked-out-version-is-forbidden precondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:checkout-of-checked-out-version-is-forbidden (pre)" primary="true"/>
      (DAV:checkout-of-checked-out-version-is-forbidden): If the
      DAV:checkout-fork property of the version being checked out is
      DAV:forbidden, the request MUST fail if a checked-out resource
      identifies that version in its DAV:checked-out property.
  </t>
  <t>
    <iref item="DAV:checkout-of-checked-out-version-is-discouraged precondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:checkout-of-checked-out-version-is-discouraged (pre)" primary="true"/>
      (DAV:checkout-of-checked-out-version-is-discouraged): If the
      DAV:checkout-fork property of the version being checked out is
      DAV:discouraged, the request MUST fail if a checked-out resource
      identifies that version in its DAV:checked-out property unless
      DAV:fork-ok is specified in the request body.
  </t>
</list>
</t>
<t>
   <iref item="CHECKOUT method" subitem="Postconditions"/>
   <x:h>Postconditions:</x:h>
<list>
  <t>
    <iref item="DAV:is-checked-out postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:is-checked-out (post)" primary="true"/>
      (DAV:is-checked-out): The checked-out resource MUST have a
      DAV:checked-out property that identifies the DAV:checked-in
      version preceding the checkout.  The version-controlled resource
      &MUST-NOT; have a DAV:checked-in property.
  </t>
  <t>
    <iref item="DAV:initialize-predecessor-set postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:initialize-predecessor-set (post)" primary="true"/>
      (DAV:initialize-predecessor-set): The DAV:predecessor-set property
      of the checked-out resource MUST be initialized to be the
      DAV:checked-out version.
  </t>
</list>
</t>

<section title="Example - CHECKOUT of a version-controlled resource">
<figure><preamble>&gt;&gt;REQUEST</preamble><artwork type='message/http; msgtype="request"'>
CHECKOUT /foo.html HTTP/1.1
Host: www.webdav.org
Content-Length: 0
</artwork></figure>
<figure><preamble>&gt;&gt;RESPONSE</preamble><artwork type='message/http; msgtype="response"'>
HTTP/1.1 200 OK
Cache-Control: no-cache
</artwork></figure>
<t>
   In this example, the version-controlled resource /foo.html is checked
   out.
</t>
</section>
</section>

<section title="CHECKIN Method (applied to a version-controlled resource)" anchor="checkin.method.applied.to.a.version-controlled.resource">
<iref item="CHECKIN method" subitem="(applied to a version-controlled resource)" primary="true"/>
<iref item="Methods" subitem="CHECKIN" primary="true"/>
<t>
   A CHECKIN request can be applied to a checked-out version-controlled
   resource to produce a new version whose content and dead properties
   are copied from the checked-out resource.
</t><t>
   If a CHECKIN request fails, the server state preceding the request
   MUST be restored.
</t><t>
   <iref item="CHECKIN method" subitem="Marshalling"/>
   <x:h>Marshalling:</x:h>
<list><t>
      If a request body is included, it MUST be a DAV:checkin XML
      element.
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT checkin ANY&gt;
ANY value: A sequence of elements with at most one
DAV:keep-checked-out element and at most one DAV:fork-ok element.

&lt;!ELEMENT keep-checked-out EMPTY&gt;
&lt;!ELEMENT fork-ok EMPTY&gt;
</artwork></figure>
</t>
<t>
      If a response body for a successful request is included, it MUST
      be a DAV:checkin-response XML element.
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT checkin-response ANY&gt;
</artwork></figure>
</t>
<t>
      The response MUST include a Cache-Control:no-cache header.
</t>
</list>
</t>
<t>
   <iref item="CHECKIN method" subitem="Preconditions"/>
   <x:h>Preconditions:</x:h>
<list>
  <t>
    <iref item="DAV:must-be-checked-out precondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:must-be-checked-out (pre)" primary="true"/>
      (DAV:must-be-checked-out): The request-URL MUST identify a
      resource with a DAV:checked-out property.
  </t>
  <t>
    <iref item="DAV:version-history-is-tree precondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:version-history-is-tree (pre)" primary="true"/>
      (DAV:version-history-is-tree) The versions identified by the
      DAV:predecessor-set of the checked-out resource MUST be
      descendants of the root version of the version history for the
      DAV:checked-out version.
  </t>
  <t>
    <iref item="DAV:checkin-fork-forbidden precondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:checkin-fork-forbidden (pre)" primary="true"/>
      (DAV:checkin-fork-forbidden): A CHECKIN request MUST fail if it
      would cause a version whose DAV:checkin-fork is DAV:forbidden to
      appear in the DAV:predecessor-set of more than one version. 
  </t>
  <t>
    <iref item="DAV:checkin-fork-discouraged precondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:checkin-fork-discouraged (pre)" primary="true"/>
      (DAV:checkin-fork-discouraged): A CHECKIN request MUST fail if it
      would cause a version whose DAV:checkin-fork is DAV:discouraged to
      appear in the DAV:predecessor-set of more than one version, unless
      DAV:fork-ok is specified in the request body.
  </t>
</list>
</t>
<t>
   <iref item="CHECKIN method" subitem="Postconditions"/>
   <x:h>Postconditions:</x:h>
<list>
  <t>
    <iref item="DAV:create-version postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:create-version (post)" primary="true"/>
      (DAV:create-version): The request MUST have created a new version
      in the version history of the DAV:checked-out version.  The
      request MUST have allocated a distinct new URL for the new
      version, and that URL &MUST-NOT; ever identify any resource other
      than that version. The URL for the new version MUST be returned in
      a Location response header.
  </t>
  <t>
    <iref item="DAV:initialize-version-content-and-properties postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:initialize-version-content-and-properties (post)" primary="true"/>
      (DAV:initialize-version-content-and-properties): The content, dead
      properties, DAV:resourcetype, and DAV:predecessor-set of the new
      version MUST be copied from the checked-out resource.  The
      DAV:version-name of the new version MUST be set to a server-defined
      value distinct from all other DAV:version-name values of
      other versions in the same version history.
  </t>
  <t>
    <iref item="DAV:checked-in postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:checked-in (post)" primary="true"/>
      (DAV:checked-in): If the request-URL identifies a version-controlled
      resource and DAV:keep-checked-out is not specified in
      the request body, the DAV:checked-out property of the version-controlled
      resource MUST have been removed and a DAV:checked-in
      property that identifies the new version MUST have been added.
  </t>
  <t>
    <iref item="DAV:keep-checked-out postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:keep-checked-out (post)" primary="true"/>
      (DAV:keep-checked-out): If DAV:keep-checked-out is specified in
      the request body, the DAV:checked-out property of the checked-out
      resource MUST have been updated to identify the new version.
  </t>
</list>
</t>

<section title="Example - CHECKIN">

<figure><preamble>&gt;&gt;REQUEST</preamble><artwork type='message/http; msgtype="request"'>
CHECKIN /foo.html HTTP/1.1
Host: www.webdav.org
Content-Length: 0
</artwork></figure>
<figure><preamble>&gt;&gt;RESPONSE</preamble><artwork type='message/http; msgtype="response"'>
HTTP/1.1 201 Created
Location: http://repo.webdav.org/his/23/ver/32
Cache-Control: no-cache
</artwork></figure>
<t>
   In this example, version-controlled resource /foo.html is checked in,
   and a new version is created at http://repo.webdav.org/his/23/ver/32.
</t>
</section>
</section>

<section title="UNCHECKOUT Method" anchor="METHOD_UNCHECKOUT">
<iref item="UNCHECKOUT method" primary="true"/>
<iref item="Methods" subitem="UNCHECKOUT" primary="true"/>
<t>
   An UNCHECKOUT request can be applied to a checked-out version-controlled
   resource to cancel the CHECKOUT and restore the pre-CHECKOUT
   state of the version-controlled resource.
</t>
<t>
   If an UNCHECKOUT request fails, the server MUST undo any partial
   effects of the UNCHECKOUT request.
</t>
<t>
   <iref item="UNCHECKOUT method" subitem="Marshalling"/>
   <x:h>Marshalling:</x:h>
<list><t>
      If a request body is included, it MUST be a DAV:uncheckout XML
      element.
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT uncheckout ANY&gt;
</artwork></figure>
</t><t>
      If a response body for a successful request is included, it MUST
      be a DAV:uncheckout-response XML element.
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT uncheckout-response ANY&gt;
</artwork></figure>
</t>
<t>
      The response MUST include a Cache-Control:no-cache header.
</t>
</list>
</t>
<t>
   <iref item="UNCHECKOUT method" subitem="Preconditions"/>
   <x:h>Preconditions:</x:h>
<list>
  <t>
    <iref item="DAV:must-be-checked-out-version-controlled-resource precondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:must-be-checked-out-version-controlled-resource (pre)" primary="true"/>
      (DAV:must-be-checked-out-version-controlled-resource): The
      request-URL MUST identify a version-controlled resource with a
      DAV:checked-out property.
  </t>
</list>
</t>
<t>
   <iref item="UNCHECKOUT method" subitem="Postconditions"/>
   <x:h>Postconditions:</x:h>
<list>
  <t>
    <iref item="DAV:cancel-checked-out postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:cancel-checked-out (post)" primary="true"/>
      (DAV:cancel-checked-out): The value of the DAV:checked-in property
      is that of the DAV:checked-out property prior to the request, and
      the DAV:checked-out property has been removed.
  </t>
  <t>
    <iref item="DAV:restore-content-and-dead-properties postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:restore-content-and-dead-properties (post)" primary="true"/>
      (DAV:restore-content-and-dead-properties): The content and dead
      properties of the version-controlled resource are copies of its
      DAV:checked-in version.
  </t>
</list>
</t>

<section title="Example - UNCHECKOUT">

<figure><preamble>&gt;&gt;REQUEST</preamble><artwork type='message/http; msgtype="request"'>
UNCHECKOUT /foo.html HTTP/1.1
Host: www.webdav.org
Content-Length: 0
</artwork></figure>
<figure><preamble>&gt;&gt;RESPONSE</preamble><artwork type='message/http; msgtype="response"'>
HTTP/1.1 200 OK
Cache-Control: no-cache
</artwork></figure>
<t>
   In this example, the content and dead properties of the version-controlled
   resource identified by http://www.webdav.org/foo.html are
   restored to their values preceding the most recent CHECKOUT of that
   version-controlled resource.
</t>
</section>
</section>

<section title="Additional OPTIONS Semantics">
<iref item="OPTIONS method" subitem="additional semantics with CHECKOUT-IN-PLACE FEATURE"/>
<iref item="DAV header" subitem="compliance class 'checkout-in-place'" primary="true"/>
<t>
   If a server supports the checkout-in-place feature, it MUST include
   "checkout-in-place" as a field in the DAV response header from an
   OPTIONS request on any resource that supports any versioning
   properties, reports, or methods.
</t>
</section></section>


<section title="Version-History Feature" anchor="version-history.feature"><iref item="Features" subitem="Version-History Feature" primary="true"/><iref item="Version-History Feature" primary="true"/>
<t>
   It is often useful to have access to a version history even after all
   version-controlled resources for that version history have been
   deleted.  A server can provide this functionality by supporting
   version history resources.  A version history resource is a resource
   that exists in a server defined namespace and therefore is unaffected
   by any deletion or movement of version-controlled resources.  A
   version history resource is an appropriate place to add a property
   that logically applies to all states of a resource.  The DAV:expand-property
   report (see <xref target="REPORT_expand-property"/>) can be applied to the DAV:version-set
   of a version history resource to provide a variety of useful
   reports on all versions in that version history.
</t>

<section title="Version History Properties">
<iref item="DAV:version-history resource type" primary="true" />
<iref item="Resource Types" subitem="DAV:version-history" primary="true"/>
<t>
   The DAV:resourcetype of a version history MUST be DAV:version-history.
</t>
<t>
   The version-history feature introduces the following &REQUIRED;
   properties for a version history.
</t>

<section title="DAV:version-set (protected)" anchor="PROPERTY_version-set">
<iref item="DAV:version-set property" primary="true"/>
<iref item="Properties" subitem="DAV:version-set" primary="true"/>
<t>
   This property identifies each version of this version history.
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT version-set (href+)&gt;
</artwork></figure>
</t>
</section>

<section title="DAV:root-version (computed)" anchor="PROPERTY_root-version">
<iref item="DAV:root-version property" primary="true"/>
<iref item="Properties" subitem="DAV:root-version" primary="true"/>
<t>
   This property identifies the root version of this version history.
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT root-version (href)&gt;
</artwork></figure>
</t>
</section>
</section>

<section title="Additional Version-Controlled Resource Properties">
<t>
   The version-history feature introduces the following &REQUIRED;
   property for a version-controlled resource.
</t>

<section title="DAV:version-history (computed)" anchor="PROPERTY_version-history">
<iref item="DAV:version-history property" primary="true"/>
<iref item="Properties" subitem="DAV:version-history" primary="true"/>
<t>
   This property identifies the version history resource for the
   DAV:checked-in or DAV:checked-out version of this version-controlled
   resource.
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT version-history (href)&gt;
</artwork></figure>
</t>
</section>
</section>

<section title="Additional Version Properties">
<t>
   The version-history feature introduces the following &REQUIRED;
   property for a version.
</t>

<section title="DAV:version-history (computed)">
<iref item="DAV:version-history property" primary="true"/>
<iref item="Properties" subitem="DAV:version-history" primary="true"/>
<t>
   This property identifies the version history that contains this
   version.
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT version-history (href)&gt;
</artwork></figure>
</t>
</section>
</section>

<section title="DAV:locate-by-history Report" anchor="REPORT_locate-by-history">
<iref item="DAV:locate-by-history report" primary="true"/>
<iref item="Reports" subitem="DAV:locate-by-history" primary="true"/>
<t>
   Many properties identify a version from some version history.  It is
   often useful to be able to efficiently locate a version-controlled
   resource for that version history.  The DAV:locate-by-history report
   can be applied to a collection to locate the collection member that
   is a version-controlled resource for a specified version history
   resource.
</t>
<t>
   <iref item="DAV:locate-by-history report" subitem="Marshalling"/>
   <x:h>Marshalling:</x:h>
<list>
  <t>
      The request body MUST be a DAV:locate-by-history XML element.
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT locate-by-history (version-history-set, prop)&gt;
&lt;!ELEMENT version-history-set (href+)&gt;
prop: see RFC 2518, <xref target="RFC2518" x:fmt="sec" x:sec="12.11"/>
</artwork></figure>
  </t><t>
      The response body for a successful request MUST be a
      DAV:multistatus XML element containing every version-controlled
      resource that is a member of the collection identified by the
      request-URL, and whose DAV:version-history property identifies one
      of the version history resources identified by the request body.
      The DAV:prop element in the request body identifies which
      properties should be reported in the DAV:prop elements in the
      response body.
  </t>
</list>
</t>
<t>
   <iref item="DAV:locate-by-history report" subitem="Preconditions"/>
   <x:h>Preconditions:</x:h>
<list>
  <t>
    <iref item="DAV:must-be-version-history precondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:must-be-version-history (pre)" primary="true"/>
      (DAV:must-be-version-history): Each member of the DAV:version-history-set
      element in the request body MUST identify a version
      history resource.
  </t>
</list>
</t>

<section title="Example - DAV:locate-by-history Report">

<figure><preamble>&gt;&gt;REQUEST</preamble><artwork type='message/http; msgtype="request"'>
REPORT /ws/public HTTP/1.1
Host: www.webdav.org
Content-Type: text/xml; charset="utf-8"
Content-Length: xxxx

&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;D:locate-by-history xmlns:D="DAV:"&gt;
 &lt;D:version-history-set&gt;
   &lt;D:href&gt;http://repo.webdav.org/his/23&lt;/D:href&gt;
   &lt;D:href&gt;http://repo.webdav.org/his/84&lt;/D:href&gt;
   &lt;D:href&gt;http://repo.webdav.org/his/129&lt;/D:href&gt;
 &lt;D:version-history-set/&gt;
 &lt;D:prop&gt;
   &lt;/D:version-history&gt;
 &lt;/D:prop&gt;
&lt;/D:locate-by-history&gt;
</artwork></figure>
<figure><preamble>&gt;&gt;RESPONSE</preamble><artwork type='message/http; msgtype="response"'>
HTTP/1.1 207 Multi-Status
Content-Type: text/xml; charset="utf-8"
Content-Length: xxxx

&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;D:multistatus xmlns:D="DAV:"&gt;
 &lt;D:response&gt;
   &lt;D:href&gt;http://www.webdav.org/ws/public/x/test.html&lt;/D:href&gt;
   &lt;D:propstat&gt;
     &lt;D:prop&gt;
       &lt;D:version-history&gt;
         &lt;D:href&gt;http://repo.webdav.org/his/23&lt;/D:href&gt;
       &lt;/D:version-history&gt;
     &lt;/D:prop&gt;
     &lt;D:status&gt;HTTP/1.1 200 OK&lt;/D:status&gt;
   &lt;/D:propstat&gt;
 &lt;/D:response&gt;
&lt;/D:multistatus&gt;
</artwork></figure>
<t>
   In this example, there is only one version-controlled member of
   /ws/public that is a version-controlled resource for one of the three
   specified version history resources.  In particular,
   /ws/public/x/test.html is the version-controlled resource for
   http://repo.webdav.org/his/23.
</t>
</section>
</section>

<section title="Additional OPTIONS Semantics">
<iref item="OPTIONS method" subitem="additional semantics with Additional Version-Controlled Resource Properties"/>
<iref item="DAV header" subitem="compliance class 'version-history'" primary="true"/>
<t>
   If the server supports the version-history feature, it MUST include
   "version-history" as a field in the DAV response header from an
   OPTIONS request on any resource that supports any versioning
   properties, reports, or methods.
</t><t>
   A DAV:version-history-collection-set element &MAY; be included in the
   request body to identify collections that may contain version history
   resources.
</t>
<t>
   <iref item="OPTIONS method" subitem="Additional Marshalling"/>
   <x:h>Additional Marshalling:</x:h>
<list><t>
      If an XML request body is included, it MUST be a DAV:options XML
      element.
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT options ANY&gt;
ANY value: A sequence of elements with at most one
DAV:version-history-collection-set element.
</artwork></figure>
  </t><t>
      If an XML response body for a successful request is included, it
      MUST be a DAV:options-response XML element.
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT options-response ANY&gt;
ANY value: A sequence of elements with at most one
DAV:version-history-collection-set element.

&lt;!ELEMENT version-history-collection-set (href*)&gt;
</artwork></figure>
  </t><t>
      If DAV:version-history-collection-set is included in the request
      body, the response body for a successful request MUST contain a
      DAV:version-history-collection-set element identifying collections
      that may contain version histories.  An identified collection &MAY;
      be the root collection of a tree of collections, all of which may
      contain version histories.  Since different servers can control
      different parts of the URL namespace, different resources on the
      same host &MAY; have different DAV:version-history-collection-set
      values.  The identified collections &MAY; be located on different
      hosts from the resource.
  </t>
</list>
</t>
</section>

<section title="Additional DELETE Semantics">
<iref item="DELETE method" subitem="additional semantics with Version-History Feature"/>
<t>
   <iref item="DELETE method" subitem="Additional Postconditions"/>
   <x:h>Additional Postconditions:</x:h>
<list>
  <t>
    <iref item="DAV:delete-version-set postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:delete-version-set (post)" primary="true"/>
      (DAV:delete-version-set): If the request deleted a version
      history, the request MUST have deleted all versions in the
      DAV:version-set of that version history, and MUST have satisfied
      the postconditions for version deletion (see <xref target="additional.delete.semantics"/>).
  </t>
  <t>
    <iref item="DAV:version-history-has-root postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:version-history-has-root (post)" primary="true"/>
      (DAV:version-history-has-root): If the request deleted the root
      version of a version history, the request MUST have updated the
      DAV:root-version of the version history to refer to another
      version that is an ancestor of all other remaining versions in
      that version history.  A result of this postcondition is that
      every version history will have at least one version, and the only
      way to delete all versions is to delete the version history
      resource.
  </t>
</list>
</t>
</section>

<section title="Additional COPY Semantics">
<iref item="COPY method" subitem="additional semantics with Version-History Feature"/>
<t>
   <iref item="COPY method" subitem="Additional Preconditions"/>
   <x:h>Additional Preconditions:</x:h>
<list>
  <t>
    <iref item="DAV:cannot-copy-history postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:cannot-copy-history (post)" primary="true"/>
      (DAV:cannot-copy-history): If the request-URL identifies a version
      history, the request MUST fail.  In order to create another
      version history whose versions have the same content and dead
      properties, the appropriate sequence of VERSION-CONTROL, CHECKOUT,
      PUT, PROPPATCH, and CHECKIN requests must be made.
  </t>
</list>
</t>
</section>

<section title="Additional MOVE Semantics">
<iref item="MOVE method" subitem="additional semantics with Version-History Feature"/>
<t>
  <iref item="MOVE method" subitem="Additional Preconditions"/>
  <x:h>Additional Preconditions:</x:h>
<list>
  <t>
    <iref item="DAV:cannot-rename-history precondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:cannot-rename-history (pre)" primary="true"/>
      (DAV:cannot-rename-history): If the request-URL identifies a
      version history, the request MUST fail.
  </t>
</list>
</t>
</section>

<section title="Additional VERSION-CONTROL Semantics">
<iref item="VERSION-CONTROL method" subitem="additional semantics with Version-History Feature"/>
<t>
   <iref item="VERSION-CONTROL method" subitem="Additional Postconditions"/>
   <x:h>Additional Postconditions:</x:h>
<list>
  <t>
    <iref item="DAV:new-version-history postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:new-version-history (post)" primary="true"/>
      (DAV:new-version-history): If the request created a new version
      history, the request MUST have allocated a new server-defined URL
      for that version history that &MUST-NOT; have previously identified
      any other resource, and &MUST-NOT; ever identify a resource other
      than this version history.
  </t>
</list>
</t>
</section>

<section title="Additional CHECKIN Semantics">
<iref item="CHECKIN method" subitem="additional semantics with Version-History Feature"/>
<t>
   <iref item="CHECKIN method" subitem="Additional Postconditions"/>
   <x:h>Additional Postconditions:</x:h>
<list>
  <t>
    <iref item="DAV:add-to-history postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:add-to-history (post)" primary="true"/>
      (DAV:add-to-history): A URL for the new version resource MUST have
      been added to the DAV:version-set of the version history of the
      DAV:checked-out version.
  </t>
</list>
</t>
</section>
</section>

<section title="Workspace Feature" anchor="workspace.feature"><iref item="Features" subitem="Workspace Feature" primary="true"/><iref item="Workspace Feature" primary="true"/>
<t>
   In order to allow multiple users to work concurrently on adding
   versions to the same version history, it is necessary to allocate on
   the server multiple checked-out resources for the same version
   history.  Even if only one user is making changes to a resource, that
   user will sometimes wish to create a "private" version, and then to
   expose that version at a later time.  One way to provide this
   functionality depends on the client keeping track of its current set
   of checked-out resources.  This is the working-resource feature
   defined in <xref target="label.feature"/>.  The other way to provide this functionality
   avoids the need for persistent state on the client, and instead has
   the server maintain a human meaningful namespace for related sets of
   checked-out resources.  This is the workspace feature defined in this
   section.
</t><t>
   The workspace feature introduces a "workspace resource".  A workspace
   resource is a collection whose members are related version-controlled
   and non-version-controlled resources.  Multiple workspaces may be
   used to expose different versions and configurations of a set of
   version-controlled resources concurrently.  In order to make changes
   to a version-controlled resource in one workspace visible in another
   workspace, that version-controlled resource must be checked in, and
   then the corresponding version-controlled resource in the other
   workspace can be updated to display the content and dead properties
   of the new version.
</t><t>
   In order to ensure unambiguous merging (see <xref target="merge.feature"/>) and
   baselining (see <xref target="baseline.feature"/>) semantics, a workspace may contain at
   most one version-controlled resource for a given version history.
   This is required for unambiguous merging because the MERGE method
   must identify which version-controlled resource is to be the merge
   target of a given version.  This is required for unambiguous
   baselining because a baseline can only select one version for a given
   version-controlled resource.
</t><t>
   Initially, an empty workspace can be created.  Non-version-controlled
   resources can then be added to the workspace with standard WebDAV
   requests such as PUT and MKCOL.  Version-controlled resources can be
   added to the workspace with VERSION-CONTROL requests.  If the
   baseline feature is supported, collections in the workspace can be
   placed under baseline control, and then initialized by existing
   baselines.
</t>

<section title="Workspace Properties">
<t>
   The workspace feature introduces the following &REQUIRED; property for
   a workspace.
</t>

<section title="DAV:workspace-checkout-set (computed)" anchor="PROPERTY_workspace-checkout-set">
<iref item="DAV:workspace-checkout-set property" primary="true"/>
<iref item="Properties" subitem="DAV:workspace-checkout-set" primary="true"/>
<t>
   This property identifies each checked-out resource whose
   DAV:workspace property identifies this workspace.
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT workspace-checkout-set (href*)&gt;
</artwork></figure>
</t>
</section>
</section>

<section title="Additional Resource Properties">
<t>
   The workspace feature introduces the following &REQUIRED; property for
   a WebDAV resource.
</t>

<section title="DAV:workspace (protected)" anchor="PROPERTY_workspace">
<iref item="DAV:workspace property" primary="true"/>
<iref item="Properties" subitem="DAV:workspace" primary="true"/>
<t>
   The DAV:workspace property of a workspace resource MUST identify
   itself.  The DAV:workspace property of any other type of resource
   MUST be the same as the DAV:workspace of its parent collection.
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT workspace (href)&gt;
</artwork></figure>
</t>
</section>
</section>

<section title="MKWORKSPACE Method" anchor="METHOD_MKWORKSPACE">
<iref item="MKWORKSPACE method" primary="true"/>
<iref item="Methods" subitem="MKWORKSPACE" primary="true"/>
<t>
   A MKWORKSPACE request creates a new workspace resource.  A server &MAY;
   restrict workspace creation to particular collections, but a client
   can determine the location of these collections from a
   DAV:workspace-collection-set OPTIONS request (see <xref target="additional.options.semantics.with.workspace.feature"/>).
</t><t>
   If a MKWORKSPACE request fails, the server state preceding the
   request MUST be restored.
</t>
<t>
  <iref item="MKWORKSPACE method" subitem="Marshalling"/>
  <x:h>Marshalling:</x:h>
<list><t>
      If a request body is included, it MUST be a DAV:mkworkspace XML
      element.
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT mkworkspace ANY&gt;
</artwork></figure>
</t>
<t>
      If a response body for a successful request is included, it MUST
      be a DAV:mkworkspace-response XML element.
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT mkworkspace-response ANY&gt;
</artwork></figure>
</t>
<t>
      The response MUST include a Cache-Control:no-cache header.
</t>
</list>
</t>
<t>
  <iref item="MKWORKSPACE method" subitem="Preconditions"/>
  <x:h>Preconditions:</x:h>
<list>
  <t>
    <iref item="DAV:resource-must-be-null precondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:resource-must-be-null (pre)" primary="true"/>
      (DAV:resource-must-be-null): A resource &MUST-NOT; exist at the
      request-URL.
  </t>
  <t>
    <iref item="DAV:workspace-location-ok precondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:workspace-location-ok (pre)" primary="true"/>
      (DAV:workspace-location-ok): The request-URL MUST identify a
      location where a workspace can be created.
  </t>
</list>
</t>
<t>
   <iref item="MKWORKSPACE method" subitem="Postconditions"/>
   <x:h>Postconditions:</x:h>
<list>
  <t>
    <iref item="DAV:initialize-workspace postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:initialize-workspace (post)" primary="true"/>
      (DAV:initialize-workspace): A new workspace exists at the
      request-URL.  The DAV:resourcetype of the workspace MUST be
      DAV:collection.  The DAV:workspace of the workspace MUST identify
      the workspace.
  </t>
</list>
</t>

<section title="Example - MKWORKSPACE">

<figure><preamble>&gt;&gt;REQUEST</preamble><artwork type='message/http; msgtype="request"'>
MKWORKSPACE /ws/public HTTP/1.1
Host: www.webdav.org
Content-Length: 0
</artwork></figure><figure><preamble>&gt;&gt;RESPONSE</preamble><artwork type='message/http; msgtype="response"'>
HTTP/1.1 201 Created
Cache-Control: no-cache
</artwork></figure>
<t>
   In this example, a new workspace is created at
   http://www.webdav.org/ws/public.
</t>
</section>
</section>

<section title="Additional OPTIONS Semantics" anchor="additional.options.semantics.with.workspace.feature">
<iref item="OPTIONS method" subitem="additional semantics with Workspace Feature"/>
<iref item="DAV header" subitem="compliance class 'workspace'" primary="true"/>
<t>
   If a server supports the workspace feature, it MUST include
   "workspace" as a field in the DAV response header from an OPTIONS
   request on any resource that supports any versioning properties,
   reports, or methods.
</t><t>
   If a server supports the workspace feature, it MUST also support the
   checkout-in-place feature and the version-history feature.
</t><t>
   A DAV:workspace-collection-set element &MAY; be included in the request
   body to identify collections that may contain workspace resources.
</t>
<t>
   <iref item="OPTIONS method" subitem="Additional Marshalling"/>
   <x:h>Additional Marshalling:</x:h>
<list><t>
      If an XML request body is included, it MUST be a DAV:options XML
      element.
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT options ANY&gt;
ANY value: A sequence of elements with at most one
DAV:workspace-collection-set element.
</artwork></figure>
</t>
<t>
      If an XML response body for a successful request is included, it
      MUST be a DAV:options-response XML element.
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT options-response ANY&gt;
ANY value: A sequence of elements with at most one
DAV:workspace-collection-set element.

&lt;!ELEMENT workspace-collection-set (href*)&gt;
</artwork></figure>
</t>
<t>
      If DAV:workspace-collection-set is included in the request body,
      the response body for a successful request MUST contain a
      DAV:workspace-collection-set element identifying collections that
      may contain workspaces.  An identified collection &MAY; be the root
      collection of a tree of collections, all of which may contain
      workspaces.  Since different servers can control different parts
      of the URL namespace, different resources on the same host &MAY;
      have different DAV:workspace-collection-set values.  The
      identified collections &MAY; be located on different hosts from the
      resource.
</t>
</list>
</t>

<section title="Example - OPTIONS">

<figure><preamble>&gt;&gt;REQUEST</preamble><artwork type='message/http; msgtype="request"'>
OPTIONS /doc HTTP/1.1
Host: www.webdav.org
Content-Type: text/xml; charset="utf-8"
Content-Length: xxxx

&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;D:options xmlns:D="DAV:"&gt;
  &lt;D:version-history-collection-set/&gt;
  &lt;D:workspace-collection-set/&gt;
&lt;/D:options&gt;
</artwork></figure><figure><preamble>&gt;&gt;RESPONSE</preamble><artwork type='message/http; msgtype="response"'>
HTTP/1.1 200 OK
DAV: 1
DAV: version-control,checkout-in-place,version-history,workspace
Content-Type: text/xml; charset="utf-8"
Content-Length: xxxx

&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;D:options-response xmlns:D="DAV:"&gt;
  &lt;D:version-history-collection-set&gt;
    &lt;D:href&gt;http://repo.webdav.org/his&lt;/D:href&gt;
  &lt;/D:version-history-collection-set&gt;
  &lt;D:workspace-collection-set&gt;
    &lt;D:href&gt;http://www.webdav.org/public/ws&lt;/D:href&gt;
    &lt;D:href&gt;http://www.webdav.org/private/ws&lt;/D:href&gt;
  &lt;/D:workspace-collection-set&gt;
&lt;/D:options-response&gt;
</artwork></figure>
<t>
   In this example, the server indicates that it provides Class 1 DAV
   support and basic-server-workspace versioning support.  In addition,
   the server indicates the requested locations of the version history
   resources and the workspace resources.
</t>
</section>
</section>

<section title="Additional DELETE Semantics">
<iref item="DELETE method" subitem="additional semantics with Workspace Feature"/>
<t>
   <iref item="DELETE method" subitem="Additional Postconditions"/>
   <x:h>Additional Postconditions:</x:h>
<list>
  <t>
    <iref item="DAV:delete-workspace-members postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:delete-workspace-members (post)" primary="true"/>
      (DAV:delete-workspace-members): If a workspace is deleted, any
      resource that identifies that workspace in its DAV:workspace
      property MUST be deleted.
  </t>
</list>
</t>
</section>

<section title="Additional MOVE Semantics">
<iref item="MOVE method" subitem="additional semantics with Workspace Feature"/>
<t>
   <iref item="MOVE method" subitem="Additional Postconditions"/>
   <x:h>Additional Postconditions:</x:h>
<list>
  <t>
    <iref item="DAV:workspace-member-moved postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:workspace-member-moved (post)" primary="true"/>
      (DAV:workspace-member-moved): If the request-URL did not identify
      a workspace, the DAV:workspace of the destination MUST have been
      updated to have the same value as the DAV:workspace of the parent
      collection of the destination.
  </t>
  <t>
    <iref item="DAV:workspace-moved postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:workspace-moved (post)" primary="true"/>
      (DAV:workspace-moved): If the request-URL identified a workspace,
      any reference to that workspace in a DAV:workspace property MUST
      have been updated to refer to the new location of that workspace.
  </t>
</list>
</t>
</section>

<section title="Additional VERSION-CONTROL Semantics">
<iref item="VERSION-CONTROL method" subitem="additional semantics with Workspace Feature"/>
<t>
   A VERSION-CONTROL request can be used to create a new version-controlled
   resource for an existing version history.  This allows the
   creation of version-controlled resources for the same version history
   in multiple workspaces.
</t>
<t>
   <iref item="VERSION-CONTROL method" subitem="Additional Marshalling"/>
   <x:h>Additional Marshalling:</x:h>
<list><t>
<figure><artwork type="application/xml-dtd">
&lt;!ELEMENT version-control ANY&gt;
ANY value: A sequence of elements with at most one DAV:version
element.

&lt;!ELEMENT version (href)&gt;
</artwork></figure>
</t>
</list>
</t>
<t>
   <iref item="VERSION-CONTROL method" subitem="Additional Preconditions"/>
   <x:h>Additional Preconditions:</x:h>
<list>
  <t>
    <iref item="DAV:cannot-add-to-existing-history precondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:cannot-add-to-existing-history (pre)" primary="true"/>
      (DAV:cannot-add-to-existing-history): If the DAV:version-control
      request body element contains a DAV:version element, the request-URL
      &MUST-NOT; identify a resource.
  </t>
  <t>
    <iref item="DAV:must-be-version precondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:must-be-version (pre)" primary="true"/>
      (DAV:must-be-version): The DAV:href of the DAV:version element
      MUST identify a version.
  </t>
  <t>
    <iref item="DAV:one-version-controlled-resource-per-history-per-workspace precondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:one-version-controlled-resource-per-history-per-workspace (pre)" primary="true"/>
      (DAV:one-version-controlled-resource-per-history-per-workspace):
      If the DAV:version-control request body specifies a version, and
      if the request-URL is a member of a workspace, then there &MUST-NOT;
      already be a version-controlled member of that workspace whose
      DAV:checked-in or DAV:checked-out property identifies any version
      from the version history of the version specified in the request
      body.
  </t>
</list>
</t>
<t>
   <iref item="VERSION-CONTROL method" subitem="Additional Postconditions"/>
   <x:h>Additional Postconditions:</x:h>
<list>
  <t>
    <iref item="DAV:new-version-controlled-resource postcondition" primary="true"/>
    <iref item="Condition Names" subitem="DAV:new-version-controlled-resource (post)" primary="true"/>
      (DAV:new-version-controlled-resource): If the request-URL did NOT
      identify a resource, a new version-controlled resource exists at
      the request-URL whose content and dead properties are initialized
      by those of the version in the request body, and whose
      DAV:checked-in property identifies that version.
  </t>
</list>
</t>

<section title="Example - VERSION-CONTROL (using an existing version history)">

<figure><preamble>&gt;&gt;REQUEST</preamble><artwork type='message/http; msgtype="request"'>
VERSION-CONTROL /ws/public/bar.html HTTP/1.1
Host: www.webdav.org
Content-Type: text/xml; charset="utf-8"
Content-Length: xxxx

&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;D:version-control xmlns:D="DAV:"&gt;
  &lt;D:version&gt;
    &lt;D:href&gt;http://repo.webdav.org/his/12/ver/V3&lt;/D:href&gt;
  &lt;/D:version&gt;
&lt;/D:version-control&gt;
</artwork></figure><figure><preamble>&gt;&gt;RESPONSE</preamble><artwork type='message/http; msgtype="response"'>
HTTP/1.1 201 Created
Cache-Control: no-cache
</artwork></figure>
<t>
   In this example, a new version-controlled resource is created at
   /ws/public/bar.html.  The content and dead properties of the new
   version-controlled resource are initialized to be the same as those
   of the version identified by http://repo.webdav.org/his/12/ver/V3.
</t>
</section>
</section>
</section>

<section title="UPDATE Feature"><iref item="Features" subitem="UPDATE Feature" primary="true"/><iref item="UPDATE Feature" primary="true"/>
<t>
   The