DAV/Properties/DAV:href

From Davical
Jump to: navigation, search

Purpose

MUST contain a URI or a relative reference.

Description

There may be limits on the value of 'href' depending on the context of its use. Refer to the specification text where 'href' is used to see what limitations apply in each case.

Although the 'href' property is widely used, there is wide latitude for interpretation. As such, the 'href' property is more of a datatype, with individual validation rules, than a defined property. There are two primary scenarios for the use of 'href':

  • As a resource key, referring to a unique location within the DAV hierarchy.
  • As a data type, wrapping the value of a property which is a URI or relative reference.

<!ELEMENT href (#PCDATA)>

Examples

Wrapping a property value which is a URI:

<C:recipient><href>mailto:boojum@example.com</href></C:recipient>

Providing a key to a unique location:

<response>
 <href>/caldav.php/user1/</href>
 <propstat>
  <prop>
   <getcontenttype>httpd/unix-directory</getcontenttype>
   <getcontentlength/>
   <resourcetype>
    <collection/>
    <principal/>
   </resourcetype>
  </prop>
  <status>HTTP/1.1 200 OK</status>
 </propstat>
</response>