[CalendarServer-changes] [9822] CalendarServer/trunk

source_changes at macosforge.org source_changes at macosforge.org
Wed Sep 19 10:16:32 PDT 2012


Revision: 9822
          http://trac.calendarserver.org//changeset/9822
Author:   cdaboo at apple.com
Date:     2012-09-19 10:16:32 -0700 (Wed, 19 Sep 2012)
Log Message:
-----------
Update spec and fix element schema.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/customxml.py

Added Paths:
-----------
    CalendarServer/trunk/doc/Extensions/caldav-sharing.txt
    CalendarServer/trunk/doc/Extensions/caldav-sharing.xml

Removed Paths:
-------------
    CalendarServer/trunk/doc/Extensions/caldav-sharing-02.txt
    CalendarServer/trunk/doc/Extensions/caldav-sharing-02.xml

Deleted: CalendarServer/trunk/doc/Extensions/caldav-sharing-02.txt
===================================================================
--- CalendarServer/trunk/doc/Extensions/caldav-sharing-02.txt	2012-09-19 14:59:42 UTC (rev 9821)
+++ CalendarServer/trunk/doc/Extensions/caldav-sharing-02.txt	2012-09-19 17:16:32 UTC (rev 9822)
@@ -1,1736 +0,0 @@
-
-
-
-Calendar Server Extension                                       C. Daboo
-                                                                 E. York
-                                                              Apple Inc.
-                                                         October 6, 2010
-
-
-                Shared and Published Calendars in CalDAV
-
-Abstract
-
-   This specification defines an extension to CalDAV that enables the
-   sharing of calendars between users on a CalDAV server.
-
-
-Table of Contents
-
-   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
-   2.  Conventions Used in This Document  . . . . . . . . . . . . . .  3
-   3.  Overview . . . . . . . . . . . . . . . . . . . . . . . . . . .  4
-   4.  Notifications  . . . . . . . . . . . . . . . . . . . . . . . .  5
-     4.1.  Additional Principal Properties  . . . . . . . . . . . . .  5
-       4.1.1.  CS:notification-URL Property . . . . . . . . . . . . .  6
-     4.2.  Properties on Notification Resources . . . . . . . . . . .  6
-       4.2.1.  CS:notificationtype Property . . . . . . . . . . . . .  6
-   5.  Shared Calendaring . . . . . . . . . . . . . . . . . . . . . .  7
-     5.1.  Feature Discovery  . . . . . . . . . . . . . . . . . . . .  7
-     5.2.  Additional Properties for Calendars  . . . . . . . . . . .  7
-       5.2.1.  DAV:resourcetype Property  . . . . . . . . . . . . . .  7
-       5.2.2.  CS:invite Property . . . . . . . . . . . . . . . . . .  8
-       5.2.3.  CS:allowed-sharing-modes Property  . . . . . . . . . .  8
-       5.2.4.  CS:shared-url Property . . . . . . . . . . . . . . . .  9
-     5.3.  Sharer Actions on Shared Calendars . . . . . . . . . . . .  9
-       5.3.1.  Creating a Shared Calendar . . . . . . . . . . . . . .  9
-         5.3.1.1.  Example: Successful MKCALENDAR Request . . . . . . 10
-         5.3.1.2.  Example: Successful Extended MKCOL Request . . . . 10
-       5.3.2.  Sharing an Existing Calendar . . . . . . . . . . . . . 11
-         5.3.2.1.  Example: Successful PROPPATCH Request  . . . . . . 11
-       5.3.3.  Manipulating Sharees of a Shared Calendar  . . . . . . 12
-         5.3.3.1.  Example: Successful Sharee Add Request . . . . . . 13
-         5.3.3.2.  Example: Successful Multiple Sharee Change
-                   Request  . . . . . . . . . . . . . . . . . . . . . 14
-     5.4.  Sharee Actions on Shared Calendars . . . . . . . . . . . . 15
-       5.4.1.  Replying to a Sharing Invite . . . . . . . . . . . . . 15
-       5.4.2.  Removing a Shared Calendar . . . . . . . . . . . . . . 16
-     5.5.  General Considerations . . . . . . . . . . . . . . . . . . 16
-       5.5.1.  Access Levels  . . . . . . . . . . . . . . . . . . . . 16
-       5.5.2.  Allowing or Disallowing Sharing  . . . . . . . . . . . 16
-       5.5.3.  Per-user WebDAV Properties . . . . . . . . . . . . . . 17
-
-
-
-Daboo & York                                                    [Page 1]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-       5.5.4.  Per-user Calendar Data . . . . . . . . . . . . . . . . 17
-       5.5.5.  Scheduling . . . . . . . . . . . . . . . . . . . . . . 18
-   6.  XML Element Definitions  . . . . . . . . . . . . . . . . . . . 19
-     6.1.  CS:shared-owner  . . . . . . . . . . . . . . . . . . . . . 19
-     6.2.  CS:shared  . . . . . . . . . . . . . . . . . . . . . . . . 20
-     6.3.  CS:can-be-shared . . . . . . . . . . . . . . . . . . . . . 20
-     6.4.  CS:can-be-published  . . . . . . . . . . . . . . . . . . . 21
-     6.5.  CS:user  . . . . . . . . . . . . . . . . . . . . . . . . . 21
-     6.6.  CS:invite-noresponse . . . . . . . . . . . . . . . . . . . 21
-     6.7.  CS:invite-deleted  . . . . . . . . . . . . . . . . . . . . 22
-     6.8.  CS:invite-accepted . . . . . . . . . . . . . . . . . . . . 22
-     6.9.  CS:invite-declined . . . . . . . . . . . . . . . . . . . . 22
-     6.10. CS:invite-invalid  . . . . . . . . . . . . . . . . . . . . 23
-     6.11. CS:access  . . . . . . . . . . . . . . . . . . . . . . . . 23
-     6.12. CS:read  . . . . . . . . . . . . . . . . . . . . . . . . . 24
-     6.13. CS:read-write  . . . . . . . . . . . . . . . . . . . . . . 24
-     6.14. CS:summary . . . . . . . . . . . . . . . . . . . . . . . . 24
-     6.15. CS:invite-notification . . . . . . . . . . . . . . . . . . 25
-     6.16. CS:uid . . . . . . . . . . . . . . . . . . . . . . . . . . 25
-     6.17. CS:hosturl . . . . . . . . . . . . . . . . . . . . . . . . 25
-     6.18. CS:organizer . . . . . . . . . . . . . . . . . . . . . . . 26
-     6.19. CS:common-name . . . . . . . . . . . . . . . . . . . . . . 26
-     6.20. CS:invite-reply  . . . . . . . . . . . . . . . . . . . . . 26
-     6.21. CS:in-reply-to . . . . . . . . . . . . . . . . . . . . . . 27
-     6.22. CS:notification  . . . . . . . . . . . . . . . . . . . . . 27
-     6.23. CS:dtstamp . . . . . . . . . . . . . . . . . . . . . . . . 28
-     6.24. CS:share . . . . . . . . . . . . . . . . . . . . . . . . . 28
-     6.25. CS:set . . . . . . . . . . . . . . . . . . . . . . . . . . 28
-     6.26. CS:remove  . . . . . . . . . . . . . . . . . . . . . . . . 29
-     6.27. CS:shared-as . . . . . . . . . . . . . . . . . . . . . . . 29
-   7.  Security Considerations  . . . . . . . . . . . . . . . . . . . 29
-   8.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 29
-   9.  Acknowledgments  . . . . . . . . . . . . . . . . . . . . . . . 30
-   10. Normative References . . . . . . . . . . . . . . . . . . . . . 30
-   Appendix A.  Change History  . . . . . . . . . . . . . . . . . . . 30
-   Appendix B.  Change History  . . . . . . . . . . . . . . . . . . . 30
-   Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 31
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Daboo & York                                                    [Page 2]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-1.  Introduction
-
-   CalDAV [RFC4791] provides a way for calendar users to store calendar
-   data and exchange this data via scheduling operations.  Based on the
-   WebDAV [RFC4918] protocol, it also includes the ability to manage
-   access to calendar data via the WebDAV ACL [RFC3744] extension.
-
-   WebDAV ACL [RFC3744] provides a way to manage fine-grained access
-   controls on WebDAV resources.  Whilst this could be used directly to
-   manage sharing of calendars, experience has shown that client
-   developers are averse to using it due to its complexity.  Instead a
-   simpler process for sharing calendars is preferred.
-
-   This extension defines a way for individual calendar users to share
-   calendars with other users.  This is done via an "opt-in" process in
-   which a sharing invite is sent from the sharer to a sharee, allowing
-   the sharee to accept or decline.  If the sharee accepts the sharing
-   invite, the shared calendar is made available to them in their own
-   calendar home collection (i.e., alongside their own personal
-   calendars).  HTTP POST operations are used to manage the sharing
-   invitations and replies, and WebDAV properties are used to expose the
-   state of shared calendars.
-
-
-2.  Conventions Used in This Document
-
-   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 [RFC2119].
-
-   When XML element types in the namespaces "DAV:" and
-   "urn:ietf:params:xml:ns:caldav" are referenced in this document
-   outside of the context of an XML fragment, the string "DAV:" and
-   "CALDAV:" will be prefixed to the element type names respectively.
-
-   The namespace "http://calendarserver.org/ns/" is used for XML
-   elements defined in this specification.  When XML element types in
-   that namespace are referenced in this document outside of the context
-   of an XML fragment, the string "CS:" will be prefixed to the element
-   type names.
-
-   Terms Used:
-
-   Sharer  A calendar user who is sharing a calendar with other calendar
-      users.
-
-
-
-
-
-
-Daboo & York                                                    [Page 3]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-   Sharee  A calendar user to whom a calendar has been shared.
-
-   Sharing Invite  A message sent by a sharer to a sharee to indicate
-      the status of a shared calendar.
-
-   Sharing Reply  A message sent by a sharee to a sharer to indicate the
-      status of a shared calendar.
-
-
-3.  Overview
-
-   This section provides a basic overview of this protocol by way of a
-   simple use case of a sharer sharing a calendar with a single sharee.
-
-   To share a calendar with another user, the sharer's client executes
-   an HTTP POST request against the calendar collection resource for the
-   calendar to be shared.  The POST request body will contain details of
-   the calendar user to whom the calendar is to be shared as well as the
-   access right to be granted to them.  If the request succeeds, a
-   notification is sent to the sharee with details of the calendar being
-   shared to them.
-
-   The sharer's client will show the notification to the sharee and
-   present them with the choice to accept or decline the invitation to
-   the shared calendar.  If the sharee chooses to decline, then nothing
-   changes for that sharee.  If the sharee chooses to accept, then the
-   server automatically creates a new calendar collection resource in
-   the sharee's calendar home collection, and ensures that calendar
-   provides a mapping to the actual shared calendar of the sharer.  Thus
-   the shared calendar is available to the sharee as just another
-   calendar in their calendar home.  The server enforces the appropriare
-   access privileges for the sharee.
-
-   At any time, the sharer can inspect properties on the calendar
-   collection being shared, and determine the accept/decline status of
-   each sharee.  Additional sharees can be added and existing ones
-   removed.  The access privileges for existing sharees can also be
-   changed.
-
-   Once a sharee has a shared calendar set to appear in their calendar
-   home collection, they can remove it and decline the sharing invite by
-   simply having their client issue an HTTP DELETE request on the shared
-   calendar collection.  That does not delete any calendar data, but
-   rather simply removes the "link" to the sharer's calendar collection
-   and sets the sharee's inviate status to declined.
-
-
-
-
-
-
-Daboo & York                                                    [Page 4]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-4.  Notifications
-
-   In order to facilitate the process of sharing invitations, this
-   specification defines a new generic notification mechanism for CalDAV
-   servers.  When this feature is available, a CS:notification-URL
-   (Section 4.1.1) property appears on principal resources for those
-   principals who are able to receive notifications.  That property
-   specifies a single DAV:href element whose content refers to a WebDAV
-   collection resource.  Notification "messages" are deposited into this
-   collection and can be retrieved by clients and acted on accordingly.
-
-   The notification collection referenced by the CS:notification-URL
-   (Section 4.1.1) property MUST have a DAV:resourcetype property with
-   DAV:collection and CS:notification (Section 6.22) child elements.
-
-   Notification "messages" are XML documents stored as resources in the
-   notification collection.  Each XML document contains a CS:
-   notification (Section 6.22) element as its root.  The root element
-   contains a CS:dtstamp (Section 6.23) element, and one additional
-   element which represents the type of notification being conveyed in
-   the message.  That child element will typically contain additional
-   content that describes the notification.
-
-   Each notification resource has a CS:notificationtype (Section 4.2.1)
-   property which contains as its single child element an empty element
-   that matches the child element of the notification resource XML
-   document root.  Any attributes on the child element in the XML
-   document are also present in the property child element.
-
-   Notifications are automatically generated by the server (perhaps in
-   response to a client action) with an appropriate resource stored in
-   the notifications collection of the user to whom the notification is
-   targeted.  Clients SHOULD monitor the notification collection looking
-   for new notification resources.  When doing so, clients SHOULD look
-   at the CS:notificationtype (Section 4.2.1) property to ensure that
-   the notification is of a type that the client can handle.  Once a
-   client has handled the notification in whatever way is appropriate it
-   SHOULD delete the notification resource.  Servers MAY delete
-   notification resources on their own if they determine that the
-   notifications are no longer relevant or valid.  Servers MAY coalesce
-   notifications as appropriate.
-
-4.1.  Additional Principal Properties
-
-   This section defines new properties for WebDAV principal resources as
-   defined in RFC3744 [RFC3744].  These properties are likely to be
-   protected but the server MAY allow them to be written by appropriate
-   users.
-
-
-
-Daboo & York                                                    [Page 5]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-4.1.1.  CS:notification-URL Property
-
-   Name:  notification-URL
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Identify the URL of the notification collection owned by
-      the associated principal resource.
-
-   Protected:  This property SHOULD be protected.
-
-   PROPFIND behavior:  This property SHOULD NOT be returned by a
-      PROPFIND allprop request (as defined in Section 14.2 of
-      [RFC4918]).
-
-   COPY/MOVE behavior:  This property value SHOULD be preserved in COPY
-      and MOVE operations.
-
-   Description:  This property is needed for a client to determine where
-      the notification collection of the current user is located so that
-      processing of notification messages can occur.  If not present,
-      then the associated calendar user is not enabled for notification
-      messages on the server.
-
-   Definition:
-
-   <!ELEMENT notification-URL (DAV:href)>
-
-4.2.  Properties on Notification Resources
-
-   The following new WebDAV properties are defined for notification
-   resources.
-
-4.2.1.  CS:notificationtype Property
-
-   Name:  notificationtype
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Identify the type of notification of the corresponding
-      resource.
-
-   Protected:  This property MUST be protected.
-
-   PROPFIND behavior:  This property SHOULD NOT be returned by a
-      PROPFIND allprop request (as defined in Section 14.2 of
-      [RFC4918]).
-
-
-
-
-Daboo & York                                                    [Page 6]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-   COPY/MOVE behavior:  This property value MUST be preserved in COPY
-      and MOVE operations.
-
-   Description:  This property allows a client, via a PROPFIND Depth:1
-      request, to quickly find notification messages that the client can
-      handle in a notification collection.  The single child element is
-      the notification resource root element's child defining the
-      notification itself.  This element MUST be empty, though any
-      attributes on the element in the notification resource MUST be
-      present in the property element.
-
-   Definition:
-
-   <!ELEMENT notificationtype (invite-notification | invite-reply)>
-   <!-- Child elements are empty but will have appropriate attributes.
-        Any valid notification message child element can appear.-->
-
-
-5.  Shared Calendaring
-
-5.1.  Feature Discovery
-
-   A server that supports the features described in this document MUST
-   include "calendarserver-sharing" as a field in the DAV response
-   header from an OPTIONS request on any resource that supports these
-   features.
-
-5.2.  Additional Properties for Calendars
-
-   The following new or modified WebDAV properties are defined for
-   calendar collections and used to view or manipulate shared calendar
-   features.
-
-5.2.1.  DAV:resourcetype Property
-
-   Calendar collections that are shared have addition elements listed in
-   their DAV:resourcetype property in addition to DAV:collection and
-   CALDAV:calendar.
-
-   o  CS:shared-owner (Section 6.1): used to indicate that the calendar
-      is owned by the current user and is being shared by them.
-
-   o  CS:shared (Section 6.2): used to indicate that the calendar is
-      owned by another user and is being shared to the current user.
-
-
-
-
-
-
-
-Daboo & York                                                    [Page 7]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-5.2.2.  CS:invite Property
-
-   Name:  invite
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Used to show to whom a calendar has been shared.
-
-   Protected:  This property MUST be protected.
-
-   PROPFIND behavior:  This property SHOULD NOT be returned by a
-      PROPFIND allprop request (as defined in Section 14.2 of
-      [RFC4918]).
-
-   COPY/MOVE behavior:  This property value MUST be preserved in COPY
-      and MOVE operations.
-
-   Description:  This WebDAV property is present on a calendar
-      collection resource that has been shared by the owner.  It MUST
-      NOT appear on the calendar collection resources of the sharees of
-      the calendar.  It provides a list of users to whom the calendar
-      has been shared, along with the "status" of the sharing invites
-      sent to each user.
-
-   Definition:
-
-   <!ELEMENT invite (user*)>
-
-5.2.3.  CS:allowed-sharing-modes Property
-
-   Name:  allowed-sharing-modes
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Used to show which modes of sharing are supported on a
-      calendar collection.
-
-   Protected:  This property MUST be protected.
-
-   PROPFIND behavior:  This property SHOULD NOT be returned by a
-      PROPFIND allprop request (as defined in Section 14.2 of
-      [RFC4918]).
-
-   COPY/MOVE behavior:  This property value MUST be preserved in COPY
-      and MOVE operations.
-
-
-
-
-
-
-Daboo & York                                                    [Page 8]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-   Description:  This WebDAV property is present on a calendar
-      collection resource that can been shared or published.  It
-      provides a list of options indicating what sharing modes are
-      allowed as per Section 5.5.2.
-
-   Definition:
-
-   <!ELEMENT allowed-sharing-modes
-             (can-be-shared?, can-be-published?)>
-
-5.2.4.  CS:shared-url Property
-
-   Name:  shared-url
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Indicates the URL of the owner's copy of a shared calendar.
-
-   Protected:  This property MUST be protected.
-
-   PROPFIND behavior:  This property SHOULD NOT be returned by a
-      PROPFIND allprop request (as defined in Section 14.2 of
-      [RFC4918]).
-
-   COPY/MOVE behavior:  This property value MUST be preserved in COPY
-      and MOVE operations.
-
-   Description:  This WebDAV property is present on a shared calendar
-      collection resource that appears in a sharee's calendar home
-      collection.  Its content is a single DAV:href element whose value
-      is the URL of the sharer's calendar being shared.
-
-   Definition:
-
-   <!ELEMENT shared-url (DAV:href)>
-
-5.3.  Sharer Actions on Shared Calendars
-
-5.3.1.  Creating a Shared Calendar
-
-   To create a shared calendar, clients use the MKCALENDAR [RFC4791] or
-   extended MKCOL [RFC5689] requests, and include a DAV:resourcetype
-   property to be set upon creation.  That property MUST contain DAV:
-   collection, CALDAV:calendar and CS:shared-owner child elements to
-   enable sharing.
-
-
-
-
-
-
-Daboo & York                                                    [Page 9]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-5.3.1.1.  Example: Successful MKCALENDAR Request
-
-   This example shows how the MKCALENDAR request is used to create a
-   shared calendar collection.  The response body is empty as the
-   request completed successfully.
-
-   >> Request <<
-
-   MKCALENDAR /calendars/users/cyrus/shared/ HTTP/1.1
-   Host: calendar.example.com
-   Content-Type: application/xml; charset="utf-8"
-   Content-Length: xxxx
-
-   <?xml version="1.0" encoding="utf-8" ?>
-   <C:mkcalendar xmlns:D="DAV:"
-                 xmlns:C="urn:ietf:params:xml:ns:caldav"
-                 xmlns:CS="http://calendarserver.org/ns/">
-     <D:set>
-       <D:prop>
-         <D:resourcetype>
-           <D:collection/>
-           <C:calendar/>
-           <CS:shared-owner/>
-         </D:resourcetype>
-       </D:prop>
-     </D:set>
-   </C:mkcalendar>
-
-   >> Response <<
-
-   HTTP/1.1 201 Created
-   Cache-Control: no-cache
-   Date: Sat, 11 Nov 2006 09:32:12 GMT
-
-5.3.1.2.  Example: Successful Extended MKCOL Request
-
-   This example shows how the extended MKCOL request is used to create a
-   shared calendar collection.  The response body is empty as the
-   request completed successfully.
-
-
-
-
-
-
-
-
-
-
-
-
-Daboo & York                                                   [Page 10]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-   >> Request <<
-
-   MKCOL /calendars/users/cyrus/shared/ HTTP/1.1
-   Host: calendar.example.com
-   Content-Type: application/xml; charset="utf-8"
-   Content-Length: xxxx
-
-   <?xml version="1.0" encoding="utf-8" ?>
-   <D:mkcol xmlns:D="DAV:"
-                 xmlns:C="urn:ietf:params:xml:ns:caldav"
-                 xmlns:CS="http://calendarserver.org/ns/">
-     <D:set>
-       <D:prop>
-         <D:resourcetype>
-           <D:collection/>
-           <C:calendar/>
-           <CS:shared-owner/>
-         </D:resourcetype>
-       </D:prop>
-     </D:set>
-   </D:mkcol>
-
-   >> Response <<
-
-   HTTP/1.1 201 Created
-   Cache-Control: no-cache
-   Date: Sat, 11 Nov 2006 09:32:12 GMT
-
-5.3.2.  Sharing an Existing Calendar
-
-   Sharing an existing calendar can be accomplished in two ways.  One
-   option is to use a PROPPATCH request to set the DAV:resourcetype
-   property to include CS:shared-owner as a child element.  Another
-   option is to add sharee's directly to the calendar collection (as
-   described in Section 5.3.3) - that action MUST upgrade a non-shared
-   calendar to a shared calendar when it completes successfully,
-   assuming that such an upgrade is allowed as per Section 5.5.2.
-
-5.3.2.1.  Example: Successful PROPPATCH Request
-
-   This example shows how the PROPPATCH request is used to upgrade to a
-   shared calendar collection.
-
-
-
-
-
-
-
-
-
-Daboo & York                                                   [Page 11]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-   >> Request <<
-
-   PROPPATCH /calendars/users/cyrus/shared/ HTTP/1.1
-   Host: calendar.example.com
-   Content-Type: application/xml; charset="utf-8"
-   Content-Length: xxxx
-
-   <?xml version="1.0" encoding="utf-8" ?>
-   <D:propertyupdate xmlns:D="DAV:"
-                 xmlns:C="urn:ietf:params:xml:ns:caldav"
-                 xmlns:CS="http://calendarserver.org/ns/">
-     <D:set>
-       <D:prop>
-         <D:resourcetype>
-           <D:collection/>
-           <C:calendar/>
-           <CS:shared-owner/>
-         </D:resourcetype>
-       </D:prop>
-     </D:set>
-   </D:propertyupdate>
-
-   >> Response <<
-
-   HTTP/1.1 207 Multi-Status
-   Date: Sat, 11 Nov 2006 09:32:12 GMT
-   Content-Type: application/xml; charset="utf-8"
-   Content-Length: xxxx
-
-   <?xml version="1.0" encoding="utf-8" ?>
-   <D:multistatus xmlns:D="DAV:">
-     <D:response>
-       <D:href>/calendars/users/cyrus/shared/</D:href>
-       <D:propstat>
-         <D:prop>
-           <D:resourcetype/>
-         </D:prop>
-         <D:status>HTTP/1.1 200 OK</D:status>
-       </D:propstat>
-     </D:response>
-   </D:multistatus>
-
-5.3.3.  Manipulating Sharees of a Shared Calendar
-
-   The sharer of a shared calendar is able to manipulate the sharee list
-   by issuing a POST request targeted at the shared calendar collection
-   resource.  The POST request MUST contain an XML document as its body
-   with the root element being CS:share (Section 6.24).
-
-
-
-Daboo & York                                                   [Page 12]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-   The CS:share (Section 6.24) element in the POST requests MUST contain
-   one or more CS:set (Section 6.25) or CS:remove (Section 6.26)
-   elements.  For each CS:set (Section 6.25) element, the server MUST
-   add the specified sharee access to the shared calendar.  For each CS:
-   remove (Section 6.26) element the server MUST remove the specified
-   sharee access from the shared calendar.  In each case the server MUST
-   send a notification message to any sharees whose status is changed
-   (added, modified or removed), indicating to them a change in status
-   for the shared calendar.  The server SHOULD NOT send notification
-   messages to sharees whose status is unchanged.
-
-   Sharee's are identified via a DAV:href element whose value is either
-   a principal-URL for a sharee hosted on the same server, a calendar
-   user address or email address.  In the case of the later two, the
-   sharee might not be a user on the same server - though in that case
-   how invitations are sent or access enabled is out of scope for this
-   specification.  A server MAY change the sharee's "address" to any
-   suitable alternative that it might prefer when returning the list of
-   sharees via the CS:invite property (Section 5.2.2).
-
-   The client MAY include a CS:common-name (Section 6.19) element in the
-   CS:set (Section 6.25) element.  When provided, the value represents
-   the common name for the sharee, and is returned in the list of
-   sharees via the CS:invite property (Section 5.2.2).  The server MAY
-   change this to a suitable alternative when it is able to match the
-   sharee to a known user.  If absent from the client request, the
-   server SHOULD add a CS:common-name when it is able to match the
-   sharee with a known user, and a common name for that user can be
-   determined.
-
-   When the sharee list on a shared calendar is changed, the server MUST
-   send notifications to each sharee to update them on their current
-   sharing status.  This is accomplished by sending a CS:invite-
-   notification (Section 6.15) notification to each sharee.
-
-5.3.3.1.  Example: Successful Sharee Add Request
-
-   This example shows how to add a single sharee (with calendar user
-   address "mailto:eric at example.com") to a shared calendar with CS:read-
-   write access.
-
-
-
-
-
-
-
-
-
-
-
-Daboo & York                                                   [Page 13]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-   >> Request <<
-
-   POST /calendars/users/cyrus/shared/ HTTP/1.1
-   Host: calendar.example.com
-   Content-Type: application/xml; charset="utf-8"
-   Content-Length: xxxx
-
-   <?xml version="1.0" encoding="utf-8" ?>
-   <CS:share xmlns:D="DAV:"
-                 xmlns:CS="http://calendarserver.org/ns/">
-     <CS:set>
-       <D:href>mailto:eric at example.com</D:href>
-       <CS:common-name>Eric York</CS:common-name>
-       <CS:summary>Shared workspace</CS:summary>
-       <CS:read-write />
-     </CS:set>
-   </CS:share>
-
-   >> Response <<
-
-   HTTP/1.1 200 OK
-   Cache-Control: no-cache
-   Date: Sat, 11 Nov 2006 09:32:12 GMT
-
-5.3.3.2.  Example: Successful Multiple Sharee Change Request
-
-   This example shows how multiple sharee's can be manipulated in a
-   single request.  The sharee with calendar user address
-   "mailto:eric at example.com" has their access downgraded to CS:read,
-   whilst another sharee is removed from the access list entirely.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Daboo & York                                                   [Page 14]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-   >> Request <<
-
-   POST /calendars/users/cyrus/shared/ HTTP/1.1
-   Host: calendar.example.com
-   Content-Type: application/xml; charset="utf-8"
-   Content-Length: xxxx
-
-   <?xml version="1.0" encoding="utf-8" ?>
-   <CS:share xmlns:D="DAV:"
-                 xmlns:CS="http://calendarserver.org/ns/">
-     <CS:set>
-       <D:href>mailto:eric at example.com</D:href>
-       <CS:summary>Shared workspace</CS:summary>
-       <CS:read-write />
-     </CS:set>
-     <CS:remove>
-       <D:href>mailto:wilfredo at example.com</D:href>
-     </CS:remove>
-   </CS:share>
-
-   >> Response <<
-
-   HTTP/1.1 200 OK
-   Cache-Control: no-cache
-   Date: Sat, 11 Nov 2006 09:32:12 GMT
-
-5.4.  Sharee Actions on Shared Calendars
-
-5.4.1.  Replying to a Sharing Invite
-
-   When a sharee is invited to a shared calendar they can accept or
-   decline the invite by issuing a POST request to the sharee's calendar
-   home collection resource.  The POST request MUST contain an XML
-   document as its body with the root element being CS:invite-reply
-   (Section 6.20).
-
-   The CS:invite-reply (Section 6.20) element in the POST request
-   specifies the sharee who is replying in the DAV:href element, the
-   accept or decline action via the CS:invite-accepted or CS:invite-
-   declined elements, the URL of the shared calendar in the CS:hosturl
-   element, the unique identifier of the invite to which it is a reply
-   in the CS:in-reply-to element, and an optional CS:summary element.
-
-   The response to a POST request that accepts a shared calendar invite
-   MUST be an XML document containing CS:shared-as (Section 6.27) as its
-   root element.  That root element contains a single DAV:href element
-   whose content is the URI of the shared calendar in the sharee's
-   calendar home created by the invite acceptance.
-
-
-
-Daboo & York                                                   [Page 15]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-   When the sharee replies to an invite, the server SHOULD send a
-   notification to the sharer to update them on the change in the sharee
-   state.  This is accomplished by sending a CS:invite-reply
-   (Section 6.20) notification to the sharer.
-
-5.4.2.  Removing a Shared Calendar
-
-   To remove a shared calendar from a sharee's calendar home collection
-   a DELETE request is targeted at the shared calendar URI.  When such a
-   request is received the server MUST remove the shared calendar from
-   the sharee's calendar home and automatically update the sharee's
-   status in the sharer's calendar's CS:invite property.
-
-5.5.  General Considerations
-
-5.5.1.  Access Levels
-
-   Two levels of access ca be granted by a sharer to any sharee.  These
-   are governed by the CS:access element used in the CS:invite/CS:user
-   element that specifies a shared user invite.  CS:access contains a
-   single empty element that defines the type of access granted:
-
-   CS:read  When present this indicates that sharees can read calendar
-      data but cannot change it.
-
-   CS:read-write  When present this indicates that sharees can read and
-      write calendar data.
-
-5.5.2.  Allowing or Disallowing Sharing
-
-   Servers MAY support calendar sharing on a per-calendar basis - e.g.,
-   they could treat some calendars as always private (cannot be shared)
-   or always public (always shared).  As a result clients need a way to
-   determine which calendar could be shared so they can enable or
-   disable sharing options on a per-calendar basis.
-
-   This specification adds a CS:allowed-sharing-modes (Section 5.2.3)
-   WebDAV property which servers can return on calendar collection
-   resources.  This property contains XML elements that describe which
-   sharing or publishing capabilities can be supported by the
-   corresponding calendar collection:
-
-      CS:can-be-shared (Section 6.3): when present indicates that the
-      calendar collection can be shared.  When not present, the calendar
-      collection cannot be shared.
-
-      CS:can-be-published (Section 6.4): when present indicates that the
-      calendar collection can be published.  When not present, the
-
-
-
-Daboo & York                                                   [Page 16]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-      calendar collection cannot be published.
-
-   When not present on a calendar collection, sharing or publishing of
-   that calendar is not allowed.  Clients SHOULD NOT attempt to use
-   requests to enable sharing or publishing targeted at those calendar
-   collections.
-
-5.5.3.  Per-user WebDAV Properties
-
-   Servers MUST support "per-user" WebDAV properties on shared calendar
-   collections and MAY support them on calendar object resources within
-   shared calendar collections.  A "per-user" WebDAV property is one
-   whose value can be set and retrieved independently by each user with
-   appropriate access rights. e.g., user "A" changes the DAV:displayname
-   property on a shared calendar in their calendar home to "My
-   calendar", and user "B" changes the same property to "Shared" on the
-   same shared calendar in their calendar home.  When each user
-   retrieves the property value they will see their own last stored
-   value and not the value of the other user.
-
-   For shared calendars, the server MUST allow all users to write "per-
-   user" WebDAV properties on the shared calendar collection and MAY
-   allow property writes on calendar object resources within the shared
-   calendar collection.  This is required even in the case where the
-   sharee has been granted read access only (i.e., the ability to change
-   calendar data is disallowed).  This requirement ensures that sharees
-   can always change "personal" properties such as calendar colors and
-   display names.
-
-   Servers MUST treat the following properties as "per-user":
-
-      DAV:displayname
-
-      CALDAV:calendar-description
-
-      CALDAV:schedule-calendar-transp
-
-      ICAL:calendar-color
-
-   Servers MAY treat any dead property as per-user.
-
-   Servers MUST NOT treat live properties as per-user.
-
-5.5.4.  Per-user Calendar Data
-
-   Servers MUST support "per-user" calendar data in calendar object
-   resources stored in shared calendars.  This allows each sharee and
-   the sharer to store their own alarms and free busy transparency
-
-
-
-Daboo & York                                                   [Page 17]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-   status without "interfering" with other users who also have access to
-   the same calendar object resources.
-
-   For calendaring object resources in shared calendar collections, the
-   server MUST treat the following iCalendar data objects as per-user:
-
-      TRANSP property
-
-      VALARM component
-
-   Servers MAY treat any non-standard X- iCalendar properties as per-
-   user.
-
-   When handling per-user data in recurring components, servers SHOULD
-   eliminate overridden instances when returning iCalendar data to
-   clients in the case where there are no differences between the
-   overridden component and the instance that could be derived from the
-   "master" recurrence component.  For example, consider a daily
-   recurring event, Monday through Friday, initially defined without any
-   overridden instances, that is in a shared calendar.  If user "A"
-   overrides the Tuesday instance and adds their own "VALARM" component
-   only, then when user "A" later retrieves the data again they would
-   see that overridden instance, but when user "B" does so, they would
-   not.  This ensures that each user sees the most "compact"
-   representation of the calendar data.
-
-5.5.5.  Scheduling
-
-   CalDAV Scheduling [I-D.desruisseaux-caldav-sched] defines how a
-   CalDAV server carries out scheduling operations when calendar object
-   resources are created, modified or deleted and include "ORGANIZER"
-   and "ATTENDEE" iCalendar properties.
-
-   When calendar object resources are created, modified or deleted in
-   shared calendars by sharees, the following restrictions apply:
-
-   1.  The "ORGANIZER" iCalendar property value in the iCalendar data
-       MUST match a calendar user address of the sharer (owner) of the
-       shared calendar.  The DAV:owner WebDAV property MUST be present
-       on a shared calendar and MUST provide a reference to a principal-
-       URL of the sharer (owner) of the shared calendar.  Clients can
-       use this value to determine what the allowed "ORGANIZER"
-       iCalendar property values are.  The server MUST reject any
-       attempt by a sharee to create an iCalendar component with an
-       "ORGANIZER" property value other than the sharer (owner) of the
-       shared calendar.
-
-
-
-
-
-Daboo & York                                                   [Page 18]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-   2.  The server MUST reject any attempt by a sharee to MOVE a calendar
-       object resource in a shared calendar to some other collection.
-
-   3.  When a sharee is listed as an Attendee in a calendar object
-       resource in a shared calendar, and write access is granted, the
-       sharee is allowed to change not only iCalendar data related to
-       the Organizer, but also data related to the Attendee. i.e., a
-       sharee can change their own participation status on the
-       "ATTENDEE" iCalendar property referring to them.  Additionally,
-       if the sharee is not listed as an Attendee, and write access is
-       granted, the sharee can add themselves as an Attendee.
-
-   4.  The default calendar collection defined in Section 6.3 of
-       [I-D.desruisseaux-caldav-sched] MUST NOT be a calendar shared to
-       the corresponding calendar user.
-
-   Following are additional considerations for scheduling with shared
-   calendars:
-
-   1.  A scheduled iCalendar component could appear in more than one
-       calendar collection within a sharee's calendar home if the sharee
-       is an Attendee and the Organizer or other Attendees have shared a
-       calendar with the sharee that includes their copies of the
-       iCalendar component.  It is important to note that the scheduled
-       component in the shared calendar could have different access
-       rights than the one in the sharee's owned calendar.
-
-   2.  A scheduled iCalendar component appearing in a sharee's shared
-       calendar could include the sharee as an Attendee.  For recurring
-       events, it is possible for the sharee to only be listed as an
-       Attendee in some instances, as opposed to all.  Clients will need
-       to be aware of this when allowing sharee's to set their own
-       participation status.
-
-   In addition, when a shared calendar is first accepted by a sharee,
-   the server SHOULD set the CALDAV:schedule-calendar-transp property to
-   the value CALDAV:transparent to ensure newly accepted shared
-   calendars do not contribute to the sharee's freebusy time until the
-   sharee explicitly requests it.
-
-
-6.  XML Element Definitions
-
-6.1.  CS:shared-owner
-
-
-
-
-
-
-
-Daboo & York                                                   [Page 19]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-   Name:  shared-owner
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Used to indicate that a calendar is being shared by the
-      owner.
-
-   Description:  This property appears in the DAV:resourcetype property
-      on the calendar collection resource shared by a sharer.  See
-      Section 5.2.
-
-   Definition:
-
-   <!ELEMENT shared-owner EMPTY>
-
-6.2.  CS:shared
-
-   Name:  shared
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Used to indicate that a calendar is being shared to a
-      sharee.
-
-   Description:  This property appears in the DAV:resourcetype property
-      on a calendar collection resource that is shared to a sharee and
-      appears in the sharee's calendar home collection.  See
-      Section 5.2.
-
-   Definition:
-
-   <!ELEMENT shared EMPTY>
-
-6.3.  CS:can-be-shared
-
-   Name:  can-be-shared
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Used to indicate that a calendar can be shared.
-
-   Description:  This element indicates that a calendar can be shared
-      with other users.  See Section 5.2.3
-
-   Definition:
-
-   <!ELEMENT can-be-shared EMPTY>
-
-
-
-
-Daboo & York                                                   [Page 20]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-6.4.  CS:can-be-published
-
-   Name:  can-be-published
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Used to indicate that a calendar can be published.
-
-   Description:  This element indicates that a calendar can be published
-      to anyone.  See Section 5.2.3
-
-   Definition:
-
-   <!ELEMENT can-be-published EMPTY>
-
-6.5.  CS:user
-
-   Name:  user
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Used to show status of sharing invites sent to sharees.
-
-   Description:  This element provides the "status" of a sharing invite
-      sent to a particular user.  See Section 5.2.2.
-
-   Definition:
-
-   <!ELEMENT user (DAV:href, common-name?, (invite-noresponse |
-                   invite-accepted | invite-declined | invite-invalid),
-                   access, summary?)>
-
-6.6.  CS:invite-noresponse
-
-   Name:  invite-noresponse
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Sharing invite status.
-
-   Description:  When used in a CS:user (Section 6.5) element, this
-      element is used to indicate that the sharee has never replied to
-      the corresponding sharing invite.  When used in a CS:invite-
-      notification (Section 6.15) element, this element is used to
-      indicate to the sharee that a sharing reply is needed.
-
-
-
-
-
-
-Daboo & York                                                   [Page 21]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-   Definition:
-
-   <!ELEMENT invite-noresponse EMPTY>
-
-6.7.  CS:invite-deleted
-
-   Name:  invite-deleted
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Sharing invite status.
-
-   Description:  When used in a CS:invite-notification (Section 6.15)
-      element, this element is used to indicate to the sharee that a
-      shared calendar has been unshared by the sharer.
-
-   Definition:
-
-   <!ELEMENT invite-deleted EMPTY>
-
-6.8.  CS:invite-accepted
-
-   Name:  invite-accepted
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Sharing invite status.
-
-   Description:  When used in a CS:user (Section 6.5) element, this
-      element is used to indicate that the sharee has accepted the
-      corresponding sharing invite.  When used in a CS:invite-
-      notification (Section 6.15) element, this element is used to
-      indicate to the sharee that the sharing invite is an update for
-      one they previously accepted.
-
-   Definition:
-
-   <!ELEMENT invite-accepted EMPTY>
-
-6.9.  CS:invite-declined
-
-   Name:  invite-declined
-
-   Namespace:  http://calendarserver.org/ns/
-
-
-
-
-
-
-
-Daboo & York                                                   [Page 22]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-   Purpose:  Sharing invite status.
-
-   Description:  When used in a CS:user (Section 6.5) element, this
-      element is used to indicate that the sharee has declined the
-      corresponding sharing invite.  When used in a CS:invite-
-      notification (Section 6.15) element, this element is used to
-      indicate to the sharee that the sharing invite is an update for
-      one they previously declined.
-
-   Definition:
-
-   <!ELEMENT invite-declined EMPTY>
-
-6.10.  CS:invite-invalid
-
-   Name:  invite-invalid
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Sharing invite status.
-
-   Description:  When used in a CS:user (Section 6.5) element, this
-      element is used to indicate that the corresponding sharee is not a
-      valid calendar user known to the server.
-
-   Definition:
-
-   <!ELEMENT invite-invalid EMPTY>
-
-6.11.  CS:access
-
-   Name:  access
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Shared calendar access level.
-
-   Description:  When used in a CS:user (Section 6.5) element, this
-      element is used to indicate the sharing access level granted to
-      the corresponding sharee.
-
-   Definition:
-
-   <!ELEMENT invite-invalid (read | read-write)>
-
-
-
-
-
-
-
-Daboo & York                                                   [Page 23]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-6.12.  CS:read
-
-   Name:  read
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Shared calendar access level privilege.
-
-   Description:  Indicates that the access level granted only allows
-      sharees to read data in the shared calendar (though they can write
-      per-user data (Section 5.5.4)).
-
-   Definition:
-
-   <!ELEMENT read EMPTY>
-
-6.13.  CS:read-write
-
-   Name:  read-write
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Shared calendar access level privilege.
-
-   Description:  Indicates that the access level granted allows sharees
-      to read and write all data in the shared calendar, with the
-      exception of components that would trigger scheduling.
-
-   Definition:
-
-   <!ELEMENT read-write EMPTY>
-
-6.14.  CS:summary
-
-   Name:  summary
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Summary or title of shared calendar.
-
-   Description:  A brief description of a shared calendar.  This can be
-      used by sharers to communicate the nature of a shared calendar to
-      sharees, as well as used by sharees to indicate back to the sharer
-      how each sharee is refering to the shared calendar.
-
-
-
-
-
-
-
-Daboo & York                                                   [Page 24]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-   Definition:
-
-   <!ELEMENT summary (#PCDATA)>
-
-6.15.  CS:invite-notification
-
-   Name:  invite-notification
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  A notification used as a shared calendar invite.
-
-   Description:  Defines a notification message sent automatically by
-      the server when a sharer adds, changes or removes a sharee from a
-      shared calendar.  The DAV:href element specifies the calendar user
-      address of the sharee to whom the message was sent.
-
-   Definition:
-
-   <!ELEMENT invite-notification (uid, DAV:href,
-                                  (invite-noresponse | invite-deleted |
-                                   invite-accepted | invite-declined),
-                                  access, hosturl, organizer, summary?>
-
-6.16.  CS:uid
-
-   Name:  uid
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Unique identifier.
-
-   Description:  A unique identifier for an invitation to a shared
-      calendar.
-
-   Definition:
-
-   <!ELEMENT uid (#PCDATA)>
-
-6.17.  CS:hosturl
-
-   Name:  hosturl
-
-   Namespace:  http://calendarserver.org/ns/
-
-
-
-
-
-
-
-Daboo & York                                                   [Page 25]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-   Purpose:  Identifies the source URL of a shared calendar.
-
-   Description:  Contains a single DAV:href element that refers to the
-      source of a shared calendar - i.e., the URL of the calendar shared
-      by the sharer.
-
-   Definition:
-
-   <!ELEMENT hosturl (DAV:href)>
-
-6.18.  CS:organizer
-
-   Name:  organizer
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Identifies the sharer of a shared calendar.
-
-   Description:  Contains a single DAV:href element that identifies the
-      calendar user address of the sharer of a shared calendar, and an
-      optional CS:common-name element that matches that user.
-
-   Definition:
-
-   <!ELEMENT organizer (DAV:href, CS:common-name?)>
-
-6.19.  CS:common-name
-
-   Name:  common-name
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  The common name of a sharer or sharee.
-
-   Description:  The common name is optionally provided by a client when
-      adding a sharee and optionally included (or modified) by the
-      server when returning results for sharers or sharees and in
-      notifications.
-
-   Definition:
-
-   <!ELEMENT common-name (#PCDATA)>
-
-6.20.  CS:invite-reply
-
-
-
-
-
-
-
-Daboo & York                                                   [Page 26]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-   Name:  invite-reply
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  A notification used as a reply to a shared calendar invite.
-
-   Description:  Defines a notification message sent automatically by
-      the server when a sharee replies to a shared calendar invite.  The
-      DAV:href element specifies the calendar user address of the sharee
-      to whom the original invite message was sent.
-
-   Definition:
-
-   <!ELEMENT invite-reply (DAV:href,
-                           (invite-accepted | invite-declined),
-                           hosturl, in-reply-to, summary?>
-
-6.21.  CS:in-reply-to
-
-   Name:  in-reply-to
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Unique identifier.
-
-   Description:  Specifies the unique identifier of the inviate message
-      that this notification message is a reply to.
-
-   Definition:
-
-   <!ELEMENT in-reply-to (#PCDATA)>
-
-6.22.  CS:notification
-
-   Name:  notification
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Notification message root element.
-
-   Description:  The root element used in notification resources.
-
-   Definition:
-
-   <!ELEMENT notification (CS:dtstamp,
-                           (invite-notification | invite-reply)>
-   <!-- Any notification type element can appear after CS:dtstamp,
-        this specification defines only the two listed above -->
-
-
-
-Daboo & York                                                   [Page 27]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-6.23.  CS:dtstamp
-
-   Name:  dtstamp
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Date-time stamp.
-
-   Description:  Contains the date-time stamp corresponding to the
-      creation of a notification message.
-
-   Definition:
-
-   <!ELEMENT dtstamp (#PCDATA)>
-
-6.24.  CS:share
-
-   Name:  share
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Describes changes to sharees.
-
-   Description:  The root element used in POST requests on calendars by
-      sharers to manipulate the sharee list of a shared calendar.
-
-   Definition:
-
-   <!ELEMENT share (set | remove)*>
-
-6.25.  CS:set
-
-   Name:  set
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Sets access for a sharee.
-
-   Description:  Used to add or modify sharee access to a shared
-      calendar.  The specified access to the shared calendar is given to
-      the sharee.
-
-   Definition:
-
-   <!ELEMENT set (DAV:href, common-name?, summary?,
-                  (read | read-write)>
-
-
-
-
-
-Daboo & York                                                   [Page 28]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-6.26.  CS:remove
-
-   Name:  remove
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Removes access for a sharee.
-
-   Description:  Used to remove sharee access to a shared calendar.  All
-      access to the shared calendar is removed for the sharee.
-
-   Definition:
-
-   <!ELEMENT remove (DAV:href)>
-
-6.27.  CS:shared-as
-
-   Name:  shared-as
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Identifies a shared calendar.
-
-   Description:  Returned by the server for a POST request by a sharee
-      accepting a shared calendar invite.  The DAV:href element
-      specifies the URI of the calendar created by the acceptance.
-
-   Definition:
-
-   <!ELEMENT shared-as (DAV:href)>
-
-
-7.  Security Considerations
-
-   Per-user WebDAV properties and iCalendar data MUST only be accessible
-   by the user that created them.
-
-   Alarms set by the sharer SHOULD NOT be propagated to sharees by
-   default.  Clients SHOULD NOT automatically enable triggering of
-   alarms on shared calendars that have just been accepted without
-   confirmation by the user.
-
-   TBD
-
-
-8.  IANA Considerations
-
-   This document does not require any actions on the part of IANA.
-
-
-
-Daboo & York                                                   [Page 29]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-9.  Acknowledgments
-
-   This specification is the result of discussions between the Apple
-   calendar server and client teams.
-
-
-10.  Normative References
-
-   [I-D.desruisseaux-caldav-sched]
-              Daboo, C. and B. Desruisseaux, "CalDAV Scheduling
-              Extensions to WebDAV", draft-desruisseaux-caldav-sched-08
-              (work in progress), August 2009.
-
-   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
-              Requirement Levels", BCP 14, RFC 2119, March 1997.
-
-   [RFC3744]  Clemm, G., Reschke, J., Sedlar, E., and J. Whitehead, "Web
-              Distributed Authoring and Versioning (WebDAV)
-              Access Control Protocol", RFC 3744, May 2004.
-
-   [RFC4791]  Daboo, C., Desruisseaux, B., and L. Dusseault,
-              "Calendaring Extensions to WebDAV (CalDAV)", RFC 4791,
-              March 2007.
-
-   [RFC4918]  Dusseault, L., "HTTP Extensions for Web Distributed
-              Authoring and Versioning (WebDAV)", RFC 4918, June 2007.
-
-   [RFC5689]  Daboo, C., "Extended MKCOL for Web Distributed Authoring
-              and Versioning (WebDAV)", RFC 5689, September 2009.
-
-
-Appendix A.  Change History
-
-   Changes in -02:
-
-   1.  Removed read-write-shared access mode - now a server that does
-       not support shared scheduling should advertise that via a DAV
-       header
-
-
-Appendix B.  Change History
-
-   Changes in -01:
-
-   1.  Added CS:shared-url property
-
-   2.  Clarified that notifications are only required to be sent when
-       sharee status is changed
-
-
-
-Daboo & York                                                   [Page 30]
-
-                      CalDAV Sharing and Publishing         October 2010
-
-
-Authors' Addresses
-
-   Cyrus Daboo
-   Apple Inc.
-   1 Infinite Loop
-   Cupertino, CA  95014
-   USA
-
-   Email: cyrus at daboo.name
-   URI:   http://www.apple.com/
-
-
-   Eric York
-   Apple Inc.
-   1 Infinite Loop
-   Cupertino, CA  95014
-   USA
-
-   Email:
-   URI:   http://www.apple.com/
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Daboo & York                                                   [Page 31]
-

Deleted: CalendarServer/trunk/doc/Extensions/caldav-sharing-02.xml
===================================================================
--- CalendarServer/trunk/doc/Extensions/caldav-sharing-02.xml	2012-09-19 14:59:42 UTC (rev 9821)
+++ CalendarServer/trunk/doc/Extensions/caldav-sharing-02.xml	2012-09-19 17:16:32 UTC (rev 9822)
@@ -1,1111 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/xsl" href="../rfc2629.xslt"?>
-<!DOCTYPE rfc SYSTEM 'rfc2629.dtd' [
-<!ENTITY rfc2119 PUBLIC '' 'bibxml/reference.RFC.2119.xml'>
-<!ENTITY rfc3744 PUBLIC '' 'bibxml/reference.RFC.3744.xml'>
-<!ENTITY rfc4791 PUBLIC '' 'bibxml/reference.RFC.4791.xml'>
-<!ENTITY rfc4918 PUBLIC '' 'bibxml/reference.RFC.4918.xml'>
-<!ENTITY rfc5689 PUBLIC '' 'bibxml/reference.RFC.5689.xml'>
-<!ENTITY I-D.desruisseaux-caldav-sched PUBLIC '' 'bibxml3/reference.I-D.desruisseaux-caldav-sched.xml'>
-]> 
-<?rfc toc="yes"?>
-<?rfc tocdepth="4"?>
-<?rfc strict="yes"?>
-<?rfc comments="yes"?>
-<?rfc inline="yes"?>
-<?rfc symrefs="yes"?>
-<?rfc sortrefs="yes"?>
-<?rfc compact="yes"?>
-<?rfc subcompact="no"?>
-<?rfc private="Calendar Server Extension"?>
-<rfc ipr="none" docName='caldav-sharing-02'>
-    <front>
-        <title abbrev="CalDAV Sharing and Publishing">Shared and Published Calendars in CalDAV</title> 
-        <author initials="C." surname="Daboo" fullname="Cyrus Daboo">
-            <organization abbrev="Apple Inc.">
-                Apple Inc.
-            </organization>
-            <address>
-                <postal>
-                    <street>1 Infinite Loop</street>
-                    <city>Cupertino</city>
-                    <region>CA</region>
-                    <code>95014</code> 
-                    <country>USA</country>
-                </postal>
-                <email>cyrus at daboo.name</email>
-                <uri>http://www.apple.com/</uri>
-            </address>
-        </author>
-        <author initials="E." surname="York" fullname="Eric York">
-            <organization abbrev="Apple Inc.">
-                Apple Inc.
-            </organization>
-            <address>
-                <postal>
-                    <street>1 Infinite Loop</street>
-                    <city>Cupertino</city>
-                    <region>CA</region>
-                    <code>95014</code> 
-                    <country>USA</country>
-                </postal>
-                <email></email>
-                <uri>http://www.apple.com/</uri>
-            </address>
-        </author>
-        <date/>
-        <abstract>
-            <t>
-                This specification defines an extension to CalDAV that enables the sharing of calendars between users on a CalDAV server.
-            </t>
-        </abstract>
-    </front>
-    <middle>
-        <section title='Introduction'>
-            <t>
-                <xref target="RFC4791">CalDAV</xref> provides a way for calendar users to store calendar data and exchange this data via scheduling operations. Based on the <xref target='RFC4918'>WebDAV</xref> protocol, it also includes the ability to manage access to calendar data via the <xref target='RFC3744'>WebDAV ACL</xref> extension.
-            </t>
-            <t>
-                <xref target='RFC3744'>WebDAV ACL</xref> provides a way to manage fine-grained access controls on WebDAV resources. Whilst this could be used directly to manage sharing of calendars, experience has shown that client developers are averse to using it due to its complexity. Instead a simpler process for sharing calendars is preferred.
-            </t>
-            <t>
-                This extension defines a way for individual calendar users to share calendars with other users. This is done via an "opt-in" process in which a sharing invite is sent from the sharer to a sharee, allowing the sharee to accept or decline. If the sharee accepts the sharing invite, the shared calendar is made available to them in their own calendar home collection (i.e., alongside their own personal calendars). HTTP POST operations are used to manage the sharing invitations and replies, and WebDAV properties are used to expose the state of shared calendars.
-            </t>
-        </section>
-
-        <!--<section title="Open Issues">
-            <t>
-                <list style="numbers">
-                    <t>
-                    </t>
-                </list>
-            </t>
-        </section>-->
-            
-        <section title='Conventions Used in This Document'>
-            <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' />. 
-            </t>
-            <t>
-                When XML element types in the namespaces "DAV:" and "urn:ietf:params:xml:ns:caldav" are referenced in this document outside of the context of an XML fragment, the string "DAV:" and "CALDAV:" will be prefixed to the element type names respectively. 
-            </t>
-            <t>
-                The namespace "http://calendarserver.org/ns/" is used for XML elements defined in this specification.  When XML element types in that namespace are referenced in this document outside of the context of an XML fragment, the string "CS:" will be prefixed to the element type names. 
-            </t>
-            <t>Terms Used:
-                <list style='hanging'>
-                    <t hangText='Sharer'>A calendar user who is sharing a calendar with other calendar users.</t>
-                    <t hangText='Sharee'>A calendar user to whom a calendar has been shared.</t>
-                    <t hangText='Sharing Invite'>A message sent by a sharer to a sharee to indicate the status of a shared calendar.</t>
-                    <t hangText='Sharing Reply'>A message sent by a sharee to a sharer to indicate the status of a shared calendar.</t>
-                </list>
-            </t>
-        </section>
-         
-        <section title='Overview' anchor='overview'>
-            <t>
-                This section provides a basic overview of this protocol by way of a simple use case of a sharer sharing a calendar with a single sharee.
-            </t>
-            <t>
-                To share a calendar with another user, the sharer's client executes an HTTP POST request against the calendar collection resource for the calendar to be shared. The POST request body will contain details of the calendar user to whom the calendar is to be shared as well as the access right to be granted to them. If the request succeeds, a notification is sent to the sharee with details of the calendar being shared to them.
-            </t>
-            <t>
-                The sharer's client will show the notification to the sharee and present them with the choice to accept or decline the invitation to the shared calendar. If the sharee chooses to decline, then nothing changes for that sharee. If the sharee chooses to accept, then the server automatically creates a new calendar collection resource in the sharee's calendar home collection, and ensures that calendar provides a mapping to the actual shared calendar of the sharer. Thus the shared calendar is available to the sharee as just another calendar in their calendar home. The server enforces the appropriare access privileges for the sharee.
-            </t>
-            <t>
-                At any time, the sharer can inspect properties on the calendar collection being shared, and determine the accept/decline status of each sharee. Additional sharees can be added and existing ones removed. The access privileges for existing sharees can also be changed.
-            </t>
-            <t>
-            	Once a sharee has a shared calendar set to appear in their calendar home collection, they can remove it and decline the sharing invite by simply having their client issue an HTTP DELETE request on the shared calendar collection. That does not delete any calendar data, but rather simply removes the "link" to the sharer's calendar collection and sets the sharee's inviate status to declined.
-            </t>
-        </section>
-        
-        <section title="Notifications">
-            <t>
-                In order to facilitate the process of sharing invitations, this specification defines a new generic notification mechanism for CalDAV servers. When this feature is available, a <xref target="CS:notification-URL">CS:notification-URL</xref> property appears on principal resources for those principals who are able to receive notifications. That property specifies a single DAV:href element whose content refers to a WebDAV collection resource. Notification "messages" are deposited into this collection and can be retrieved by clients and acted on accordingly.
-            </t>
-            <t>
-                The notification collection referenced by the <xref target="CS:notification-URL">CS:notification-URL</xref> property MUST have a DAV:resourcetype property with DAV:collection and <xref target="CS:notification">CS:notification</xref> child elements. 
-            </t>
-            <t>
-                Notification "messages" are XML documents stored as resources in the notification collection. Each XML document contains a <xref target="CS:notification">CS:notification</xref> element as its root. The root element contains a <xref target="CS:dtstamp">CS:dtstamp</xref> element, and one additional element which represents the type of notification being conveyed in the message. That child element will typically contain additional content that describes the notification.
-            </t>
-            <t>
-                Each notification resource has a <xref target="CS:notificationtype">CS:notificationtype</xref> property which contains as its single child element an empty element that matches the child element of the notification resource XML document root. Any attributes on the child element in the XML document are also present in the property child element.
-            </t>
-            <t>
-                Notifications are automatically generated by the server (perhaps in response to a client action) with an appropriate resource stored in the notifications collection of the user to whom the notification is targeted. Clients SHOULD monitor the notification collection looking for new notification resources. When doing so, clients SHOULD look at the <xref target="CS:notificationtype">CS:notificationtype</xref> property to ensure that the notification is of a type that the client can handle. Once a client has handled the notification in whatever way is appropriate it SHOULD delete the notification resource. Servers MAY delete notification resources on their own if they determine that the notifications are no longer relevant or valid. Servers MAY coalesce notifications as appropriate.
-            </t>
-            <section title="Additional Principal Properties" anchor='principal-properties'>
-                <t>
-                    This section defines new properties for WebDAV principal resources as defined in <xref target="RFC3744">RFC3744</xref>. These properties are likely to be protected but the server MAY allow them to be written by appropriate users.
-                </t>
-                <section title="CS:notification-URL Property" anchor="CS:notification-URL">
-                  <t>
-                    <list style="hanging">
-                      <t hangText="Name:">notification-URL</t>
-                      <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                      <t hangText="Purpose:">Identify the URL of the notification collection owned by the associated principal resource.</t>
-                      <t hangText="Protected:">This property SHOULD be protected.</t>
-                      <t hangText="PROPFIND behavior:">This property SHOULD NOT be returned by a PROPFIND allprop request (as defined in Section 14.2 of <xref target="RFC4918"/>).</t>
-                      <t hangText="COPY/MOVE behavior:">This property value SHOULD be preserved in COPY and MOVE operations.</t>
-        
-                      <t hangText="Description:">This property is needed for a client to determine where the notification collection of the current user is located so that processing of notification messages can occur. If not present, then the associated calendar user is not enabled for notification messages on the server.</t>
-                      <t hangText="Definition:">
-                        <figure>
-                          <artwork><![CDATA[
-<!ELEMENT notification-URL (DAV:href)>]]></artwork>
-                        </figure>
-                      </t>
-                    </list>
-                  </t>
-                </section>
-            </section>
-            <section title="Properties on Notification Resources" anchor='notification-properties'>
-                <t>
-                    The following new WebDAV properties are defined for notification resources.
-                </t>
-                <section title="CS:notificationtype Property" anchor="CS:notificationtype">
-                  <t>
-                    <list style="hanging">
-                      <t hangText="Name:">notificationtype</t>
-                      <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                      <t hangText="Purpose:">Identify the type of notification of the corresponding resource.</t>
-                      <t hangText="Protected:">This property MUST be protected.</t>
-                      <t hangText="PROPFIND behavior:">This property SHOULD NOT be returned by a PROPFIND allprop request (as defined in Section 14.2 of <xref target="RFC4918"/>).</t>
-                      <t hangText="COPY/MOVE behavior:">This property value MUST be preserved in COPY and MOVE operations.</t>
-        
-                      <t hangText="Description:">This property allows a client, via a PROPFIND Depth:1 request, to quickly find notification messages that the client can handle in a notification collection. The single child element is the notification resource root element's child defining the notification itself. This element MUST be empty, though any attributes on the element in the notification resource MUST be present in the property element.</t>
-                      <t hangText="Definition:">
-                        <figure>
-                          <artwork><![CDATA[
-<!ELEMENT notificationtype (invite-notification | invite-reply)>
-<!-- Child elements are empty but will have appropriate attributes.
-     Any valid notification message child element can appear.-->]]></artwork>
-                        </figure>
-                      </t>
-                    </list>
-                  </t>
-                </section>
-            </section>
-        </section>
-
-        <section title="Shared Calendaring">
-            <section title="Feature Discovery">
-                <t>
-                    A server that supports the features described in this document MUST include "calendarserver-sharing" as a field in the DAV response header from an OPTIONS request on any resource that supports these features.
-                </t>
-            </section>
-            <section title="Additional Properties for Calendars" anchor='properties'>
-                <t>
-                    The following new or modified WebDAV properties are defined for calendar collections and used to view or manipulate shared calendar features.
-                </t>
-                <section title="DAV:resourcetype Property" anchor="DAV:resourcetype">
-                    <t>
-                        Calendar collections that are shared have addition elements listed in their DAV:resourcetype property in addition to DAV:collection and CALDAV:calendar.
-                        <list style="symbols">
-                            <t><xref target="CS:shared-owner">CS:shared-owner</xref>: used to indicate that the calendar is owned by the current user and is being shared by them.</t>
-                            <t><xref target="CS:shared">CS:shared</xref>: used to indicate that the calendar is owned by another user and is being shared to the current user.</t>
-                        </list>
-                    </t>
-                </section>
-                <section title="CS:invite Property" anchor="CS:invite">
-                  <t>
-                    <list style="hanging">
-                      <t hangText="Name:">invite</t>
-                      <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                      <t hangText="Purpose:">Used to show to whom a calendar has been shared.</t>
-                      <t hangText="Protected:">This property MUST be protected.</t>
-                      <t hangText="PROPFIND behavior:">This property SHOULD NOT be returned by a PROPFIND allprop request (as defined in Section 14.2 of <xref target="RFC4918"/>).</t>
-                      <t hangText="COPY/MOVE behavior:">This property value MUST be preserved in COPY and MOVE operations.</t>
-        
-                      <t hangText="Description:">This WebDAV property is present on a calendar collection resource that has been shared by the owner. It MUST NOT appear on the calendar collection resources of the sharees of the calendar. It provides a list of users to whom the calendar has been shared, along with the "status" of the sharing invites sent to each user.</t>
-                      <t hangText="Definition:">
-                        <figure>
-                          <artwork><![CDATA[
-<!ELEMENT invite (user*)>]]></artwork>
-                        </figure>
-                      </t>
-                    </list>
-                  </t>
-                </section>
-                <section title="CS:allowed-sharing-modes Property" anchor="CS:allowed-sharing-modes">
-                  <t>
-                    <list style="hanging">
-                      <t hangText="Name:">allowed-sharing-modes</t>
-                      <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                      <t hangText="Purpose:">Used to show which modes of sharing are supported on a calendar collection.</t>
-                      <t hangText="Protected:">This property MUST be protected.</t>
-                      <t hangText="PROPFIND behavior:">This property SHOULD NOT be returned by a PROPFIND allprop request (as defined in Section 14.2 of <xref target="RFC4918"/>).</t>
-                      <t hangText="COPY/MOVE behavior:">This property value MUST be preserved in COPY and MOVE operations.</t>
-        
-                      <t hangText="Description:">This WebDAV property is present on a calendar collection resource that can been shared or published. It provides a list of options indicating what sharing modes are allowed as per <xref target="allowed"/>.</t>
-                      <t hangText="Definition:">
-                        <figure>
-                          <artwork><![CDATA[
-<!ELEMENT allowed-sharing-modes
-          (can-be-shared?, can-be-published?)>]]></artwork>
-                        </figure>
-                      </t>
-                    </list>
-                  </t>
-                </section>
-                <section title="CS:shared-url Property" anchor="CS:shared-url">
-                  <t>
-                    <list style="hanging">
-                      <t hangText="Name:">shared-url</t>
-                      <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                      <t hangText="Purpose:">Indicates the URL of the owner's copy of a shared calendar.</t>
-                      <t hangText="Protected:">This property MUST be protected.</t>
-                      <t hangText="PROPFIND behavior:">This property SHOULD NOT be returned by a PROPFIND allprop request (as defined in Section 14.2 of <xref target="RFC4918"/>).</t>
-                      <t hangText="COPY/MOVE behavior:">This property value MUST be preserved in COPY and MOVE operations.</t>
-        
-                      <t hangText="Description:">This WebDAV property is present on a shared calendar collection resource that appears in a sharee's calendar home collection. Its content is a single DAV:href element whose value is the URL of the sharer's calendar being shared.</t>
-                      <t hangText="Definition:">
-                        <figure>
-                          <artwork><![CDATA[
-<!ELEMENT shared-url (DAV:href)>]]></artwork>
-                        </figure>
-                      </t>
-                    </list>
-                  </t>
-                </section>
-            </section>
-            <section title="Sharer Actions on Shared Calendars">
-                <section title="Creating a Shared Calendar">
-                    <t>
-                        To create a shared calendar, clients use the <xref target="RFC4791">MKCALENDAR</xref> or <xref target="RFC5689">extended MKCOL</xref> requests, and include a DAV:resourcetype property to be set upon creation. That property MUST contain DAV:collection, CALDAV:calendar and CS:shared-owner child elements to enable sharing.
-                    </t>
-                    <section title="Example: Successful MKCALENDAR Request">
-            
-                        <t>
-                          This example shows how the MKCALENDAR request is used to create a shared calendar collection. The response body is empty as the request completed successfully.
-                        </t>
-    
-                        <figure>
-                          <preamble>&gt;&gt; Request &lt;&lt;</preamble>
-                          <artwork><![CDATA[
-MKCALENDAR /calendars/users/cyrus/shared/ HTTP/1.1
-Host: calendar.example.com
-Content-Type: application/xml; charset="utf-8"
-Content-Length: xxxx
-
-<?xml version="1.0" encoding="utf-8" ?>
-<C:mkcalendar xmlns:D="DAV:"
-              xmlns:C="urn:ietf:params:xml:ns:caldav"
-              xmlns:CS="http://calendarserver.org/ns/">
-  <D:set>
-    <D:prop>
-      <D:resourcetype>
-        <D:collection/>
-        <C:calendar/>
-        <CS:shared-owner/>
-      </D:resourcetype>
-    </D:prop>
-  </D:set>
-</C:mkcalendar>]]></artwork>
-                        </figure>
-                        <figure>
-                          <preamble>&gt;&gt; Response &lt;&lt;</preamble>
-                          <artwork><![CDATA[
-HTTP/1.1 201 Created
-Cache-Control: no-cache
-Date: Sat, 11 Nov 2006 09:32:12 GMT]]></artwork>
-                        </figure>
-                    </section>
-                    <section title="Example: Successful Extended MKCOL Request">
-            
-                        <t>
-                          This example shows how the extended MKCOL request is used to create a shared calendar collection. The response body is empty as the request completed successfully.
-                        </t>
-    
-                        <figure>
-                          <preamble>&gt;&gt; Request &lt;&lt;</preamble>
-                          <artwork><![CDATA[
-MKCOL /calendars/users/cyrus/shared/ HTTP/1.1
-Host: calendar.example.com
-Content-Type: application/xml; charset="utf-8"
-Content-Length: xxxx
-
-<?xml version="1.0" encoding="utf-8" ?>
-<D:mkcol xmlns:D="DAV:"
-              xmlns:C="urn:ietf:params:xml:ns:caldav"
-              xmlns:CS="http://calendarserver.org/ns/">
-  <D:set>
-    <D:prop>
-      <D:resourcetype>
-        <D:collection/>
-        <C:calendar/>
-        <CS:shared-owner/>
-      </D:resourcetype>
-    </D:prop>
-  </D:set>
-</D:mkcol>]]></artwork>
-                        </figure>
-                        <figure>
-                          <preamble>&gt;&gt; Response &lt;&lt;</preamble>
-                          <artwork><![CDATA[
-HTTP/1.1 201 Created
-Cache-Control: no-cache
-Date: Sat, 11 Nov 2006 09:32:12 GMT]]></artwork>
-                        </figure>
-                    </section>
-                </section>
-                <section title="Sharing an Existing Calendar">
-                    <t>
-                        Sharing an existing calendar can be accomplished in two ways. One option is to use a PROPPATCH request to set the DAV:resourcetype property to include CS:shared-owner as a child element. Another option is to add sharee's directly to the calendar collection (as described in <xref target="sharee"/>) - that action MUST upgrade a non-shared calendar to a shared calendar when it completes successfully, assuming that such an upgrade is allowed as per <xref target="allowed"/>.
-                    </t>
-                    <section title="Example: Successful PROPPATCH Request">
-            
-                        <t>
-                          This example shows how the PROPPATCH request is used to upgrade to a shared calendar collection.
-                        </t>
-    
-                        <figure>
-                          <preamble>&gt;&gt; Request &lt;&lt;</preamble>
-                          <artwork><![CDATA[
-PROPPATCH /calendars/users/cyrus/shared/ HTTP/1.1
-Host: calendar.example.com
-Content-Type: application/xml; charset="utf-8"
-Content-Length: xxxx
-
-<?xml version="1.0" encoding="utf-8" ?>
-<D:propertyupdate xmlns:D="DAV:"
-              xmlns:C="urn:ietf:params:xml:ns:caldav"
-              xmlns:CS="http://calendarserver.org/ns/">
-  <D:set>
-    <D:prop>
-      <D:resourcetype>
-        <D:collection/>
-        <C:calendar/>
-        <CS:shared-owner/>
-      </D:resourcetype>
-    </D:prop>
-  </D:set>
-</D:propertyupdate>]]></artwork>
-                        </figure>
-                        <figure>
-                          <preamble>&gt;&gt; Response &lt;&lt;</preamble>
-                          <artwork><![CDATA[
-HTTP/1.1 207 Multi-Status
-Date: Sat, 11 Nov 2006 09:32:12 GMT
-Content-Type: application/xml; charset="utf-8"
-Content-Length: xxxx
-
-<?xml version="1.0" encoding="utf-8" ?>
-<D:multistatus xmlns:D="DAV:">
-  <D:response>
-    <D:href>/calendars/users/cyrus/shared/</D:href>
-    <D:propstat>
-      <D:prop>
-        <D:resourcetype/>
-      </D:prop>
-      <D:status>HTTP/1.1 200 OK</D:status>
-    </D:propstat>
-  </D:response>
-</D:multistatus>]]></artwork>
-                        </figure>
-                    </section>
-                </section>
-                <section title="Manipulating Sharees of a Shared Calendar" anchor="sharee">
-                    <t>
-                        The sharer of a shared calendar is able to manipulate the sharee list by issuing a POST request targeted at the shared calendar collection resource. The POST request MUST contain an XML document as its body with the root element being <xref target="CS:share">CS:share</xref>.
-                    </t>
-                    <t>
-                    	The <xref target="CS:share">CS:share</xref> element in the POST requests MUST contain one or more <xref target="CS:set">CS:set</xref> or <xref target="CS:remove">CS:remove</xref> elements. For each <xref target="CS:set">CS:set</xref> element, the server MUST add the specified sharee access to the shared calendar. For each <xref target="CS:remove">CS:remove</xref> element the server MUST remove the specified sharee access from the shared calendar. In each case the server MUST send a notification message to any sharees whose status is changed (added, modified or removed), indicating to them a change in status for the shared calendar. The server SHOULD NOT send notification messages to sharees whose status is unchanged.
-                    </t>
-                    <t>
-                    	Sharee's are identified via a DAV:href element whose value is either a principal-URL for a sharee hosted on the same server, a calendar user address or email address. In the case of the later two, the sharee might not be a user on the same server - though in that case how invitations are sent or access enabled is out of scope for this specification. A server MAY change the sharee's "address" to any suitable alternative that it might prefer when returning the list of sharees via the <xref target="CS:invite">CS:invite property</xref>.
-                    </t>
-                    <t>
-                    	The client MAY include a <xref target="CS:common-name">CS:common-name</xref> element in the <xref target="CS:set">CS:set</xref> element. When provided, the value represents the common name for the sharee, and is returned in the list of sharees via the <xref target="CS:invite">CS:invite property</xref>. The server MAY change this to a suitable alternative when it is able to match the sharee to a known user. If absent from the client request, the server SHOULD add a CS:common-name when it is able to match the sharee with a known user, and a common name for that user can be determined.
-                    </t>
-                    <t>
-                    	When the sharee list on a shared calendar is changed, the server MUST send notifications to each sharee to update them on their current sharing status. This is accomplished by sending a <xref target="CS:invite-notification">CS:invite-notification</xref> notification to each sharee.
-                    </t>
-                    <section title="Example: Successful Sharee Add Request">
-            
-                        <t>
-                          This example shows how to add a single sharee (with calendar user address "mailto:eric at example.com") to a shared calendar with CS:read-write access.
-                        </t>
-    
-                        <figure>
-                          <preamble>&gt;&gt; Request &lt;&lt;</preamble>
-                          <artwork><![CDATA[
-POST /calendars/users/cyrus/shared/ HTTP/1.1
-Host: calendar.example.com
-Content-Type: application/xml; charset="utf-8"
-Content-Length: xxxx
-
-<?xml version="1.0" encoding="utf-8" ?>
-<CS:share xmlns:D="DAV:"
-              xmlns:CS="http://calendarserver.org/ns/">
-  <CS:set>
-    <D:href>mailto:eric at example.com</D:href>
-    <CS:common-name>Eric York</CS:common-name>
-    <CS:summary>Shared workspace</CS:summary>
-    <CS:read-write />
-  </CS:set>
-</CS:share>]]></artwork>
-                        </figure>
-                        <figure>
-                          <preamble>&gt;&gt; Response &lt;&lt;</preamble>
-                          <artwork><![CDATA[
-HTTP/1.1 200 OK
-Cache-Control: no-cache
-Date: Sat, 11 Nov 2006 09:32:12 GMT]]></artwork>
-                        </figure>
-                    </section>
-                    <section title="Example: Successful Multiple Sharee Change Request">
-            
-                        <t>
-                          This example shows how multiple sharee's can be manipulated in a single request. The sharee with calendar user address "mailto:eric at example.com" has their access downgraded to CS:read, whilst another sharee is removed from the access list entirely.
-                        </t>
-    
-                        <figure>
-                          <preamble>&gt;&gt; Request &lt;&lt;</preamble>
-                          <artwork><![CDATA[
-POST /calendars/users/cyrus/shared/ HTTP/1.1
-Host: calendar.example.com
-Content-Type: application/xml; charset="utf-8"
-Content-Length: xxxx
-
-<?xml version="1.0" encoding="utf-8" ?>
-<CS:share xmlns:D="DAV:"
-              xmlns:CS="http://calendarserver.org/ns/">
-  <CS:set>
-    <D:href>mailto:eric at example.com</D:href>
-    <CS:summary>Shared workspace</CS:summary>
-    <CS:read-write />
-  </CS:set>
-  <CS:remove>
-    <D:href>mailto:wilfredo at example.com</D:href>
-  </CS:remove>
-</CS:share>]]></artwork>
-                        </figure>
-                        <figure>
-                          <preamble>&gt;&gt; Response &lt;&lt;</preamble>
-                          <artwork><![CDATA[
-HTTP/1.1 200 OK
-Cache-Control: no-cache
-Date: Sat, 11 Nov 2006 09:32:12 GMT]]></artwork>
-                        </figure>
-                    </section>
-                </section>
-            </section>
-            <section title="Sharee Actions on Shared Calendars">
-                <section title="Replying to a Sharing Invite">
-                	<t>
-                		When a sharee is invited to a shared calendar they can accept or decline the invite by issuing a POST request to the sharee's calendar home collection resource. The POST request MUST contain an XML document as its body with the root element being <xref target="CS:invite-reply">CS:invite-reply</xref>.
-                	</t>
-                	<t>
-                		The <xref target="CS:invite-reply">CS:invite-reply</xref> element in the POST request specifies the sharee who is replying in the DAV:href element, the accept or decline action via the CS:invite-accepted or CS:invite-declined elements, the URL of the shared calendar in the CS:hosturl element, the unique identifier of the invite to which it is a reply in the CS:in-reply-to element, and an optional CS:summary element.
-                	</t>
-                	<t>
-                		The response to a POST request that accepts a shared calendar invite MUST be an XML document containing <xref target="CS:shared-as">CS:shared-as</xref> as its root element. That root element contains a single DAV:href element whose content is the URI of the shared calendar in the sharee's calendar home created by the invite acceptance.
-                	</t>
-                	<t>
-                        When the sharee replies to an invite, the server SHOULD send a notification to the sharer to update them on the change in the sharee state.  This is accomplished by sending a <xref target="CS:invite-reply">CS:invite-reply</xref> notification to the sharer.
-                	</t>
-                </section>
-                <section title="Removing a Shared Calendar">
-                	<t>
-                		To remove a shared calendar from a sharee's calendar home collection a DELETE request is targeted at the shared calendar URI. When such a request is received the server MUST remove the shared calendar from the sharee's calendar home and automatically update the sharee's status in the sharer's calendar's CS:invite property.
-                	</t>
-                </section>
-            </section>
-            <section title="General Considerations">
-                <section title="Access Levels">
-                	<t>
-                		Two levels of access ca be granted by a sharer to any sharee. These are governed by the CS:access element used in the CS:invite/CS:user element that specifies a shared user invite. CS:access contains a single empty element that defines the type of access granted:
-                		<list style="hanging">
-                		<t hangText="CS:read">
-                		    When present this indicates that sharees can read calendar data but cannot change it.
-                		</t>
-                		<t hangText="CS:read-write">
-                		    When present this indicates that sharees can read and write calendar data.
-                		</t>
-                		</list>
-                	</t>
-                </section>
-                <section title="Allowing or Disallowing Sharing" anchor="allowed">
-                	<t>
-                		Servers MAY support calendar sharing on a per-calendar basis - e.g., they could treat some calendars as always private (cannot be shared) or always public (always shared). As a result clients need a way to determine which calendar could be shared so they can enable or disable sharing options on a per-calendar basis.
-                	</t>
-                	<t>
-                		This specification adds a <xref target="CS:allowed-sharing-modes">CS:allowed-sharing-modes</xref> WebDAV property which servers can return on calendar collection resources. This property contains XML elements that describe which sharing or publishing capabilities can be supported by the corresponding calendar collection:
-                		<list>
-							<t><xref target="CS:can-be-shared">CS:can-be-shared</xref>: when present indicates that the calendar collection can be shared. When not present, the calendar collection cannot be shared.</t>
-							<t><xref target="CS:can-be-published">CS:can-be-published</xref>: when present indicates that the calendar collection can be published. When not present, the calendar collection cannot be published.</t>
-						</list>                		
-                	</t>
-                	<t>
-                		When not present on a calendar collection, sharing or publishing of that calendar is not allowed. Clients SHOULD NOT attempt to use requests to enable sharing or publishing targeted at those calendar collections.
-                	</t>
-                </section>
-                <section title="Per-user WebDAV Properties">
-                	<t>
-                		Servers MUST support "per-user" WebDAV properties on shared calendar collections and MAY support them on calendar object resources within shared calendar collections. A "per-user" WebDAV property is one whose value can be set and retrieved independently by each user with appropriate access rights. e.g., user "A" changes the DAV:displayname property on a shared calendar in their calendar home to "My calendar", and user "B" changes the same property to "Shared" on the same shared calendar in their calendar home. When each user retrieves the property value they will see their own last stored value and not the value of the other user.
-                	</t>
-                	<t>
-                		For shared calendars, the server MUST allow all users to write "per-user" WebDAV properties on the shared calendar collection and MAY allow property writes on calendar object resources within the shared calendar collection. This is required even in the case where the sharee has been granted read access only (i.e., the ability to change calendar data is disallowed). This requirement ensures that sharees can always change "personal" properties such as calendar colors and display names.
-                	</t>
-                	<t>
-                		Servers MUST treat the following properties as "per-user":
-                		<list>
-                			<t>DAV:displayname</t>
-                			<t>CALDAV:calendar-description</t>
-                			<t>CALDAV:schedule-calendar-transp</t>
-                			<t>ICAL:calendar-color</t>
-                		</list>
-                	</t>
-                	<t>
-                		Servers MAY treat any dead property as per-user.
-                	</t>
-                	<t>
-                		Servers MUST NOT treat live properties as per-user.
-                	</t>
-                </section>
-                <section title="Per-user Calendar Data" anchor="per-user-data">
-                	<t>
-                		Servers MUST support "per-user" calendar data in calendar object resources stored in shared calendars. This allows each sharee and the sharer to store their own alarms and free busy transparency status without "interfering" with other users who also have access to the same calendar object resources.
-                	</t>
-                	<t>
-                		For calendaring object resources in shared calendar collections, the server MUST treat the following iCalendar data objects as per-user:
-                		<list>
-                			<t>TRANSP property</t>
-                			<t>VALARM component</t>
-                		</list>
-                	</t>
-                	<t>
-                		Servers MAY treat any non-standard X- iCalendar properties as per-user.
-                	</t>
-                	<t>
-                		When handling per-user data in recurring components, servers SHOULD eliminate overridden instances when returning iCalendar data to clients in the case where there are no differences between the overridden component and the instance that could be derived from the "master" recurrence component. For example, consider a daily recurring event, Monday through Friday, initially defined without any overridden instances, that is in a shared calendar. If user "A" overrides the Tuesday instance and adds their own "VALARM" component only, then when user "A" later retrieves the data again they would see that overridden instance, but when user "B" does so, they would not. This ensures that each user sees the most "compact" representation of the calendar data.
-                	</t>
-                </section>
-                <section title="Scheduling">
-                	<t>
-                		<xref target="I-D.desruisseaux-caldav-sched">CalDAV Scheduling</xref> defines how a CalDAV server carries out scheduling operations when calendar object resources are created, modified or deleted and include "ORGANIZER" and "ATTENDEE" iCalendar properties.
-                	</t>
-                	<t>
-                		When calendar object resources are created, modified or deleted in shared calendars by sharees, the following restrictions apply:
-                		<list style="numbers">
-                			<t>The "ORGANIZER" iCalendar property value in the iCalendar data MUST match a calendar user address of the sharer (owner) of the shared calendar. The DAV:owner WebDAV property MUST be present on a shared calendar and MUST provide a reference to a principal-URL of the sharer (owner) of the shared calendar. Clients can use this value to determine what the allowed "ORGANIZER" iCalendar property values are. The server MUST reject any attempt by a sharee to create an iCalendar component with an "ORGANIZER" property value other than the sharer (owner) of the shared calendar.</t>
-                			<t>The server MUST reject any attempt by a sharee to MOVE a calendar object resource in a shared calendar to some other collection.</t>
-                			<t>When a sharee is listed as an Attendee in a calendar object resource in a shared calendar, and write access is granted, the sharee is allowed to change not only iCalendar data related to the Organizer, but also data related to the Attendee. i.e., a sharee can change their own participation status on the "ATTENDEE" iCalendar property referring to them. Additionally, if the sharee is not listed as an Attendee, and write access is granted, the sharee can add themselves as an Attendee.</t>
-                			<t>The default calendar collection defined in Section 6.3 of <xref target="I-D.desruisseaux-caldav-sched"/> MUST NOT be a calendar shared to the corresponding calendar user.</t>
-                		</list>
-                	</t>
-                	<t>
-                		Following are additional considerations for scheduling with shared calendars:
-                		<list style="numbers">
-                			<t>A scheduled iCalendar component could appear in more than one calendar collection within a sharee's calendar home if the sharee is an Attendee and the Organizer or other Attendees have shared a calendar with the sharee that includes their copies of the iCalendar component. It is important to note that the scheduled component in the shared calendar could have different access rights than the one in the sharee's owned calendar.</t>
-                			<t>A scheduled iCalendar component appearing in a sharee's shared calendar could include the sharee as an Attendee. For recurring events, it is possible for the sharee to only be listed as an Attendee in some instances, as opposed to all. Clients will need to be aware of this when allowing sharee's to set their own participation status.</t>
-                		</list>
-                	</t>
-                	<t>
-                		In addition, when a shared calendar is first accepted by a sharee, the server SHOULD set the CALDAV:schedule-calendar-transp property to the value CALDAV:transparent to ensure newly accepted shared calendars do not contribute to the sharee's freebusy time until the sharee explicitly requests it.
-                	</t>
-                </section>
-            </section>
-        </section>
-
-        <section title='XML Element Definitions'>
-            <section title="CS:shared-owner" anchor="CS:shared-owner">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">shared-owner</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">Used to indicate that a calendar is being shared by the owner.</t>
-                    <t hangText="Description:">This property appears in the DAV:resourcetype property on the calendar collection resource shared by a sharer. See <xref target="properties"/>.</t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT shared-owner EMPTY>]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-            <section title="CS:shared" anchor="CS:shared">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">shared</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">Used to indicate that a calendar is being shared to a sharee.</t>
-                    <t hangText="Description:">This property appears in the DAV:resourcetype property on a calendar collection resource that is shared to a sharee and appears in the sharee's calendar home collection. See <xref target="properties"/>.</t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT shared EMPTY>]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-            <section title="CS:can-be-shared" anchor="CS:can-be-shared">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">can-be-shared</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">Used to indicate that a calendar can be shared.</t>
-                    <t hangText="Description:">This element indicates that a calendar can be shared with other users. See <xref target="CS:allowed-sharing-modes"/></t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT can-be-shared EMPTY>]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-            <section title="CS:can-be-published" anchor="CS:can-be-published">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">can-be-published</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">Used to indicate that a calendar can be published.</t>
-                    <t hangText="Description:">This element indicates that a calendar can be published to anyone. See <xref target="CS:allowed-sharing-modes"/></t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT can-be-published EMPTY>]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-            <section title="CS:user" anchor="CS:user">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">user</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">Used to show status of sharing invites sent to sharees.</t>
-                    <t hangText="Description:">This element provides the "status" of a sharing invite sent to a particular user. See <xref target="CS:invite"/>.</t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT user (DAV:href, common-name?, (invite-noresponse |
-                invite-accepted | invite-declined | invite-invalid),
-                access, summary?)>]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-            <section title="CS:invite-noresponse">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">invite-noresponse</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">Sharing invite status.</t>
-                    <t hangText="Description:">When used in a <xref target="CS:user">CS:user</xref> element, this element is used to indicate that the sharee has never replied to the corresponding sharing invite. When used in a <xref target="CS:invite-notification">CS:invite-notification</xref> element, this element is used to indicate to the sharee that a sharing reply is needed.</t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT invite-noresponse EMPTY>]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-            <section title="CS:invite-deleted">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">invite-deleted</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">Sharing invite status.</t>
-                    <t hangText="Description:">When used in a <xref target="CS:invite-notification">CS:invite-notification</xref> element, this element is used to indicate to the sharee that a shared calendar has been unshared by the sharer.</t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT invite-deleted EMPTY>]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-            <section title="CS:invite-accepted">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">invite-accepted</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">Sharing invite status.</t>
-                    <t hangText="Description:">When used in a <xref target="CS:user">CS:user</xref> element, this element is used to indicate that the sharee has accepted the corresponding sharing invite. When used in a <xref target="CS:invite-notification">CS:invite-notification</xref> element, this element is used to indicate to the sharee that the sharing invite is an update for one they previously accepted.</t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT invite-accepted EMPTY>]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-            <section title="CS:invite-declined">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">invite-declined</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">Sharing invite status.</t>
-                    <t hangText="Description:">When used in a <xref target="CS:user">CS:user</xref> element, this element is used to indicate that the sharee has declined the corresponding sharing invite. When used in a <xref target="CS:invite-notification">CS:invite-notification</xref> element, this element is used to indicate to the sharee that the sharing invite is an update for one they previously declined.</t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT invite-declined EMPTY>]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-            <section title="CS:invite-invalid">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">invite-invalid</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">Sharing invite status.</t>
-                    <t hangText="Description:">When used in a <xref target="CS:user">CS:user</xref> element, this element is used to indicate that the corresponding sharee is not a valid calendar user known to the server.</t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT invite-invalid EMPTY>]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-            <section title="CS:access">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">access</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">Shared calendar access level.</t>
-                    <t hangText="Description:">When used in a <xref target="CS:user">CS:user</xref> element, this element is used to indicate the sharing access level granted to the corresponding sharee.</t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT invite-invalid (read | read-write)>]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-            <section title="CS:read">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">read</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">Shared calendar access level privilege.</t>
-                    <t hangText="Description:">Indicates that the access level granted only allows sharees to read data in the shared calendar (though they can write <xref target="per-user-data">per-user data</xref>).</t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT read EMPTY>]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-            <section title="CS:read-write">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">read-write</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">Shared calendar access level privilege.</t>
-                    <t hangText="Description:">Indicates that the access level granted allows sharees to read and write all data in the shared calendar, with the exception of components that would trigger scheduling.</t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT read-write EMPTY>]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-            <section title="CS:summary">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">summary</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">Summary or title of shared calendar.</t>
-                    <t hangText="Description:">A brief description of a shared calendar. This can be used by sharers to communicate the nature of a shared calendar to sharees, as well as used by sharees to indicate back to the sharer how each sharee is refering to the shared calendar.</t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT summary (#PCDATA)>]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-            <section title="CS:invite-notification" anchor="CS:invite-notification">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">invite-notification</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">A notification used as a shared calendar invite.</t>
-                    <t hangText="Description:">Defines a notification message sent automatically by the server when a sharer adds, changes or removes a sharee from a shared calendar. The DAV:href element specifies the calendar user address of the sharee to whom the message was sent.</t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT invite-notification (uid, DAV:href,
-                               (invite-noresponse | invite-deleted |
-                                invite-accepted | invite-declined),
-                               access, hosturl, organizer, summary?>]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-            <section title="CS:uid">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">uid</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">Unique identifier.</t>
-                    <t hangText="Description:">A unique identifier for an invitation to a shared calendar.</t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT uid (#PCDATA)>]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-            <section title="CS:hosturl">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">hosturl</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">Identifies the source URL of a shared calendar.</t>
-                    <t hangText="Description:">Contains a single DAV:href element that refers to the source of a shared calendar - i.e., the URL of the calendar shared by the sharer.</t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT hosturl (DAV:href)>]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-            <section title="CS:organizer">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">organizer</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">Identifies the sharer of a shared calendar.</t>
-                    <t hangText="Description:">Contains a single DAV:href element that identifies the calendar user address of the sharer of a shared calendar, and an optional CS:common-name element that matches that user.</t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT organizer (DAV:href, CS:common-name?)>]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-            <section title="CS:common-name" anchor="CS:common-name">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">common-name</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">The common name of a sharer or sharee.</t>
-                    <t hangText="Description:">The common name is optionally provided by a client when adding a sharee and optionally included (or modified) by the server when returning results for sharers or sharees and in notifications.</t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT common-name (#PCDATA)>]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-            <section title="CS:invite-reply" anchor="CS:invite-reply">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">invite-reply</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">A notification used as a reply to a shared calendar invite.</t>
-                    <t hangText="Description:">Defines a notification message sent automatically by the server when a sharee replies to a shared calendar invite. The DAV:href element specifies the calendar user address of the sharee to whom the original invite message was sent.</t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT invite-reply (DAV:href,
-                        (invite-accepted | invite-declined),
-                        hosturl, in-reply-to, summary?>]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-            <section title="CS:in-reply-to">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">in-reply-to</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">Unique identifier.</t>
-                    <t hangText="Description:">Specifies the unique identifier of the inviate message that this notification message is a reply to.</t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT in-reply-to (#PCDATA)>]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-            <section title="CS:notification" anchor="CS:notification">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">notification</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">Notification message root element.</t>
-                    <t hangText="Description:">The root element used in notification resources.</t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT notification (CS:dtstamp,
-                        (invite-notification | invite-reply)>
-<!-- Any notification type element can appear after CS:dtstamp,
-     this specification defines only the two listed above -->]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-            <section title="CS:dtstamp" anchor="CS:dtstamp">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">dtstamp</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">Date-time stamp.</t>
-                    <t hangText="Description:">Contains the date-time stamp corresponding to the creation of a notification message.</t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT dtstamp (#PCDATA)>]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-            <section title="CS:share" anchor="CS:share">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">share</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">Describes changes to sharees.</t>
-                    <t hangText="Description:">The root element used in POST requests on calendars by sharers to manipulate the sharee list of a shared calendar.</t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT share (set | remove)*>]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-            <section title="CS:set" anchor="CS:set">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">set</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">Sets access for a sharee.</t>
-                    <t hangText="Description:">Used to add or modify sharee access to a shared calendar. The specified access to the shared calendar is given to the sharee.</t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT set (DAV:href, common-name?, summary?,
-               (read | read-write)>]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-            <section title="CS:remove" anchor="CS:remove">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">remove</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">Removes access for a sharee.</t>
-                    <t hangText="Description:">Used to remove sharee access to a shared calendar. All access to the shared calendar is removed for the sharee.</t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT remove (DAV:href)>]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-            <section title="CS:shared-as" anchor="CS:shared-as">
-                <t>
-                  <list style="hanging">
-                    <t hangText="Name:">shared-as</t>
-                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
-                    <t hangText="Purpose:">Identifies a shared calendar.</t>
-                    <t hangText="Description:">Returned by the server for a POST request by a sharee accepting a shared calendar invite. The DAV:href element specifies the URI of the calendar created by the acceptance.</t>
-                    <t hangText="Definition:">
-                      <figure>
-                        <artwork><![CDATA[
-<!ELEMENT shared-as (DAV:href)>]]></artwork>
-                      </figure>
-                    </t>
-                  </list>
-                </t>
-            </section>
-        </section>
-
-        <section title='Security Considerations'>
-            <t>
-                Per-user WebDAV properties and iCalendar data MUST only be accessible by the user that created them.
-            </t>
-            <t>
-                Alarms set by the sharer SHOULD NOT be propagated to sharees by default. Clients SHOULD NOT automatically enable triggering of alarms on shared calendars that have just been accepted without confirmation by the user.
-            </t>
-            <t>
-            	TBD
-            </t>
-        </section>
-        <section title='IANA Considerations'>
-            <t>
-                This document does not require any actions on the part of IANA.
-            </t>
-        </section>
-        <section title='Acknowledgments'>
-            <t>
-                This specification is the result of discussions between the Apple calendar server and client teams.
-            </t>
-        </section>
-    </middle>
-    <back>
-        <references title='Normative References'>
-            &rfc2119;
-            &rfc3744;
-            &rfc4791;
-            &rfc4918;
-            &rfc5689;
-            &I-D.desruisseaux-caldav-sched; 
-        </references>
-<!--
-<references title='Informative References'>
-</references>
--->
-        <section title='Change History'>
-            <t>Changes in -02:
-                <list style='numbers'>
-                    <t>Removed read-write-shared access mode - now a server that does not support shared scheduling should advertise that via a DAV header</t>
-                </list>
-            </t>
-        </section>
-        <section title='Change History'>
-            <t>Changes in -01:
-                <list style='numbers'>
-                    <t>Added CS:shared-url property</t>
-                    <t>Clarified that notifications are only required to be sent when sharee status is changed</t>
-                </list>
-            </t>
-        </section>
-    </back>
-</rfc>

Added: CalendarServer/trunk/doc/Extensions/caldav-sharing.txt
===================================================================
--- CalendarServer/trunk/doc/Extensions/caldav-sharing.txt	                        (rev 0)
+++ CalendarServer/trunk/doc/Extensions/caldav-sharing.txt	2012-09-19 17:16:32 UTC (rev 9822)
@@ -0,0 +1,1624 @@
+
+
+
+Calendar Server Extension                                       C. Daboo
+                                                                 E. York
+                                                              Apple Inc.
+                                                      September 19, 2012
+
+
+                Shared and Published Calendars in CalDAV
+
+Abstract
+
+   This specification defines an extension to CalDAV that enables the
+   sharing of calendars between users on a CalDAV server.
+
+
+Table of Contents
+
+   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
+   2.  Conventions Used in This Document  . . . . . . . . . . . . . .  3
+   3.  Overview . . . . . . . . . . . . . . . . . . . . . . . . . . .  4
+   4.  Notifications  . . . . . . . . . . . . . . . . . . . . . . . .  5
+     4.1.  Additional Principal Properties  . . . . . . . . . . . . .  5
+       4.1.1.  CS:notification-URL Property . . . . . . . . . . . . .  6
+     4.2.  Properties on Notification Resources . . . . . . . . . . .  6
+       4.2.1.  CS:notificationtype Property . . . . . . . . . . . . .  6
+   5.  Shared Calendaring . . . . . . . . . . . . . . . . . . . . . .  7
+     5.1.  Feature Discovery  . . . . . . . . . . . . . . . . . . . .  7
+     5.2.  Additional Properties for Calendars  . . . . . . . . . . .  7
+       5.2.1.  DAV:resourcetype Property  . . . . . . . . . . . . . .  7
+       5.2.2.  CS:invite Property . . . . . . . . . . . . . . . . . .  8
+       5.2.3.  CS:allowed-sharing-modes Property  . . . . . . . . . .  8
+       5.2.4.  CS:shared-url Property . . . . . . . . . . . . . . . .  9
+     5.3.  Sharer Actions on Shared Calendars . . . . . . . . . . . .  9
+       5.3.1.  Sharing or Unsharing a Calendar  . . . . . . . . . . .  9
+       5.3.2.  Manipulating Sharees of a Shared Calendar  . . . . . . 10
+         5.3.2.1.  Example: Successful Sharee Add Request . . . . . . 11
+         5.3.2.2.  Example: Successful Multiple Sharee Change
+                   Request  . . . . . . . . . . . . . . . . . . . . . 11
+     5.4.  Sharee Actions on Shared Calendars . . . . . . . . . . . . 12
+       5.4.1.  Replying to a Sharing Invite . . . . . . . . . . . . . 12
+       5.4.2.  Removing a Shared Calendar . . . . . . . . . . . . . . 13
+     5.5.  General Considerations . . . . . . . . . . . . . . . . . . 13
+       5.5.1.  Access Levels  . . . . . . . . . . . . . . . . . . . . 13
+       5.5.2.  Allowing or Disallowing Sharing  . . . . . . . . . . . 13
+       5.5.3.  Per-user WebDAV Properties . . . . . . . . . . . . . . 14
+       5.5.4.  Per-user Calendar Data . . . . . . . . . . . . . . . . 14
+       5.5.5.  Scheduling . . . . . . . . . . . . . . . . . . . . . . 15
+   6.  XML Element Definitions  . . . . . . . . . . . . . . . . . . . 16
+     6.1.  CS:shared-owner  . . . . . . . . . . . . . . . . . . . . . 16
+
+
+
+Daboo & York                                                    [Page 1]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+     6.2.  CS:shared  . . . . . . . . . . . . . . . . . . . . . . . . 17
+     6.3.  CS:can-be-shared . . . . . . . . . . . . . . . . . . . . . 17
+     6.4.  CS:can-be-published  . . . . . . . . . . . . . . . . . . . 18
+     6.5.  CS:user  . . . . . . . . . . . . . . . . . . . . . . . . . 18
+     6.6.  CS:invite-noresponse . . . . . . . . . . . . . . . . . . . 18
+     6.7.  CS:invite-deleted  . . . . . . . . . . . . . . . . . . . . 19
+     6.8.  CS:invite-accepted . . . . . . . . . . . . . . . . . . . . 19
+     6.9.  CS:invite-declined . . . . . . . . . . . . . . . . . . . . 19
+     6.10. CS:invite-invalid  . . . . . . . . . . . . . . . . . . . . 20
+     6.11. CS:access  . . . . . . . . . . . . . . . . . . . . . . . . 20
+     6.12. CS:read  . . . . . . . . . . . . . . . . . . . . . . . . . 21
+     6.13. CS:read-write  . . . . . . . . . . . . . . . . . . . . . . 21
+     6.14. CS:summary . . . . . . . . . . . . . . . . . . . . . . . . 21
+     6.15. CS:invite-notification . . . . . . . . . . . . . . . . . . 22
+     6.16. CS:uid . . . . . . . . . . . . . . . . . . . . . . . . . . 22
+     6.17. CS:hosturl . . . . . . . . . . . . . . . . . . . . . . . . 23
+     6.18. CS:organizer . . . . . . . . . . . . . . . . . . . . . . . 23
+     6.19. CS:common-name . . . . . . . . . . . . . . . . . . . . . . 23
+     6.20. CS:first-name  . . . . . . . . . . . . . . . . . . . . . . 24
+     6.21. CS:last-name . . . . . . . . . . . . . . . . . . . . . . . 24
+     6.22. CS:invite-reply  . . . . . . . . . . . . . . . . . . . . . 24
+     6.23. CS:in-reply-to . . . . . . . . . . . . . . . . . . . . . . 25
+     6.24. CS:notification  . . . . . . . . . . . . . . . . . . . . . 25
+     6.25. CS:dtstamp . . . . . . . . . . . . . . . . . . . . . . . . 26
+     6.26. CS:share . . . . . . . . . . . . . . . . . . . . . . . . . 26
+     6.27. CS:set . . . . . . . . . . . . . . . . . . . . . . . . . . 26
+     6.28. CS:remove  . . . . . . . . . . . . . . . . . . . . . . . . 27
+     6.29. CS:shared-as . . . . . . . . . . . . . . . . . . . . . . . 27
+   7.  Security Considerations  . . . . . . . . . . . . . . . . . . . 27
+   8.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 27
+   9.  Acknowledgments  . . . . . . . . . . . . . . . . . . . . . . . 28
+   10. Normative References . . . . . . . . . . . . . . . . . . . . . 28
+   Appendix A.  Change History  . . . . . . . . . . . . . . . . . . . 28
+   Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 29
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Daboo & York                                                    [Page 2]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+1.  Introduction
+
+   CalDAV [RFC4791] provides a way for calendar users to store calendar
+   data and exchange this data via scheduling operations.  Based on the
+   WebDAV [RFC4918] protocol, it also includes the ability to manage
+   access to calendar data via the WebDAV ACL [RFC3744] extension.
+
+   WebDAV ACL [RFC3744] provides a way to manage fine-grained access
+   controls on WebDAV resources.  Whilst this could be used directly to
+   manage sharing of calendars, experience has shown that client
+   developers are averse to using it due to its complexity.  Instead a
+   simpler process for sharing calendars is preferred.
+
+   This extension defines a way for individual calendar users to share
+   calendars with other users.  This is done via an "opt-in" process in
+   which a sharing invite is sent from the sharer to a sharee, allowing
+   the sharee to accept or decline.  If the sharee accepts the sharing
+   invite, the shared calendar is made available to them in their own
+   calendar home collection (i.e., alongside their own personal
+   calendars).  HTTP POST operations are used to manage the sharing
+   invitations and replies, and WebDAV properties are used to expose the
+   state of shared calendars.
+
+
+2.  Conventions Used in This Document
+
+   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 [RFC2119].
+
+   When XML element types in the namespaces "DAV:" and
+   "urn:ietf:params:xml:ns:caldav" are referenced in this document
+   outside of the context of an XML fragment, the string "DAV:" and
+   "CALDAV:" will be prefixed to the element type names respectively.
+
+   The namespace "http://calendarserver.org/ns/" is used for XML
+   elements defined in this specification.  When XML element types in
+   that namespace are referenced in this document outside of the context
+   of an XML fragment, the string "CS:" will be prefixed to the element
+   type names.
+
+   Terms Used:
+
+   Sharer  A calendar user who is sharing a calendar with other calendar
+      users.
+
+
+
+
+
+
+Daboo & York                                                    [Page 3]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+   Sharee  A calendar user to whom a calendar has been shared.
+
+   Sharing Invite  A message sent by a sharer to a sharee to indicate
+      the status of a shared calendar.
+
+   Sharing Reply  A message sent by a sharee to a sharer to indicate the
+      status of a shared calendar.
+
+
+3.  Overview
+
+   This section provides a basic overview of this protocol by way of a
+   simple use case of a sharer sharing a calendar with a single sharee.
+
+   To share a calendar with another user, the sharer's client executes
+   an HTTP POST request against the calendar collection resource for the
+   calendar to be shared.  The POST request body will contain details of
+   the calendar user to whom the calendar is to be shared as well as the
+   access right to be granted to them.  If the request succeeds, a
+   notification is sent to the sharee with details of the calendar being
+   shared to them.
+
+   The sharer's client will show the notification to the sharee and
+   present them with the choice to accept or decline the invitation to
+   the shared calendar.  If the sharee chooses to decline, then nothing
+   changes for that sharee.  If the sharee chooses to accept, then the
+   server automatically creates a new calendar collection resource in
+   the sharee's calendar home collection, and ensures that calendar
+   provides a mapping to the actual shared calendar of the sharer.  Thus
+   the shared calendar is available to the sharee as just another
+   calendar in their calendar home.  The server enforces the appropriare
+   access privileges for the sharee.
+
+   At any time, the sharer can inspect properties on the calendar
+   collection being shared, and determine the accept/decline status of
+   each sharee.  Additional sharees can be added and existing ones
+   removed.  The access privileges for existing sharees can also be
+   changed.
+
+   Once a sharee has a shared calendar set to appear in their calendar
+   home collection, they can remove it and decline the sharing invite by
+   simply having their client issue an HTTP DELETE request on the shared
+   calendar collection.  That does not delete any calendar data, but
+   rather simply removes the "link" to the sharer's calendar collection
+   and sets the sharee's inviate status to declined.
+
+
+
+
+
+
+Daboo & York                                                    [Page 4]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+4.  Notifications
+
+   In order to facilitate the process of sharing invitations, this
+   specification defines a new generic notification mechanism for CalDAV
+   servers.  When this feature is available, a CS:notification-URL
+   (Section 4.1.1) property appears on principal resources for those
+   principals who are able to receive notifications.  That property
+   specifies a single DAV:href element whose content refers to a WebDAV
+   collection resource.  Notification "messages" are deposited into this
+   collection and can be retrieved by clients and acted on accordingly.
+
+   The notification collection referenced by the CS:notification-URL
+   (Section 4.1.1) property MUST have a DAV:resourcetype property with
+   DAV:collection and CS:notification (Section 6.24) child elements.
+
+   Notification "messages" are XML documents stored as resources in the
+   notification collection.  Each XML document contains a CS:
+   notification (Section 6.24) element as its root.  The root element
+   contains a CS:dtstamp (Section 6.25) element, and one additional
+   element which represents the type of notification being conveyed in
+   the message.  That child element will typically contain additional
+   content that describes the notification.
+
+   Each notification resource has a CS:notificationtype (Section 4.2.1)
+   property which contains as its single child element an empty element
+   that matches the child element of the notification resource XML
+   document root.  Any attributes on the child element in the XML
+   document are also present in the property child element.
+
+   Notifications are automatically generated by the server (perhaps in
+   response to a client action) with an appropriate resource stored in
+   the notifications collection of the user to whom the notification is
+   targeted.  Clients SHOULD monitor the notification collection looking
+   for new notification resources.  When doing so, clients SHOULD look
+   at the CS:notificationtype (Section 4.2.1) property to ensure that
+   the notification is of a type that the client can handle.  Once a
+   client has handled the notification in whatever way is appropriate it
+   SHOULD delete the notification resource.  Servers MAY delete
+   notification resources on their own if they determine that the
+   notifications are no longer relevant or valid.  Servers MAY coalesce
+   notifications as appropriate.
+
+4.1.  Additional Principal Properties
+
+   This section defines new properties for WebDAV principal resources as
+   defined in RFC3744 [RFC3744].  These properties are likely to be
+   protected but the server MAY allow them to be written by appropriate
+   users.
+
+
+
+Daboo & York                                                    [Page 5]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+4.1.1.  CS:notification-URL Property
+
+   Name:  notification-URL
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Identify the URL of the notification collection owned by
+      the associated principal resource.
+
+   Protected:  This property SHOULD be protected.
+
+   PROPFIND behavior:  This property SHOULD NOT be returned by a
+      PROPFIND allprop request (as defined in Section 14.2 of
+      [RFC4918]).
+
+   COPY/MOVE behavior:  This property value SHOULD be preserved in COPY
+      and MOVE operations.
+
+   Description:  This property is needed for a client to determine where
+      the notification collection of the current user is located so that
+      processing of notification messages can occur.  If not present,
+      then the associated calendar user is not enabled for notification
+      messages on the server.
+
+   Definition:
+
+   <!ELEMENT notification-URL (DAV:href)>
+
+4.2.  Properties on Notification Resources
+
+   The following new WebDAV properties are defined for notification
+   resources.
+
+4.2.1.  CS:notificationtype Property
+
+   Name:  notificationtype
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Identify the type of notification of the corresponding
+      resource.
+
+   Protected:  This property MUST be protected.
+
+   PROPFIND behavior:  This property SHOULD NOT be returned by a
+      PROPFIND allprop request (as defined in Section 14.2 of
+      [RFC4918]).
+
+
+
+
+Daboo & York                                                    [Page 6]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+   COPY/MOVE behavior:  This property value MUST be preserved in COPY
+      and MOVE operations.
+
+   Description:  This property allows a client, via a PROPFIND Depth:1
+      request, to quickly find notification messages that the client can
+      handle in a notification collection.  The single child element is
+      the notification resource root element's child defining the
+      notification itself.  This element MUST be empty, though any
+      attributes on the element in the notification resource MUST be
+      present in the property element.
+
+   Definition:
+
+   <!ELEMENT notificationtype (invite-notification | invite-reply)>
+   <!-- Child elements are empty but will have appropriate attributes.
+        Any valid notification message child element can appear.-->
+
+
+5.  Shared Calendaring
+
+5.1.  Feature Discovery
+
+   A server that supports the features described in this document MUST
+   include "calendarserver-sharing" as a field in the DAV response
+   header from an OPTIONS request on any resource that supports these
+   features.
+
+5.2.  Additional Properties for Calendars
+
+   The following new or modified WebDAV properties are defined for
+   calendar collections and used to view or manipulate shared calendar
+   features.
+
+5.2.1.  DAV:resourcetype Property
+
+   Calendar collections that are shared have addition elements listed in
+   their DAV:resourcetype property in addition to DAV:collection and
+   CALDAV:calendar.
+
+   o  CS:shared-owner (Section 6.1): used to indicate that the calendar
+      is owned by the current user and is being shared by them.
+
+   o  CS:shared (Section 6.2): used to indicate that the calendar is
+      owned by another user and is being shared to the current user.
+
+
+
+
+
+
+
+Daboo & York                                                    [Page 7]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+5.2.2.  CS:invite Property
+
+   Name:  invite
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Used to show to whom a calendar has been shared.
+
+   Protected:  This property MUST be protected.
+
+   PROPFIND behavior:  This property SHOULD NOT be returned by a
+      PROPFIND allprop request (as defined in Section 14.2 of
+      [RFC4918]).
+
+   COPY/MOVE behavior:  This property value MUST be preserved in COPY
+      and MOVE operations.
+
+   Description:  This WebDAV property is present on a calendar
+      collection resource that has been shared by the owner, or on the
+      calendar collection resources of the sharees of the calendar.  It
+      provides a list of users to whom the calendar has been shared,
+      along with the "status" of the sharing invites sent to each user.
+      In addition, servers SHOULD include a CS:organizer XML element on
+      calendar collection resources of the sharees to provide clients
+      with a fast way to determine who the sharer is.  A server's local
+      privacy policy may prevent sharees from knowing about other
+      sharees on a shared calendar.  If that is so server will not
+      include CS:user XML elements for other sharees.
+
+   Definition:
+
+   <!ELEMENT invite (organizer?, user*)>
+
+5.2.3.  CS:allowed-sharing-modes Property
+
+   Name:  allowed-sharing-modes
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Used to show which modes of sharing are supported on a
+      calendar collection.
+
+   Protected:  This property MUST be protected.
+
+   PROPFIND behavior:  This property SHOULD NOT be returned by a
+      PROPFIND allprop request (as defined in Section 14.2 of
+      [RFC4918]).
+
+
+
+
+Daboo & York                                                    [Page 8]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+   COPY/MOVE behavior:  This property value MUST be preserved in COPY
+      and MOVE operations.
+
+   Description:  This WebDAV property is present on a calendar
+      collection resource that can been shared or published.  It
+      provides a list of options indicating what sharing modes are
+      allowed as per Section 5.5.2.
+
+   Definition:
+
+   <!ELEMENT allowed-sharing-modes
+             (can-be-shared?, can-be-published?)>
+
+5.2.4.  CS:shared-url Property
+
+   Name:  shared-url
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Indicates the URL of the owner's copy of a shared calendar.
+
+   Protected:  This property MUST be protected.
+
+   PROPFIND behavior:  This property SHOULD NOT be returned by a
+      PROPFIND allprop request (as defined in Section 14.2 of
+      [RFC4918]).
+
+   COPY/MOVE behavior:  This property value MUST be preserved in COPY
+      and MOVE operations.
+
+   Description:  This WebDAV property is present on a shared calendar
+      collection resource that appears in a sharee's calendar home
+      collection.  Its content is a single DAV:href element whose value
+      is the URL of the sharer's calendar being shared.
+
+   Definition:
+
+   <!ELEMENT shared-url (DAV:href)>
+
+5.3.  Sharer Actions on Shared Calendars
+
+5.3.1.  Sharing or Unsharing a Calendar
+
+   To update an existing calendar to be shared, the sharer simply adds
+   one or more sharees to the calendar collection as per Section 5.3.2.
+   The server MUST update the DAV:resourcetype property on the calendar
+   collection to ensure it contains a CS:shared-owner XML element to
+   indicate the calendar collection is now shared.
+
+
+
+Daboo & York                                                    [Page 9]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+   To unshare a calendar, the sharer simply removes all sharees to the
+   CS:invite property of the calendar collection as per Section 5.3.2.
+   The server MUST update the DAV:resourcetype property on the calendar
+   collection to ensure it does not contain a CS:shared-owner XML
+   element to indicate the calendar collection is not shared.
+
+5.3.2.  Manipulating Sharees of a Shared Calendar
+
+   The sharer of a shared calendar is able to manipulate the sharee list
+   by issuing a POST request targeted at the calendar collection
+   resource.  The POST request MUST contain an XML document as its body
+   with the root element being CS:share (Section 6.26).
+
+   The CS:share (Section 6.26) element in the POST requests MUST contain
+   one or more CS:set (Section 6.27) or CS:remove (Section 6.28)
+   elements.  For each CS:set (Section 6.27) element, the server MUST
+   add the specified sharee access to the calendar.  For each CS:remove
+   (Section 6.28) element the server MUST remove the specified sharee
+   access from the shared calendar.  In each case the server MUST send a
+   notification message to any sharees whose status is changed (added,
+   modified or removed), indicating to them a change in status for the
+   shared calendar.  The server SHOULD NOT send notification messages to
+   sharees whose status is unchanged.
+
+   Sharee's are identified via a DAV:href element whose value is either
+   a principal-URL for a sharee hosted on the same server, a calendar
+   user address or email address.  In the case of the later two, the
+   sharee might not be a user on the same server - though in that case
+   how invitations are sent or access enabled is out of scope for this
+   specification.  A server MAY change the sharee's "address" to any
+   suitable alternative that it might prefer when returning the list of
+   sharees via the CS:invite property (Section 5.2.2).
+
+   The client MAY include a CS:common-name (Section 6.19) element in the
+   CS:set (Section 6.27) element.  When provided, the value represents
+   the common name for the sharee, and is returned in the list of
+   sharees via the CS:invite property (Section 5.2.2).  The server MAY
+   change this to a suitable alternative when it is able to match the
+   sharee to a known user.  If absent from the client request, the
+   server SHOULD add a CS:common-name when it is able to match the
+   sharee with a known user, and a common name for that user can be
+   determined.
+
+   When the sharee list on a shared calendar is changed, the server MUST
+   send notifications to each sharee to update them on their current
+   sharing status.  This is accomplished by sending a CS:invite-
+   notification (Section 6.15) notification to each sharee.
+
+
+
+
+Daboo & York                                                   [Page 10]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+5.3.2.1.  Example: Successful Sharee Add Request
+
+   This example shows how to add a single sharee (with calendar user
+   address "mailto:eric at example.com") to a shared calendar with CS:read-
+   write access.
+
+   >> Request <<
+
+   POST /calendars/users/cyrus/shared/ HTTP/1.1
+   Host: calendar.example.com
+   Content-Type: application/xml; charset="utf-8"
+   Content-Length: xxxx
+
+   <?xml version="1.0" encoding="utf-8" ?>
+   <CS:share xmlns:D="DAV:"
+                 xmlns:CS="http://calendarserver.org/ns/">
+     <CS:set>
+       <D:href>mailto:eric at example.com</D:href>
+       <CS:common-name>Eric York</CS:common-name>
+       <CS:summary>Shared workspace</CS:summary>
+       <CS:read-write />
+     </CS:set>
+   </CS:share>
+
+   >> Response <<
+
+   HTTP/1.1 200 OK
+   Cache-Control: no-cache
+   Date: Sat, 11 Nov 2006 09:32:12 GMT
+
+5.3.2.2.  Example: Successful Multiple Sharee Change Request
+
+   This example shows how multiple sharee's can be manipulated in a
+   single request.  The sharee with calendar user address
+   "mailto:eric at example.com" has their access downgraded to CS:read,
+   whilst another sharee is removed from the access list entirely.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Daboo & York                                                   [Page 11]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+   >> Request <<
+
+   POST /calendars/users/cyrus/shared/ HTTP/1.1
+   Host: calendar.example.com
+   Content-Type: application/xml; charset="utf-8"
+   Content-Length: xxxx
+
+   <?xml version="1.0" encoding="utf-8" ?>
+   <CS:share xmlns:D="DAV:"
+                 xmlns:CS="http://calendarserver.org/ns/">
+     <CS:set>
+       <D:href>mailto:eric at example.com</D:href>
+       <CS:summary>Shared workspace</CS:summary>
+       <CS:read-write />
+     </CS:set>
+     <CS:remove>
+       <D:href>mailto:wilfredo at example.com</D:href>
+     </CS:remove>
+   </CS:share>
+
+   >> Response <<
+
+   HTTP/1.1 200 OK
+   Cache-Control: no-cache
+   Date: Sat, 11 Nov 2006 09:32:12 GMT
+
+5.4.  Sharee Actions on Shared Calendars
+
+5.4.1.  Replying to a Sharing Invite
+
+   When a sharee is invited to a shared calendar they can accept or
+   decline the invite by issuing a POST request to the sharee's calendar
+   home collection resource.  The POST request MUST contain an XML
+   document as its body with the root element being CS:invite-reply
+   (Section 6.22).
+
+   The CS:invite-reply (Section 6.22) element in the POST request
+   specifies the sharee who is replying in the DAV:href element, the
+   accept or decline action via the CS:invite-accepted or CS:invite-
+   declined elements, the URL of the shared calendar in the CS:hosturl
+   element, the unique identifier of the invite to which it is a reply
+   in the CS:in-reply-to element, and an optional CS:summary element.
+
+   The response to a POST request that accepts a shared calendar invite
+   MUST be an XML document containing CS:shared-as (Section 6.29) as its
+   root element.  That root element contains a single DAV:href element
+   whose content is the URI of the shared calendar in the sharee's
+   calendar home created by the invite acceptance.
+
+
+
+Daboo & York                                                   [Page 12]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+   When the sharee replies to an invite, the server SHOULD send a
+   notification to the sharer to update them on the change in the sharee
+   state.  This is accomplished by sending a CS:invite-reply
+   (Section 6.22) notification to the sharer.
+
+5.4.2.  Removing a Shared Calendar
+
+   To remove a shared calendar from a sharee's calendar home collection
+   a DELETE request is targeted at the shared calendar URI.  When such a
+   request is received the server MUST remove the shared calendar from
+   the sharee's calendar home and automatically update the sharee's
+   status in the sharer's calendar's CS:invite property.
+
+5.5.  General Considerations
+
+5.5.1.  Access Levels
+
+   Two levels of access ca be granted by a sharer to any sharee.  These
+   are governed by the CS:access element used in the CS:invite/CS:user
+   element that specifies a shared user invite.  CS:access contains a
+   single empty element that defines the type of access granted:
+
+   CS:read  When present this indicates that sharees can read calendar
+      data but cannot change it.
+
+   CS:read-write  When present this indicates that sharees can read and
+      write calendar data.
+
+5.5.2.  Allowing or Disallowing Sharing
+
+   Servers MAY support calendar sharing on a per-calendar basis - e.g.,
+   they could treat some calendars as always private (cannot be shared)
+   or always public (always shared).  As a result clients need a way to
+   determine which calendar could be shared so they can enable or
+   disable sharing options on a per-calendar basis.
+
+   This specification adds a CS:allowed-sharing-modes (Section 5.2.3)
+   WebDAV property which servers can return on calendar collection
+   resources.  This property contains XML elements that describe which
+   sharing or publishing capabilities can be supported by the
+   corresponding calendar collection:
+
+      CS:can-be-shared (Section 6.3): when present indicates that the
+      calendar collection can be shared.  When not present, the calendar
+      collection cannot be shared.
+
+      CS:can-be-published (Section 6.4): when present indicates that the
+      calendar collection can be published.  When not present, the
+
+
+
+Daboo & York                                                   [Page 13]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+      calendar collection cannot be published.
+
+   When not present on a calendar collection, sharing or publishing of
+   that calendar is not allowed.  Clients SHOULD NOT attempt to use
+   requests to enable sharing or publishing targeted at those calendar
+   collections.
+
+5.5.3.  Per-user WebDAV Properties
+
+   Servers MUST support "per-user" WebDAV properties on shared calendar
+   collections and MAY support them on calendar object resources within
+   shared calendar collections.  A "per-user" WebDAV property is one
+   whose value can be set and retrieved independently by each user with
+   appropriate access rights. e.g., user "A" changes the DAV:displayname
+   property on a shared calendar in their calendar home to "My
+   calendar", and user "B" changes the same property to "Shared" on the
+   same shared calendar in their calendar home.  When each user
+   retrieves the property value they will see their own last stored
+   value and not the value of the other user.
+
+   For shared calendars, the server MUST allow all users to write "per-
+   user" WebDAV properties on the shared calendar collection and MAY
+   allow property writes on calendar object resources within the shared
+   calendar collection.  This is required even in the case where the
+   sharee has been granted read access only (i.e., the ability to change
+   calendar data is disallowed).  This requirement ensures that sharees
+   can always change "personal" properties such as calendar colors and
+   display names.
+
+   Servers MUST treat the following properties as "per-user":
+
+      DAV:displayname
+
+      CALDAV:calendar-description
+
+      CALDAV:schedule-calendar-transp
+
+      ICAL:calendar-color
+
+   Servers MAY treat any dead property as per-user.
+
+   Servers MUST NOT treat live properties as per-user.
+
+5.5.4.  Per-user Calendar Data
+
+   Servers MUST support "per-user" calendar data in calendar object
+   resources stored in shared calendars.  This allows each sharee and
+   the sharer to store their own alarms and free busy transparency
+
+
+
+Daboo & York                                                   [Page 14]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+   status without "interfering" with other users who also have access to
+   the same calendar object resources.
+
+   For calendaring object resources in shared calendar collections, the
+   server MUST treat the following iCalendar data objects as per-user:
+
+      TRANSP property
+
+      VALARM component
+
+   Servers MAY treat any non-standard X- iCalendar properties as per-
+   user.
+
+   When handling per-user data in recurring components, servers SHOULD
+   eliminate overridden instances when returning iCalendar data to
+   clients in the case where there are no differences between the
+   overridden component and the instance that could be derived from the
+   "master" recurrence component.  For example, consider a daily
+   recurring event, Monday through Friday, initially defined without any
+   overridden instances, that is in a shared calendar.  If user "A"
+   overrides the Tuesday instance and adds their own "VALARM" component
+   only, then when user "A" later retrieves the data again they would
+   see that overridden instance, but when user "B" does so, they would
+   not.  This ensures that each user sees the most "compact"
+   representation of the calendar data.
+
+5.5.5.  Scheduling
+
+   CalDAV Scheduling [RFC6638] defines how a CalDAV server carries out
+   scheduling operations when calendar object resources are created,
+   modified or deleted and include "ORGANIZER" and "ATTENDEE" iCalendar
+   properties.
+
+   When calendar object resources are created, modified or deleted in
+   shared calendars by sharees, the following restrictions apply:
+
+   1.  The "ORGANIZER" iCalendar property value in the iCalendar data
+       MUST match a calendar user address of the sharer (owner) of the
+       shared calendar.  The DAV:owner WebDAV property MUST be present
+       on a shared calendar and MUST provide a reference to a principal-
+       URL of the sharer (owner) of the shared calendar.  Clients can
+       use this value to determine what the allowed "ORGANIZER"
+       iCalendar property values are.  The server MUST reject any
+       attempt by a sharee to create an iCalendar component with an
+       "ORGANIZER" property value other than the sharer (owner) of the
+       shared calendar.
+
+
+
+
+
+Daboo & York                                                   [Page 15]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+   2.  The server MUST reject any attempt by a sharee to MOVE a calendar
+       object resource in a shared calendar to some other collection.
+
+   3.  When a sharee is listed as an Attendee in a calendar object
+       resource in a shared calendar, and write access is granted, the
+       sharee is allowed to change not only iCalendar data related to
+       the Organizer, but also data related to the Attendee. i.e., a
+       sharee can change their own participation status on the
+       "ATTENDEE" iCalendar property referring to them.  Additionally,
+       if the sharee is not listed as an Attendee, and write access is
+       granted, the sharee can add themselves as an Attendee.
+
+   4.  The default calendar collection defined in Section 6.3 of
+       [RFC6638] MUST NOT be a calendar shared to the corresponding
+       calendar user.
+
+   Following are additional considerations for scheduling with shared
+   calendars:
+
+   1.  A scheduled iCalendar component could appear in more than one
+       calendar collection within a sharee's calendar home if the sharee
+       is an Attendee and the Organizer or other Attendees have shared a
+       calendar with the sharee that includes their copies of the
+       iCalendar component.  It is important to note that the scheduled
+       component in the shared calendar could have different access
+       rights than the one in the sharee's owned calendar.
+
+   2.  A scheduled iCalendar component appearing in a sharee's shared
+       calendar could include the sharee as an Attendee.  For recurring
+       events, it is possible for the sharee to only be listed as an
+       Attendee in some instances, as opposed to all.  Clients will need
+       to be aware of this when allowing sharee's to set their own
+       participation status.
+
+   In addition, when a shared calendar is first accepted by a sharee,
+   the server SHOULD set the CALDAV:schedule-calendar-transp property to
+   the value CALDAV:transparent to ensure newly accepted shared
+   calendars do not contribute to the sharee's freebusy time until the
+   sharee explicitly requests it.
+
+
+6.  XML Element Definitions
+
+6.1.  CS:shared-owner
+
+
+
+
+
+
+
+Daboo & York                                                   [Page 16]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+   Name:  shared-owner
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Used to indicate that a calendar is being shared by the
+      owner.
+
+   Description:  This property appears in the DAV:resourcetype property
+      on the calendar collection resource shared by a sharer.  See
+      Section 5.2.
+
+   Definition:
+
+   <!ELEMENT shared-owner EMPTY>
+
+6.2.  CS:shared
+
+   Name:  shared
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Used to indicate that a calendar is being shared to a
+      sharee.
+
+   Description:  This property appears in the DAV:resourcetype property
+      on a calendar collection resource that is shared to a sharee and
+      appears in the sharee's calendar home collection.  See
+      Section 5.2.
+
+   Definition:
+
+   <!ELEMENT shared EMPTY>
+
+6.3.  CS:can-be-shared
+
+   Name:  can-be-shared
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Used to indicate that a calendar can be shared.
+
+   Description:  This element indicates that a calendar can be shared
+      with other users.  See Section 5.2.3
+
+   Definition:
+
+   <!ELEMENT can-be-shared EMPTY>
+
+
+
+
+Daboo & York                                                   [Page 17]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+6.4.  CS:can-be-published
+
+   Name:  can-be-published
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Used to indicate that a calendar can be published.
+
+   Description:  This element indicates that a calendar can be published
+      to anyone.  See Section 5.2.3
+
+   Definition:
+
+   <!ELEMENT can-be-published EMPTY>
+
+6.5.  CS:user
+
+   Name:  user
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Used to show status of sharing invites sent to sharees.
+
+   Description:  This element provides the "status" of a sharing invite
+      sent to a particular user.  See Section 5.2.2.
+
+   Definition:
+
+   <!ELEMENT user (DAV:href, common-name?, (invite-noresponse |
+                   invite-accepted | invite-declined | invite-invalid),
+                   access, summary?)>
+
+6.6.  CS:invite-noresponse
+
+   Name:  invite-noresponse
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Sharing invite status.
+
+   Description:  When used in a CS:user (Section 6.5) element, this
+      element is used to indicate that the sharee has never replied to
+      the corresponding sharing invite.  When used in a CS:invite-
+      notification (Section 6.15) element, this element is used to
+      indicate to the sharee that a sharing reply is needed.
+
+
+
+
+
+
+Daboo & York                                                   [Page 18]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+   Definition:
+
+   <!ELEMENT invite-noresponse EMPTY>
+
+6.7.  CS:invite-deleted
+
+   Name:  invite-deleted
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Sharing invite status.
+
+   Description:  When used in a CS:invite-notification (Section 6.15)
+      element, this element is used to indicate to the sharee that a
+      shared calendar has been unshared by the sharer.
+
+   Definition:
+
+   <!ELEMENT invite-deleted EMPTY>
+
+6.8.  CS:invite-accepted
+
+   Name:  invite-accepted
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Sharing invite status.
+
+   Description:  When used in a CS:user (Section 6.5) element, this
+      element is used to indicate that the sharee has accepted the
+      corresponding sharing invite.  When used in a CS:invite-
+      notification (Section 6.15) element, this element is used to
+      indicate to the sharee that the sharing invite is an update for
+      one they previously accepted.
+
+   Definition:
+
+   <!ELEMENT invite-accepted EMPTY>
+
+6.9.  CS:invite-declined
+
+   Name:  invite-declined
+
+   Namespace:  http://calendarserver.org/ns/
+
+
+
+
+
+
+
+Daboo & York                                                   [Page 19]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+   Purpose:  Sharing invite status.
+
+   Description:  When used in a CS:user (Section 6.5) element, this
+      element is used to indicate that the sharee has declined the
+      corresponding sharing invite.  When used in a CS:invite-
+      notification (Section 6.15) element, this element is used to
+      indicate to the sharee that the sharing invite is an update for
+      one they previously declined.
+
+   Definition:
+
+   <!ELEMENT invite-declined EMPTY>
+
+6.10.  CS:invite-invalid
+
+   Name:  invite-invalid
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Sharing invite status.
+
+   Description:  When used in a CS:user (Section 6.5) element, this
+      element is used to indicate that the corresponding sharee is not a
+      valid calendar user known to the server.
+
+   Definition:
+
+   <!ELEMENT invite-invalid EMPTY>
+
+6.11.  CS:access
+
+   Name:  access
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Shared calendar access level.
+
+   Description:  When used in a CS:user (Section 6.5) element, this
+      element is used to indicate the sharing access level granted to
+      the corresponding sharee.
+
+   Definition:
+
+   <!ELEMENT access (read | read-write)>
+
+
+
+
+
+
+
+Daboo & York                                                   [Page 20]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+6.12.  CS:read
+
+   Name:  read
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Shared calendar access level privilege.
+
+   Description:  Indicates that the access level granted only allows
+      sharees to read data in the shared calendar (though they can write
+      per-user data (Section 5.5.4)).
+
+   Definition:
+
+   <!ELEMENT read EMPTY>
+
+6.13.  CS:read-write
+
+   Name:  read-write
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Shared calendar access level privilege.
+
+   Description:  Indicates that the access level granted allows sharees
+      to read and write all data in the shared calendar, with the
+      exception of components that would trigger scheduling.
+
+   Definition:
+
+   <!ELEMENT read-write EMPTY>
+
+6.14.  CS:summary
+
+   Name:  summary
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Summary or title of shared calendar.
+
+   Description:  A brief description of a shared calendar.  This can be
+      used by sharers to communicate the nature of a shared calendar to
+      sharees, as well as used by sharees to indicate back to the sharer
+      how each sharee is refering to the shared calendar.
+
+
+
+
+
+
+
+Daboo & York                                                   [Page 21]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+   Definition:
+
+   <!ELEMENT summary (#PCDATA)>
+
+6.15.  CS:invite-notification
+
+   Name:  invite-notification
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  A notification used as a shared calendar invite.
+
+   Description:  Defines a notification message sent automatically by
+      the server when a sharer adds, changes or removes a sharee from a
+      shared calendar.  The DAV:href element specifies the calendar user
+      address of the sharee to whom the message was sent.  The CALDAV:
+      supported-calendar-component-set is a copy of the matching WebDAV
+      property on the sharers calendar collection, to allow clients to
+      know what restrictions might apply to the shared calendar before
+      accepting it.
+
+   Definition:
+
+   <!ELEMENT invite-notification (
+               uid, DAV:href,
+               (invite-noresponse | invite-deleted |
+               invite-accepted | invite-declined),
+               access, hosturl, organizer,
+               summary?,
+               CALDAV:supported-calendar-component-set?>
+
+6.16.  CS:uid
+
+   Name:  uid
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Unique identifier.
+
+   Description:  A unique identifier for an invitation to a shared
+      calendar.
+
+   Definition:
+
+   <!ELEMENT uid (#PCDATA)>
+
+
+
+
+
+
+Daboo & York                                                   [Page 22]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+6.17.  CS:hosturl
+
+   Name:  hosturl
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Identifies the source URL of a shared calendar.
+
+   Description:  Contains a single DAV:href element that refers to the
+      source of a shared calendar - i.e., the URL of the calendar shared
+      by the sharer.
+
+   Definition:
+
+   <!ELEMENT hosturl (DAV:href)>
+
+6.18.  CS:organizer
+
+   Name:  organizer
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Identifies the sharer of a shared calendar.
+
+   Description:  Contains a single DAV:href element that identifies the
+      calendar user address of the sharer of a shared calendar, and an
+      optional CS:common-name element that matches that user, and an
+      option CS:first-name, CS:last-name pair of elements that match
+      that user.  In some cases servers might have directory information
+      that includes only the common name, or only the first or last
+      name, and it is better to expose those directly to the client
+      as-is rather than to try and split or combine the attributes to
+      synthesize one set or the other.
+
+   Definition:
+
+   <!ELEMENT organizer (DAV:href,
+                        CS:common-name?,
+                        (CS:first-name, CS:last-name)?)>
+
+6.19.  CS:common-name
+
+   Name:  common-name
+
+   Namespace:  http://calendarserver.org/ns/
+
+
+
+
+
+
+Daboo & York                                                   [Page 23]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+   Purpose:  The common name of a sharer or sharee.
+
+   Description:  The common name is optionally provided by a client when
+      adding a sharee and optionally included (or modified) by the
+      server when returning results for sharers or sharees and in
+      notifications.
+
+   Definition:
+
+   <!ELEMENT common-name (#PCDATA)>
+
+6.20.  CS:first-name
+
+   Name:  first-name
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  The first name of a sharer or sharee.
+
+   Description:  The first name is optionally included by the server
+      when returning results for sharers or sharees and in
+      notifications.
+
+   Definition:
+
+   <!ELEMENT first-name (#PCDATA)>
+
+6.21.  CS:last-name
+
+   Name:  last-name
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  The last name of a sharer or sharee.
+
+   Description:  The last name is optionally included by the server when
+      returning results for sharers or sharees and in notifications.
+
+   Definition:
+
+   <!ELEMENT last-name (#PCDATA)>
+
+6.22.  CS:invite-reply
+
+
+
+
+
+
+
+
+Daboo & York                                                   [Page 24]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+   Name:  invite-reply
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  A notification used as a reply to a shared calendar invite.
+
+   Description:  Defines a notification message sent automatically by
+      the server when a sharee replies to a shared calendar invite.  The
+      DAV:href element specifies the calendar user address of the sharee
+      to whom the original invite message was sent.
+
+   Definition:
+
+   <!ELEMENT invite-reply (DAV:href,
+                           (invite-accepted | invite-declined),
+                           hosturl, in-reply-to, summary?>
+
+6.23.  CS:in-reply-to
+
+   Name:  in-reply-to
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Unique identifier.
+
+   Description:  Specifies the unique identifier of the inviate message
+      that this notification message is a reply to.
+
+   Definition:
+
+   <!ELEMENT in-reply-to (#PCDATA)>
+
+6.24.  CS:notification
+
+   Name:  notification
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Notification message root element.
+
+   Description:  The root element used in notification resources.
+
+   Definition:
+
+   <!ELEMENT notification (CS:dtstamp,
+                           (invite-notification | invite-reply)>
+   <!-- Any notification type element can appear after CS:dtstamp,
+        this specification defines only the two listed above -->
+
+
+
+Daboo & York                                                   [Page 25]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+6.25.  CS:dtstamp
+
+   Name:  dtstamp
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Date-time stamp.
+
+   Description:  Contains the date-time stamp corresponding to the
+      creation of a notification message.
+
+   Definition:
+
+   <!ELEMENT dtstamp (#PCDATA)>
+
+6.26.  CS:share
+
+   Name:  share
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Describes changes to sharees.
+
+   Description:  The root element used in POST requests on calendars by
+      sharers to manipulate the sharee list of a shared calendar.
+
+   Definition:
+
+   <!ELEMENT share (set | remove)*>
+
+6.27.  CS:set
+
+   Name:  set
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Sets access for a sharee.
+
+   Description:  Used to add or modify sharee access to a shared
+      calendar.  The specified access to the shared calendar is given to
+      the sharee.
+
+   Definition:
+
+   <!ELEMENT set (DAV:href, common-name?, summary?,
+                  (read | read-write)>
+
+
+
+
+
+Daboo & York                                                   [Page 26]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+6.28.  CS:remove
+
+   Name:  remove
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Removes access for a sharee.
+
+   Description:  Used to remove sharee access to a shared calendar.  All
+      access to the shared calendar is removed for the sharee.
+
+   Definition:
+
+   <!ELEMENT remove (DAV:href)>
+
+6.29.  CS:shared-as
+
+   Name:  shared-as
+
+   Namespace:  http://calendarserver.org/ns/
+
+   Purpose:  Identifies a shared calendar.
+
+   Description:  Returned by the server for a POST request by a sharee
+      accepting a shared calendar invite.  The DAV:href element
+      specifies the URI of the calendar created by the acceptance.
+
+   Definition:
+
+   <!ELEMENT shared-as (DAV:href)>
+
+
+7.  Security Considerations
+
+   Per-user WebDAV properties and iCalendar data MUST only be accessible
+   by the user that created them.
+
+   Alarms set by the sharer SHOULD NOT be propagated to sharees by
+   default.  Clients SHOULD NOT automatically enable triggering of
+   alarms on shared calendars that have just been accepted without
+   confirmation by the user.
+
+   TBD
+
+
+8.  IANA Considerations
+
+   This document does not require any actions on the part of IANA.
+
+
+
+Daboo & York                                                   [Page 27]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+9.  Acknowledgments
+
+   This specification is the result of discussions between the Apple
+   calendar server and client teams.
+
+
+10.  Normative References
+
+   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
+              Requirement Levels", BCP 14, RFC 2119, March 1997.
+
+   [RFC3744]  Clemm, G., Reschke, J., Sedlar, E., and J. Whitehead, "Web
+              Distributed Authoring and Versioning (WebDAV)
+              Access Control Protocol", RFC 3744, May 2004.
+
+   [RFC4791]  Daboo, C., Desruisseaux, B., and L. Dusseault,
+              "Calendaring Extensions to WebDAV (CalDAV)", RFC 4791,
+              March 2007.
+
+   [RFC4918]  Dusseault, L., "HTTP Extensions for Web Distributed
+              Authoring and Versioning (WebDAV)", RFC 4918, June 2007.
+
+   [RFC6638]  Daboo, C. and B. Desruisseaux, "Scheduling Extensions to
+              CalDAV", RFC 6638, June 2012.
+
+
+Appendix A.  Change History
+
+   Changes in -03:
+
+   1.  Fixed access element DTD.
+
+   2.  Remove MKxxx and PROPPATCH mechanism for upgrading/downgrading
+       shared state on a calendar collection.  Instead the server
+       implicitly sets the state based on whether there are any sharees
+       or not..
+
+   3.  Added CS:first-name and CS:last-name optional element to CS:
+       organizer.
+
+   4.  Added CALDAV:supported-calendar-component-set optional element to
+       CS:invite-notification.
+
+   Changes in -02:
+
+   1.  Removed read-write-shared access mode - now a server that does
+       not support shared scheduling should advertise that via a DAV
+       header
+
+
+
+Daboo & York                                                   [Page 28]
+
+                      CalDAV Sharing and Publishing       September 2012
+
+
+   Changes in -01:
+
+   1.  Added CS:shared-url property
+
+   2.  Clarified that notifications are only required to be sent when
+       sharee status is changed
+
+
+Authors' Addresses
+
+   Cyrus Daboo
+   Apple Inc.
+   1 Infinite Loop
+   Cupertino, CA  95014
+   USA
+
+   Email: cyrus at daboo.name
+   URI:   http://www.apple.com/
+
+
+   Eric York
+   Apple Inc.
+   1 Infinite Loop
+   Cupertino, CA  95014
+   USA
+
+   Email:
+   URI:   http://www.apple.com/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Daboo & York                                                   [Page 29]
+

Added: CalendarServer/trunk/doc/Extensions/caldav-sharing.xml
===================================================================
--- CalendarServer/trunk/doc/Extensions/caldav-sharing.xml	                        (rev 0)
+++ CalendarServer/trunk/doc/Extensions/caldav-sharing.xml	2012-09-19 17:16:32 UTC (rev 9822)
@@ -0,0 +1,1025 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="../rfc2629.xslt"?>
+<!DOCTYPE rfc SYSTEM 'rfc2629.dtd' [
+<!ENTITY rfc2119 PUBLIC '' 'bibxml/reference.RFC.2119.xml'>
+<!ENTITY rfc3744 PUBLIC '' 'bibxml/reference.RFC.3744.xml'>
+<!ENTITY rfc4791 PUBLIC '' 'bibxml/reference.RFC.4791.xml'>
+<!ENTITY rfc4918 PUBLIC '' 'bibxml/reference.RFC.4918.xml'>
+<!ENTITY rfc6638 PUBLIC '' 'bibxml/reference.RFC.6638.xml'>
+]> 
+<?rfc toc="yes"?>
+<?rfc tocdepth="4"?>
+<?rfc strict="yes"?>
+<?rfc comments="yes"?>
+<?rfc inline="yes"?>
+<?rfc symrefs="yes"?>
+<?rfc sortrefs="yes"?>
+<?rfc compact="yes"?>
+<?rfc subcompact="no"?>
+<?rfc private="Calendar Server Extension"?>
+<rfc ipr="none" docName='caldav-sharing-03'>
+    <front>
+        <title abbrev="CalDAV Sharing and Publishing">Shared and Published Calendars in CalDAV</title> 
+        <author initials="C." surname="Daboo" fullname="Cyrus Daboo">
+            <organization abbrev="Apple Inc.">
+                Apple Inc.
+            </organization>
+            <address>
+                <postal>
+                    <street>1 Infinite Loop</street>
+                    <city>Cupertino</city>
+                    <region>CA</region>
+                    <code>95014</code> 
+                    <country>USA</country>
+                </postal>
+                <email>cyrus at daboo.name</email>
+                <uri>http://www.apple.com/</uri>
+            </address>
+        </author>
+        <author initials="E." surname="York" fullname="Eric York">
+            <organization abbrev="Apple Inc.">
+                Apple Inc.
+            </organization>
+            <address>
+                <postal>
+                    <street>1 Infinite Loop</street>
+                    <city>Cupertino</city>
+                    <region>CA</region>
+                    <code>95014</code> 
+                    <country>USA</country>
+                </postal>
+                <email></email>
+                <uri>http://www.apple.com/</uri>
+            </address>
+        </author>
+        <date/>
+        <abstract>
+            <t>
+                This specification defines an extension to CalDAV that enables the sharing of calendars between users on a CalDAV server.
+            </t>
+        </abstract>
+    </front>
+    <middle>
+        <section title='Introduction'>
+            <t>
+                <xref target="RFC4791">CalDAV</xref> provides a way for calendar users to store calendar data and exchange this data via scheduling operations. Based on the <xref target='RFC4918'>WebDAV</xref> protocol, it also includes the ability to manage access to calendar data via the <xref target='RFC3744'>WebDAV ACL</xref> extension.
+            </t>
+            <t>
+                <xref target='RFC3744'>WebDAV ACL</xref> provides a way to manage fine-grained access controls on WebDAV resources. Whilst this could be used directly to manage sharing of calendars, experience has shown that client developers are averse to using it due to its complexity. Instead a simpler process for sharing calendars is preferred.
+            </t>
+            <t>
+                This extension defines a way for individual calendar users to share calendars with other users. This is done via an "opt-in" process in which a sharing invite is sent from the sharer to a sharee, allowing the sharee to accept or decline. If the sharee accepts the sharing invite, the shared calendar is made available to them in their own calendar home collection (i.e., alongside their own personal calendars). HTTP POST operations are used to manage the sharing invitations and replies, and WebDAV properties are used to expose the state of shared calendars.
+            </t>
+        </section>
+
+        <!--<section title="Open Issues">
+            <t>
+                <list style="numbers">
+                    <t>
+                    </t>
+                </list>
+            </t>
+        </section>-->
+            
+        <section title='Conventions Used in This Document'>
+            <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' />. 
+            </t>
+            <t>
+                When XML element types in the namespaces "DAV:" and "urn:ietf:params:xml:ns:caldav" are referenced in this document outside of the context of an XML fragment, the string "DAV:" and "CALDAV:" will be prefixed to the element type names respectively. 
+            </t>
+            <t>
+                The namespace "http://calendarserver.org/ns/" is used for XML elements defined in this specification.  When XML element types in that namespace are referenced in this document outside of the context of an XML fragment, the string "CS:" will be prefixed to the element type names. 
+            </t>
+            <t>Terms Used:
+                <list style='hanging'>
+                    <t hangText='Sharer'>A calendar user who is sharing a calendar with other calendar users.</t>
+                    <t hangText='Sharee'>A calendar user to whom a calendar has been shared.</t>
+                    <t hangText='Sharing Invite'>A message sent by a sharer to a sharee to indicate the status of a shared calendar.</t>
+                    <t hangText='Sharing Reply'>A message sent by a sharee to a sharer to indicate the status of a shared calendar.</t>
+                </list>
+            </t>
+        </section>
+         
+        <section title='Overview' anchor='overview'>
+            <t>
+                This section provides a basic overview of this protocol by way of a simple use case of a sharer sharing a calendar with a single sharee.
+            </t>
+            <t>
+                To share a calendar with another user, the sharer's client executes an HTTP POST request against the calendar collection resource for the calendar to be shared. The POST request body will contain details of the calendar user to whom the calendar is to be shared as well as the access right to be granted to them. If the request succeeds, a notification is sent to the sharee with details of the calendar being shared to them.
+            </t>
+            <t>
+                The sharer's client will show the notification to the sharee and present them with the choice to accept or decline the invitation to the shared calendar. If the sharee chooses to decline, then nothing changes for that sharee. If the sharee chooses to accept, then the server automatically creates a new calendar collection resource in the sharee's calendar home collection, and ensures that calendar provides a mapping to the actual shared calendar of the sharer. Thus the shared calendar is available to the sharee as just another calendar in their calendar home. The server enforces the appropriare access privileges for the sharee.
+            </t>
+            <t>
+                At any time, the sharer can inspect properties on the calendar collection being shared, and determine the accept/decline status of each sharee. Additional sharees can be added and existing ones removed. The access privileges for existing sharees can also be changed.
+            </t>
+            <t>
+                Once a sharee has a shared calendar set to appear in their calendar home collection, they can remove it and decline the sharing invite by simply having their client issue an HTTP DELETE request on the shared calendar collection. That does not delete any calendar data, but rather simply removes the "link" to the sharer's calendar collection and sets the sharee's inviate status to declined.
+            </t>
+        </section>
+        
+        <section title="Notifications">
+            <t>
+                In order to facilitate the process of sharing invitations, this specification defines a new generic notification mechanism for CalDAV servers. When this feature is available, a <xref target="CS:notification-URL">CS:notification-URL</xref> property appears on principal resources for those principals who are able to receive notifications. That property specifies a single DAV:href element whose content refers to a WebDAV collection resource. Notification "messages" are deposited into this collection and can be retrieved by clients and acted on accordingly.
+            </t>
+            <t>
+                The notification collection referenced by the <xref target="CS:notification-URL">CS:notification-URL</xref> property MUST have a DAV:resourcetype property with DAV:collection and <xref target="CS:notification">CS:notification</xref> child elements. 
+            </t>
+            <t>
+                Notification "messages" are XML documents stored as resources in the notification collection. Each XML document contains a <xref target="CS:notification">CS:notification</xref> element as its root. The root element contains a <xref target="CS:dtstamp">CS:dtstamp</xref> element, and one additional element which represents the type of notification being conveyed in the message. That child element will typically contain additional content that describes the notification.
+            </t>
+            <t>
+                Each notification resource has a <xref target="CS:notificationtype">CS:notificationtype</xref> property which contains as its single child element an empty element that matches the child element of the notification resource XML document root. Any attributes on the child element in the XML document are also present in the property child element.
+            </t>
+            <t>
+                Notifications are automatically generated by the server (perhaps in response to a client action) with an appropriate resource stored in the notifications collection of the user to whom the notification is targeted. Clients SHOULD monitor the notification collection looking for new notification resources. When doing so, clients SHOULD look at the <xref target="CS:notificationtype">CS:notificationtype</xref> property to ensure that the notification is of a type that the client can handle. Once a client has handled the notification in whatever way is appropriate it SHOULD delete the notification resource. Servers MAY delete notification resources on their own if they determine that the notifications are no longer relevant or valid. Servers MAY coalesce notifications as appropriate.
+            </t>
+            <section title="Additional Principal Properties" anchor='principal-properties'>
+                <t>
+                    This section defines new properties for WebDAV principal resources as defined in <xref target="RFC3744">RFC3744</xref>. These properties are likely to be protected but the server MAY allow them to be written by appropriate users.
+                </t>
+                <section title="CS:notification-URL Property" anchor="CS:notification-URL">
+                  <t>
+                    <list style="hanging">
+                      <t hangText="Name:">notification-URL</t>
+                      <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                      <t hangText="Purpose:">Identify the URL of the notification collection owned by the associated principal resource.</t>
+                      <t hangText="Protected:">This property SHOULD be protected.</t>
+                      <t hangText="PROPFIND behavior:">This property SHOULD NOT be returned by a PROPFIND allprop request (as defined in Section 14.2 of <xref target="RFC4918"/>).</t>
+                      <t hangText="COPY/MOVE behavior:">This property value SHOULD be preserved in COPY and MOVE operations.</t>
+        
+                      <t hangText="Description:">This property is needed for a client to determine where the notification collection of the current user is located so that processing of notification messages can occur. If not present, then the associated calendar user is not enabled for notification messages on the server.</t>
+                      <t hangText="Definition:">
+                        <figure>
+                          <artwork><![CDATA[
+<!ELEMENT notification-URL (DAV:href)>]]></artwork>
+                        </figure>
+                      </t>
+                    </list>
+                  </t>
+                </section>
+            </section>
+            <section title="Properties on Notification Resources" anchor='notification-properties'>
+                <t>
+                    The following new WebDAV properties are defined for notification resources.
+                </t>
+                <section title="CS:notificationtype Property" anchor="CS:notificationtype">
+                  <t>
+                    <list style="hanging">
+                      <t hangText="Name:">notificationtype</t>
+                      <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                      <t hangText="Purpose:">Identify the type of notification of the corresponding resource.</t>
+                      <t hangText="Protected:">This property MUST be protected.</t>
+                      <t hangText="PROPFIND behavior:">This property SHOULD NOT be returned by a PROPFIND allprop request (as defined in Section 14.2 of <xref target="RFC4918"/>).</t>
+                      <t hangText="COPY/MOVE behavior:">This property value MUST be preserved in COPY and MOVE operations.</t>
+        
+                      <t hangText="Description:">This property allows a client, via a PROPFIND Depth:1 request, to quickly find notification messages that the client can handle in a notification collection. The single child element is the notification resource root element's child defining the notification itself. This element MUST be empty, though any attributes on the element in the notification resource MUST be present in the property element.</t>
+                      <t hangText="Definition:">
+                        <figure>
+                          <artwork><![CDATA[
+<!ELEMENT notificationtype (invite-notification | invite-reply)>
+<!-- Child elements are empty but will have appropriate attributes.
+     Any valid notification message child element can appear.-->]]></artwork>
+                        </figure>
+                      </t>
+                    </list>
+                  </t>
+                </section>
+            </section>
+        </section>
+
+        <section title="Shared Calendaring">
+            <section title="Feature Discovery">
+                <t>
+                    A server that supports the features described in this document MUST include "calendarserver-sharing" as a field in the DAV response header from an OPTIONS request on any resource that supports these features.
+                </t>
+            </section>
+            <section title="Additional Properties for Calendars" anchor='properties'>
+                <t>
+                    The following new or modified WebDAV properties are defined for calendar collections and used to view or manipulate shared calendar features.
+                </t>
+                <section title="DAV:resourcetype Property" anchor="DAV:resourcetype">
+                    <t>
+                        Calendar collections that are shared have addition elements listed in their DAV:resourcetype property in addition to DAV:collection and CALDAV:calendar.
+                        <list style="symbols">
+                            <t><xref target="CS:shared-owner">CS:shared-owner</xref>: used to indicate that the calendar is owned by the current user and is being shared by them.</t>
+                            <t><xref target="CS:shared">CS:shared</xref>: used to indicate that the calendar is owned by another user and is being shared to the current user.</t>
+                        </list>
+                    </t>
+                </section>
+                <section title="CS:invite Property" anchor="CS:invite">
+                  <t>
+                    <list style="hanging">
+                      <t hangText="Name:">invite</t>
+                      <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                      <t hangText="Purpose:">Used to show to whom a calendar has been shared.</t>
+                      <t hangText="Protected:">This property MUST be protected.</t>
+                      <t hangText="PROPFIND behavior:">This property SHOULD NOT be returned by a PROPFIND allprop request (as defined in Section 14.2 of <xref target="RFC4918"/>).</t>
+                      <t hangText="COPY/MOVE behavior:">This property value MUST be preserved in COPY and MOVE operations.</t>
+        
+                      <t hangText="Description:">This WebDAV property is present on a calendar collection resource that has been shared by the owner, or on the calendar collection resources of the sharees of the calendar. It provides a list of users to whom the calendar has been shared, along with the "status" of the sharing invites sent to each user. In addition, servers SHOULD include a CS:organizer XML element on calendar collection resources of the sharees to provide clients with a fast way to determine who the sharer is. A server's local privacy policy may prevent sharees from knowing about other sharees on a shared calendar. If that is so server will not include CS:user XML elements for other sharees.</t>
+                      <t hangText="Definition:">
+                        <figure>
+                          <artwork><![CDATA[
+<!ELEMENT invite (organizer?, user*)>]]></artwork>
+                        </figure>
+                      </t>
+                    </list>
+                  </t>
+                </section>
+                <section title="CS:allowed-sharing-modes Property" anchor="CS:allowed-sharing-modes">
+                  <t>
+                    <list style="hanging">
+                      <t hangText="Name:">allowed-sharing-modes</t>
+                      <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                      <t hangText="Purpose:">Used to show which modes of sharing are supported on a calendar collection.</t>
+                      <t hangText="Protected:">This property MUST be protected.</t>
+                      <t hangText="PROPFIND behavior:">This property SHOULD NOT be returned by a PROPFIND allprop request (as defined in Section 14.2 of <xref target="RFC4918"/>).</t>
+                      <t hangText="COPY/MOVE behavior:">This property value MUST be preserved in COPY and MOVE operations.</t>
+        
+                      <t hangText="Description:">This WebDAV property is present on a calendar collection resource that can been shared or published. It provides a list of options indicating what sharing modes are allowed as per <xref target="allowed"/>.</t>
+                      <t hangText="Definition:">
+                        <figure>
+                          <artwork><![CDATA[
+<!ELEMENT allowed-sharing-modes
+          (can-be-shared?, can-be-published?)>]]></artwork>
+                        </figure>
+                      </t>
+                    </list>
+                  </t>
+                </section>
+                <section title="CS:shared-url Property" anchor="CS:shared-url">
+                  <t>
+                    <list style="hanging">
+                      <t hangText="Name:">shared-url</t>
+                      <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                      <t hangText="Purpose:">Indicates the URL of the owner's copy of a shared calendar.</t>
+                      <t hangText="Protected:">This property MUST be protected.</t>
+                      <t hangText="PROPFIND behavior:">This property SHOULD NOT be returned by a PROPFIND allprop request (as defined in Section 14.2 of <xref target="RFC4918"/>).</t>
+                      <t hangText="COPY/MOVE behavior:">This property value MUST be preserved in COPY and MOVE operations.</t>
+        
+                      <t hangText="Description:">This WebDAV property is present on a shared calendar collection resource that appears in a sharee's calendar home collection. Its content is a single DAV:href element whose value is the URL of the sharer's calendar being shared.</t>
+                      <t hangText="Definition:">
+                        <figure>
+                          <artwork><![CDATA[
+<!ELEMENT shared-url (DAV:href)>]]></artwork>
+                        </figure>
+                      </t>
+                    </list>
+                  </t>
+                </section>
+            </section>
+            <section title="Sharer Actions on Shared Calendars">
+                <section title="Sharing or Unsharing a Calendar">
+                    <t>
+                        To update an existing calendar to be shared, the sharer simply adds one or more sharees to the calendar collection as per <xref target="sharee"/>. The server MUST update the DAV:resourcetype property on the calendar collection to ensure it contains a CS:shared-owner XML element to indicate the calendar collection is now shared.
+                    </t>
+                    <t>
+                        To unshare a calendar, the sharer simply removes all sharees to the CS:invite property of the calendar collection as per <xref target="sharee"/>. The server MUST update the DAV:resourcetype property on the calendar collection to ensure it does not contain a CS:shared-owner XML element to indicate the calendar collection is not shared.
+                    </t>
+                </section>
+                <section title="Manipulating Sharees of a Shared Calendar" anchor="sharee">
+                    <t>
+                        The sharer of a shared calendar is able to manipulate the sharee list by issuing a POST request targeted at the calendar collection resource. The POST request MUST contain an XML document as its body with the root element being <xref target="CS:share">CS:share</xref>.
+                    </t>
+                    <t>
+                        The <xref target="CS:share">CS:share</xref> element in the POST requests MUST contain one or more <xref target="CS:set">CS:set</xref> or <xref target="CS:remove">CS:remove</xref> elements. For each <xref target="CS:set">CS:set</xref> element, the server MUST add the specified sharee access to the calendar. For each <xref target="CS:remove">CS:remove</xref> element the server MUST remove the specified sharee access from the shared calendar. In each case the server MUST send a notification message to any sharees whose status is changed (added, modified or removed), indicating to them a change in status for the shared calendar. The server SHOULD NOT send notification messages to sharees whose status is unchanged.
+                    </t>
+                    <t>
+                        Sharee's are identified via a DAV:href element whose value is either a principal-URL for a sharee hosted on the same server, a calendar user address or email address. In the case of the later two, the sharee might not be a user on the same server - though in that case how invitations are sent or access enabled is out of scope for this specification. A server MAY change the sharee's "address" to any suitable alternative that it might prefer when returning the list of sharees via the <xref target="CS:invite">CS:invite property</xref>.
+                    </t>
+                    <t>
+                        The client MAY include a <xref target="CS:common-name">CS:common-name</xref> element in the <xref target="CS:set">CS:set</xref> element. When provided, the value represents the common name for the sharee, and is returned in the list of sharees via the <xref target="CS:invite">CS:invite property</xref>. The server MAY change this to a suitable alternative when it is able to match the sharee to a known user. If absent from the client request, the server SHOULD add a CS:common-name when it is able to match the sharee with a known user, and a common name for that user can be determined.
+                    </t>
+                    <t>
+                        When the sharee list on a shared calendar is changed, the server MUST send notifications to each sharee to update them on their current sharing status. This is accomplished by sending a <xref target="CS:invite-notification">CS:invite-notification</xref> notification to each sharee.
+                    </t>
+                    <section title="Example: Successful Sharee Add Request">
+            
+                        <t>
+                          This example shows how to add a single sharee (with calendar user address "mailto:eric at example.com") to a shared calendar with CS:read-write access.
+                        </t>
+    
+                        <figure>
+                          <preamble>&gt;&gt; Request &lt;&lt;</preamble>
+                          <artwork><![CDATA[
+POST /calendars/users/cyrus/shared/ HTTP/1.1
+Host: calendar.example.com
+Content-Type: application/xml; charset="utf-8"
+Content-Length: xxxx
+
+<?xml version="1.0" encoding="utf-8" ?>
+<CS:share xmlns:D="DAV:"
+              xmlns:CS="http://calendarserver.org/ns/">
+  <CS:set>
+    <D:href>mailto:eric at example.com</D:href>
+    <CS:common-name>Eric York</CS:common-name>
+    <CS:summary>Shared workspace</CS:summary>
+    <CS:read-write />
+  </CS:set>
+</CS:share>]]></artwork>
+                        </figure>
+                        <figure>
+                          <preamble>&gt;&gt; Response &lt;&lt;</preamble>
+                          <artwork><![CDATA[
+HTTP/1.1 200 OK
+Cache-Control: no-cache
+Date: Sat, 11 Nov 2006 09:32:12 GMT]]></artwork>
+                        </figure>
+                    </section>
+                    <section title="Example: Successful Multiple Sharee Change Request">
+            
+                        <t>
+                          This example shows how multiple sharee's can be manipulated in a single request. The sharee with calendar user address "mailto:eric at example.com" has their access downgraded to CS:read, whilst another sharee is removed from the access list entirely.
+                        </t>
+    
+                        <figure>
+                          <preamble>&gt;&gt; Request &lt;&lt;</preamble>
+                          <artwork><![CDATA[
+POST /calendars/users/cyrus/shared/ HTTP/1.1
+Host: calendar.example.com
+Content-Type: application/xml; charset="utf-8"
+Content-Length: xxxx
+
+<?xml version="1.0" encoding="utf-8" ?>
+<CS:share xmlns:D="DAV:"
+              xmlns:CS="http://calendarserver.org/ns/">
+  <CS:set>
+    <D:href>mailto:eric at example.com</D:href>
+    <CS:summary>Shared workspace</CS:summary>
+    <CS:read-write />
+  </CS:set>
+  <CS:remove>
+    <D:href>mailto:wilfredo at example.com</D:href>
+  </CS:remove>
+</CS:share>]]></artwork>
+                        </figure>
+                        <figure>
+                          <preamble>&gt;&gt; Response &lt;&lt;</preamble>
+                          <artwork><![CDATA[
+HTTP/1.1 200 OK
+Cache-Control: no-cache
+Date: Sat, 11 Nov 2006 09:32:12 GMT]]></artwork>
+                        </figure>
+                    </section>
+                </section>
+            </section>
+            <section title="Sharee Actions on Shared Calendars">
+                <section title="Replying to a Sharing Invite">
+                    <t>
+                        When a sharee is invited to a shared calendar they can accept or decline the invite by issuing a POST request to the sharee's calendar home collection resource. The POST request MUST contain an XML document as its body with the root element being <xref target="CS:invite-reply">CS:invite-reply</xref>.
+                    </t>
+                    <t>
+                        The <xref target="CS:invite-reply">CS:invite-reply</xref> element in the POST request specifies the sharee who is replying in the DAV:href element, the accept or decline action via the CS:invite-accepted or CS:invite-declined elements, the URL of the shared calendar in the CS:hosturl element, the unique identifier of the invite to which it is a reply in the CS:in-reply-to element, and an optional CS:summary element.
+                    </t>
+                    <t>
+                        The response to a POST request that accepts a shared calendar invite MUST be an XML document containing <xref target="CS:shared-as">CS:shared-as</xref> as its root element. That root element contains a single DAV:href element whose content is the URI of the shared calendar in the sharee's calendar home created by the invite acceptance.
+                    </t>
+                    <t>
+                        When the sharee replies to an invite, the server SHOULD send a notification to the sharer to update them on the change in the sharee state.  This is accomplished by sending a <xref target="CS:invite-reply">CS:invite-reply</xref> notification to the sharer.
+                    </t>
+                </section>
+                <section title="Removing a Shared Calendar">
+                    <t>
+                        To remove a shared calendar from a sharee's calendar home collection a DELETE request is targeted at the shared calendar URI. When such a request is received the server MUST remove the shared calendar from the sharee's calendar home and automatically update the sharee's status in the sharer's calendar's CS:invite property.
+                    </t>
+                </section>
+            </section>
+            <section title="General Considerations">
+                <section title="Access Levels">
+                    <t>
+                        Two levels of access ca be granted by a sharer to any sharee. These are governed by the CS:access element used in the CS:invite/CS:user element that specifies a shared user invite. CS:access contains a single empty element that defines the type of access granted:
+                        <list style="hanging">
+                        <t hangText="CS:read">
+                            When present this indicates that sharees can read calendar data but cannot change it.
+                        </t>
+                        <t hangText="CS:read-write">
+                            When present this indicates that sharees can read and write calendar data.
+                        </t>
+                        </list>
+                    </t>
+                </section>
+                <section title="Allowing or Disallowing Sharing" anchor="allowed">
+                    <t>
+                        Servers MAY support calendar sharing on a per-calendar basis - e.g., they could treat some calendars as always private (cannot be shared) or always public (always shared). As a result clients need a way to determine which calendar could be shared so they can enable or disable sharing options on a per-calendar basis.
+                    </t>
+                    <t>
+                        This specification adds a <xref target="CS:allowed-sharing-modes">CS:allowed-sharing-modes</xref> WebDAV property which servers can return on calendar collection resources. This property contains XML elements that describe which sharing or publishing capabilities can be supported by the corresponding calendar collection:
+                        <list>
+                            <t><xref target="CS:can-be-shared">CS:can-be-shared</xref>: when present indicates that the calendar collection can be shared. When not present, the calendar collection cannot be shared.</t>
+                            <t><xref target="CS:can-be-published">CS:can-be-published</xref>: when present indicates that the calendar collection can be published. When not present, the calendar collection cannot be published.</t>
+                        </list>                     
+                    </t>
+                    <t>
+                        When not present on a calendar collection, sharing or publishing of that calendar is not allowed. Clients SHOULD NOT attempt to use requests to enable sharing or publishing targeted at those calendar collections.
+                    </t>
+                </section>
+                <section title="Per-user WebDAV Properties">
+                    <t>
+                        Servers MUST support "per-user" WebDAV properties on shared calendar collections and MAY support them on calendar object resources within shared calendar collections. A "per-user" WebDAV property is one whose value can be set and retrieved independently by each user with appropriate access rights. e.g., user "A" changes the DAV:displayname property on a shared calendar in their calendar home to "My calendar", and user "B" changes the same property to "Shared" on the same shared calendar in their calendar home. When each user retrieves the property value they will see their own last stored value and not the value of the other user.
+                    </t>
+                    <t>
+                        For shared calendars, the server MUST allow all users to write "per-user" WebDAV properties on the shared calendar collection and MAY allow property writes on calendar object resources within the shared calendar collection. This is required even in the case where the sharee has been granted read access only (i.e., the ability to change calendar data is disallowed). This requirement ensures that sharees can always change "personal" properties such as calendar colors and display names.
+                    </t>
+                    <t>
+                        Servers MUST treat the following properties as "per-user":
+                        <list>
+                            <t>DAV:displayname</t>
+                            <t>CALDAV:calendar-description</t>
+                            <t>CALDAV:schedule-calendar-transp</t>
+                            <t>ICAL:calendar-color</t>
+                        </list>
+                    </t>
+                    <t>
+                        Servers MAY treat any dead property as per-user.
+                    </t>
+                    <t>
+                        Servers MUST NOT treat live properties as per-user.
+                    </t>
+                </section>
+                <section title="Per-user Calendar Data" anchor="per-user-data">
+                    <t>
+                        Servers MUST support "per-user" calendar data in calendar object resources stored in shared calendars. This allows each sharee and the sharer to store their own alarms and free busy transparency status without "interfering" with other users who also have access to the same calendar object resources.
+                    </t>
+                    <t>
+                        For calendaring object resources in shared calendar collections, the server MUST treat the following iCalendar data objects as per-user:
+                        <list>
+                            <t>TRANSP property</t>
+                            <t>VALARM component</t>
+                        </list>
+                    </t>
+                    <t>
+                        Servers MAY treat any non-standard X- iCalendar properties as per-user.
+                    </t>
+                    <t>
+                        When handling per-user data in recurring components, servers SHOULD eliminate overridden instances when returning iCalendar data to clients in the case where there are no differences between the overridden component and the instance that could be derived from the "master" recurrence component. For example, consider a daily recurring event, Monday through Friday, initially defined without any overridden instances, that is in a shared calendar. If user "A" overrides the Tuesday instance and adds their own "VALARM" component only, then when user "A" later retrieves the data again they would see that overridden instance, but when user "B" does so, they would not. This ensures that each user sees the most "compact" representation of the calendar data.
+                    </t>
+                </section>
+                <section title="Scheduling">
+                    <t>
+                        <xref target="RFC6638">CalDAV Scheduling</xref> defines how a CalDAV server carries out scheduling operations when calendar object resources are created, modified or deleted and include "ORGANIZER" and "ATTENDEE" iCalendar properties.
+                    </t>
+                    <t>
+                        When calendar object resources are created, modified or deleted in shared calendars by sharees, the following restrictions apply:
+                        <list style="numbers">
+                            <t>The "ORGANIZER" iCalendar property value in the iCalendar data MUST match a calendar user address of the sharer (owner) of the shared calendar. The DAV:owner WebDAV property MUST be present on a shared calendar and MUST provide a reference to a principal-URL of the sharer (owner) of the shared calendar. Clients can use this value to determine what the allowed "ORGANIZER" iCalendar property values are. The server MUST reject any attempt by a sharee to create an iCalendar component with an "ORGANIZER" property value other than the sharer (owner) of the shared calendar.</t>
+                            <t>The server MUST reject any attempt by a sharee to MOVE a calendar object resource in a shared calendar to some other collection.</t>
+                            <t>When a sharee is listed as an Attendee in a calendar object resource in a shared calendar, and write access is granted, the sharee is allowed to change not only iCalendar data related to the Organizer, but also data related to the Attendee. i.e., a sharee can change their own participation status on the "ATTENDEE" iCalendar property referring to them. Additionally, if the sharee is not listed as an Attendee, and write access is granted, the sharee can add themselves as an Attendee.</t>
+                            <t>The default calendar collection defined in Section 6.3 of <xref target="RFC6638"/> MUST NOT be a calendar shared to the corresponding calendar user.</t>
+                        </list>
+                    </t>
+                    <t>
+                        Following are additional considerations for scheduling with shared calendars:
+                        <list style="numbers">
+                            <t>A scheduled iCalendar component could appear in more than one calendar collection within a sharee's calendar home if the sharee is an Attendee and the Organizer or other Attendees have shared a calendar with the sharee that includes their copies of the iCalendar component. It is important to note that the scheduled component in the shared calendar could have different access rights than the one in the sharee's owned calendar.</t>
+                            <t>A scheduled iCalendar component appearing in a sharee's shared calendar could include the sharee as an Attendee. For recurring events, it is possible for the sharee to only be listed as an Attendee in some instances, as opposed to all. Clients will need to be aware of this when allowing sharee's to set their own participation status.</t>
+                        </list>
+                    </t>
+                    <t>
+                        In addition, when a shared calendar is first accepted by a sharee, the server SHOULD set the CALDAV:schedule-calendar-transp property to the value CALDAV:transparent to ensure newly accepted shared calendars do not contribute to the sharee's freebusy time until the sharee explicitly requests it.
+                    </t>
+                </section>
+            </section>
+        </section>
+
+        <section title='XML Element Definitions'>
+            <section title="CS:shared-owner" anchor="CS:shared-owner">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">shared-owner</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">Used to indicate that a calendar is being shared by the owner.</t>
+                    <t hangText="Description:">This property appears in the DAV:resourcetype property on the calendar collection resource shared by a sharer. See <xref target="properties"/>.</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT shared-owner EMPTY>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:shared" anchor="CS:shared">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">shared</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">Used to indicate that a calendar is being shared to a sharee.</t>
+                    <t hangText="Description:">This property appears in the DAV:resourcetype property on a calendar collection resource that is shared to a sharee and appears in the sharee's calendar home collection. See <xref target="properties"/>.</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT shared EMPTY>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:can-be-shared" anchor="CS:can-be-shared">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">can-be-shared</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">Used to indicate that a calendar can be shared.</t>
+                    <t hangText="Description:">This element indicates that a calendar can be shared with other users. See <xref target="CS:allowed-sharing-modes"/></t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT can-be-shared EMPTY>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:can-be-published" anchor="CS:can-be-published">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">can-be-published</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">Used to indicate that a calendar can be published.</t>
+                    <t hangText="Description:">This element indicates that a calendar can be published to anyone. See <xref target="CS:allowed-sharing-modes"/></t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT can-be-published EMPTY>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:user" anchor="CS:user">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">user</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">Used to show status of sharing invites sent to sharees.</t>
+                    <t hangText="Description:">This element provides the "status" of a sharing invite sent to a particular user. See <xref target="CS:invite"/>.</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT user (DAV:href, common-name?, (invite-noresponse |
+                invite-accepted | invite-declined | invite-invalid),
+                access, summary?)>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:invite-noresponse">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">invite-noresponse</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">Sharing invite status.</t>
+                    <t hangText="Description:">When used in a <xref target="CS:user">CS:user</xref> element, this element is used to indicate that the sharee has never replied to the corresponding sharing invite. When used in a <xref target="CS:invite-notification">CS:invite-notification</xref> element, this element is used to indicate to the sharee that a sharing reply is needed.</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT invite-noresponse EMPTY>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:invite-deleted">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">invite-deleted</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">Sharing invite status.</t>
+                    <t hangText="Description:">When used in a <xref target="CS:invite-notification">CS:invite-notification</xref> element, this element is used to indicate to the sharee that a shared calendar has been unshared by the sharer.</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT invite-deleted EMPTY>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:invite-accepted">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">invite-accepted</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">Sharing invite status.</t>
+                    <t hangText="Description:">When used in a <xref target="CS:user">CS:user</xref> element, this element is used to indicate that the sharee has accepted the corresponding sharing invite. When used in a <xref target="CS:invite-notification">CS:invite-notification</xref> element, this element is used to indicate to the sharee that the sharing invite is an update for one they previously accepted.</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT invite-accepted EMPTY>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:invite-declined">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">invite-declined</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">Sharing invite status.</t>
+                    <t hangText="Description:">When used in a <xref target="CS:user">CS:user</xref> element, this element is used to indicate that the sharee has declined the corresponding sharing invite. When used in a <xref target="CS:invite-notification">CS:invite-notification</xref> element, this element is used to indicate to the sharee that the sharing invite is an update for one they previously declined.</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT invite-declined EMPTY>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:invite-invalid">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">invite-invalid</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">Sharing invite status.</t>
+                    <t hangText="Description:">When used in a <xref target="CS:user">CS:user</xref> element, this element is used to indicate that the corresponding sharee is not a valid calendar user known to the server.</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT invite-invalid EMPTY>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:access">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">access</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">Shared calendar access level.</t>
+                    <t hangText="Description:">When used in a <xref target="CS:user">CS:user</xref> element, this element is used to indicate the sharing access level granted to the corresponding sharee.</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT access (read | read-write)>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:read">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">read</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">Shared calendar access level privilege.</t>
+                    <t hangText="Description:">Indicates that the access level granted only allows sharees to read data in the shared calendar (though they can write <xref target="per-user-data">per-user data</xref>).</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT read EMPTY>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:read-write">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">read-write</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">Shared calendar access level privilege.</t>
+                    <t hangText="Description:">Indicates that the access level granted allows sharees to read and write all data in the shared calendar, with the exception of components that would trigger scheduling.</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT read-write EMPTY>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:summary">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">summary</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">Summary or title of shared calendar.</t>
+                    <t hangText="Description:">A brief description of a shared calendar. This can be used by sharers to communicate the nature of a shared calendar to sharees, as well as used by sharees to indicate back to the sharer how each sharee is refering to the shared calendar.</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT summary (#PCDATA)>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:invite-notification" anchor="CS:invite-notification">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">invite-notification</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">A notification used as a shared calendar invite.</t>
+                    <t hangText="Description:">Defines a notification message sent automatically by the server when a sharer adds, changes or removes a sharee from a shared calendar. The DAV:href element specifies the calendar user address of the sharee to whom the message was sent. The CALDAV:supported-calendar-component-set is a copy of the matching WebDAV property on the sharers calendar collection, to allow clients to know what restrictions might apply to the shared calendar before accepting it.</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT invite-notification (
+            uid, DAV:href,
+            (invite-noresponse | invite-deleted |
+            invite-accepted | invite-declined),
+            access, hosturl, organizer,
+            summary?,
+            CALDAV:supported-calendar-component-set?>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:uid">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">uid</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">Unique identifier.</t>
+                    <t hangText="Description:">A unique identifier for an invitation to a shared calendar.</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT uid (#PCDATA)>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:hosturl">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">hosturl</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">Identifies the source URL of a shared calendar.</t>
+                    <t hangText="Description:">Contains a single DAV:href element that refers to the source of a shared calendar - i.e., the URL of the calendar shared by the sharer.</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT hosturl (DAV:href)>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:organizer">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">organizer</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">Identifies the sharer of a shared calendar.</t>
+                    <t hangText="Description:">Contains a single DAV:href element that identifies the calendar user address of the sharer of a shared calendar, and an optional CS:common-name element that matches that user, and an option CS:first-name, CS:last-name pair of elements that match that user. In some cases servers might have directory information that includes only the common name, or only the first or last name, and it is better to expose those directly to the client as-is rather than to try and split or combine the attributes to synthesize one set or the other.</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT organizer (DAV:href,
+                     CS:common-name?,
+                     (CS:first-name, CS:last-name)?)>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:common-name" anchor="CS:common-name">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">common-name</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">The common name of a sharer or sharee.</t>
+                    <t hangText="Description:">The common name is optionally provided by a client when adding a sharee and optionally included (or modified) by the server when returning results for sharers or sharees and in notifications.</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT common-name (#PCDATA)>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:first-name" anchor="CS:first-name">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">first-name</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">The first name of a sharer or sharee.</t>
+                    <t hangText="Description:">The first name is optionally included by the server when returning results for sharers or sharees and in notifications.</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT first-name (#PCDATA)>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:last-name" anchor="CS:last-name">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">last-name</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">The last name of a sharer or sharee.</t>
+                    <t hangText="Description:">The last name is optionally included by the server when returning results for sharers or sharees and in notifications.</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT last-name (#PCDATA)>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:invite-reply" anchor="CS:invite-reply">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">invite-reply</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">A notification used as a reply to a shared calendar invite.</t>
+                    <t hangText="Description:">Defines a notification message sent automatically by the server when a sharee replies to a shared calendar invite. The DAV:href element specifies the calendar user address of the sharee to whom the original invite message was sent.</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT invite-reply (DAV:href,
+                        (invite-accepted | invite-declined),
+                        hosturl, in-reply-to, summary?>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:in-reply-to">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">in-reply-to</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">Unique identifier.</t>
+                    <t hangText="Description:">Specifies the unique identifier of the inviate message that this notification message is a reply to.</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT in-reply-to (#PCDATA)>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:notification" anchor="CS:notification">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">notification</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">Notification message root element.</t>
+                    <t hangText="Description:">The root element used in notification resources.</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT notification (CS:dtstamp,
+                        (invite-notification | invite-reply)>
+<!-- Any notification type element can appear after CS:dtstamp,
+     this specification defines only the two listed above -->]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:dtstamp" anchor="CS:dtstamp">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">dtstamp</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">Date-time stamp.</t>
+                    <t hangText="Description:">Contains the date-time stamp corresponding to the creation of a notification message.</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT dtstamp (#PCDATA)>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:share" anchor="CS:share">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">share</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">Describes changes to sharees.</t>
+                    <t hangText="Description:">The root element used in POST requests on calendars by sharers to manipulate the sharee list of a shared calendar.</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT share (set | remove)*>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:set" anchor="CS:set">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">set</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">Sets access for a sharee.</t>
+                    <t hangText="Description:">Used to add or modify sharee access to a shared calendar. The specified access to the shared calendar is given to the sharee.</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT set (DAV:href, common-name?, summary?,
+               (read | read-write)>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:remove" anchor="CS:remove">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">remove</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">Removes access for a sharee.</t>
+                    <t hangText="Description:">Used to remove sharee access to a shared calendar. All access to the shared calendar is removed for the sharee.</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT remove (DAV:href)>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+            <section title="CS:shared-as" anchor="CS:shared-as">
+                <t>
+                  <list style="hanging">
+                    <t hangText="Name:">shared-as</t>
+                    <t hangText="Namespace:">http://calendarserver.org/ns/</t>
+                    <t hangText="Purpose:">Identifies a shared calendar.</t>
+                    <t hangText="Description:">Returned by the server for a POST request by a sharee accepting a shared calendar invite. The DAV:href element specifies the URI of the calendar created by the acceptance.</t>
+                    <t hangText="Definition:">
+                      <figure>
+                        <artwork><![CDATA[
+<!ELEMENT shared-as (DAV:href)>]]></artwork>
+                      </figure>
+                    </t>
+                  </list>
+                </t>
+            </section>
+        </section>
+
+        <section title='Security Considerations'>
+            <t>
+                Per-user WebDAV properties and iCalendar data MUST only be accessible by the user that created them.
+            </t>
+            <t>
+                Alarms set by the sharer SHOULD NOT be propagated to sharees by default. Clients SHOULD NOT automatically enable triggering of alarms on shared calendars that have just been accepted without confirmation by the user.
+            </t>
+            <t>
+                TBD
+            </t>
+        </section>
+        <section title='IANA Considerations'>
+            <t>
+                This document does not require any actions on the part of IANA.
+            </t>
+        </section>
+        <section title='Acknowledgments'>
+            <t>
+                This specification is the result of discussions between the Apple calendar server and client teams.
+            </t>
+        </section>
+    </middle>
+    <back>
+        <references title='Normative References'>
+            &rfc2119;
+            &rfc3744;
+            &rfc4791;
+            &rfc4918;
+            &rfc6638; 
+        </references>
+<!--
+<references title='Informative References'>
+</references>
+-->
+        <section title='Change History'>
+            <t>Changes in -03:
+                <list style='numbers'>
+                    <t>Fixed access element DTD.</t>
+                    <t>Remove MKxxx and PROPPATCH mechanism for upgrading/downgrading shared state on a calendar collection. Instead the server implicitly sets the state based on whether there are any sharees or not..</t>
+                    <t>Added CS:first-name and CS:last-name optional element to CS:organizer.</t>
+                    <t>Added CALDAV:supported-calendar-component-set optional element to CS:invite-notification.</t>
+                </list>
+            </t>
+            <t>Changes in -02:
+                <list style='numbers'>
+                    <t>Removed read-write-shared access mode - now a server that does not support shared scheduling should advertise that via a DAV header</t>
+                </list>
+            </t>
+            <t>Changes in -01:
+                <list style='numbers'>
+                    <t>Added CS:shared-url property</t>
+                    <t>Clarified that notifications are only required to be sent when sharee status is changed</t>
+                </list>
+            </t>
+        </section>
+    </back>
+</rfc>

Modified: CalendarServer/trunk/twistedcaldav/customxml.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/customxml.py	2012-09-19 14:59:42 UTC (rev 9821)
+++ CalendarServer/trunk/twistedcaldav/customxml.py	2012-09-19 17:16:32 UTC (rev 9822)
@@ -31,6 +31,7 @@
 from txdav.xml.element import ResourceType, Collection, Principal
 
 from twistedcaldav import caldavxml, carddavxml
+from twistedcaldav.caldavxml import caldav_namespace
 from twistedcaldav.ical import Component as iComponent
 
 from pycalendar.datetime import PyCalendarDateTime
@@ -82,6 +83,7 @@
         return str(self)
 
 
+
 @registerElement
 class TwistedCalendarAccessProperty (WebDAVTextElement):
     """
@@ -95,42 +97,46 @@
         return str(self)
 
 
+
 @registerElement
 class TwistedSchedulingObjectResource (WebDAVTextElement):
     """
-    Indicates that the resource is a scheduling object resource.    
+    Indicates that the resource is a scheduling object resource.
     """
     namespace = twisted_private_namespace
     name = "scheduling-object-resource"
     hidden = True
 
 
+
 @registerElement
 class TwistedScheduleMatchETags(WebDAVElement):
     """
-    List of ETags that can be used for a "weak" If-Match comparison.    
+    List of ETags that can be used for a "weak" If-Match comparison.
     """
     namespace = twisted_private_namespace
     name = "scheduling-match-etags"
     hidden = True
 
-    allowed_children = { (dav_namespace, "getetag"): (0, None) }
+    allowed_children = {(dav_namespace, "getetag"): (0, None)}
 
 
+
 @registerElement
 class TwistedCalendarHasPrivateCommentsProperty (WebDAVEmptyElement):
     """
     Indicates that a calendar resource has private comments.
-    
+
     NB This MUST be a private property as we don't want to expose the presence of private comments
     in private events.
-    
+
     """
     namespace = twisted_private_namespace
     name = "calendar-has-private-comments"
     hidden = True
 
 
+
 @registerElement
 class CalendarProxyRead (WebDAVEmptyElement):
     """
@@ -141,6 +147,7 @@
     name = "calendar-proxy-read"
 
 
+
 @registerElement
 class CalendarProxyWrite (WebDAVEmptyElement):
     """
@@ -151,6 +158,7 @@
     name = "calendar-proxy-write"
 
 
+
 @registerElement
 class CalendarProxyReadFor (WebDAVElement):
     """
@@ -162,9 +170,10 @@
     hidden = True
     protected = True
 
-    allowed_children = { (dav_namespace, "href"): (0, None) }
+    allowed_children = {(dav_namespace, "href"): (0, None)}
 
 
+
 @registerElement
 class CalendarProxyWriteFor (WebDAVElement):
     """
@@ -176,9 +185,10 @@
     hidden = True
     protected = True
 
-    allowed_children = { (dav_namespace, "href"): (0, None) }
+    allowed_children = {(dav_namespace, "href"): (0, None)}
 
 
+
 @registerElement
 class DropBoxHome (WebDAVEmptyElement):
     """
@@ -189,6 +199,7 @@
     name = "dropbox-home"
 
 
+
 @registerElement
 class DropBox (WebDAVEmptyElement):
     """
@@ -199,6 +210,7 @@
     name = "dropbox"
 
 
+
 @registerElement
 class DropBoxHomeURL (WebDAVElement):
     """
@@ -210,9 +222,10 @@
     hidden = True
     protected = True
 
-    allowed_children = { (dav_namespace, "href"): (0, 1) }
+    allowed_children = {(dav_namespace, "href"): (0, 1)}
 
 
+
 @registerElement
 class GETCTag (WebDAVTextElement):
     """
@@ -223,6 +236,7 @@
     protected = True
 
 
+
 @registerElement
 class CalendarAvailability (WebDAVTextElement):
     """
@@ -239,6 +253,7 @@
         """
         return iComponent.fromString(str(self))
 
+
     def valid(self):
         """
         Determine whether the content of this element is a valid single VAVAILABILITY component,
@@ -246,7 +261,7 @@
 
         @return: True if valid, False if not.
         """
-        
+
         try:
             calendar = self.calendar()
             if calendar is None:
@@ -269,6 +284,7 @@
         return found
 
 
+
 @registerElement
 class MaxCollections (WebDAVTextElement):
     """
@@ -280,6 +296,7 @@
     protected = True
 
 
+
 @registerElement
 class MaxResources (WebDAVTextElement):
     """
@@ -291,6 +308,7 @@
     protected = True
 
 
+
 @registerElement
 class Timezones (WebDAVEmptyElement):
     """
@@ -301,6 +319,7 @@
     name = "timezones"
 
 
+
 @registerElement
 class TZIDs (WebDAVElement):
     """
@@ -308,9 +327,10 @@
     """
     namespace = calendarserver_namespace
     name = "tzids"
-    allowed_children = { (calendarserver_namespace, "tzid" ): (0, None) }
+    allowed_children = {(calendarserver_namespace, "tzid"): (0, None)}
 
 
+
 @registerElement
 class TZID (WebDAVTextElement):
     """
@@ -320,6 +340,7 @@
     name = "tzid"
 
 
+
 @registerElement
 class TZData (WebDAVElement):
     """
@@ -327,9 +348,10 @@
     """
     namespace = calendarserver_namespace
     name = "tzdata"
-    allowed_children = { (calendarserver_namespace, "observance" ): (0, None) }
+    allowed_children = {(calendarserver_namespace, "observance"): (0, None)}
 
 
+
 @registerElement
 class Observance (WebDAVElement):
     """
@@ -338,11 +360,12 @@
     namespace = calendarserver_namespace
     name = "observance"
     allowed_children = {
-        (calendarserver_namespace, "onset" )     : (1, 1),
-        (calendarserver_namespace, "utc-offset" ): (1, 1),
+        (calendarserver_namespace, "onset")     : (1, 1),
+        (calendarserver_namespace, "utc-offset"): (1, 1),
     }
 
 
+
 @registerElement
 class Onset (WebDAVTextElement):
     """
@@ -352,6 +375,7 @@
     name = "onset"
 
 
+
 @registerElement
 class UTCOffset (WebDAVTextElement):
     """
@@ -361,6 +385,7 @@
     name = "utc-offset"
 
 
+
 @registerElement
 class PubSubPushTransportsProperty (WebDAVTextElement):
     """
@@ -376,6 +401,7 @@
     }
 
 
+
 @registerElement
 class PubSubTransportProperty (WebDAVTextElement):
     namespace = calendarserver_namespace
@@ -394,15 +420,17 @@
     }
 
 
+
 @registerElement
 class PubSubSubscriptionProperty (WebDAVTextElement):
     namespace = calendarserver_namespace
     name = "subscription-url"
     protected = True
     hidden = True
-    allowed_children = { (dav_namespace, "href"): (0, 1) }
+    allowed_children = {(dav_namespace, "href"): (0, 1)}
 
 
+
 @registerElement
 class PubSubAPSBundleIDProperty (WebDAVTextElement):
     namespace = calendarserver_namespace
@@ -411,6 +439,7 @@
     hidden = True
 
 
+
 @registerElement
 class PubSubAPSEnvironmentProperty (WebDAVTextElement):
     namespace = calendarserver_namespace
@@ -419,6 +448,7 @@
     hidden = True
 
 
+
 @registerElement
 class PubSubAPSRefreshIntervalProperty (WebDAVTextElement):
     namespace = calendarserver_namespace
@@ -427,6 +457,7 @@
     hidden = True
 
 
+
 @registerElement
 class PubSubXMPPPushKeyProperty (WebDAVTextElement):
     namespace = calendarserver_namespace
@@ -435,6 +466,7 @@
     hidden = True
 
 
+
 @registerElement
 class PubSubXMPPURIProperty (WebDAVTextElement):
     """
@@ -447,6 +479,7 @@
     hidden = True
 
 
+
 @registerElement
 class PubSubHeartbeatProperty (WebDAVElement):
     """
@@ -458,11 +491,12 @@
     protected = True
     hidden = True
     allowed_children = {
-        (calendarserver_namespace, "xmpp-heartbeat-uri" )     : (1, 1),
-        (calendarserver_namespace, "xmpp-heartbeat-minutes" ) : (1, 1),
+        (calendarserver_namespace, "xmpp-heartbeat-uri")     : (1, 1),
+        (calendarserver_namespace, "xmpp-heartbeat-minutes") : (1, 1),
     }
 
 
+
 @registerElement
 class PubSubHeartbeatURIProperty (WebDAVTextElement):
     namespace = calendarserver_namespace
@@ -471,6 +505,7 @@
     hidden = True
 
 
+
 @registerElement
 class PubSubHeartbeatMinutesProperty (WebDAVTextElement):
     namespace = calendarserver_namespace
@@ -479,6 +514,7 @@
     hidden = True
 
 
+
 @registerElement
 class PubSubXMPPServerProperty (WebDAVTextElement):
     """
@@ -507,10 +543,11 @@
     namespace = calendarserver_namespace
     name = "limit"
     allowed_children = {
-        (calendarserver_namespace, "nresults" )  : (1, 1),
+        (calendarserver_namespace, "nresults")  : (1, 1),
     }
 
 
+
 @registerElement
 class NResults (WebDAVTextElement):
     """
@@ -520,6 +557,7 @@
     name = "nresults"
 
 
+
 @registerElement
 class FirstNameProperty (WebDAVTextElement):
     """
@@ -531,6 +569,7 @@
     hidden = True
 
 
+
 @registerElement
 class LastNameProperty (WebDAVTextElement):
     """
@@ -542,6 +581,7 @@
     hidden = True
 
 
+
 @registerElement
 class EmailAddressProperty (WebDAVTextElement):
     """
@@ -553,6 +593,7 @@
     hidden = True
 
 
+
 @registerElement
 class EmailAddressSet (WebDAVElement):
     """
@@ -562,9 +603,10 @@
     name = "email-address-set"
     hidden = True
 
-    allowed_children = { (calendarserver_namespace, "email-address"): (0, None) }
+    allowed_children = {(calendarserver_namespace, "email-address"): (0, None)}
 
 
+
 @registerElement
 class ExpandedGroupMemberSet (WebDAVElement):
     """
@@ -575,9 +617,10 @@
     protected = True
     hidden = True
 
-    allowed_children = { (dav_namespace, "href"): (0, None) }
+    allowed_children = {(dav_namespace, "href"): (0, None)}
 
 
+
 @registerElement
 class ExpandedGroupMembership (WebDAVElement):
     """
@@ -588,9 +631,10 @@
     protected = True
     hidden = True
 
-    allowed_children = { (dav_namespace, "href"): (0, None) }
+    allowed_children = {(dav_namespace, "href"): (0, None)}
 
 
+
 @registerElement
 class IScheduleInbox (WebDAVEmptyElement):
     """
@@ -601,6 +645,7 @@
     name = "ischedule-inbox"
 
 
+
 @registerElement
 class FreeBusyURL (WebDAVEmptyElement):
     """
@@ -611,6 +656,7 @@
     name = "free-busy-url"
 
 
+
 @registerElement
 class ScheduleChanges (WebDAVElement):
     """
@@ -621,11 +667,12 @@
     protected = True
     hidden = True
     allowed_children = {
-        (calendarserver_namespace, "dtstamp" )     : (0, 1), # Have to allow 0 as element is empty in PROPFIND requests
-        (calendarserver_namespace, "action" )      : (0, 1), # Have to allow 0 as element is empty in PROPFIND requests
+        (calendarserver_namespace, "dtstamp")     : (0, 1), # Have to allow 0 as element is empty in PROPFIND requests
+        (calendarserver_namespace, "action")      : (0, 1), # Have to allow 0 as element is empty in PROPFIND requests
     }
 
 
+
 @registerElement
 class ScheduleDefaultTasksURL (WebDAVElement):
     """
@@ -634,9 +681,10 @@
     namespace = calendarserver_namespace
     name = "schedule-default-tasks-URL"
 
-    allowed_children = { (dav_namespace, "href"): (0, 1) }
+    allowed_children = {(dav_namespace, "href"): (0, 1)}
 
 
+
 @registerElement
 class DTStamp (WebDAVTextElement):
     """
@@ -650,6 +698,7 @@
         self.children = (PCDATAElement(PyCalendarDateTime.getNowUTC().getText()),)
 
 
+
 @registerElement
 class Action (WebDAVElement):
     """
@@ -658,13 +707,14 @@
     namespace = calendarserver_namespace
     name = "action"
     allowed_children = {
-        (calendarserver_namespace, "create" ) : (0, 1),
-        (calendarserver_namespace, "update" ) : (0, 1),
-        (calendarserver_namespace, "cancel" ) : (0, 1),
-        (calendarserver_namespace, "reply" )  : (0, 1),
+        (calendarserver_namespace, "create") : (0, 1),
+        (calendarserver_namespace, "update") : (0, 1),
+        (calendarserver_namespace, "cancel") : (0, 1),
+        (calendarserver_namespace, "reply")  : (0, 1),
     }
 
 
+
 @registerElement
 class Create (WebDAVEmptyElement):
     """
@@ -674,6 +724,7 @@
     name = "create"
 
 
+
 @registerElement
 class Update (WebDAVElement):
     """
@@ -682,10 +733,11 @@
     namespace = calendarserver_namespace
     name = "update"
     allowed_children = {
-        (calendarserver_namespace, "recurrence" ) : (1, None),
+        (calendarserver_namespace, "recurrence") : (1, None),
     }
 
 
+
 @registerElement
 class Cancel (WebDAVElement):
     """
@@ -694,10 +746,11 @@
     namespace = calendarserver_namespace
     name = "cancel"
     allowed_children = {
-        (calendarserver_namespace, "recurrence" ) : (0, 1),
+        (calendarserver_namespace, "recurrence") : (0, 1),
     }
 
 
+
 @registerElement
 class Reply (WebDAVElement):
     """
@@ -706,11 +759,12 @@
     namespace = calendarserver_namespace
     name = "reply"
     allowed_children = {
-        (calendarserver_namespace, "attendee" )        : (1, 1),
-        (calendarserver_namespace, "recurrence" )      : (1, None),
+        (calendarserver_namespace, "attendee")        : (1, 1),
+        (calendarserver_namespace, "recurrence")      : (1, None),
     }
 
 
+
 @registerElement
 class Recurrence (WebDAVElement):
     """
@@ -719,12 +773,13 @@
     namespace = calendarserver_namespace
     name = "recurrence"
     allowed_children = {
-        (calendarserver_namespace, "master" )       : (0, 1),
-        (calendarserver_namespace, "recurrenceid" ) : (0, None),
-        (calendarserver_namespace, "changes" )      : (0, 1),
+        (calendarserver_namespace, "master")       : (0, 1),
+        (calendarserver_namespace, "recurrenceid") : (0, None),
+        (calendarserver_namespace, "changes")      : (0, 1),
     }
 
 
+
 @registerElement
 class Master (WebDAVEmptyElement):
     """
@@ -734,6 +789,7 @@
     name = "master"
 
 
+
 @registerElement
 class RecurrenceID (WebDAVTextElement):
     """
@@ -743,6 +799,7 @@
     name = "recurrenceid"
 
 
+
 @registerElement
 class Changes (WebDAVElement):
     """
@@ -751,10 +808,11 @@
     namespace = calendarserver_namespace
     name = "changes"
     allowed_children = {
-        (calendarserver_namespace, "changed-property" )  : (0, None),
+        (calendarserver_namespace, "changed-property")  : (0, None),
     }
 
 
+
 @registerElement
 class ChangedProperty (WebDAVElement):
     """
@@ -764,7 +822,7 @@
     name = "changed-property"
 
     allowed_children = {
-        (calendarserver_namespace, "changed-parameter" )  : (0, None),
+        (calendarserver_namespace, "changed-parameter")  : (0, None),
     }
 
     allowed_attributes = {
@@ -772,6 +830,7 @@
     }
 
 
+
 @registerElement
 class ChangedParameter (WebDAVEmptyElement):
     """
@@ -785,6 +844,7 @@
     }
 
 
+
 @registerElement
 class Attendee (WebDAVTextElement):
     """
@@ -794,6 +854,7 @@
     name = "attendee"
 
 
+
 @registerElement
 class RecordType (WebDAVTextElement):
     """
@@ -805,6 +866,7 @@
     hidden = True
 
 
+
 @registerElement
 class AutoSchedule (WebDAVTextElement):
     """
@@ -814,6 +876,7 @@
     name = "auto-schedule"
 
 
+
 @registerElement
 class AutoScheduleMode (WebDAVTextElement):
     """
@@ -823,6 +886,7 @@
     name = "auto-schedule-mode"
 
 
+
 ##
 # Sharing
 ##
@@ -836,6 +900,7 @@
     name = "read"
 
 
+
 @registerElement
 class ReadWriteAccess (WebDAVEmptyElement):
     """
@@ -845,18 +910,21 @@
     name = "read-write"
 
 
+
 @registerElement
 class UID (WebDAVTextElement):
     namespace = calendarserver_namespace
     name = "uid"
 
 
+
 @registerElement
 class InReplyTo (WebDAVTextElement):
     namespace = calendarserver_namespace
     name = "in-reply-to"
 
 
+
 @registerElement
 class SharedOwner (WebDAVEmptyElement):
     """
@@ -866,6 +934,7 @@
     name = "shared-owner"
 
 
+
 @registerElement
 class Shared (WebDAVEmptyElement):
     """
@@ -875,6 +944,7 @@
     name = "shared"
 
 
+
 @registerElement
 class Subscribed (WebDAVEmptyElement):
     """
@@ -884,6 +954,7 @@
     name = "subscribed"
 
 
+
 @registerElement
 class SharedURL (WebDAVTextElement):
     """
@@ -895,6 +966,7 @@
     hidden = True
 
 
+
 @registerElement
 class SharedAs (WebDAVElement):
     """
@@ -908,6 +980,7 @@
     }
 
 
+
 @registerElement
 class SharedAcceptEmailNotification (WebDAVTextElement):
     """
@@ -917,6 +990,7 @@
     name = "shared-accept-email-notification"
 
 
+
 @registerElement
 class Birthday (WebDAVEmptyElement):
     """
@@ -926,6 +1000,7 @@
     name = "birthday"
 
 
+
 @registerElement
 class AllowedSharingModes (WebDAVElement):
     namespace = calendarserver_namespace
@@ -939,18 +1014,21 @@
     }
 
 
+
 @registerElement
 class CanBeShared (WebDAVEmptyElement):
     namespace = calendarserver_namespace
     name = "can-be-shared"
 
 
+
 @registerElement
 class CanBePublished (WebDAVEmptyElement):
     namespace = calendarserver_namespace
     name = "can-be-published"
 
 
+
 @registerElement
 class InviteShare (WebDAVElement):
     namespace = calendarserver_namespace
@@ -962,6 +1040,7 @@
     }
 
 
+
 @registerElement
 class InviteSet (WebDAVElement):
     namespace = calendarserver_namespace
@@ -977,6 +1056,7 @@
     }
 
 
+
 @registerElement
 class InviteRemove (WebDAVElement):
     namespace = calendarserver_namespace
@@ -990,6 +1070,7 @@
     }
 
 
+
 @registerElement
 class InviteUser (WebDAVElement):
     namespace = calendarserver_namespace
@@ -1009,6 +1090,7 @@
     }
 
 
+
 @registerElement
 class InviteAccess (WebDAVElement):
     namespace = calendarserver_namespace
@@ -1021,6 +1103,7 @@
     }
 
 
+
 @registerElement
 class Invite (WebDAVElement):
     namespace = calendarserver_namespace
@@ -1032,42 +1115,49 @@
     }
 
 
+
 @registerElement
 class InviteSummary (WebDAVTextElement):
     namespace = calendarserver_namespace
     name = "summary"
 
 
+
 @registerElement
 class InviteStatusNoResponse (WebDAVEmptyElement):
     namespace = calendarserver_namespace
     name = "invite-noresponse"
 
 
+
 @registerElement
 class InviteStatusDeleted (WebDAVEmptyElement):
     namespace = calendarserver_namespace
     name = "invite-deleted"
 
 
+
 @registerElement
 class InviteStatusAccepted (WebDAVEmptyElement):
     namespace = calendarserver_namespace
     name = "invite-accepted"
 
 
+
 @registerElement
 class InviteStatusDeclined (WebDAVEmptyElement):
     namespace = calendarserver_namespace
     name = "invite-declined"
 
 
+
 @registerElement
 class InviteStatusInvalid (WebDAVEmptyElement):
     namespace = calendarserver_namespace
     name = "invite-invalid"
 
 
+
 @registerElement
 class HostURL (WebDAVElement):
     """
@@ -1081,6 +1171,7 @@
     }
 
 
+
 @registerElement
 class Organizer (WebDAVElement):
     """
@@ -1095,6 +1186,7 @@
     }
 
 
+
 @registerElement
 class CommonName (WebDAVTextElement):
     """
@@ -1104,6 +1196,7 @@
     name = "common-name"
 
 
+
 @registerElement
 class InviteNotification (WebDAVElement):
     namespace = calendarserver_namespace
@@ -1120,6 +1213,7 @@
         (calendarserver_namespace, "hosturl")           : (0, 1),
         (calendarserver_namespace, "organizer")         : (0, 1),
         (calendarserver_namespace, "summary")           : (0, 1),
+        (caldav_namespace, "supported-calendar-component-set") : (0, 1),
     }
 
     allowed_attributes = {
@@ -1127,6 +1221,7 @@
     }
 
 
+
 @registerElement
 class InviteReply (WebDAVElement):
     namespace = calendarserver_namespace
@@ -1145,6 +1240,7 @@
     }
 
 
+
 @registerElement
 class ResourceUpdateNotification (WebDAVElement):
     namespace = calendarserver_namespace
@@ -1159,24 +1255,28 @@
     }
 
 
+
 @registerElement
 class ResourceUpdateAdded(WebDAVEmptyElement):
     namespace = calendarserver_namespace
     name = "resource-added-notification"
 
 
+
 @registerElement
 class ResourceUpdateUpdated(WebDAVEmptyElement):
     namespace = calendarserver_namespace
     name = "resource-updated-notification"
 
 
+
 @registerElement
 class ResourceUpdateDeleted(WebDAVEmptyElement):
     namespace = calendarserver_namespace
     name = "resource-deleted-notification"
 
 
+
 @registerElement
 class SharedCalendarUpdateNotification (WebDAVElement):
     namespace = calendarserver_namespace
@@ -1190,6 +1290,8 @@
         (calendarserver_namespace, "invite-declined")   : (0, 1),
     }
 
+
+
 ##
 # Notifications
 ##
@@ -1211,6 +1313,7 @@
     }
 
 
+
 @registerElement
 class NotificationURL (WebDAVElement):
     """
@@ -1226,6 +1329,7 @@
     }
 
 
+
 @registerElement
 class NotificationType (WebDAVElement):
     """
@@ -1242,6 +1346,7 @@
     }
 
 
+
 @registerElement
 class Link (WebDAVEmptyElement):
     """
@@ -1263,6 +1368,7 @@
     }
 
 
+
 @registerElement
 class Resource (WebDAVElement):
     namespace = mm_namespace
@@ -1270,13 +1376,14 @@
 
     allowed_children = {
         (dav_namespace, "href")     : (0, 1),
-        (mm_namespace,  "if-match") : (0, 1),
+        (mm_namespace, "if-match") : (0, 1),
         (dav_namespace, "set")      : (0, 1),
         (dav_namespace, "remove")   : (0, 1),
-        (mm_namespace,  "delete")   : (0, 1),
+        (mm_namespace, "delete")   : (0, 1),
     }
 
 
+
 @registerElement
 class IfMatch (WebDAVElement):
     namespace = mm_namespace
@@ -1287,6 +1394,7 @@
     }
 
 
+
 @registerElement
 class Delete (WebDAVEmptyElement):
     namespace = mm_namespace
@@ -1307,6 +1415,7 @@
     }
 
 
+
 @registerElement
 class Simple (WebDAVElement):
     namespace = mm_namespace
@@ -1320,6 +1429,7 @@
     }
 
 
+
 @registerElement
 class CRUD (WebDAVElement):
     namespace = mm_namespace
@@ -1333,18 +1443,21 @@
     }
 
 
+
 @registerElement
 class MaxBulkResources (WebDAVTextElement):
     namespace = mm_namespace
     name = "max-resources"
 
 
+
 @registerElement
 class MaxBulkBytes (WebDAVTextElement):
     namespace = mm_namespace
     name = "max-bytes"
 
 
+
 #
 # Client properties we might care about
 #
@@ -1354,6 +1467,8 @@
     namespace = "http://apple.com/ns/ical/"
     name = "calendar-color"
 
+
+
 #
 # calendarserver-principal-search REPORT
 #
@@ -1366,6 +1481,8 @@
     namespace = calendarserver_namespace
     name = "search-token"
 
+
+
 @registerElement
 class CalendarServerPrincipalSearch (WebDAVElement):
 
@@ -1373,21 +1490,21 @@
     name = "calendarserver-principal-search"
 
     allowed_children = {
-        (calendarserver_namespace, "search-token"          ): (0, None),
-        (calendarserver_namespace, "limit"                 ): (0, 1),
-        (dav_namespace, "prop"                             ): (0, 1),
+        (calendarserver_namespace, "search-token"): (0, None),
+        (calendarserver_namespace, "limit"): (0, 1),
+        (dav_namespace, "prop"): (0, 1),
         (dav_namespace, "apply-to-principal-collection-set"): (0, 1),
     }
-    allowed_attributes = { "context" : False }
+    allowed_attributes = {"context": False}
 
 ##
 # Extensions to ResourceType
 ##
 
 ResourceType.dropboxhome = ResourceType(Collection(), DropBoxHome())
-ResourceType.dropbox     = ResourceType(Collection(), DropBox())
+ResourceType.dropbox = ResourceType(Collection(), DropBox())
 
-ResourceType.calendarproxyread  = ResourceType(Principal(), Collection(), CalendarProxyRead())
+ResourceType.calendarproxyread = ResourceType(Principal(), Collection(), CalendarProxyRead())
 ResourceType.calendarproxywrite = ResourceType(Principal(), Collection(), CalendarProxyWrite())
 
 ResourceType.timezones = ResourceType(Timezones())
@@ -1398,8 +1515,8 @@
 
 ResourceType.notification = ResourceType(Collection(), Notification())
 
-ResourceType.sharedownercalendar = ResourceType(Collection(), caldavxml.Calendar(),     SharedOwner())
-ResourceType.sharedcalendar      = ResourceType(Collection(), caldavxml.Calendar(),     Shared())
-ResourceType.sharedaddressbook   = ResourceType(Collection(), carddavxml.AddressBook(), Shared())
+ResourceType.sharedownercalendar = ResourceType(Collection(), caldavxml.Calendar(), SharedOwner())
+ResourceType.sharedcalendar = ResourceType(Collection(), caldavxml.Calendar(), Shared())
+ResourceType.sharedaddressbook = ResourceType(Collection(), carddavxml.AddressBook(), Shared())
 
 ResourceType.link = ResourceType(Link())
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120919/f683ef27/attachment-0001.html>


More information about the calendarserver-changes mailing list