From db963fadf64ca6614e9c9bcafe5bce674273f5eb Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 27 Sep 2006 09:53:34 +1200 Subject: [PATCH] Now supports user create, view & edit with role assignment. Also starts to support the PROPFIND request that Mulberry makes but does not fully support Mulberry yet (their timezones are non-standard). --- dba/create-database.sh | 8 +- debian/changelog | 10 + docs/dusseault-caldav-15.txt.html | 2662 +++++++++++++++-------------- htdocs/caldav.php | 5 + htdocs/user.php | 50 + htdocs/users.php | 2 +- inc/BasicAuthSession.php | 8 +- inc/RSCDSUser.php | 71 + inc/XMLElement.php | 109 ++ inc/always.php | 1 + inc/caldav-MKCALENDAR.php | 32 + inc/caldav-OPTIONS.php | 4 +- inc/caldav-PROPFIND.php | 142 ++ inc/caldav-REPORT.php | 36 +- inc/interactive-page.php | 2 + inc/page-header.php | 89 +- inc/vEvent.php | 4 +- rscds.webprj | 9 +- 18 files changed, 1913 insertions(+), 1331 deletions(-) create mode 100644 htdocs/user.php create mode 100644 inc/RSCDSUser.php create mode 100644 inc/XMLElement.php create mode 100644 inc/caldav-MKCALENDAR.php create mode 100644 inc/caldav-PROPFIND.php diff --git a/dba/create-database.sh b/dba/create-database.sh index a83b4ec2..b1675c98 100755 --- a/dba/create-database.sh +++ b/dba/create-database.sh @@ -5,8 +5,12 @@ DBNAME="${1:-rscds}" +DBADIR="`dirname \"$0\"`" + createdb -E UTF8 "${DBNAME}" -psql -f rscds.sql "${DBNAME}" +psql -f "${DBADIR}/rscds.sql" "${DBNAME}" -psql -f sample-data.sql "${DBNAME}" +psql -f "${DBADIR}/caldav_functions.sql" "${DBNAME}" + +psql -f "${DBADIR}/sample-data.sql" "${DBNAME}" diff --git a/debian/changelog b/debian/changelog index b0701598..129202d2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +rscds (0.1.4) unstable; urgency=low + + * Now working with both Evolution and Lightning+Thunderbird(alpha) + * Restructured database to show some sense. + * Initial support for TODO items, although either I have it wrong, or + Lighning has it wrong. Lightning can write them, but it doesn't read + them. + + -- Andrew McMillan Sun, 24 Sep 2006 17:18:30 +1200 + rscds (0.1.3) unstable; urgency=low * Hopefully now fairly much ready to install. diff --git a/docs/dusseault-caldav-15.txt.html b/docs/dusseault-caldav-15.txt.html index 26a669a6..65596637 100644 --- a/docs/dusseault-caldav-15.txt.html +++ b/docs/dusseault-caldav-15.txt.html @@ -1,3 +1,60 @@ + + + + + +dusseault-caldav-15.txt + + + +Internet DRAFT - draft-dusseault-caldav +

draft-dusseault-caldav

+


+
+
 
 
 
@@ -11,14 +68,14 @@ Expires: March 17, 2007                                  B. Desruisseaux
 
 
                Calendaring Extensions to WebDAV (CalDAV)
-                       draft-dusseault-caldav-15
+                       draft-dusseault-caldav-15
 
 Status of this Memo
 
    By submitting this Internet-Draft, each author represents that any
    applicable patent or other IPR claims of which he or she is aware
    have been or will be disclosed, and any of which he or she becomes
-   aware will be disclosed, in accordance with Section 6 of BCP 79.
+   aware will be disclosed, in accordance with Section 6 of BCP 79.
 
    Internet-Drafts are working documents of the Internet Engineering
    Task Force (IETF), its areas, and its working groups.  Note that
@@ -31,10 +88,10 @@ Status of this Memo
    material or to cite them other than as "work in progress."
 
    The list of current Internet-Drafts can be accessed at
-   http://www.ietf.org/ietf/1id-abstracts.txt.
+   http://www.ietf.org/ietf/1id-abstracts.txt.
 
    The list of Internet-Draft Shadow Directories can be accessed at
-   http://www.ietf.org/shadow.html.
+   http://www.ietf.org/shadow.html.
 
    This Internet-Draft will expire on March 17, 2007.
 
@@ -53,7 +110,7 @@ Abstract
 
 
 Daboo, et al.            Expires March 17, 2007                 [Page 1]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -62,153 +119,153 @@ Internet-Draft                   CalDAV                   September 2006
 
 Table of Contents
 
-   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   5
-     1.1.  Notational Conventions  . . . . . . . . . . . . . . . . .   5
-     1.2.  XML Namespaces and Processing . . . . . . . . . . . . . .   5
-     1.3.  Method Preconditions and Postconditions . . . . . . . . .   6
-   2.  Requirements Overview . . . . . . . . . . . . . . . . . . . .   6
-   3.  Calendaring Data Model  . . . . . . . . . . . . . . . . . . .   7
-     3.1.  Calendar Server . . . . . . . . . . . . . . . . . . . . .   7
-     3.2.  Recurrence and the Data Model . . . . . . . . . . . . . .   8
-   4.  Calendar Resources  . . . . . . . . . . . . . . . . . . . . .   9
-     4.1.  Calendar Object Resources . . . . . . . . . . . . . . . .   9
-     4.2.  Calendar Collection . . . . . . . . . . . . . . . . . . .  10
-   5.  Calendar Access Feature . . . . . . . . . . . . . . . . . . .  11
-     5.1.  Calendar Access Support . . . . . . . . . . . . . . . . .  11
+   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   5
+     1.1.  Notational Conventions  . . . . . . . . . . . . . . . . .   5
+     1.2.  XML Namespaces and Processing . . . . . . . . . . . . . .   5
+     1.3.  Method Preconditions and Postconditions . . . . . . . . .   6
+   2.  Requirements Overview . . . . . . . . . . . . . . . . . . . .   6
+   3.  Calendaring Data Model  . . . . . . . . . . . . . . . . . . .   7
+     3.1.  Calendar Server . . . . . . . . . . . . . . . . . . . . .   7
+     3.2.  Recurrence and the Data Model . . . . . . . . . . . . . .   8
+   4.  Calendar Resources  . . . . . . . . . . . . . . . . . . . . .   9
+     4.1.  Calendar Object Resources . . . . . . . . . . . . . . . .   9
+     4.2.  Calendar Collection . . . . . . . . . . . . . . . . . . .  10
+   5.  Calendar Access Feature . . . . . . . . . . . . . . . . . . .  11
+     5.1.  Calendar Access Support . . . . . . . . . . . . . . . . .  11
        5.1.1.  Example: Using OPTIONS for the Discovery of
-               Calendar Access Support . . . . . . . . . . . . . . .  12
-     5.2.  Calendar Collection Properties  . . . . . . . . . . . . .  12
-       5.2.1.  CALDAV:calendar-description Property  . . . . . . . .  12
-       5.2.2.  CALDAV:calendar-timezone Property . . . . . . . . . .  13
-       5.2.3.  CALDAV:supported-calendar-component-set Property  . .  14
-       5.2.4.  CALDAV:supported-calendar-data Property . . . . . . .  15
-       5.2.5.  CALDAV:max-resource-size Property . . . . . . . . . .  16
-       5.2.6.  CALDAV:min-date-time Property . . . . . . . . . . . .  17
-       5.2.7.  CALDAV:max-date-time Property . . . . . . . . . . . .  18
-       5.2.8.  CALDAV:max-instances Property . . . . . . . . . . . .  18
-       5.2.9.  CALDAV:max-attendees-per-instance Property  . . . . .  19
-       5.2.10. Additional Precondition for PROPPATCH . . . . . . . .  20
-     5.3.  Creating Resources  . . . . . . . . . . . . . . . . . . .  20
-       5.3.1.  MKCALENDAR Method . . . . . . . . . . . . . . . . . .  20
-         5.3.1.1.  Status Codes  . . . . . . . . . . . . . . . . . .  22
-         5.3.1.2.  Example: Successful MKCALENDAR request  . . . . .  23
-       5.3.2.  Creating Calendar Object Resources  . . . . . . . . .  25
+               Calendar Access Support . . . . . . . . . . . . . . .  12
+     5.2.  Calendar Collection Properties  . . . . . . . . . . . . .  12
+       5.2.1.  CALDAV:calendar-description Property  . . . . . . . .  12
+       5.2.2.  CALDAV:calendar-timezone Property . . . . . . . . . .  13
+       5.2.3.  CALDAV:supported-calendar-component-set Property  . .  14
+       5.2.4.  CALDAV:supported-calendar-data Property . . . . . . .  15
+       5.2.5.  CALDAV:max-resource-size Property . . . . . . . . . .  16
+       5.2.6.  CALDAV:min-date-time Property . . . . . . . . . . . .  17
+       5.2.7.  CALDAV:max-date-time Property . . . . . . . . . . . .  18
+       5.2.8.  CALDAV:max-instances Property . . . . . . . . . . . .  18
+       5.2.9.  CALDAV:max-attendees-per-instance Property  . . . . .  19
+       5.2.10. Additional Precondition for PROPPATCH . . . . . . . .  20
+     5.3.  Creating Resources  . . . . . . . . . . . . . . . . . . .  20
+       5.3.1.  MKCALENDAR Method . . . . . . . . . . . . . . . . . .  20
+         5.3.1.1.  Status Codes  . . . . . . . . . . . . . . . . . .  22
+         5.3.1.2.  Example: Successful MKCALENDAR request  . . . . .  23
+       5.3.2.  Creating Calendar Object Resources  . . . . . . . . .  25
          5.3.2.1.  Additional Preconditions for PUT, COPY and MOVE .  26
        5.3.3.  Non-standard components, properties and parameters  .  28
-       5.3.4.  Calendar Object Resource Entity Tag . . . . . . . . .  28
-   6.  Calendaring Access Control  . . . . . . . . . . . . . . . . .  29
-     6.1.  Calendaring Privilege . . . . . . . . . . . . . . . . . .  29
-       6.1.1.  CALDAV:read-free-busy Privilege . . . . . . . . . . .  29
-     6.2.  Additional Principal Property . . . . . . . . . . . . . .  30
-       6.2.1.  CALDAV:calendar-home-set Property . . . . . . . . . .  30
-   7.  Calendaring Reports . . . . . . . . . . . . . . . . . . . . .  31
-     7.1.  REPORT Method . . . . . . . . . . . . . . . . . . . . . .  31
-     7.2.  Ordinary collections  . . . . . . . . . . . . . . . . . .  31
-     7.3.  Date and floating time  . . . . . . . . . . . . . . . . .  32
+       5.3.4.  Calendar Object Resource Entity Tag . . . . . . . . .  28
+   6.  Calendaring Access Control  . . . . . . . . . . . . . . . . .  29
+     6.1.  Calendaring Privilege . . . . . . . . . . . . . . . . . .  29
+       6.1.1.  CALDAV:read-free-busy Privilege . . . . . . . . . . .  29
+     6.2.  Additional Principal Property . . . . . . . . . . . . . .  30
+       6.2.1.  CALDAV:calendar-home-set Property . . . . . . . . . .  30
+   7.  Calendaring Reports . . . . . . . . . . . . . . . . . . . . .  31
+     7.1.  REPORT Method . . . . . . . . . . . . . . . . . . . . . .  31
+     7.2.  Ordinary collections  . . . . . . . . . . . . . . . . . .  31
+     7.3.  Date and floating time  . . . . . . . . . . . . . . . . .  32
 
 
 
 Daboo, et al.            Expires March 17, 2007                 [Page 2]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-     7.4.  Time range filtering  . . . . . . . . . . . . . . . . . .  32
-     7.5.  Searching Text: Collations  . . . . . . . . . . . . . . .  33
-       7.5.1.  CALDAV:supported-collation-set Property . . . . . . .  34
-     7.6.  Partial Retrieval . . . . . . . . . . . . . . . . . . . .  34
-     7.7.  Non-standard components, properties and parameters  . . .  35
-     7.8.  CALDAV:calendar-query Report  . . . . . . . . . . . . . .  35
+     7.4.  Time range filtering  . . . . . . . . . . . . . . . . . .  32
+     7.5.  Searching Text: Collations  . . . . . . . . . . . . . . .  33
+       7.5.1.  CALDAV:supported-collation-set Property . . . . . . .  34
+     7.6.  Partial Retrieval . . . . . . . . . . . . . . . . . . . .  34
+     7.7.  Non-standard components, properties and parameters  . . .  35
+     7.8.  CALDAV:calendar-query Report  . . . . . . . . . . . . . .  35
        7.8.1.  Example: Partial retrieval of events by time range  .  38
-       7.8.2.  Example: Partial retrieval of recurring events  . . .  42
-       7.8.3.  Example: Expanded retrieval of recurring events . . .  45
+       7.8.2.  Example: Partial retrieval of recurring events  . . .  42
+       7.8.3.  Example: Expanded retrieval of recurring events . . .  45
        7.8.4.  Example: Partial retrieval of stored free busy
-               components  . . . . . . . . . . . . . . . . . . . . .  47
-       7.8.5.  Example: Retrieval of to-dos by alarm time range  . .  49
-       7.8.6.  Example: Retrieval of event by UID  . . . . . . . . .  51
-       7.8.7.  Example: Retrieval of events by PARTSTAT  . . . . . .  53
-       7.8.8.  Example: Retrieval of events only . . . . . . . . . .  55
-       7.8.9.  Example: Retrieval of all pending to-dos  . . . . . .  59
-       7.8.10. Example: Attempt to query unsupported property  . . .  62
-     7.9.  CALDAV:calendar-multiget Report . . . . . . . . . . . . .  63
+               components  . . . . . . . . . . . . . . . . . . . . .  47
+       7.8.5.  Example: Retrieval of to-dos by alarm time range  . .  49
+       7.8.6.  Example: Retrieval of event by UID  . . . . . . . . .  51
+       7.8.7.  Example: Retrieval of events by PARTSTAT  . . . . . .  53
+       7.8.8.  Example: Retrieval of events only . . . . . . . . . .  55
+       7.8.9.  Example: Retrieval of all pending to-dos  . . . . . .  59
+       7.8.10. Example: Attempt to query unsupported property  . . .  62
+     7.9.  CALDAV:calendar-multiget Report . . . . . . . . . . . . .  63
        7.9.1.  Example: Successful CALDAV:calendar-multiget Report .  64
-     7.10. CALDAV:free-busy-query Report . . . . . . . . . . . . . .  66
-       7.10.1. Example: Successful CALDAV:free-busy-query Report . .  68
-   8.  Guidelines  . . . . . . . . . . . . . . . . . . . . . . . . .  68
-     8.1.  Client-to-client Interoperability . . . . . . . . . . . .  69
-     8.2.  Synchronization Operations  . . . . . . . . . . . . . . .  69
-       8.2.1.  Use of Reports  . . . . . . . . . . . . . . . . . . .  69
-         8.2.1.1.  Restrict the Time Range . . . . . . . . . . . . .  69
-         8.2.1.2.  Synchronize by Time Range . . . . . . . . . . . .  69
-         8.2.1.3.  Synchronization Process . . . . . . . . . . . . .  70
-       8.2.2.  Restrict the Properties Returned  . . . . . . . . . .  72
-     8.3.  Use of Locking  . . . . . . . . . . . . . . . . . . . . .  72
-     8.4.  Finding calendars . . . . . . . . . . . . . . . . . . . .  72
-     8.5.  Storing and Using Attachments . . . . . . . . . . . . . .  74
-       8.5.1.  Inline attachments  . . . . . . . . . . . . . . . . .  74
-       8.5.2.  External attachments  . . . . . . . . . . . . . . . .  75
-     8.6.  Storing and Using Alarms  . . . . . . . . . . . . . . . .  76
-   9.  XML Element Definitions . . . . . . . . . . . . . . . . . . .  77
-     9.1.  CALDAV:calendar XML Element . . . . . . . . . . . . . . .  77
-     9.2.  CALDAV:mkcalendar XML Element . . . . . . . . . . . . . .  77
-     9.3.  CALDAV:mkcalendar-response XML Element  . . . . . . . . .  77
-     9.4.  CALDAV:supported-collation XML Element  . . . . . . . . .  78
-     9.5.  CALDAV:calendar-query XML Element . . . . . . . . . . . .  78
-     9.6.  CALDAV:calendar-data XML Element  . . . . . . . . . . . .  79
-       9.6.1.  CALDAV:comp XML Element . . . . . . . . . . . . . . .  80
-       9.6.2.  CALDAV:allcomp XML Element  . . . . . . . . . . . . .  80
-       9.6.3.  CALDAV:allprop XML Element  . . . . . . . . . . . . .  81
-       9.6.4.  CALDAV:prop XML Element . . . . . . . . . . . . . . .  81
-       9.6.5.  CALDAV:expand XML Element . . . . . . . . . . . . . .  82
-       9.6.6.  CALDAV:limit-recurrence-set XML Element . . . . . . .  83
+     7.10. CALDAV:free-busy-query Report . . . . . . . . . . . . . .  66
+       7.10.1. Example: Successful CALDAV:free-busy-query Report . .  68
+   8.  Guidelines  . . . . . . . . . . . . . . . . . . . . . . . . .  68
+     8.1.  Client-to-client Interoperability . . . . . . . . . . . .  69
+     8.2.  Synchronization Operations  . . . . . . . . . . . . . . .  69
+       8.2.1.  Use of Reports  . . . . . . . . . . . . . . . . . . .  69
+         8.2.1.1.  Restrict the Time Range . . . . . . . . . . . . .  69
+         8.2.1.2.  Synchronize by Time Range . . . . . . . . . . . .  69
+         8.2.1.3.  Synchronization Process . . . . . . . . . . . . .  70
+       8.2.2.  Restrict the Properties Returned  . . . . . . . . . .  72
+     8.3.  Use of Locking  . . . . . . . . . . . . . . . . . . . . .  72
+     8.4.  Finding calendars . . . . . . . . . . . . . . . . . . . .  72
+     8.5.  Storing and Using Attachments . . . . . . . . . . . . . .  74
+       8.5.1.  Inline attachments  . . . . . . . . . . . . . . . . .  74
+       8.5.2.  External attachments  . . . . . . . . . . . . . . . .  75
+     8.6.  Storing and Using Alarms  . . . . . . . . . . . . . . . .  76
+   9.  XML Element Definitions . . . . . . . . . . . . . . . . . . .  77
+     9.1.  CALDAV:calendar XML Element . . . . . . . . . . . . . . .  77
+     9.2.  CALDAV:mkcalendar XML Element . . . . . . . . . . . . . .  77
+     9.3.  CALDAV:mkcalendar-response XML Element  . . . . . . . . .  77
+     9.4.  CALDAV:supported-collation XML Element  . . . . . . . . .  78
+     9.5.  CALDAV:calendar-query XML Element . . . . . . . . . . . .  78
+     9.6.  CALDAV:calendar-data XML Element  . . . . . . . . . . . .  79
+       9.6.1.  CALDAV:comp XML Element . . . . . . . . . . . . . . .  80
+       9.6.2.  CALDAV:allcomp XML Element  . . . . . . . . . . . . .  80
+       9.6.3.  CALDAV:allprop XML Element  . . . . . . . . . . . . .  81
+       9.6.4.  CALDAV:prop XML Element . . . . . . . . . . . . . . .  81
+       9.6.5.  CALDAV:expand XML Element . . . . . . . . . . . . . .  82
+       9.6.6.  CALDAV:limit-recurrence-set XML Element . . . . . . .  83
 
 
 
 Daboo, et al.            Expires March 17, 2007                 [Page 3]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-       9.6.7.  CALDAV:limit-freebusy-set XML Element . . . . . . . .  84
-     9.7.  CALDAV:filter XML Element . . . . . . . . . . . . . . . .  84
-       9.7.1.  CALDAV:comp-filter XML Element  . . . . . . . . . . .  85
-       9.7.2.  CALDAV:prop-filter XML Element  . . . . . . . . . . .  85
-       9.7.3.  CALDAV:param-filter XML Element . . . . . . . . . . .  86
-       9.7.4.  CALDAV:is-not-defined XML Element . . . . . . . . . .  87
-       9.7.5.  CALDAV:text-match XML Element . . . . . . . . . . . .  87
-     9.8.  CALDAV:timezone XML Element . . . . . . . . . . . . . . .  88
-     9.9.  CALDAV:time-range XML Element . . . . . . . . . . . . . .  88
-     9.10. CALDAV:calendar-multiget XML Element  . . . . . . . . . .  93
-     9.11. CALDAV:free-busy-query XML Element  . . . . . . . . . . .  94
-   10. Internationalization Considerations . . . . . . . . . . . . .  94
-   11. Security Considerations . . . . . . . . . . . . . . . . . . .  94
-   12. IANA Consideration  . . . . . . . . . . . . . . . . . . . . .  95
-     12.1. Namespace Registration  . . . . . . . . . . . . . . . . .  95
-   13. Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  96
-   14. References  . . . . . . . . . . . . . . . . . . . . . . . . .  96
-     14.1. Normative References  . . . . . . . . . . . . . . . . . .  96
-     14.2. Informative References  . . . . . . . . . . . . . . . . .  97
-   Appendix A.  CalDAV Method Privilege Table (Normative)  . . . . .  97
-   Appendix B.  Calendar collections used in the examples  . . . . .  98
+       9.6.7.  CALDAV:limit-freebusy-set XML Element . . . . . . . .  84
+     9.7.  CALDAV:filter XML Element . . . . . . . . . . . . . . . .  84
+       9.7.1.  CALDAV:comp-filter XML Element  . . . . . . . . . . .  85
+       9.7.2.  CALDAV:prop-filter XML Element  . . . . . . . . . . .  85
+       9.7.3.  CALDAV:param-filter XML Element . . . . . . . . . . .  86
+       9.7.4.  CALDAV:is-not-defined XML Element . . . . . . . . . .  87
+       9.7.5.  CALDAV:text-match XML Element . . . . . . . . . . . .  87
+     9.8.  CALDAV:timezone XML Element . . . . . . . . . . . . . . .  88
+     9.9.  CALDAV:time-range XML Element . . . . . . . . . . . . . .  88
+     9.10. CALDAV:calendar-multiget XML Element  . . . . . . . . . .  93
+     9.11. CALDAV:free-busy-query XML Element  . . . . . . . . . . .  94
+   10. Internationalization Considerations . . . . . . . . . . . . .  94
+   11. Security Considerations . . . . . . . . . . . . . . . . . . .  94
+   12. IANA Consideration  . . . . . . . . . . . . . . . . . . . . .  95
+     12.1. Namespace Registration  . . . . . . . . . . . . . . . . .  95
+   13. Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  96
+   14. References  . . . . . . . . . . . . . . . . . . . . . . . . .  96
+     14.1. Normative References  . . . . . . . . . . . . . . . . . .  96
+     14.2. Informative References  . . . . . . . . . . . . . . . . .  97
+   Appendix A.  CalDAV Method Privilege Table (Normative)  . . . . .  97
+   Appendix B.  Calendar collections used in the examples  . . . . .  98
    Appendix C.  Changes (to be removed prior to publication as an
-                RFC) . . . . . . . . . . . . . . . . . . . . . . . . 104
-     C.1.  Changes in -15  . . . . . . . . . . . . . . . . . . . . . 104
-     C.2.  Changes in -14  . . . . . . . . . . . . . . . . . . . . . 105
-     C.3.  Changes in -13  . . . . . . . . . . . . . . . . . . . . . 105
-     C.4.  Changes in -12  . . . . . . . . . . . . . . . . . . . . . 106
-     C.5.  Changes in -11  . . . . . . . . . . . . . . . . . . . . . 106
-     C.6.  Changes in -10  . . . . . . . . . . . . . . . . . . . . . 107
-     C.7.  Changes in -09  . . . . . . . . . . . . . . . . . . . . . 108
-     C.8.  Changes in -08  . . . . . . . . . . . . . . . . . . . . . 109
-     C.9.  Changes in -07  . . . . . . . . . . . . . . . . . . . . . 110
-     C.10. Changes in -06  . . . . . . . . . . . . . . . . . . . . . 111
-     C.11. Changes in -05  . . . . . . . . . . . . . . . . . . . . . 111
-     C.12. Changes in -04  . . . . . . . . . . . . . . . . . . . . . 112
-     C.13. Changes in -03  . . . . . . . . . . . . . . . . . . . . . 113
-     C.14. Changes in -02  . . . . . . . . . . . . . . . . . . . . . 113
-     C.15. Changes in -01  . . . . . . . . . . . . . . . . . . . . . 113
-   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . . 114
-   Intellectual Property and Copyright Statements  . . . . . . . . . 115
+                RFC) . . . . . . . . . . . . . . . . . . . . . . . . 104
+     C.1.  Changes in -15  . . . . . . . . . . . . . . . . . . . . . 104
+     C.2.  Changes in -14  . . . . . . . . . . . . . . . . . . . . . 105
+     C.3.  Changes in -13  . . . . . . . . . . . . . . . . . . . . . 105
+     C.4.  Changes in -12  . . . . . . . . . . . . . . . . . . . . . 106
+     C.5.  Changes in -11  . . . . . . . . . . . . . . . . . . . . . 106
+     C.6.  Changes in -10  . . . . . . . . . . . . . . . . . . . . . 107
+     C.7.  Changes in -09  . . . . . . . . . . . . . . . . . . . . . 108
+     C.8.  Changes in -08  . . . . . . . . . . . . . . . . . . . . . 109
+     C.9.  Changes in -07  . . . . . . . . . . . . . . . . . . . . . 110
+     C.10. Changes in -06  . . . . . . . . . . . . . . . . . . . . . 111
+     C.11. Changes in -05  . . . . . . . . . . . . . . . . . . . . . 111
+     C.12. Changes in -04  . . . . . . . . . . . . . . . . . . . . . 112
+     C.13. Changes in -03  . . . . . . . . . . . . . . . . . . . . . 113
+     C.14. Changes in -02  . . . . . . . . . . . . . . . . . . . . . 113
+     C.15. Changes in -01  . . . . . . . . . . . . . . . . . . . . . 113
+   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . . 114
+   Intellectual Property and Copyright Statements  . . . . . . . . . 115
 
 
 
@@ -221,17 +278,17 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                 [Page 4]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-1.  Introduction
+1.  Introduction
 
-   The concept of using HTTP [RFC2616] and WebDAV [RFC2518] as a basis
+   The concept of using HTTP [RFC2616] and WebDAV [RFC2518] as a basis
    for a calendar access protocol is by no means a new concept: it was
    discussed in the IETF CALSCH working group as early as 1997 or 1998.
    Several companies have implemented calendar access protocols using
-   HTTP to upload and download iCalendar [RFC2445] objects, and using
+   HTTP to upload and download iCalendar [RFC2445] objects, and using
    WebDAV to get listings of resources.  However, those implementations
    do not interoperate because there are many small and big decisions to
    be made in how to model calendaring data as WebDAV resources, as well
@@ -240,25 +297,25 @@ Internet-Draft                   CalDAV                   September 2006
    WebDAV, with additional features to make an interoperable calendar
    access protocol.
 
-1.1.  Notational Conventions
+1.1.  Notational Conventions
 
    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].
+   document are to be interpreted as described in [RFC2119].
 
    The term "protected" is used in the Conformance field of property
-   definitions as defined in Section 1.4.2 of [RFC3253].
+   definitions as defined in Section 1.4.2 of [RFC3253].
 
    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.
 
-1.2.  XML Namespaces and Processing
+1.2.  XML Namespaces and Processing
 
    Definitions of XML elements in this document use XML element type
    declarations (as found in XML Document Type Declarations), described
-   in Section 3.2 of [W3C.REC-xml-20060816].
+   in Section 3.2 of [W3C.REC-xml-20060816].
 
    The namespace "urn:ietf:params:xml:ns:caldav" is reserved for the XML
    elements defined in this specification, its revisions, and related
@@ -270,14 +327,14 @@ Internet-Draft                   CalDAV                   September 2006
    information.  Thus, implementers must not use these declarations as
    the only way to create valid CalDAV properties or to validate CalDAV
    XML element type.  Some of the declarations refer to XML elements
-   defined by WebDAV [RFC2518] which use the "DAV:" namespace.  Wherever
+   defined by WebDAV [RFC2518] which use the "DAV:" namespace.  Wherever
    such XML elements appear, they are explicitly prefixed with "DAV:" to
    avoid confusion.
 
 
 
 Daboo, et al.            Expires March 17, 2007                 [Page 5]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -286,10 +343,10 @@ Internet-Draft                   CalDAV                   September 2006
    taken not to confuse the two sets of names.
 
    Processing of XML by CalDAV clients and servers MUST follow the rules
-   described in [RFC2518], in particular Section 14, and Appendices 3
+   described in [RFC2518], in particular Section 14, and Appendices 3
    and 4 of that specification.
 
-1.3.  Method Preconditions and Postconditions
+1.3.  Method Preconditions and Postconditions
 
    A "precondition" of a method describes the state of the server that
    must be true for that method to be performed.  A "postcondition" of a
@@ -310,51 +367,51 @@ Internet-Draft                   CalDAV                   September 2006
    by the request.
 
 
-2.  Requirements Overview
+2.  Requirements Overview
 
    This section lists what functionality is required of a CalDAV server.
    To advertise support for CalDAV, a server:
 
-   o  MUST support iCalendar [RFC2445] as a media type for calendar
+   o  MUST support iCalendar [RFC2445] as a media type for calendar
       object resource format;
 
-   o  MUST support WebDAV Class 1 [RFC2518] (note that [I-D.ietf-webdav-
-      rfc2518bis] describes clarifications to [RFC2518] that aid
+   o  MUST support WebDAV Class 1 [RFC2518] (note that [I-D.ietf-webdav-
+      rfc2518bis] describes clarifications to [RFC2518] that aid
       interoperability);
 
-   o  MUST support WebDAV ACL [RFC3744] with the additional privilege
-      defined in Section 6.1 of this document;
+   o  MUST support WebDAV ACL [RFC3744] with the additional privilege
+      defined in Section 6.1 of this document;
 
-   o  MUST support transport over TLS [RFC2246] as defined in [RFC2818]
-      (note that [RFC2246] has been obsoleted by [RFC4346]);
+   o  MUST support transport over TLS [RFC2246] as defined in [RFC2818]
+      (note that [RFC2246] has been obsoleted by [RFC4346]);
 
 
 
 
 
 Daboo, et al.            Expires March 17, 2007                 [Page 6]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-   o  MUST support ETags [RFC2616] with additional requirements
-      specified in Section 5.3.4 of this document;
+   o  MUST support ETags [RFC2616] with additional requirements
+      specified in Section 5.3.4 of this document;
 
-   o  MUST support all calendaring REPORTs defined in Section 7 of this
+   o  MUST support all calendaring REPORTs defined in Section 7 of this
       document; and
 
    o  MUST advertise support on all calendar collections and calendar
       object resources for the calendaring REPORTs in the DAV:supported-
       report-set property as defined in Versioning Extensions to WebDAV
-      [RFC3253].
+      [RFC3253].
 
    In addition, a server:
 
-   o  SHOULD support the MKCALENDAR method defined in Section 5.3.1 of
+   o  SHOULD support the MKCALENDAR method defined in Section 5.3.1 of
       this document.
 
 
-3.  Calendaring Data Model
+3.  Calendaring Data Model
 
    One of the features which has made WebDAV a successful protocol is
    its firm data model.  This makes it a useful framework for other
@@ -370,9 +427,9 @@ Internet-Draft                   CalDAV                   September 2006
    called a "calendar object resource".  Each calendar object resource
    and each calendar collection can be individually locked and have
    individual WebDAV properties.  Requirements derived from this model
-   are provided in Section 4.1 and Section 4.2.
+   are provided in Section 4.1 and Section 4.2.
 
-3.1.  Calendar Server
+3.1.  Calendar Server
 
    A CalDAV server is a calendaring-aware engine combined with a WebDAV
    repository.  A WebDAV repository is a set of WebDAV collections,
@@ -389,7 +446,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                 [Page 7]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -418,7 +475,7 @@ Internet-Draft                   CalDAV                   September 2006
    calendar collections may be shared and accessible via multiple
    clients.  Entity tags and other features make this possible.
 
-3.2.  Recurrence and the Data Model
+3.2.  Recurrence and the Data Model
 
    Recurrence is an important part of the data model because it governs
    how many resources are expected to exist.  This specification models
@@ -445,13 +502,13 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                 [Page 8]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-4.  Calendar Resources
+4.  Calendar Resources
 
-4.1.  Calendar Object Resources
+4.1.  Calendar Object Resources
 
    Calendar object resources contained in calendar collections MUST NOT
    contain more than one type of calendar component (e.g., VEVENT,
@@ -501,7 +558,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                 [Page 9]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -539,7 +596,7 @@ Internet-Draft                   CalDAV                   September 2006
    recurring event where one recurrence instance has been overridden,
    would be stored in the same calendar object resource.
 
-4.2.  Calendar Collection
+4.2.  Calendar Collection
 
    A calendar collection contains calendar object resources that
    represent calendar components within a calendar.  A calendar
@@ -549,7 +606,7 @@ Internet-Draft                   CalDAV                   September 2006
    resourcetype property.  The element type declaration for CALDAV:
    calendar is:
 
-       
+       <!ELEMENT calendar EMPTY>
 
    A calendar collection can be created through provisioning (e.g.,
    automatically created when a user's account is provisioned), or it
@@ -557,17 +614,17 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 10]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-   can be created with the MKCALENDAR method (see Section 5.3.1).  This
+   can be created with the MKCALENDAR method (see Section 5.3.1).  This
    method can be useful for a user to create additional calendars (e.g.,
    soccer schedule) or for users to share a calendar (e.g., team events
    or conference room).  Note however that this document doesn't define
    what extra calendar collections are for.  Users must rely on non-
    standard cues to find out what a calendar collection is for, or use
-   the CALDAV:calendar-description property defined in Section 5.2.1 to
+   the CALDAV:calendar-description property defined in Section 5.2.1 to
    provide such a cue.
 
    The following restrictions are applied to the resources within a
@@ -593,9 +650,9 @@ Internet-Draft                   CalDAV                   September 2006
    Multiple calendar collections MAY be children of the same collection.
 
 
-5.  Calendar Access Feature
+5.  Calendar Access Feature
 
-5.1.  Calendar Access Support
+5.1.  Calendar Access Support
 
    A server supporting the features described in this document MUST
    include "calendar-access" as a field in the DAV response header from
@@ -613,19 +670,19 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 11]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-5.1.1.  Example: Using OPTIONS for the Discovery of Calendar Access
+5.1.1.  Example: Using OPTIONS for the Discovery of Calendar Access
         Support
 
-   >> Request <<
+   >> Request <<
 
    OPTIONS /home/bernard/calendars/ HTTP/1.1
    Host: cal.example.com
 
-   >> Response <<
+   >> Response <<
 
    HTTP/1.1 200 OK
    Allow: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, COPY, MOVE
@@ -639,12 +696,12 @@ Internet-Draft                   CalDAV                   September 2006
    "/home/bernard/calendars/" supports the properties, reports, methods,
    or privileges defined in this specification.
 
-5.2.  Calendar Collection Properties
+5.2.  Calendar Collection Properties
 
    This section defines properties that MAY be defined on calendar
    collections.
 
-5.2.1.  CALDAV:calendar-description Property
+5.2.1.  CALDAV:calendar-description Property
 
    Name: calendar-description
 
@@ -655,8 +712,8 @@ Internet-Draft                   CalDAV                   September 2006
 
    Conformance: This property MAY be defined on any calendar collection.
       If defined, it MAY be protected and SHOULD NOT be returned by a
-      PROPFIND DAV:allprop request (as defined in Section 12.14.1 of
-      [RFC2518]).  An xml:lang attribute indicating the human language
+      PROPFIND DAV:allprop request (as defined in Section 12.14.1 of
+      [RFC2518]).  An xml:lang attribute indicating the human language
       of the description SHOULD be set for this property by clients or
       through server provisioning.  Servers MUST return any xml:lang
       attribute if set for the property.
@@ -669,22 +726,22 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 12]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
    Definition:
 
-         
+         <!ELEMENT calendar-description (#PCDATA)>
          PCDATA value: string
 
    Example:
 
-         Calendrier de Mathilde Desruisseaux
+         >Calendrier de Mathilde Desruisseaux</C:calendar-description>
 
-5.2.2.  CALDAV:calendar-timezone Property
+5.2.2.  CALDAV:calendar-timezone Property
 
    Name: calendar-timezone
 
@@ -694,7 +751,7 @@ Internet-Draft                   CalDAV                   September 2006
 
    Conformance: This property SHOULD be defined on all calendar
       collections.  If defined, it SHOULD NOT be returned by a PROPFIND
-      DAV:allprop request (as defined in Section 12.14.1 of [RFC2518]).
+      DAV:allprop request (as defined in Section 12.14.1 of [RFC2518]).
 
    Description: The CALDAV:calendar-timezone property is used to specify
       the time zone the server should rely on to resolve "date" values
@@ -712,20 +769,20 @@ Internet-Draft                   CalDAV                   September 2006
 
    Note: The iCalendar data embedded within the CALDAV:calendar-timezone
       XML element MUST follow the standard XML character data encoding
-      rules, including use of <, >, & etc entity encoding or
-      the use of a  construct.  In the later case the
-      iCalendar data cannot contain the character sequence "]]>" which
+      rules, including use of &lt;, &gt;, &amp; etc entity encoding or
+      the use of a <![CDATA[ ... ]]> construct.  In the later case the
+      iCalendar data cannot contain the character sequence "]]>" which
       is the end delimiter for the CDATA section.
 
    Definition:
 
-         
+         <!ELEMENT calendar-timezone (#PCDATA)>
          PCDATA value: an iCalendar object with exactly one VTIMEZONE
 
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 13]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -733,8 +790,8 @@ Internet-Draft                   CalDAV                   September 2006
 
    Example:
 
-   BEGIN:VCALENDAR
+   <C:calendar-timezone
+       xmlns:C="urn:ietf:params:xml:ns:caldav">BEGIN:VCALENDAR
    PRODID:-//Example Corp.//CalDAV Client//EN
    VERSION:2.0
    BEGIN:VTIMEZONE
@@ -745,20 +802,20 @@ Internet-Draft                   CalDAV                   September 2006
    RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
    TZOFFSETFROM:-0400
    TZOFFSETTO:-0500
-   TZNAME:Eastern Standard Time (US & Canada)
+   TZNAME:Eastern Standard Time (US &amp; Canada)
    END:STANDARD
    BEGIN:DAYLIGHT
    DTSTART:19870405T020000
    RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
    TZOFFSETFROM:-0500
    TZOFFSETTO:-0400
-   TZNAME:Eastern Daylight Time (US & Canada)
+   TZNAME:Eastern Daylight Time (US &amp; Canada)
    END:DAYLIGHT
    END:VTIMEZONE
    END:VCALENDAR
-   
+   </C:calendar-timezone>
 
-5.2.3.  CALDAV:supported-calendar-component-set Property
+5.2.3.  CALDAV:supported-calendar-component-set Property
 
    Name: supported-calendar-component-set
 
@@ -770,8 +827,8 @@ Internet-Draft                   CalDAV                   September 2006
 
    Conformance: This property MAY be defined on any calendar collection.
       If defined, it MUST be protected and SHOULD NOT be returned by a
-      PROPFIND DAV:allprop request (as defined in Section 12.14.1 of
-      [RFC2518]).
+      PROPFIND DAV:allprop request (as defined in Section 12.14.1 of
+      [RFC2518]).
 
    Description: The CALDAV:supported-calendar-component-set property is
       used to specify restrictions on the calendar component types that
@@ -781,17 +838,17 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 14]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
       component types not listed in this property, if it exists, MUST
       result in an error, with the CALDAV:supported-calendar-component
-      precondition (Section 5.3.2.1) being violated.  Since this
+      precondition (Section 5.3.2.1) being violated.  Since this
       property is protected it cannot be changed by clients using a
       PROPPATCH request.  However, clients can initialize the value of
       this property when creating a new calendar collection with
-      MKCALENDAR.  The empty-element tag  MUST
+      MKCALENDAR.  The empty-element tag <C:comp name="VTIMEZONE"/> MUST
       only be specified if support for calendar object resources that
       only contain VTIMEZONE components is provided or desired.  Support
       for VTIMEZONE components in calendar object resources that contain
@@ -801,17 +858,17 @@ Internet-Draft                   CalDAV                   September 2006
 
    Definition:
 
-         
+         <!ELEMENT supported-calendar-component-set (comp*)>
 
    Example:
 
-         
-           
-           
-         
+         <C:supported-calendar-component-set
+             xmlns:C="urn:ietf:params:xml:ns:caldav">
+           <C:comp name="VEVENT"/>
+           <C:comp name="VTODO"/>
+         </C:supported-calendar-component-set>
 
-5.2.4.  CALDAV:supported-calendar-data Property
+5.2.4.  CALDAV:supported-calendar-data Property
 
    Name: supported-calendar-data
 
@@ -822,8 +879,8 @@ Internet-Draft                   CalDAV                   September 2006
 
    Conformance: This property MAY be defined on any calendar collection.
       If defined, it MUST be protected and SHOULD NOT be returned by a
-      PROPFIND DAV:allprop request (as defined in Section 12.14.1 of
-      [RFC2518]).
+      PROPFIND DAV:allprop request (as defined in Section 12.14.1 of
+      [RFC2518]).
 
    Description: The CALDAV:supported-calendar-data property is used to
       specify the media type supported for the calendar object resources
@@ -831,13 +888,13 @@ Internet-Draft                   CalDAV                   September 2006
       2.0).  Any attempt by the client to store calendar object
       resources with a media type not listed in this property MUST
       result in an error, with the CALDAV:supported-calendar-data
-      precondition (Section 5.3.2.1) being violated.  In the absence of
+      precondition (Section 5.3.2.1) being violated.  In the absence of
       this property the server MUST only accept data with the media type
 
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 15]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -846,16 +903,16 @@ Internet-Draft                   CalDAV                   September 2006
 
    Definition:
 
-         
+         <!ELEMENT supported-calendar-data (calendar-data*)>
 
    Example:
 
-         
-           
-         
+         <C:supported-calendar-data
+            xmlns:C="urn:ietf:params:xml:ns:caldav">
+           <C:calendar-data content-type="text/calendar" version="2.0"/>
+         </C:supported-calendar-data>
 
-5.2.5.  CALDAV:max-resource-size Property
+5.2.5.  CALDAV:max-resource-size Property
 
    Name: max-resource-size
 
@@ -867,22 +924,22 @@ Internet-Draft                   CalDAV                   September 2006
 
    Conformance: This property MAY be defined on any calendar collection.
       If defined, it MUST be protected and SHOULD NOT be returned by a
-      PROPFIND DAV:allprop request (as defined in Section 12.14.1 of
-      [RFC2518]).
+      PROPFIND DAV:allprop request (as defined in Section 12.14.1 of
+      [RFC2518]).
 
    Description: The CALDAV:max-resource-size is used to specify a
       numeric value that represents the maximum size in octets that the
       server is willing to accept when a calendar object resource is
       stored in a calendar collection.  Any attempt to store a calendar
       object resource exceeding this size MUST result in an error, with
-      the CALDAV:max-resource-size precondition (Section 5.3.2.1) being
+      the CALDAV:max-resource-size precondition (Section 5.3.2.1) being
       violated.  In the absence of this property the client can assume
       that the server will allow storing a resource of any reasonable
       size.
 
    Definition:
 
-         
+         <!ELEMENT max-resource-size (#PCDATA)>
          PCDATA value: a numeric value (positive integer)
 
 
@@ -893,16 +950,16 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 16]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
    Example:
 
-         102400
+         <C:max-resource-size xmlns:C="urn:ietf:params:xml:ns:caldav"
+         >102400</C:max-resource-size>
 
-5.2.6.  CALDAV:min-date-time Property
+5.2.6.  CALDAV:min-date-time Property
 
    Name: min-date-time
 
@@ -915,8 +972,8 @@ Internet-Draft                   CalDAV                   September 2006
 
    Conformance: This property MAY be defined on any calendar collection.
       If defined, it MUST be protected and SHOULD NOT be returned by a
-      PROPFIND DAV:allprop request (as defined in Section 12.14.1 of
-      [RFC2518]).
+      PROPFIND DAV:allprop request (as defined in Section 12.14.1 of
+      [RFC2518]).
 
    Description: The CALDAV:min-date-time is used to specify an iCalendar
       DATE-TIME value in UTC that indicates the earliest inclusive date
@@ -925,7 +982,7 @@ Internet-Draft                   CalDAV                   September 2006
       collection.  Any attempt to store a calendar object resource using
       a date or time value earlier than this value MUST result in an
       error, with the CALDAV:min-date-time precondition
-      (Section 5.3.2.1) being violated.  Note that servers MUST accept
+      (Section 5.3.2.1) being violated.  Note that servers MUST accept
       recurring components that specify instances beyond this limit,
       provided none of those instances have been overridden.  In that
       case the server MAY simply ignore those instances outside of the
@@ -936,24 +993,24 @@ Internet-Draft                   CalDAV                   September 2006
 
    Definition:
 
-         
+         <!ELEMENT min-date-time (#PCDATA)>
          PCDATA value: an iCalendar format DATE-TIME value in UTC
 
    Example:
 
-         19000101T000000Z
+         <C:min-date-time xmlns:C="urn:ietf:params:xml:ns:caldav"
+         >19000101T000000Z</C:min-date-time>
 
 
 
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 17]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-5.2.7.  CALDAV:max-date-time Property
+5.2.7.  CALDAV:max-date-time Property
 
    Name: max-date-time
 
@@ -966,8 +1023,8 @@ Internet-Draft                   CalDAV                   September 2006
 
    Conformance: This property MAY be defined on any calendar collection.
       If defined, it MUST be protected and SHOULD NOT be returned by a
-      PROPFIND DAV:allprop request (as defined in Section 12.14.1 of
-      [RFC2518]).
+      PROPFIND DAV:allprop request (as defined in Section 12.14.1 of
+      [RFC2518]).
 
    Description: The CALDAV:max-date-time is used to specify an iCalendar
       DATE-TIME value in UTC that indicates the inclusive latest date
@@ -975,7 +1032,7 @@ Internet-Draft                   CalDAV                   September 2006
       a calendar object resource stored in a calendar collection.  Any
       attempt to store a calendar object resource using a date or time
       value later than this value MUST result in an error, with the
-      CALDAV:max-date-time precondition (Section 5.3.2.1) being
+      CALDAV:max-date-time precondition (Section 5.3.2.1) being
       violated.  Note that servers MUST accept recurring components that
       specify instances beyond this limit, provided none of those
       instances have been overridden.  In that case the server MAY
@@ -987,15 +1044,15 @@ Internet-Draft                   CalDAV                   September 2006
 
    Definition:
 
-         
+         <!ELEMENT max-date-time (#PCDATA)>
          PCDATA value: an iCalendar format DATE-TIME value in UTC
 
    Example:
 
-         20491231T235959Z
+         <C:max-date-time xmlns:C="urn:ietf:params:xml:ns:caldav"
+         >20491231T235959Z</C:max-date-time>
 
-5.2.8.  CALDAV:max-instances Property
+5.2.8.  CALDAV:max-instances Property
 
 
 
@@ -1005,7 +1062,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 18]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -1019,8 +1076,8 @@ Internet-Draft                   CalDAV                   September 2006
 
    Conformance: This property MAY be defined on any calendar collection.
       If defined, it MUST be protected and SHOULD NOT be returned by a
-      PROPFIND DAV:allprop request (as defined in Section 12.14.1 of
-      [RFC2518]).
+      PROPFIND DAV:allprop request (as defined in Section 12.14.1 of
+      [RFC2518]).
 
    Description: The CALDAV:max-instances is used to specify a numeric
       value that indicates the maximum number of recurrence instances
@@ -1028,21 +1085,21 @@ Internet-Draft                   CalDAV                   September 2006
       can generate.  Any attempt to store a calendar object resource
       with a recurrence pattern that generates more instances than this
       value MUST result in an error, with the CALDAV:max-instances
-      precondition (Section 5.3.2.1) being violated.  In the absence of
+      precondition (Section 5.3.2.1) being violated.  In the absence of
       this property the client can assume that the server has no limits
       on the number of recurrence instances it can handle or expand.
 
    Definition:
 
-         
+         <!ELEMENT max-instances (#PCDATA)>
          PCDATA value: a numeric value (integer greater than zero)
 
    Example:
 
-         100
+         <C:max-instances xmlns:C="urn:ietf:params:xml:ns:caldav"
+         >100</C:max-instances>
 
-5.2.9.  CALDAV:max-attendees-per-instance Property
+5.2.9.  CALDAV:max-attendees-per-instance Property
 
    Name: max-attendees-per-instance
 
@@ -1054,14 +1111,14 @@ Internet-Draft                   CalDAV                   September 2006
 
    Conformance: This property MAY be defined on any calendar collection.
       If defined, it MUST be protected and SHOULD NOT be returned by a
-      PROPFIND DAV:allprop request (as defined in Section 12.14.1 of
-      [RFC2518]).
+      PROPFIND DAV:allprop request (as defined in Section 12.14.1 of
+      [RFC2518]).
 
 
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 19]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -1071,23 +1128,23 @@ Internet-Draft                   CalDAV                   September 2006
       resource stored in a calendar collection.  Any attempt to store a
       calendar object resource with more ATTENDEE properties per
       instance than this value MUST result in an error, with the CALDAV:
-      max-attendees-per-instance precondition (Section 5.3.2.1) being
+      max-attendees-per-instance precondition (Section 5.3.2.1) being
       violated.  In the absence of this property the client can assume
       that the server can handle any number of ATTENDEE properties in a
       calendar component.
 
    Definition:
 
-         
+         <!ELEMENT max-attendees-per-instance (#PCDATA)>
          PCDATA value: a numeric value (integer greater than zero)
 
    Example:
 
-         25
+         >25</C:max-attendees-per-instance>
 
-5.2.10.  Additional Precondition for PROPPATCH
+5.2.10.  Additional Precondition for PROPPATCH
 
    This specification requires an additional Precondition for the
    PROPPATCH method.  The precondition is:
@@ -1096,7 +1153,7 @@ Internet-Draft                   CalDAV                   September 2006
       calendar-timezone property MUST be a valid iCalendar object
       containing a single valid VTIMEZONE component.
 
-5.3.  Creating Resources
+5.3.  Creating Resources
 
    The creation of calendar collections and calendar object resources
    may be initiated by either a CalDAV client or by the CalDAV server.
@@ -1109,7 +1166,7 @@ Internet-Draft                   CalDAV                   September 2006
    and MUST understand objects appearing in calendar collections or
    according to the data model defined here.
 
-5.3.1.  MKCALENDAR Method
+5.3.1.  MKCALENDAR Method
 
    An HTTP request using the MKCALENDAR method creates a new calendar
    collection resource.  A server MAY restrict calendar collection
@@ -1117,7 +1174,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 20]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -1156,14 +1213,14 @@ Internet-Draft                   CalDAV                   September 2006
       if any error occurs during processing, all executed instructions
       MUST be undone and a proper error result returned.  Instruction
       processing details can be found in the definition of the DAV:set
-      instruction in Section 12.13.2 of [RFC2518].
+      instruction in Section 12.13.2 of [RFC2518].
 
-         
+         <!ELEMENT mkcalendar (DAV:set)>
 
       If a response body for a successful request is included, it MUST
       be a CALDAV:mkcalendar-response XML element.
 
-         
+         <!ELEMENT mkcalendar-response ANY>
 
       The response MUST include a Cache-Control:no-cache header.
 
@@ -1173,7 +1230,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 21]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -1197,29 +1254,29 @@ Internet-Draft                   CalDAV                   September 2006
       collection MUST contain both DAV:collection and CALDAV:calendar
       XML elements.
 
-5.3.1.1.  Status Codes
+5.3.1.1.  Status Codes
 
    The following are examples of response codes one would expect to get
    in a response to a MKCALENDAR request.  Note that this list is by no
    means exhaustive.
 
-      201 (Created) - The calendar collection resource was created in
+      201 (Created) - The calendar collection resource was created in
       its entirety;
 
-      207 (Multi-Status) - The calendar collection resource was not
+      207 (Multi-Status) - The calendar collection resource was not
       created since one or more DAV:set instructions specified in the
       request body could not be processed successfully.  The following
       are examples of response codes one would expect to be used in a
       207 (Multi-Status) response in this situation:
 
-         403 (Forbidden) - The client, for reasons the server chooses
+         403 (Forbidden) - The client, for reasons the server chooses
          not to specify, cannot alter one of the properties;
 
-         409 (Conflict) - The client has provided a value whose
+         409 (Conflict) - The client has provided a value whose
          semantics are not appropriate for the property.  This includes
          trying to set read-only properties;
 
-         424 (Failed Dependency) - The DAV:set instruction on the
+         424 (Failed Dependency) - The DAV:set instruction on the
          specified resource would have succeeded if it were not for the
          failure of another DAV:set instruction specified in the request
          body;
@@ -1229,33 +1286,33 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 22]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-         423 (Locked) - The specified resource is locked and the client
+         423 (Locked) - The specified resource is locked and the client
          either is not a lock owner or the lock type requires a lock
          token to be submitted and the client did not submit it; and
 
-         507 (Insufficient Storage) - The server did not have sufficient
+         507 (Insufficient Storage) - The server did not have sufficient
          space to record the property;
 
-      403 (Forbidden) - This indicates at least one of two conditions:
+      403 (Forbidden) - This indicates at least one of two conditions:
       1) the server does not allow the creation of calendar collections
       at the given location in its namespace, or 2) the parent
       collection of the Request-URI exists but cannot accept members;
 
-      409 (Conflict) - A collection cannot be made at the Request-URI
+      409 (Conflict) - A collection cannot be made at the Request-URI
       until one or more intermediate collections have been created;
 
-      415 (Unsupported Media Type) - The server does not support the
+      415 (Unsupported Media Type) - The server does not support the
       request type of the body; and
 
-      507 (Insufficient Storage) - The resource does not have sufficient
+      507 (Insufficient Storage) - The resource does not have sufficient
       space to record the state of the resource after the execution of
       this method.
 
-5.3.1.2.  Example: Successful MKCALENDAR request
+5.3.1.2.  Example: Successful MKCALENDAR request
 
    This example creates a calendar collection called /home/lisa/
    calendars/events/ on the server cal.example.com with specific values
@@ -1285,29 +1342,29 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 23]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-   >> Request <<
+   >> Request <<
 
    MKCALENDAR /home/lisa/calendars/events/ HTTP/1.1
    Host: cal.example.com
    Content-Type: application/xml; charset="utf-8"
    Content-Length: xxxx
 
-   
-   
-     
-       
-         Lisa's Events
-         Calendar restricted to events.
-         
-           
-         
-         
-       
-     
-   
+   ]]></C:calendar-timezone>
+       </D:prop>
+     </D:set>
+   </C:mkcalendar>
 
 
 
@@ -1341,18 +1398,18 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 24]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-   >> Response <<
+   >> Response <<
 
    HTTP/1.1 201 Created
    Cache-Control: no-cache
    Date: Fri, 11 Nov 2005 09:32:12 GMT
    Content-Length: 0
 
-5.3.2.  Creating Calendar Object Resources
+5.3.2.  Creating Calendar Object Resources
 
    Clients populate calendar collections with calendar object resources.
    The URL for each calendar object resource is entirely arbitrary, and
@@ -1397,11 +1454,11 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 25]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-   >> Request <<
+   >> Request <<
 
    PUT /home/lisa/calendars/events/qwue23489.ics HTTP/1.1
    If-None-Match: *
@@ -1421,7 +1478,7 @@ Internet-Draft                   CalDAV                   September 2006
    END:VEVENT
    END:VCALENDAR
 
-   >> Response <<
+   >> Response <<
 
    HTTP/1.1 201 Created
    Content-Length: 0
@@ -1432,13 +1489,13 @@ Internet-Draft                   CalDAV                   September 2006
    specific ETag in the "If-Match" header, rather than the "If-None-
    Match" header.
 
-   As indicated in Section 3.10 of [RFC2445], the URL of calendar object
+   As indicated in Section 3.10 of [RFC2445], the URL of calendar object
    resources containing (an arbitrary set of) calendaring and scheduling
    information may be suffixed by ".ics", and the URL of calendar object
    resources containing free or busy time information may be suffixed by
    ".ifb".
 
-5.3.2.1.  Additional Preconditions for PUT, COPY and MOVE
+5.3.2.1.  Additional Preconditions for PUT, COPY and MOVE
 
    This specification creates additional Preconditions for PUT, COPY and
    MOVE methods.  These preconditions apply:
@@ -1453,7 +1510,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 26]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -1471,7 +1528,7 @@ Internet-Draft                   CalDAV                   September 2006
 
       (CALDAV:valid-calendar-object-resource): The resource submitted in
       the PUT request, or targeted by a COPY or MOVE request MUST obey
-      all restrictions specified in Section 4.1 (e.g., calendar object
+      all restrictions specified in Section 4.1 (e.g., calendar object
       resources MUST NOT contain more than one type of calendar
       component, calendar object resources MUST NOT specify the
       iCalendar METHOD property, etc.);
@@ -1489,7 +1546,7 @@ Internet-Draft                   CalDAV                   September 2006
       Servers SHOULD report the URL of the resource that is already
       making use of the same UID property value in the DAV:href element;
 
-                
+                <!ELEMENT no-uid-conflict (DAV:href)>
 
       (CALDAV:calendar-collection-location-ok): In a COPY or MOVE
       request, when the Request-URI is a calendar collection, the
@@ -1499,7 +1556,7 @@ Internet-Draft                   CalDAV                   September 2006
       (CALDAV:max-resource-size): The resource submitted in the PUT
       request, or targeted by a COPY or MOVE request MUST have an octet
       size less than or equal to the value of the CALDAV:max-resource-
-      size property value (Section 5.2.5) on the calendar collection
+      size property value (Section 5.2.5) on the calendar collection
       where the resource will be stored;
 
       (CALDAV:min-date-time): The resource submitted in the PUT request,
@@ -1509,35 +1566,35 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 27]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
       instance) greater than or equal to the value of the CALDAV:min-
-      date-time property value (Section 5.2.6) on the calendar
+      date-time property value (Section 5.2.6) on the calendar
       collection where the resource will be stored;
 
       (CALDAV:max-date-time): The resource submitted in the PUT request,
       or targeted by a COPY or MOVE request MUST have all of its
       iCalendar date or time property values (for each recurring
       instance) less than the value of the CALDAV:max-date-time property
-      value (Section 5.2.7) on the calendar collection where the
+      value (Section 5.2.7) on the calendar collection where the
       resource will be stored;
 
       (CALDAV:max-instances): The resource submitted in the PUT request,
       or targeted by a COPY or MOVE request MUST generate a number of
       recurring instances less than or equal to the value of the CALDAV:
-      max-instances property value (Section 5.2.8) on the calendar
+      max-instances property value (Section 5.2.8) on the calendar
       collection where the resource will be stored;
 
       (CALDAV:max-attendees-per-instance): The resource submitted in the
       PUT request, or targeted by a COPY or MOVE request MUST have a
       number of ATTENDEE properties on any one instance less than or
       equal to the value of the CALDAV:max-attendees-per-instance
-      property value (Section 5.2.9) on the calendar collection where
+      property value (Section 5.2.9) on the calendar collection where
       the resource will be stored;
 
-5.3.3.  Non-standard components, properties and parameters
+5.3.3.  Non-standard components, properties and parameters
 
    iCalendar provides a "standard mechanism for doing non-standard
    things".  This extension support allows implementers to make use of
@@ -1554,9 +1611,9 @@ Internet-Draft                   CalDAV                   September 2006
    restrictions the server may have.  Servers SHOULD ensure that any
    "private" components, properties or parameters it uses follow the
    convention of including a vendor id in the "X-" name as described in
-   Section 4.2 of [RFC2445], e.g., "X-ABC-Private".
+   Section 4.2 of [RFC2445], e.g., "X-ABC-Private".
 
-5.3.4.  Calendar Object Resource Entity Tag
+5.3.4.  Calendar Object Resource Entity Tag
 
    The DAV:getetag property MUST be defined and set to a strong entity
    tag on all calendar object resources.
@@ -1565,7 +1622,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 28]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -1594,17 +1651,17 @@ Internet-Draft                   CalDAV                   September 2006
    had sent with the PUT request.
 
 
-6.  Calendaring Access Control
+6.  Calendaring Access Control
 
-6.1.  Calendaring Privilege
+6.1.  Calendaring Privilege
 
    CalDAV servers MUST support and adhere to the requirements of WebDAV
-   ACL [RFC3744].  WebDAV ACL provides a framework for an extensible set
+   ACL [RFC3744].  WebDAV ACL provides a framework for an extensible set
    of privileges that can be applied to WebDAV collections and ordinary
    resources.  CalDAV servers MUST also support the calendaring
    privilege defined in this section.
 
-6.1.1.  CALDAV:read-free-busy Privilege
+6.1.1.  CALDAV:read-free-busy Privilege
 
    Calendar users often wish to allow other users to see their busy time
    information, without viewing the other details of the calendar
@@ -1615,13 +1672,13 @@ Internet-Draft                   CalDAV                   September 2006
    The CALDAV:read-free-busy privilege controls which calendar
    collections, regular collections and calendar object resources are
    examined when a CALDAV:free-busy-query REPORT request is processed
-   (see Section 7.10).  This privilege can be granted on calendar
+   (see Section 7.10).  This privilege can be granted on calendar
    collections, regular collections or calendar object resources.
 
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 29]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -1629,7 +1686,7 @@ Internet-Draft                   CalDAV                   September 2006
    regular collections and calendar object resources.
 
 
-           
+           <!ELEMENT read-free-busy EMPTY>
 
    The CALDAV:read-free-busy privilege MUST be aggregated in the DAV:
    read privilege.  Servers MUST allow the CALDAV:read-free-busy to be
@@ -1640,12 +1697,12 @@ Internet-Draft                   CalDAV                   September 2006
    to GET, HEAD, OPTIONS and PROPFIND on the resource -- those
    operations are governed by the DAV:read privilege.
 
-6.2.  Additional Principal Property
+6.2.  Additional Principal Property
 
    This section defines an additional property for WebDAV principal
-   resources as defined in [RFC3744].
+   resources as defined in [RFC3744].
 
-6.2.1.  CALDAV:calendar-home-set Property
+6.2.1.  CALDAV:calendar-home-set Property
 
    Name: calendar-home-set
 
@@ -1656,8 +1713,8 @@ Internet-Draft                   CalDAV                   September 2006
 
    Conformance: This property SHOULD be defined on a principal resource.
       If defined, it MAY be protected and SHOULD NOT be returned by a
-      PROPFIND DAV:allprop request (as defined in Section 12.14.1 of
-      [RFC2518]).
+      PROPFIND DAV:allprop request (as defined in Section 12.14.1 of
+      [RFC2518]).
 
    Description: The CALDAV:calendar-home-set property is meant to allow
       users to easily find the calendar collections owned by the
@@ -1669,7 +1726,7 @@ Internet-Draft                   CalDAV                   September 2006
 
    Definition:
 
-         
+         <!ELEMENT calendar-home-set (DAV:href*)>
 
 
 
@@ -1677,35 +1734,35 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 30]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
    Example:
 
-       
-         http://cal.example.com/home/bernard/calendars/
-       
+       <C:calendar-home-set xmlns:D="DAV:"
+                            xmlns:C="urn:ietf:params:xml:ns:caldav">
+         <D:href>http://cal.example.com/home/bernard/calendars/</D:href>
+       </C:calendar-home-set>
 
 
-7.  Calendaring Reports
+7.  Calendaring Reports
 
    This section defines the REPORTs that CalDAV servers MUST support on
    calendar collections and calendar object resources.
 
    CalDAV servers MUST advertise support for these REPORTs on all
    calendar collections and calendar object resources with the DAV:
-   supported-report-set property defined in Section 3.1.5 of [RFC3253].
+   supported-report-set property defined in Section 3.1.5 of [RFC3253].
    CalDAV servers MAY also advertise support for these REPORTs on
    ordinary collections.
 
    Some of these REPORTs allow calendar data (from possibly multiple
    resources) to be returned.
 
-7.1.  REPORT Method
+7.1.  REPORT Method
 
-   The REPORT method (defined in Section 3.6 of [RFC3253]) provides an
+   The REPORT method (defined in Section 3.6 of [RFC3253]) provides an
    extensible mechanism for obtaining information about one or more
    resources.  Unlike the PROPFIND method, which returns the value of
    one or more named properties, the REPORT method can involve more
@@ -1716,9 +1773,9 @@ Internet-Draft                   CalDAV                   September 2006
    the same request.
 
    CalDAV servers MUST support the DAV:expand-property REPORT defined in
-   Section 3.8 of [RFC3253].
+   Section 3.8 of [RFC3253].
 
-7.2.  Ordinary collections
+7.2.  Ordinary collections
 
    Servers MAY support the REPORTs defined in this document on ordinary
    collections (collections that are not calendar collections) in
@@ -1733,11 +1790,11 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 31]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-7.3.  Date and floating time
+7.3.  Date and floating time
 
    iCalendar provides a way to specify DATE and DATE-TIME values that
    are not bound to any time zone in particular, hereafter called
@@ -1768,7 +1825,7 @@ Internet-Draft                   CalDAV                   September 2006
    time".  If the CALDAV:calendar-timezone property is not defined,
    CalDAV servers MAY rely on the time zone of their choice.
 
-7.4.  Time range filtering
+7.4.  Time range filtering
 
    Some of the reports defined in this section can include a time range
    filter that is used to restrict the set of calendar object resources
@@ -1782,14 +1839,14 @@ Internet-Draft                   CalDAV                   September 2006
    component or property are determined and then compared to the
    requested time range.  If there is an overlap with the requested time
    range, then the calendar object resource matches the filter element.
-   The rules defined in [RFC2445] for determining the actual start and
+   The rules defined in [RFC2445] for determining the actual start and
    end times of calendar components MUST be used, and these are fully
-   enumerated in Section 9.9 of this document.
+   enumerated in Section 9.9 of this document.
 
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 32]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -1800,7 +1857,7 @@ Internet-Draft                   CalDAV                   September 2006
    If one or more recurrence instances overlap the time range, then the
    calendar object resource matches the filter element.
 
-7.5.  Searching Text: Collations
+7.5.  Searching Text: Collations
 
    Some of the reports defined in this section do text matches of
    character strings provided by the client and compared to stored
@@ -1810,16 +1867,16 @@ Internet-Draft                   CalDAV                   September 2006
    to ensure that text matching follows well-defined rules.
 
    To deal with this, this specification makes use of the IANA Collation
-   Registry defined in [I-D.newman-i18n-comparator] to specify
+   Registry defined in [I-D.newman-i18n-comparator] to specify
    collations that may be used to carry out the text comparison
    operations with a well-defined rule.
 
    The comparisons used in CalDAV are all "substring" matches as per
-   [I-D.newman-i18n-comparator] Section 4.2.  Collations supported by
+   [I-D.newman-i18n-comparator] Section 4.2.  Collations supported by
    the server MUST support "substring" match operations.
 
    CalDAV servers are REQUIRED to support the "i;ascii-casemap" and
-   "i;octet" collations as described in [I-D.newman-i18n-comparator],
+   "i;octet" collations as described in [I-D.newman-i18n-comparator],
    and MAY support other collations.
 
    Servers MUST advertise the set of collations that they support via
@@ -1831,10 +1888,10 @@ Internet-Draft                   CalDAV                   September 2006
 
    In the absence of a collation explicitly specified by the client, or
    if the client specifies the "default" collation identifier (as
-   defined in [I-D.newman-i18n-comparator] Section 3.1), the server MUST
+   defined in [I-D.newman-i18n-comparator] Section 3.1), the server MUST
    default to using "i;ascii-casemap" as the collation.
 
-   Wildcards (as defined in [I-D.newman-i18n-comparator] Section 3.2)
+   Wildcards (as defined in [I-D.newman-i18n-comparator] Section 3.2)
    MUST NOT be used in the collation identifier.
 
    If the client chooses a collation not supported by the server, the
@@ -1845,11 +1902,11 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 33]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-7.5.1.  CALDAV:supported-collation-set Property
+7.5.1.  CALDAV:supported-collation-set Property
 
    Name: supported-collation-set
 
@@ -1861,7 +1918,7 @@ Internet-Draft                   CalDAV                   September 2006
    Conformance: This property MUST be defined on any resource that
       supports a REPORT that does text matching.  If defined, it MUST be
       protected and SHOULD NOT be returned by a PROPFIND DAV:allprop
-      request (as defined in Section 12.14.1 of [RFC2518]).
+      request (as defined in Section 12.14.1 of [RFC2518]).
 
    Description: The CALDAV:supported-collation-set property contains
       zero or more CALDAV:supported-collation elements which specify the
@@ -1869,18 +1926,18 @@ Internet-Draft                   CalDAV                   September 2006
 
    Definition:
 
-         
-           
+         <!ELEMENT supported-collation-set (supported-collation*)>
+           <!ELEMENT supported-collation (#PCDATA)>
 
    Example:
 
-       
-         i;ascii-casemap
-         i;octet
-       
+       <C:supported-collation-set
+           xmlns:C="urn:ietf:params:xml:ns:caldav">
+         <C:supported-collation>i;ascii-casemap</C:supported-collation>
+         <C:supported-collation>i;octet</C:supported-collation>
+       </C:supported-collation-set>
 
-7.6.  Partial Retrieval
+7.6.  Partial Retrieval
 
    Some calendaring REPORTs defined in this document allow partial
    retrieval of calendar object resources.  A CalDAV client can specify
@@ -1892,7 +1949,7 @@ Internet-Draft                   CalDAV                   September 2006
    WebDAV properties.  A CalDAV client can also request calendar data to
    be returned and whether all calendar components and properties should
    be returned or only particular ones.  See CALDAV:calendar-data in
-   Section 9.6.
+   Section 9.6.
 
    By default, the returned calendar data will include the component
    that defines the recurrence set, referred to as the "master
@@ -1901,7 +1958,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 34]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -1911,7 +1968,7 @@ Internet-Draft                   CalDAV                   September 2006
    overlap a specified time range can request to receive only the
    "master component" along with the "overridden components" that impact
    the specified time range and thus limit the data returned by the
-   server.  See CALDAV:limit-recurrence-set in Section 9.6.6.  An
+   server.  See CALDAV:limit-recurrence-set in Section 9.6.6.  An
    overridden component impacts a time range if its current start and
    end times overlap the time range, or if the original start and end
    times - the ones that would have been used if the instance were not
@@ -1923,14 +1980,14 @@ Internet-Draft                   CalDAV                   September 2006
    limited processing capability can request to receive only the
    recurrence instances that overlap a specified time range as separate
    calendar components that each define exactly one recurrence instance.
-   See CALDAV:expand in Section 9.6.5.
+   See CALDAV:expand in Section 9.6.5.
 
    Finally, in the case of VFREEBUSY components, a CalDAV client can
    request to receive only the FREEBUSY property values that overlap a
    specified time range.  See CALDAV:limit-freebusy-set in
-   Section 9.6.7.
+   Section 9.6.7.
 
-7.7.  Non-standard components, properties and parameters
+7.7.  Non-standard components, properties and parameters
 
    Servers MUST support the use of non-standard component, property or
    parameter names in the CALDAV:calendar-data XML element in
@@ -1949,7 +2006,7 @@ Internet-Draft                   CalDAV                   September 2006
    non-standard component, property or parameter name which the server
    does not support queries on.
 
-7.8.  CALDAV:calendar-query Report
+7.8.  CALDAV:calendar-query Report
 
    The CALDAV:calendar-query REPORT performs a search for all calendar
    object resources that match a specified filter.  The response of this
@@ -1957,7 +2014,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 35]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -1983,7 +2040,7 @@ Internet-Draft                   CalDAV                   September 2006
    Marshalling:
 
       The request body MUST be a CALDAV:calendar-query XML element as
-      defined in Section 9.5.
+      defined in Section 9.5.
 
       The request MAY include a Depth header.  If no Depth header is
       included, Depth:0 is assumed.
@@ -2004,28 +2061,28 @@ Internet-Draft                   CalDAV                   September 2006
 
       (CALDAV:supported-calendar-data): The attributes "content-type"
       and "version" of the CALDAV:calendar-data XML element (see
-      Section 9.6) specify a media type supported by the server for
+      Section 9.6) specify a media type supported by the server for
       calendar object resources.
 
       (CALDAV:valid-filter): The CALDAV:filter XML element (see
-      Section 9.7) specified in the REPORT request MUST be valid.  For
+      Section 9.7) specified in the REPORT request MUST be valid.  For
 
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 36]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-      instance, a CALDAV:filter cannot nest a 
-      element in a  element, or a CALDAV:filter
-      cannot nest a  element in a
-       element.
+      instance, a CALDAV:filter cannot nest a <C:comp name="VEVENT">
+      element in a <C:comp name="VTODO"> element, or a CALDAV:filter
+      cannot nest a <C:time-range start="..." end="..."> element in a
+      <C:prop name="SUMMARY"> element.
 
       (CALDAV:supported-filter): The CALDAV:comp-filter (see
-      Section 9.7.1), CALDAV:prop-filter (see Section 9.7.2) and CALDAV:
-      param-filter (see Section 9.7.3) XML elements used in the CALDAV:
-      filter XML element (see Section 9.7) in the REPORT request only
+      Section 9.7.1), CALDAV:prop-filter (see Section 9.7.2) and CALDAV:
+      param-filter (see Section 9.7.3) XML elements used in the CALDAV:
+      filter XML element (see Section 9.7) in the REPORT request only
       make reference to components, properties and parameters for which
       queries are supported by the server. i.e., if the CALDAV:filter
       element attempts to reference an unsupported component, property
@@ -2033,9 +2090,9 @@ Internet-Draft                   CalDAV                   September 2006
       report the CALDAV:comp-filter, CALDAV:prop-filter or CALDAV:param-
       filter for which it does not provide support.
 
-            
+                                        param-filter*)>
 
       (CALDAV:valid-calendar-data): The time zone specified in the
       REPORT request MUST be a valid iCalendar object containing a
@@ -2044,18 +2101,18 @@ Internet-Draft                   CalDAV                   September 2006
       (CALDAV:min-date-time): Any XML element specifying a range of time
       MUST have its start or end date or time values greater than or
       equal to the value of the CALDAV:min-date-time property value
-      (Section 5.2.6) on the calendar collections being targeted by the
+      (Section 5.2.6) on the calendar collections being targeted by the
       REPORT;
 
       (CALDAV:max-date-time): Any XML element specifying a range of time
       MUST have its start or end date or time values less than or equal
       to the value of the CALDAV:max-date-time property value
-      (Section 5.2.7) on the calendar collections being targeted by the
+      (Section 5.2.7) on the calendar collections being targeted by the
       REPORT;
 
       (CALDAV:supported-collation): Any XML attribute specifying a
       collation MUST specify a collation supported by the server as
-      described in Section 7.5.
+      described in Section 7.5.
 
    Postconditions:
 
@@ -2069,11 +2126,11 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 37]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-7.8.1.  Example: Partial retrieval of events by time range
+7.8.1.  Example: Partial retrieval of events by time range
 
    In this example, the client requests the server to return specific
    components and properties of the VEVENT components that overlap the
@@ -2125,11 +2182,11 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 38]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-   >> Request <<
+   >> Request <<
 
    REPORT /bernard/work/ HTTP/1.1
    Host: cal.example.com
@@ -2137,41 +2194,41 @@ Internet-Draft                   CalDAV                   September 2006
    Content-Type: application/xml; charset="utf-8"
    Content-Length: xxxx
 
-   
-   
-     
-       
-       
-         
-           
-           
-             
-             
-             
-             
-             
-             
-             
-             
-             
-             
-           
-           
-         
-       
-     
-     
-       
-         
-           
-         
-       
-     
-   
+   <?xml version="1.0" encoding="utf-8" ?>
+   <C:calendar-query xmlns:D="DAV:"
+                 xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:prop>
+       <D:getetag/>
+       <C:calendar-data>
+         <C:comp name="VCALENDAR">
+           <C:prop name="VERSION"/>
+           <C:comp name="VEVENT">
+             <C:prop name="SUMMARY"/>
+             <C:prop name="UID"/>
+             <C:prop name="DTSTART"/>
+             <C:prop name="DTEND"/>
+             <C:prop name="DURATION"/>
+             <C:prop name="RRULE"/>
+             <C:prop name="RDATE"/>
+             <C:prop name="EXRULE"/>
+             <C:prop name="EXDATE"/>
+             <C:prop name="RECURRENCE-ID"/>
+           </C:comp>
+           <C:comp name="VTIMEZONE"/>
+         </C:comp>
+       </C:calendar-data>
+     </D:prop>
+     <C:filter>
+       <C:comp-filter name="VCALENDAR">
+         <C:comp-filter name="VEVENT">
+           <C:time-range start="20060104T000000Z"
+                         end="20060105T000000Z"/>
+         </C:comp-filter>
+       </C:comp-filter>
+     </C:filter>
+   </C:calendar-query>
 
-   >> Response <<
+   >> Response <<
 
    HTTP/1.1 207 Multi-Status
    Date: Fri, 11 Nov 2005 09:32:12 GMT
@@ -2181,19 +2238,19 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 39]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-   
-   
-     
-       http://cal.example.com/bernard/work/abcd2.ics
-       
-         
-           "fffff-abcd2"
-           BEGIN:VCALENDAR
+   <?xml version="1.0" encoding="utf-8" ?>
+   <D:multistatus xmlns:D="DAV:"
+              xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:response>
+       <D:href>http://cal.example.com/bernard/work/abcd2.ics</D:href>
+       <D:propstat>
+         <D:prop>
+           <D:getetag>"fffff-abcd2"</D:getetag>
+           <C:calendar-data>BEGIN:VCALENDAR
    VERSION:2.0
    BEGIN:VTIMEZONE
    LAST-MODIFIED:20040110T032845Z
@@ -2237,23 +2294,23 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 40]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
    END:VEVENT
    END:VCALENDAR
-   
-         
-         HTTP/1.1 200 OK
-       
-     
-     
-       http://cal.example.com/bernard/work/abcd3.ics
-       
-         
-           "fffff-abcd3"
-           BEGIN:VCALENDAR
+   </C:calendar-data>
+         </D:prop>
+         <D:status>HTTP/1.1 200 OK</D:status>
+       </D:propstat>
+     </D:response>
+     <D:response>
+       <D:href>http://cal.example.com/bernard/work/abcd3.ics</D:href>
+       <D:propstat>
+         <D:prop>
+           <D:getetag>"fffff-abcd3"</D:getetag>
+           <C:calendar-data>BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Example Corp.//CalDAV Client//EN
    BEGIN:VTIMEZONE
@@ -2281,23 +2338,23 @@ Internet-Draft                   CalDAV                   September 2006
    UID:DC6C50A017428C5216A2F1CD@example.com
    END:VEVENT
    END:VCALENDAR
-   
-         
-         HTTP/1.1 200 OK
-       
-     
-   
+   </C:calendar-data>
+         </D:prop>
+         <D:status>HTTP/1.1 200 OK</D:status>
+       </D:propstat>
+     </D:response>
+   </D:multistatus>
 
 
 
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 41]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-7.8.2.  Example: Partial retrieval of recurring events
+7.8.2.  Example: Partial retrieval of recurring events
 
    In this example, the client requests the server to return VEVENT
    components that overlap the time range from January 3rd, 2006 at 00:
@@ -2311,7 +2368,7 @@ Internet-Draft                   CalDAV                   September 2006
 
    See Appendix B for the calendar data being targeted by this example.
 
-   >> Request <<
+   >> Request <<
 
    REPORT /bernard/work/ HTTP/1.1
    Host: cal.example.com
@@ -2319,26 +2376,26 @@ Internet-Draft                   CalDAV                   September 2006
    Content-Type: application/xml; charset="utf-8"
    Content-Length: xxxx
 
-   
-   
-     
-       
-         
-       
-     
-     
-       
-         
-           
-         
-       
-     
-   
+   <?xml version="1.0" encoding="utf-8" ?>
+   <C:calendar-query xmlns:D="DAV:"
+                     xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:prop>
+       <C:calendar-data>
+         <C:limit-recurrence-set start="20060103T000000Z"
+                                 end="20060105T000000Z"/>
+       </C:calendar-data>
+     </D:prop>
+     <C:filter>
+       <C:comp-filter name="VCALENDAR">
+         <C:comp-filter name="VEVENT">
+           <C:time-range start="20060103T000000Z"
+                         end="20060105T000000Z"/>
+         </C:comp-filter>
+       </C:comp-filter>
+     </C:filter>
+   </C:calendar-query>
 
-   >> Response <<
+   >> Response <<
 
    HTTP/1.1 207 Multi-Status
    Date: Fri, 11 Nov 2006 09:32:12 GMT
@@ -2349,19 +2406,19 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 42]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-   
-   
-     
-       http://cal.example.com/bernard/work/abcd2.ics
-       
-         
-           "fffff-abcd2"
-           BEGIN:VCALENDAR
+   <?xml version="1.0" encoding="utf-8" ?>
+   <D:multistatus xmlns:D="DAV:"
+              xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:response>
+       <D:href>http://cal.example.com/bernard/work/abcd2.ics</D:href>
+       <D:propstat>
+         <D:prop>
+           <D:getetag>"fffff-abcd2"</D:getetag>
+           <C:calendar-data>BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Example Corp.//CalDAV Client//EN
    BEGIN:VTIMEZONE
@@ -2399,25 +2456,25 @@ Internet-Draft                   CalDAV                   September 2006
    UID:00959BC664CA650E933C892C@example.com
    END:VEVENT
    END:VCALENDAR
-   
-         
+   </C:calendar-data>
+         </D:prop>
 
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 43]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-         HTTP/1.1 200 OK
-       
-     
-     
-       http://cal.example.com/bernard/work/abcd3.ics
-       
-         
-           "fffff-abcd3"
-           BEGIN:VCALENDAR
+         <D:status>HTTP/1.1 200 OK</D:status>
+       </D:propstat>
+     </D:response>
+     <D:response>
+       <D:href>http://cal.example.com/bernard/work/abcd3.ics</D:href>
+       <D:propstat>
+         <D:prop>
+           <D:getetag>"fffff-abcd3"</D:getetag>
+           <C:calendar-data>BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Example Corp.//CalDAV Client//EN
    BEGIN:VTIMEZONE
@@ -2453,22 +2510,22 @@ Internet-Draft                   CalDAV                   September 2006
    X-ABC-GUID:E1CX5Dr-0007ym-Hz@example.com
    END:VEVENT
    END:VCALENDAR
-   
-         
-         HTTP/1.1 200 OK
-       
+   </C:calendar-data>
+         </D:prop>
+         <D:status>HTTP/1.1 200 OK</D:status>
+       </D:propstat>
 
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 44]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-     
-   
+     </D:response>
+   </D:multistatus>
 
-7.8.3.  Example: Expanded retrieval of recurring events
+7.8.3.  Example: Expanded retrieval of recurring events
 
    In this example, the client requests the server to return VEVENT
    components that overlap the time range from January 2nd, 2006 at 00:
@@ -2480,7 +2537,7 @@ Internet-Draft                   CalDAV                   September 2006
 
    See Appendix B for the calendar data being targeted by this example.
 
-   >> Request <<
+   >> Request <<
 
    REPORT /bernard/work/ HTTP/1.1
    Host: cal.example.com
@@ -2488,26 +2545,26 @@ Internet-Draft                   CalDAV                   September 2006
    Content-Type: application/xml; charset="utf-8"
    Content-Length: xxxx
 
-   
-   
-     
-       
-         
-       
-     
-     
-       
-         
-           
-         
-       
-     
-   
+   <?xml version="1.0" encoding="utf-8" ?>
+   <C:calendar-query xmlns:D="DAV:"
+                     xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:prop>
+       <C:calendar-data>
+         <C:expand start="20060103T000000Z"
+                   end="20060105T000000Z"/>
+       </C:calendar-data>
+     </D:prop>
+     <C:filter>
+       <C:comp-filter name="VCALENDAR">
+         <C:comp-filter name="VEVENT">
+           <C:time-range start="20060103T000000Z"
+                         end="20060105T000000Z"/>
+         </C:comp-filter>
+       </C:comp-filter>
+     </C:filter>
+   </C:calendar-query>
 
-   >> Response <<
+   >> Response <<
 
    HTTP/1.1 207 Multi-Status
    Date: Fri, 11 Nov 2006 09:32:12 GMT
@@ -2517,19 +2574,19 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 45]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-   
-   
-     
-       http://cal.example.com/bernard/work/abcd2.ics
-       
-         
-           "fffff-abcd2"
-           BEGIN:VCALENDAR
+   <?xml version="1.0" encoding="utf-8" ?>
+   <D:multistatus xmlns:D="DAV:"
+              xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:response>
+       <D:href>http://cal.example.com/bernard/work/abcd2.ics</D:href>
+       <D:propstat>
+         <D:prop>
+           <D:getetag>"fffff-abcd2"</D:getetag>
+           <C:calendar-data>BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Example Corp.//CalDAV Client//EN
    BEGIN:VEVENT
@@ -2549,17 +2606,17 @@ Internet-Draft                   CalDAV                   September 2006
    UID:00959BC664CA650E933C892C@example.com
    END:VEVENT
    END:VCALENDAR
-   
-         
-         HTTP/1.1 200 OK
-       
-     
-     
-       http://cal.example.com/bernard/work/abcd3.ics
-       
-         
-           "fffff-abcd3"
-           BEGIN:VCALENDAR
+   </C:calendar-data>
+         </D:prop>
+         <D:status>HTTP/1.1 200 OK</D:status>
+       </D:propstat>
+     </D:response>
+     <D:response>
+       <D:href>http://cal.example.com/bernard/work/abcd3.ics</D:href>
+       <D:propstat>
+         <D:prop>
+           <D:getetag>"fffff-abcd3"</D:getetag>
+           <C:calendar-data>BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Example Corp.//CalDAV Client//EN
    BEGIN:VEVENT
@@ -2573,7 +2630,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 46]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -2585,14 +2642,14 @@ Internet-Draft                   CalDAV                   September 2006
    X-ABC-GUID:E1CX5Dr-0007ym-Hz@example.com
    END:VEVENT
    END:VCALENDAR
-   
-         
-         HTTP/1.1 200 OK
-       
-     
-   
+   </C:calendar-data>
+         </D:prop>
+         <D:status>HTTP/1.1 200 OK</D:status>
+       </D:propstat>
+     </D:response>
+   </D:multistatus>
 
-7.8.4.  Example: Partial retrieval of stored free busy components
+7.8.4.  Example: Partial retrieval of stored free busy components
 
    In this example, the client requests the server to return the
    VFREEBUSY components that have free busy information that overlap the
@@ -2629,11 +2686,11 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 47]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-   >> Request <<
+   >> Request <<
 
    REPORT /bernard/work/ HTTP/1.1
    Host: cal.example.com
@@ -2641,24 +2698,24 @@ Internet-Draft                   CalDAV                   September 2006
    Content-Type: application/xml; charset="utf-8"
    Content-Length: xxxx
 
-   
-   
-     
-       
-         
-       
-     
-     
-       
-         
-           
-         
-       
-     
-   
+   <?xml version="1.0" encoding="utf-8" ?>
+   <C:calendar-query xmlns:D="DAV:"
+                 xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:prop>
+       <C:calendar-data>
+         <C:limit-freebusy-set start="20060102T000000Z"
+                                 end="20060103T000000Z"/>
+       </C:calendar-data>
+     </D:prop>
+     <C:filter>
+       <C:comp-filter name="VCALENDAR">
+         <C:comp-filter name="VFREEBUSY">
+           <C:time-range start="20060102T000000Z"
+                           end="20060103T000000Z"/>
+         </C:comp-filter>
+       </C:comp-filter>
+     </C:filter>
+   </C:calendar-query>
 
 
 
@@ -2685,26 +2742,26 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 48]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-   >> Response <<
+   >> Response <<
 
    HTTP/1.1 207 Multi-Status
    Date: Fri, 11 Nov 2006 09:32:12 GMT
    Content-Type: application/xml; charset="utf-8"
    Content-Length: xxxx
 
-   
-   
-     
-       http://cal.example.com/bernard/work/abcd8.ics
-       
-         
-           "fffff-abcd8"
-           BEGIN:VCALENDAR
+   <?xml version="1.0" encoding="utf-8" ?>
+   <D:multistatus xmlns:D="DAV:"
+                  xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:response>
+       <D:href>http://cal.example.com/bernard/work/abcd8.ics</D:href>
+       <D:propstat>
+         <D:prop>
+           <D:getetag>"fffff-abcd8"</D:getetag>
+           <C:calendar-data>BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Example Corp.//CalDAV Client//EN
    BEGIN:VFREEBUSY
@@ -2716,14 +2773,14 @@ Internet-Draft                   CalDAV                   September 2006
    FREEBUSY;FBTYPE=BUSY-TENTATIVE:20060102T100000Z/20060102T120000Z
    END:VFREEBUSY
    END:VCALENDAR
-   
-         
-         HTTP/1.1 200 OK
-       
-     
-   
+   </C:calendar-data>
+         </D:prop>
+         <D:status>HTTP/1.1 200 OK</D:status>
+       </D:propstat>
+     </D:response>
+   </D:multistatus>
 
-7.8.5.  Example: Retrieval of to-dos by alarm time range
+7.8.5.  Example: Retrieval of to-dos by alarm time range
 
    In this example, the client requests the server to return the VTODO
    components that have an alarm trigger scheduled in the specified time
@@ -2741,11 +2798,11 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 49]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-   >> Request <<
+   >> Request <<
 
    REPORT /bernard/work/ HTTP/1.1
    Host: cal.example.com
@@ -2753,23 +2810,23 @@ Internet-Draft                   CalDAV                   September 2006
    Content-Type: application/xml; charset="utf-8"
    Content-Length: xxxx
 
-   
-   
-     
-       
-       
-     
-     
-       
-         
-           
-             
-           
-         
-       
-     
-   
+   <?xml version="1.0" encoding="utf-8" ?>
+   <C:calendar-query xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:prop xmlns:D="DAV:">
+       <D:getetag/>
+       <C:calendar-data/>
+     </D:prop>
+     <C:filter>
+       <C:comp-filter name="VCALENDAR">
+         <C:comp-filter name="VTODO">
+           <C:comp-filter name="VALARM">
+             <C:time-range start="20060106T100000Z"
+                             end="20060107T100000Z"/>
+           </C:comp-filter>
+         </C:comp-filter>
+       </C:comp-filter>
+     </C:filter>
+   </C:calendar-query>
 
 
 
@@ -2797,26 +2854,26 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 50]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-   >> Response <<
+   >> Response <<
 
    HTTP/1.1 207 Multi-Status
    Date: Fri, 11 Nov 2006 09:32:12 GMT
    Content-Type: application/xml; charset="utf-8"
    Content-Length: xxxx
 
-   
-   
-     
-       http://cal.example.com/bernard/work/abcd4.ics
-       
-         
-           "fffff-abcd4"
-           BEGIN:VCALENDAR
+   <?xml version="1.0" encoding="utf-8" ?>
+   <D:multistatus xmlns:D="DAV:"
+                  xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:response>
+       <D:href>http://cal.example.com/bernard/work/abcd4.ics</D:href>
+       <D:propstat>
+         <D:prop>
+           <D:getetag>"fffff-abcd4"</D:getetag>
+           <C:calendar-data>BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Example Corp.//CalDAV Client//EN
    BEGIN:VTODO
@@ -2833,14 +2890,14 @@ Internet-Draft                   CalDAV                   September 2006
    END:VALARM
    END:VTODO
    END:VCALENDAR
-   
-         
-         HTTP/1.1 200 OK
-       
-     
-   
+   </C:calendar-data>
+         </D:prop>
+         <D:status>HTTP/1.1 200 OK</D:status>
+       </D:propstat>
+     </D:response>
+   </D:multistatus>
 
-7.8.6.  Example: Retrieval of event by UID
+7.8.6.  Example: Retrieval of event by UID
 
    In this example, the client requests the server to return the VEVENT
    component that has the UID property set to
@@ -2853,11 +2910,11 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 51]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-   >> Request <<
+   >> Request <<
 
    REPORT /bernard/work/ HTTP/1.1
    Host: cal.example.com
@@ -2865,40 +2922,40 @@ Internet-Draft                   CalDAV                   September 2006
    Content-Type: application/xml; charset="utf-8"
    Content-Length: xxxx
 
-   
-   
-     
-       
-       
-     
-     
-       
-         
-           
-             DC6C50A017428C5216A2F1CD@example.com
-           
-         
-       
-     
-   
+   <?xml version="1.0" encoding="utf-8" ?>
+   <C:calendar-query xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:prop xmlns:D="DAV:">
+       <D:getetag/>
+       <C:calendar-data/>
+     </D:prop>
+     <C:filter>
+       <C:comp-filter name="VCALENDAR">
+         <C:comp-filter name="VEVENT">
+           <C:prop-filter name="UID">
+             <C:text-match collation="i;octet"
+             >DC6C50A017428C5216A2F1CD@example.com</C:text-match>
+           </C:prop-filter>
+         </C:comp-filter>
+       </C:comp-filter>
+     </C:filter>
+   </C:calendar-query>
 
-   >> Response <<
+   >> Response <<
 
    HTTP/1.1 207 Multi-Status
    Date: Fri, 11 Nov 2006 09:32:12 GMT
    Content-Type: application/xml; charset="utf-8"
    Content-Length: xxxx
 
-   
-   
-     
-       http://cal.example.com/bernard/work/abcd3.ics
-       
-         
-           "fffff-abcd3"
-           BEGIN:VCALENDAR
+   <?xml version="1.0" encoding="utf-8" ?>
+   <D:multistatus xmlns:D="DAV:"
+                  xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:response>
+       <D:href>http://cal.example.com/bernard/work/abcd3.ics</D:href>
+       <D:propstat>
+         <D:prop>
+           <D:getetag>"fffff-abcd3"</D:getetag>
+           <C:calendar-data>BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Example Corp.//CalDAV Client//EN
    BEGIN:VTIMEZONE
@@ -2909,7 +2966,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 52]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -2942,14 +2999,14 @@ Internet-Draft                   CalDAV                   September 2006
    X-ABC-GUID:E1CX5Dr-0007ym-Hz@example.com
    END:VEVENT
    END:VCALENDAR
-   
-         
-         HTTP/1.1 200 OK
-       
-     
-   
+   </C:calendar-data>
+         </D:prop>
+         <D:status>HTTP/1.1 200 OK</D:status>
+       </D:propstat>
+     </D:response>
+   </D:multistatus>
 
-7.8.7.  Example: Retrieval of events by PARTSTAT
+7.8.7.  Example: Retrieval of events by PARTSTAT
 
    In this example, the client requests the server to return the VEVENT
    components that have the ATTENDEE property with the value
@@ -2965,11 +3022,11 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 53]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-   >> Request <<
+   >> Request <<
 
    REPORT /bernard/work/ HTTP/1.1
    Host: cal.example.com
@@ -2977,51 +3034,51 @@ Internet-Draft                   CalDAV                   September 2006
    Content-Type: application/xml; charset="utf-8"
    Content-Length: xxxx
 
-   
-   
-     
-       
-       
-     
-     
-       
-         
-           
-             mailto:lisa@example.com
-             
-               NEEDS-ACTION
-             
-           
-         
-       
-     
-   
+   <?xml version="1.0" encoding="utf-8" ?>
+   <C:calendar-query xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:prop xmlns:D="DAV:">
+       <D:getetag/>
+       <C:calendar-data/>
+     </D:prop>
+     <C:filter>
+       <C:comp-filter name="VCALENDAR">
+         <C:comp-filter name="VEVENT">
+           <C:prop-filter name="ATTENDEE">
+             <C:text-match collation="i;ascii-casemap"
+              >mailto:lisa@example.com</C:text-match>
+             <C:param-filter name="PARTSTAT">
+               <C:text-match collation="i;ascii-casemap"
+                >NEEDS-ACTION</C:text-match>
+             </C:param-filter>
+           </C:prop-filter>
+         </C:comp-filter>
+       </C:comp-filter>
+     </C:filter>
+   </C:calendar-query>
 
-   >> Response <<
+   >> Response <<
 
    HTTP/1.1 207 Multi-Status
    Date: Fri, 11 Nov 2006 09:32:12 GMT
    Content-Type: application/xml; charset="utf-8"
    Content-Length: xxxx
 
-   
-   
-     
-       http://cal.example.com/bernard/work/abcd3.ics
-       
-         
-           "fffff-abcd3"
-           BEGIN:VCALENDAR
+   <?xml version="1.0" encoding="utf-8" ?>
+   <D:multistatus xmlns:D="DAV:"
+                  xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:response>
+       <D:href>http://cal.example.com/bernard/work/abcd3.ics</D:href>
+       <D:propstat>
+         <D:prop>
+           <D:getetag>"fffff-abcd3"</D:getetag>
+           <C:calendar-data>BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Example Corp.//CalDAV Client//EN
 
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 54]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -3058,14 +3115,14 @@ Internet-Draft                   CalDAV                   September 2006
    X-ABC-GUID:E1CX5Dr-0007ym-Hz@example.com
    END:VEVENT
    END:VCALENDAR
-   
-         
-         HTTP/1.1 200 OK
-       
-     
-   
+   </C:calendar-data>
+         </D:prop>
+         <D:status>HTTP/1.1 200 OK</D:status>
+       </D:propstat>
+     </D:response>
+   </D:multistatus>
 
-7.8.8.  Example: Retrieval of events only
+7.8.8.  Example: Retrieval of events only
 
    In this example, the client requests the server to return all VEVENT
    components.
@@ -3077,11 +3134,11 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 55]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-   >> Request <<
+   >> Request <<
 
    REPORT /bernard/work/ HTTP/1.1
    Host: cal.example.com
@@ -3089,35 +3146,35 @@ Internet-Draft                   CalDAV                   September 2006
    Content-Type: application/xml; charset="utf-8"
    Content-Length: xxxx
 
-   
-   
-     
-       
-       
-     
-     
-       
-         
-       
-     
-   
+   <?xml version="1.0" encoding="utf-8" ?>
+   <C:calendar-query xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:prop xmlns:D="DAV:">
+       <D:getetag/>
+       <C:calendar-data/>
+     </D:prop>
+     <C:filter>
+       <C:comp-filter name="VCALENDAR">
+         <C:comp-filter name="VEVENT"/>
+       </C:comp-filter>
+     </C:filter>
+   </C:calendar-query>
 
-   >> Response <<
+   >> Response <<
 
    HTTP/1.1 207 Multi-Status
    Date: Fri, 11 Nov 2006 09:32:12 GMT
    Content-Type: application/xml; charset="utf-8"
    Content-Length: xxxx
 
-   
-   
-     
-       http://cal.example.com/bernard/work/abcd1.ics
-       
-         
-           "fffff-abcd1"
-           BEGIN:VCALENDAR
+   <?xml version="1.0" encoding="utf-8" ?>
+   <D:multistatus xmlns:D="DAV:"
+                  xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:response>
+       <D:href>http://cal.example.com/bernard/work/abcd1.ics</D:href>
+       <D:propstat>
+         <D:prop>
+           <D:getetag>"fffff-abcd1"</D:getetag>
+           <C:calendar-data>BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Example Corp.//CalDAV Client//EN
    BEGIN:VTIMEZONE
@@ -3133,7 +3190,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 56]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -3155,17 +3212,17 @@ Internet-Draft                   CalDAV                   September 2006
    UID:74855313FA803DA593CD579A@example.com
    END:VEVENT
    END:VCALENDAR
-   
-         
-         HTTP/1.1 200 OK
-       
-     
-     
-       http://cal.example.com/bernard/work/abcd2.ics
-       
-         
-           "fffff-abcd2"
-           BEGIN:VCALENDAR
+   </C:calendar-data>
+         </D:prop>
+         <D:status>HTTP/1.1 200 OK</D:status>
+       </D:propstat>
+     </D:response>
+     <D:response>
+       <D:href>http://cal.example.com/bernard/work/abcd2.ics</D:href>
+       <D:propstat>
+         <D:prop>
+           <D:getetag>"fffff-abcd2"</D:getetag>
+           <C:calendar-data>BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Example Corp.//CalDAV Client//EN
    BEGIN:VTIMEZONE
@@ -3189,7 +3246,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 57]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -3219,17 +3276,17 @@ Internet-Draft                   CalDAV                   September 2006
    UID:00959BC664CA650E933C892C@example.com
    END:VEVENT
    END:VCALENDAR
-   
-         
-         HTTP/1.1 200 OK
-       
-     
-     
-       http://cal.example.com/bernard/work/abcd3.ics
-       
-         
-           "fffff-abcd3"
-           BEGIN:VCALENDAR
+   </C:calendar-data>
+         </D:prop>
+         <D:status>HTTP/1.1 200 OK</D:status>
+       </D:propstat>
+     </D:response>
+     <D:response>
+       <D:href>http://cal.example.com/bernard/work/abcd3.ics</D:href>
+       <D:propstat>
+         <D:prop>
+           <D:getetag>"fffff-abcd3"</D:getetag>
+           <C:calendar-data>BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Example Corp.//CalDAV Client//EN
    BEGIN:VTIMEZONE
@@ -3245,7 +3302,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 58]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -3273,14 +3330,14 @@ Internet-Draft                   CalDAV                   September 2006
    X-ABC-GUID:E1CX5Dr-0007ym-Hz@example.com
    END:VEVENT
    END:VCALENDAR
-   
-         
-         HTTP/1.1 200 OK
-       
-     
-   
+   </C:calendar-data>
+         </D:prop>
+         <D:status>HTTP/1.1 200 OK</D:status>
+       </D:propstat>
+     </D:response>
+   </D:multistatus>
 
-7.8.9.  Example: Retrieval of all pending to-dos
+7.8.9.  Example: Retrieval of all pending to-dos
 
    In this example, the client requests the server to return all VTODO
    components that do not include a "COMPLETED" property and do not have
@@ -3301,11 +3358,11 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 59]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-   >> Request <<
+   >> Request <<
 
    REPORT /bernard/work/ HTTP/1.1
    Host: cal.example.com
@@ -3313,43 +3370,43 @@ Internet-Draft                   CalDAV                   September 2006
    Content-Type: application/xml; charset="utf-8"
    Content-Length: xxxx
 
-   
-   
-     
-       
-       
-     
-     
-       
-         
-           
-             
-           
-           
-             CANCELLED
-           
-         
-       
-     
-   
+   <?xml version="1.0" encoding="utf-8" ?>
+   <C:calendar-query xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:prop xmlns:D="DAV:">
+       <D:getetag/>
+       <C:calendar-data/>
+     </D:prop>
+     <C:filter>
+       <C:comp-filter name="VCALENDAR">
+         <C:comp-filter name="VTODO">
+           <C:prop-filter name="COMPLETED">
+             <C:is-not-defined/>
+           </C:prop-filter>
+           <C:prop-filter name="STATUS">
+             <C:text-match
+                negate-condition="yes">CANCELLED</c:text-match>
+           </C:prop-filter>
+         </C:comp-filter>
+       </C:comp-filter>
+     </C:filter>
+   </C:calendar-query>
 
-   >> Response <<
+   >> Response <<
 
    HTTP/1.1 207 Multi-Status
    Date: Fri, 11 Nov 2006 09:32:12 GMT
    Content-Type: application/xml; charset="utf-8"
    Content-Length: xxxx
 
-   
-   
-     
-       http://cal.example.com/bernard/work/abcd4.ics
-       
-         
-           "fffff-abcd4"
-           BEGIN:VCALENDAR
+   <?xml version="1.0" encoding="utf-8" ?>
+   <D:multistatus xmlns:D="DAV:"
+                  xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:response>
+       <D:href>http://cal.example.com/bernard/work/abcd4.ics</D:href>
+       <D:propstat>
+         <D:prop>
+           <D:getetag>"fffff-abcd4"</D:getetag>
+           <C:calendar-data>BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Example Corp.//CalDAV Client//EN
    BEGIN:VTODO
@@ -3357,7 +3414,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 60]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -3372,18 +3429,18 @@ Internet-Draft                   CalDAV                   September 2006
    END:VALARM
    END:VTODO
    END:VCALENDAR
-   
-         
-         HTTP/1.1 200 OK
-       
-     
+   </C:calendar-data>
+         </D:prop>
+         <D:status>HTTP/1.1 200 OK</D:status>
+       </D:propstat>
+     </D:response>
 
-     
-       http://cal.example.com/bernard/work/abcd5.ics
-       
-         
-           "fffff-abcd5"
-           BEGIN:VCALENDAR
+     <D:response>
+       <D:href>http://cal.example.com/bernard/work/abcd5.ics</D:href>
+       <D:propstat>
+         <D:prop>
+           <D:getetag>"fffff-abcd5"</D:getetag>
+           <C:calendar-data>BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Example Corp.//CalDAV Client//EN
    BEGIN:VTODO
@@ -3400,12 +3457,12 @@ Internet-Draft                   CalDAV                   September 2006
    END:VALARM
    END:VTODO
    END:VCALENDAR
-   
-         
-         HTTP/1.1 200 OK
-       
-     
-   
+   </C:calendar-data>
+         </D:prop>
+         <D:status>HTTP/1.1 200 OK</D:status>
+       </D:propstat>
+     </D:response>
+   </D:multistatus>
 
 
 
@@ -3413,11 +3470,11 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 61]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-7.8.10.  Example: Attempt to query unsupported property
+7.8.10.  Example: Attempt to query unsupported property
 
    In this example, the client requests the server to return all VEVENT
    components that include an "X-ABC-GUID" property with a value
@@ -3426,7 +3483,7 @@ Internet-Draft                   CalDAV                   September 2006
 
    See Appendix B for the calendar data being targeted by this example.
 
-   >> Request <<
+   >> Request <<
 
    REPORT /bernard/work/ HTTP/1.1
    Host: cal.example.com
@@ -3434,53 +3491,53 @@ Internet-Draft                   CalDAV                   September 2006
    Content-Type: application/xml; charset="utf-8"
    Content-Length: xxxx
 
-   
-   
-     
-       
-       
-     
-     
-       
-         
-           
-             ABC
-           
-         
-       
-     
-   
+   <?xml version="1.0" encoding="utf-8" ?>
+   <C:calendar-query xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:prop xmlns:D="DAV:">
+       <D:getetag/>
+       <C:calendar-data/>
+     </D:prop>
+     <C:filter>
+       <C:comp-filter name="VCALENDAR">
+         <C:comp-filter name="VEVENT">
+           <C:prop-filter name="X-ABC-GUID">
+             <C:text-match>ABC</C:text-match>
+           </C:prop-filter>
+         </C:comp-filter>
+       </C:comp-filter>
+     </C:filter>
+   </C:calendar-query>
 
-   >> Response <<
+   >> Response <<
 
    HTTP/1.1 403 Forbidden
    Date: Fri, 11 Nov 2005 09:32:12 GMT
    Content-Type: application/xml; charset="utf-8"
    Content-Length: xxxx
 
-   
-   
-     
-       
-     
-   
+   <?xml version="1.0" encoding="utf-8" ?>
+   <D:error>
+     <C:supported-filter>
+       <C:prop-filter name="X-ABC-GUID"/>
+     </C:supported-filter>
+   </D:error>
 
 
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 62]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-7.9.  CALDAV:calendar-multiget Report
+7.9.  CALDAV:calendar-multiget Report
 
    The CALDAV:calendar-multiget REPORT is used to retrieve specific
    calendar object resources from within a collection, if the Request-
    URI is a collection, or to retrieve a specific calendar object
    resource, if the Request-URI is a calendar object resource.  This
    REPORT is similar to the CALDAV:calendar-query REPORT (see
-   Section 7.8), except that it takes a list of DAV:href elements
+   Section 7.8), except that it takes a list of DAV:href elements
    instead of a CALDAV:filter element to determine which calendar object
    resources to return.
 
@@ -3489,7 +3546,7 @@ Internet-Draft                   CalDAV                   September 2006
    Marshalling:
 
       The request body MUST be a CALDAV:calendar-multiget XML element
-      (see Section 9.10).  If the Request-URI is a collection resource,
+      (see Section 9.10).  If the Request-URI is a collection resource,
       then the DAV:href elements MUST refer to calendar object resources
       within that collection, and they MAY refer to calendar object
       resources at any depth within the collection.  As a result the
@@ -3516,7 +3573,7 @@ Internet-Draft                   CalDAV                   September 2006
 
       (CALDAV:supported-calendar-data): The attributes "content-type"
       and "version" of the CALDAV:calendar-data XML elements (see
-      Section 9.6) specify a media type supported by the server for
+      Section 9.6) specify a media type supported by the server for
       calendar object resources.
 
       (CALDAV:min-date-time): Any XML element specifying a range of time
@@ -3525,54 +3582,54 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 63]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
       equal to the value of the CALDAV:min-date-time property value
-      (Section 5.2.6) on the calendar collections being targeted by the
+      (Section 5.2.6) on the calendar collections being targeted by the
       REPORT;
 
       (CALDAV:max-date-time): Any XML element specifying a range of time
       MUST have its start or end date or time values less than or equal
       to the value of the CALDAV:max-date-time property value
-      (Section 5.2.7) on the calendar collections being targeted by the
+      (Section 5.2.7) on the calendar collections being targeted by the
       REPORT;
 
    Postconditions:
 
       None.
 
-7.9.1.  Example: Successful CALDAV:calendar-multiget Report
+7.9.1.  Example: Successful CALDAV:calendar-multiget Report
 
    In this example, the client requests the server to return specific
    properties of the VEVENT components referenced by specific URIs.  In
    addition the DAV:getetag property is also requested and returned as
    part of the response.  Note that in this example, the resource at
-   http://cal.example.com/bernard/work/mtg1.ics does not exist,
+   http://cal.example.com/bernard/work/mtg1.ics does not exist,
    resulting in an error status response.
 
    See Appendix B for the calendar data being targeted by this example.
 
-   >> Request <<
+   >> Request <<
 
    REPORT /bernard/work/ HTTP/1.1
    Host: cal.example.com
    Content-Type: application/xml; charset="utf-8"
    Content-Length: xxxx
 
-   
-   
-     
-       
-       
-     
-     /bernard/work/abcd1.ics
-     /bernard/work/mtg1.ics
-   
+   <?xml version="1.0" encoding="utf-8" ?>
+   <C:calendar-multiget xmlns:D="DAV:"
+                    xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:prop>
+       <D:getetag/>
+       <C:calendar-data/>
+     </D:prop>
+     <D:href>/bernard/work/abcd1.ics</D:href>
+     <D:href>/bernard/work/mtg1.ics</D:href>
+   </C:calendar-multiget>
 
-   >> Response <<
+   >> Response <<
 
    HTTP/1.1 207 Multi-Status
    Date: Fri, 11 Nov 2006 09:32:12 GMT
@@ -3581,21 +3638,21 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 64]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
    Content-Length: xxxx
 
-   
-   
-     
-       http://cal.example.com/bernard/work/abcd1.ics
-       
-         
-           "fffff-abcd1"
-           BEGIN:VCALENDAR
+   <?xml version="1.0" encoding="utf-8" ?>
+   <D:multistatus xmlns:D="DAV:"
+                  xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:response>
+       <D:href>http://cal.example.com/bernard/work/abcd1.ics</D:href>
+       <D:propstat>
+         <D:prop>
+           <D:getetag>"fffff-abcd1"</D:getetag>
+           <C:calendar-data>BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Example Corp.//CalDAV Client//EN
    BEGIN:VTIMEZONE
@@ -3625,26 +3682,26 @@ Internet-Draft                   CalDAV                   September 2006
    UID:74855313FA803DA593CD579A@example.com
    END:VEVENT
    END:VCALENDAR
-   
-         
-         HTTP/1.1 200 OK
-       
-     
-     
-       http://cal.example.com/bernard/work/mtg1.ics
-       HTTP/1.1 404 Not Found
+   </C:calendar-data>
+         </D:prop>
+         <D:status>HTTP/1.1 200 OK</D:status>
+       </D:propstat>
+     </D:response>
+     <D:response>
+       <D:href>http://cal.example.com/bernard/work/mtg1.ics</D:href>
+       <D:status>HTTP/1.1 404 Not Found</D:status>
 
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 65]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-     
-   
+     </D:response>
+   </D:multistatus>
 
-7.10.  CALDAV:free-busy-query Report
+7.10.  CALDAV:free-busy-query Report
 
    The CALDAV:free-busy-query REPORT generates a VFREEBUSY component
    containing free busy information for all the calendar object
@@ -3693,15 +3750,15 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 66]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
    Marshalling:
 
       The request body MUST be a CALDAV:free-busy-query XML element (see
-      Section 9.11, which MUST contain exactly one CALDAV:time-range XML
-      element, as defined in Section 9.9.
+      Section 9.11, which MUST contain exactly one CALDAV:time-range XML
+      element, as defined in Section 9.9.
 
       The request MAY include a Depth header.  If no Depth header is
       included, Depth:0 is assumed.
@@ -3749,11 +3806,11 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 67]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-7.10.1.  Example: Successful CALDAV:free-busy-query Report
+7.10.1.  Example: Successful CALDAV:free-busy-query Report
 
    In this example, the client requests the server to return free busy
    information on the calendar collection /bernard/work/, between 9:00
@@ -3763,7 +3820,7 @@ Internet-Draft                   CalDAV                   September 2006
 
    See Appendix B for the calendar data being targeted by this example.
 
-   >> Request <<
+   >> Request <<
 
    REPORT /bernard/work/ HTTP/1.1
    Host: cal.example.com
@@ -3771,13 +3828,13 @@ Internet-Draft                   CalDAV                   September 2006
    Content-Type: application/xml; charset="utf-8"
    Content-Length: xxxx
 
-   
-   
-     
-   
+   <?xml version="1.0" encoding="utf-8" ?>
+   <C:free-busy-query xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <C:time-range start="20060104T140000Z"
+                     end="20060105T220000Z"/>
+   </C:free-busy-query>
 
-   >> Response <<
+   >> Response <<
 
    HTTP/1.1 200 OK
    Date: Fri, 11 Nov 2006 09:32:12 GMT
@@ -3797,7 +3854,7 @@ Internet-Draft                   CalDAV                   September 2006
    END:VCALENDAR
 
 
-8.  Guidelines
+8.  Guidelines
 
 
 
@@ -3805,11 +3862,11 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 68]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-8.1.  Client-to-client Interoperability
+8.1.  Client-to-client Interoperability
 
    There are a number of actions clients can take which will be legal
    (the server will not return errors) but which can degrade
@@ -3823,7 +3880,7 @@ Internet-Draft                   CalDAV                   September 2006
    usage, interoperability problems are likely to be more evident in
    CalDAV use cases.
 
-8.2.  Synchronization Operations
+8.2.  Synchronization Operations
 
    WebDAV already provides functionality required to synchronize a
    collection or set of collections, make changes offline, and a simple
@@ -3831,11 +3888,11 @@ Internet-Draft                   CalDAV                   September 2006
    making this work, but these are not required of all WebDAV servers.
    Since offline functionality is more important to calendar
    applications than to some other WebDAV applications, CalDAV servers
-   MUST support ETags as specified in Section 5.3.4.
+   MUST support ETags as specified in Section 5.3.4.
 
-8.2.1.  Use of Reports
+8.2.1.  Use of Reports
 
-8.2.1.1.  Restrict the Time Range
+8.2.1.1.  Restrict the Time Range
 
    The REPORTs provided in CalDAV can be used by clients to optimize
    their performance in terms of network bandwidth usage, and resource
@@ -3851,7 +3908,7 @@ Internet-Draft                   CalDAV                   September 2006
    set of returned components to just those needed to populate the
    current view.
 
-8.2.1.2.  Synchronize by Time Range
+8.2.1.2.  Synchronize by Time Range
 
    Typically in a calendar, historical data (events, to-dos etc. that
    have completed prior to the current date) do not change, though they
@@ -3861,7 +3918,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 69]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -3872,7 +3929,7 @@ Internet-Draft                   CalDAV                   September 2006
    examined.  This "just-in-time" synchronization can minimize bandwidth
    for common user interaction behaviors.
 
-8.2.1.3.  Synchronization Process
+8.2.1.3.  Synchronization Process
 
    If a client wants to support calendar data synchronization, as
    opposed to downloading calendar data each time it is needed, it needs
@@ -3917,7 +3974,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 70]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -3927,21 +3984,21 @@ Internet-Draft                   CalDAV                   September 2006
    Content-Type: application/xml; charset="utf-8"
    Content-Length: xxxx
 
-   
-   
-     
-       
-     
-     
-       
-         
-           
-         
-       
-     
-   
+   <?xml version="1.0" encoding="utf-8" ?>
+   <C:calendar-query xmlns:D="DAV:"
+                     xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:prop>
+       <D:getetag/>
+     </D:prop>
+     <C:filter>
+       <C:comp-filter name="VCALENDAR">
+         <C:comp-filter name="VEVENT">
+           <C:time-range start="20040902T000000Z"
+                           end="20040903T000000Z"/>
+         </C:comp-filter>
+       </C:comp-filter>
+     </C:filter>
+   </C:calendar-query>
 
    The client then uses the results to determine which calendar object
    resources have changed, been created or deleted on the server and how
@@ -3956,16 +4013,16 @@ Internet-Draft                   CalDAV                   September 2006
    Content-Type: application/xml; charset="utf-8"
    Content-Length: xxxx
 
-   
-   
-     
-       
-       
-     
-     /bernard/work/abcd1.ics
-     /bernard/work/mtg1.ics
-   
+   <?xml version="1.0" encoding="utf-8" ?>
+   <C:calendar-multiget xmlns:D="DAV:"
+                        xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:prop>
+       <D:getetag/>
+       <C:calendar-data/>
+     </D:prop>
+     <D:href>/bernard/work/abcd1.ics</D:href>
+     <D:href>/bernard/work/mtg1.ics</D:href>
+   </C:calendar-multiget>
 
 
 
@@ -3973,11 +4030,11 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 71]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-8.2.2.  Restrict the Properties Returned
+8.2.2.  Restrict the Properties Returned
 
    Clients may not need all the calendar properties of a calendar object
    resource when presenting information to the user.  Since some
@@ -3992,7 +4049,7 @@ Internet-Draft                   CalDAV                   September 2006
    As a result the client will have to get the entire calendar object
    resource that is being changed.
 
-8.3.  Use of Locking
+8.3.  Use of Locking
 
    WebDAV locks can be used to prevent two clients modifying the same
    resource from either overwriting each others' changes (though that
@@ -4014,7 +4071,7 @@ Internet-Draft                   CalDAV                   September 2006
    means that if the client is unable to remove the lock, the other
    calendar users aren't prevented from making changes.
 
-8.4.  Finding calendars
+8.4.  Finding calendars
 
    Much of the time a calendar client (or agent) will discover a new
    calendar's location by being provided directly with the URL.  E.g., a
@@ -4029,7 +4086,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 72]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -4047,10 +4104,10 @@ Internet-Draft                   CalDAV                   September 2006
    calendar in the same repository, that calendar can be found by using
    the principal namespace required by WebDAV ACL support.  For other
    cases, the authors have no universal solution but implementers can
-   consider whether to use vCard [RFC2426] or LDAP [RFC4511] standards
-   together with calendar attributes [RFC2739].
+   consider whether to use vCard [RFC2426] or LDAP [RFC4511] standards
+   together with calendar attributes [RFC2739].
 
-   Because CalDAV requires servers to support WebDAV ACL [RFC3744]
+   Because CalDAV requires servers to support WebDAV ACL [RFC3744]
    including principal namespaces, and with the addition of the CALDAV:
    calendar-home-set property, there are a couple options for CalDAV
    clients to find one's own calendar or another user's calendar.
@@ -4060,14 +4117,14 @@ Internet-Draft                   CalDAV                   September 2006
    current user.  Using this, a WebDAV client can learn "who am I" and
    "where are my calendars".  The REPORT request body looks like this:
 
-   
-   
-     
-     
-       
-     
-   
+   <?xml version="1.0" encoding="utf-8" ?>
+   <D:principal-match xmlns:D="DAV:">
+     <D:self/>
+     <D:prop>
+       <C:calendar-home-set
+          xmlns:C="urn:ietf:params:xml:ns:caldav"/>
+     </D:prop>
+   </D:principal-match>
 
    To find other users calendars, the DAV:principal-property-search
    REPORT can be used to filter on some properties and return others.
@@ -4085,24 +4142,24 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 73]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-   
-   
-     
-       
-         
-       
-       Laurie
-     
-     
-       
-       
-     
-   
+   <?xml version="1.0" encoding="utf-8" ?>
+   <D:principal-property-search xmlns:D="DAV:">
+     <D:property-search>
+       <D:prop>
+         <D:displayname/>
+       </D:prop>
+       <D:match>Laurie</D:match>
+     </D:property-search>
+     <D:prop>
+       <C:calendar-home-set
+          xmlns:C="urn:ietf:params:xml:ns:caldav"/>
+       <D:displayname/>
+     </D:prop>
+   </D:principal-property-search>
 
    The server performs a case-sensitive or caseless search for a
    matching string subset of "Laurie" within the DAV:displayname
@@ -4110,16 +4167,16 @@ Internet-Draft                   CalDAV                   September 2006
    Desruisseaux" or "Wilfrid Laurier" all as matching DAV:displayname
    values, and the calendars for each of these.
 
-8.5.  Storing and Using Attachments
+8.5.  Storing and Using Attachments
 
    CalDAV clients MAY create attachments in calendar components either
    as inline or external.  This section contains some guidelines on
    creating and managing attachments.
 
-8.5.1.  Inline attachments
+8.5.1.  Inline attachments
 
    CalDAV clients MUST support inline attachments as specified in
-   iCalendar [RFC2445].  CalDAV servers MUST support inline attachments,
+   iCalendar [RFC2445].  CalDAV servers MUST support inline attachments,
    so clients can rely on being able to create attachments this way.  On
    the other hand, inline attachments have some drawbacks:
 
@@ -4127,10 +4184,10 @@ Internet-Draft                   CalDAV                   September 2006
       resources (i.e., refusing PUT requests of very large iCalendar
       objects).  Servers that do that MUST use the CALDAV:max-resource-
       size property on a calendar collection to inform the client as to
-      what the limitation is (see Section 5.2.5).
+      what the limitation is (see Section 5.2.5).
 
    o  Servers MAY impose storage quota limitations on calendar
-      collections (See [RFC4331]).
+      collections (See [RFC4331]).
 
    o  Any change to a calendar object resource containing an attachment
       requires the entire attachment to be re-uploaded.
@@ -4141,13 +4198,13 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 74]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
       attachment is unchanged.
 
-8.5.2.  External attachments
+8.5.2.  External attachments
 
    CalDAV clients SHOULD support downloading of external attachments
    referenced by arbitrary URI schemes, by either processing them
@@ -4197,7 +4254,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 75]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -4210,7 +4267,7 @@ Internet-Draft                   CalDAV                   September 2006
    access control mechanisms to provide partially satisfactory solutions
    to these kinds of problems.
 
-8.6.  Storing and Using Alarms
+8.6.  Storing and Using Alarms
 
    Note that all CalDAV calendar collections (including those which the
    user might treat as public or group calendars) can contain alarm
@@ -4253,7 +4310,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 76]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -4269,9 +4326,9 @@ Internet-Draft                   CalDAV                   September 2006
    public, group or resource calendars.
 
 
-9.  XML Element Definitions
+9.  XML Element Definitions
 
-9.1.  CALDAV:calendar XML Element
+9.1.  CALDAV:calendar XML Element
 
    Name: calendar
 
@@ -4279,13 +4336,13 @@ Internet-Draft                   CalDAV                   September 2006
 
    Purpose: Specifies the resource type of a calendar collection.
 
-   Description: See Section 4.2.
+   Description: See Section 4.2.
 
    Definition:
 
-         
+         <!ELEMENT calendar EMPTY>
 
-9.2.  CALDAV:mkcalendar XML Element
+9.2.  CALDAV:mkcalendar XML Element
 
    Name: mkcalendar
 
@@ -4294,13 +4351,13 @@ Internet-Draft                   CalDAV                   September 2006
    Purpose: Specifies a request that includes the WebDAV property values
       to be set for a calendar collection resource when it is created.
 
-   Description: See Section 5.3.1.
+   Description: See Section 5.3.1.
 
    Definition:
 
-         
+         <!ELEMENT mkcalendar (DAV:set)>
 
-9.3.  CALDAV:mkcalendar-response XML Element
+9.3.  CALDAV:mkcalendar-response XML Element
 
 
 
@@ -4309,7 +4366,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 77]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -4320,30 +4377,30 @@ Internet-Draft                   CalDAV                   September 2006
    Purpose: Specifies a response body for a successful MKCALENDAR
       request.
 
-   Description: See Section 5.3.1.
+   Description: See Section 5.3.1.
 
    Definition:
 
-         
+         <!ELEMENT mkcalendar-response ANY>
 
-9.4.  CALDAV:supported-collation XML Element
+9.4.  CALDAV:supported-collation XML Element
 
    Name: supported-collation
 
    Namespace: urn:ietf:params:xml:ns:caldav
 
    Purpose: Identifies a single collation via its collation identifier
-      as defined by [I-D.newman-i18n-comparator].
+      as defined by [I-D.newman-i18n-comparator].
 
    Description: The CALDAV:supported-collation contains the text of a
-      collation identifier as described in Section 7.5.1.
+      collation identifier as described in Section 7.5.1.
 
    Definition:
 
-         
+         <!ELEMENT supported-collation (#PCDATA)>
          PCDATA value: collation identifier
 
-9.5.  CALDAV:calendar-query XML Element
+9.5.  CALDAV:calendar-query XML Element
 
    Name: calendar-query
 
@@ -4351,13 +4408,13 @@ Internet-Draft                   CalDAV                   September 2006
 
    Purpose: Defines a REPORT for querying calendar object resources.
 
-   Description: See Section 7.8.
+   Description: See Section 7.8.
 
    Definition:
 
-         
+                                    DAV:prop)?, filter, timezone?)>
 
 
 
@@ -4365,11 +4422,11 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 78]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-9.6.  CALDAV:calendar-data XML Element
+9.6.  CALDAV:calendar-data XML Element
 
    Name: calendar-data
 
@@ -4414,14 +4471,14 @@ Internet-Draft                   CalDAV                   September 2006
 
    Note: The iCalendar data embedded within the CALDAV:calendar-data XML
       element MUST follow the standard XML character data encoding
-      rules, including use of <, >, & etc entity encoding or
-      the use of a  construct.  In the later case the
-      iCalendar data cannot contain the character sequence "]]>" which
+      rules, including use of &lt;, &gt;, &amp; etc entity encoding or
+      the use of a <![CDATA[ ... ]]> construct.  In the later case the
+      iCalendar data cannot contain the character sequence "]]>" which
 
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 79]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -4429,18 +4486,18 @@ Internet-Draft                   CalDAV                   September 2006
 
    Definition:
 
-         
+                                  #PCDATA)?>
          PCDATA value: iCalendar object
 
-         
-                                 version CDATA "2.0">
+         <!ATTLIST calendar-data content-type CDATA "text/calendar">
+                                 version CDATA "2.0">
          content-type value: a MIME media type
          version value: a version string
 
-9.6.1.  CALDAV:comp XML Element
+9.6.1.  CALDAV:comp XML Element
 
    Name: comp
 
@@ -4453,18 +4510,18 @@ Internet-Draft                   CalDAV                   September 2006
 
    Definition:
 
-         
+         <!ELEMENT comp ((allprop | prop*), (allcomp | comp*))>
 
-         
+         <!ATTLIST comp name CDATA #REQUIRED>
          name value: a calendar component name
 
    Note: The CALDAV:prop and CALDAV:allprop elements have the same name
-      as the DAV:prop and DAV:allprop elements defined in [RFC2518].
+      as the DAV:prop and DAV:allprop elements defined in [RFC2518].
       However, the CALDAV:prop and CALDAV:allprop element are defined in
       the "urn:ietf:params:xml:ns:caldav" namespace instead of the
       "DAV:" namespace.
 
-9.6.2.  CALDAV:allcomp XML Element
+9.6.2.  CALDAV:allcomp XML Element
 
    Name: allcomp
 
@@ -4477,7 +4534,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 80]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -4489,9 +4546,9 @@ Internet-Draft                   CalDAV                   September 2006
 
    Definition:
 
-         
+         <!ELEMENT allcomp EMPTY>
 
-9.6.3.  CALDAV:allprop XML Element
+9.6.3.  CALDAV:allprop XML Element
 
    Name: allprop
 
@@ -4505,14 +4562,14 @@ Internet-Draft                   CalDAV                   September 2006
 
    Definition:
 
-         
+         <!ELEMENT allprop EMPTY>
 
    Note: The CALDAV:allprop element has the same name as the DAV:allprop
-      element defined in [RFC2518].  However, the CALDAV:allprop element
+      element defined in [RFC2518].  However, the CALDAV:allprop element
       is defined in the "urn:ietf:params:xml:ns:caldav" namespace
       instead of the "DAV:" namespace.
 
-9.6.4.  CALDAV:prop XML Element
+9.6.4.  CALDAV:prop XML Element
 
    Name: prop
 
@@ -4533,25 +4590,25 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 81]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
    Definition:
 
-         
+         <!ELEMENT prop EMPTY>
 
-         
+         <!ATTLIST prop name CDATA #REQUIRED
+                     novalue (yes | no) "no">
          name value: a calendar property name
          novalue value: "yes" or "no"
 
    Note: The CALDAV:prop element has the same name as the DAV:prop
-      element defined in [RFC2518].  However, the CALDAV:prop element is
+      element defined in [RFC2518].  However, the CALDAV:prop element is
       defined in the "urn:ietf:params:xml:ns:caldav" namespace instead
       of the "DAV:" namespace.
 
-9.6.5.  CALDAV:expand XML Element
+9.6.5.  CALDAV:expand XML Element
 
    Name: expand
 
@@ -4589,18 +4646,18 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 82]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-         
+         <!ELEMENT expand EMPTY>
 
-         
+         <!ATTLIST expand start CDATA #REQUIRED
+                         end   CDATA #REQUIRED>
          start value: an iCalendar "date with UTC time"
          end value: an iCalendar "date with UTC time"
 
-9.6.6.  CALDAV:limit-recurrence-set XML Element
+9.6.6.  CALDAV:limit-recurrence-set XML Element
 
    Name: limit-recurrence-set
 
@@ -4635,21 +4692,21 @@ Internet-Draft                   CalDAV                   September 2006
 
    Definition:
 
-         
+         <!ELEMENT limit-recurrence-set EMPTY>
 
-         
+         <!ATTLIST limit-recurrence-set start CDATA #REQUIRED
+                                       end   CDATA #REQUIRED>
          start value: an iCalendar "date with UTC time"
          end value: an iCalendar "date with UTC time"
 
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 83]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-9.6.7.  CALDAV:limit-freebusy-set XML Element
+9.6.7.  CALDAV:limit-freebusy-set XML Element
 
    Name: limit-freebusy-set
 
@@ -4672,14 +4729,14 @@ Internet-Draft                   CalDAV                   September 2006
 
    Definition:
 
-         
+         <!ELEMENT limit-freebusy-set EMPTY>
 
-         
+         <!ATTLIST limit-freebusy-set start CDATA #REQUIRED
+                                     end   CDATA #REQUIRED>
          start value: an iCalendar "date with UTC time"
          end value: an iCalendar "date with UTC time"
 
-9.7.  CALDAV:filter XML Element
+9.7.  CALDAV:filter XML Element
 
    Name: filter
 
@@ -4694,18 +4751,18 @@ Internet-Draft                   CalDAV                   September 2006
 
    Definition:
 
-         
+         <!ELEMENT filter (comp-filter)>
 
 
 
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 84]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-9.7.1.  CALDAV:comp-filter XML Element
+9.7.1.  CALDAV:comp-filter XML Element
 
    Name: comp-filter
 
@@ -4731,13 +4788,13 @@ Internet-Draft                   CalDAV                   September 2006
 
    Definition:
 
-         
+         <!ELEMENT comp-filter (is-not-defined | (time-range?,
+                                prop-filter*, comp-filter*))>
 
-         
+         <!ATTLIST comp-filter name CDATA #REQUIRED>
          name value: a calendar component name (e.g., "VEVENT")
 
-9.7.2.  CALDAV:prop-filter XML Element
+9.7.2.  CALDAV:prop-filter XML Element
 
    Name: prop-filter
 
@@ -4757,7 +4814,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 85]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -4771,14 +4828,14 @@ Internet-Draft                   CalDAV                   September 2006
 
    Definition:
 
-         
+                                 param-filter*))>
 
-         
+         <!ATTLIST prop-filter name CDATA #REQUIRED>
          name value: a calendar property name (e.g., "ATTENDEE")
 
-9.7.3.  CALDAV:param-filter XML Element
+9.7.3.  CALDAV:param-filter XML Element
 
    Name: param-filter
 
@@ -4802,9 +4859,9 @@ Internet-Draft                   CalDAV                   September 2006
 
    Definition:
 
-         
+         <!ELEMENT param-filter (is-not-defined | text-match)?>
 
-         
+         <!ATTLIST param-filter name CDATA #REQUIRED>
          name value: a property parameter name (e.g., "PARTSTAT")
 
 
@@ -4813,11 +4870,11 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 86]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-9.7.4.  CALDAV:is-not-defined XML Element
+9.7.4.  CALDAV:is-not-defined XML Element
 
    Name: is-not-defined
 
@@ -4833,9 +4890,9 @@ Internet-Draft                   CalDAV                   September 2006
 
    Definition:
 
-         
+         <!ELEMENT is-not-defined EMPTY>
 
-9.7.5.  CALDAV:text-match XML Element
+9.7.5.  CALDAV:text-match XML Element
 
    Name: text-match
 
@@ -4869,17 +4926,17 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 87]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-         
+         <!ELEMENT text-match (#PCDATA)>
          PCDATA value: string
 
-         
+         <!ATTLIST text-match collation        CDATA "i;ascii-casemap"
+                              negate-condition (yes | no) "no">
 
-9.8.  CALDAV:timezone XML Element
+9.8.  CALDAV:timezone XML Element
 
    Name: timezone
 
@@ -4901,17 +4958,17 @@ Internet-Draft                   CalDAV                   September 2006
 
    Note: The iCalendar data embedded within the CALDAV:timezone XML
       element MUST follow the standard XML character data encoding
-      rules, including use of <, >, & etc entity encoding or
-      the use of a  construct.  In the later case the
-      iCalendar data cannot contain the character sequence "]]>" which
+      rules, including use of &lt;, &gt;, &amp; etc entity encoding or
+      the use of a <![CDATA[ ... ]]> construct.  In the later case the
+      iCalendar data cannot contain the character sequence "]]>" which
       is the end delimiter for the CDATA section.
 
    Definition:
 
-         
+         <!ELEMENT timezone (#PCDATA)>
          PCDATA value: an iCalendar object with exactly one VTIMEZONE
 
-9.9.  CALDAV:time-range XML Element
+9.9.  CALDAV:time-range XML Element
 
    Name: time-range
 
@@ -4925,7 +4982,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 88]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -4954,7 +5011,7 @@ Internet-Draft                   CalDAV                   September 2006
 
       A VEVENT component overlaps a given time range if the condition
       for the corresponding component state specified in the table below
-      is satisfied.  Note that as specified in [RFC2445] the DTSTART
+      is satisfied.  Note that as specified in [RFC2445] the DTSTART
       property is REQUIRED in the VEVENT component.  The conditions
       depend on the presence of the DTEND and DURATION properties in the
       VEVENT component.  Furthermore, the value of the DTEND property
@@ -4981,7 +5038,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 89]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -4996,22 +5053,22 @@ Internet-Draft                   CalDAV                   September 2006
       |   |   |   |   +-----------------------------------------------+
       |   |   |   |   | Condition to evaluate                         |
       +---+---+---+---+-----------------------------------------------+
-      | Y | N | N | * | (start <  DTEND AND end > DTSTART)            |
+      | Y | N | N | * | (start <  DTEND AND end > DTSTART)            |
       +---+---+---+---+-----------------------------------------------+
-      | N | Y | Y | * | (start <  DTSTART+DURATION AND end > DTSTART) |
+      | N | Y | Y | * | (start <  DTSTART+DURATION AND end > DTSTART) |
       |   |   +---+---+-----------------------------------------------+
-      |   |   | N | * | (start <= DTSTART AND end > DTSTART)          |
+      |   |   | N | * | (start <= DTSTART AND end > DTSTART)          |
       +---+---+---+---+-----------------------------------------------+
-      | N | N | N | Y | (start <= DTSTART AND end > DTSTART)          |
+      | N | N | N | Y | (start <= DTSTART AND end > DTSTART)          |
       +---+---+---+---+-----------------------------------------------+
-      | N | N | N | N | (start <  DTSTART+P1D AND end > DTSTART)      |
+      | N | N | N | N | (start <  DTSTART+P1D AND end > DTSTART)      |
       +---+---+---+---+-----------------------------------------------+
 
       A VTODO component is said to overlap a given time range if the
       condition for the corresponding component state specified in the
       table below is satisfied.  The conditions depend on the presence
       of the DTSTART, DURATION, DUE, COMPLETED and CREATED properties in
-      the VTODO component.  Note that as specified in [RFC2445] the DUE
+      the VTODO component.  Note that as specified in [RFC2445] the DUE
       value MUST be a DATE-TIME value equal to or after the DTSTART
       value, if specified.
 
@@ -5037,7 +5094,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 90]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -5054,25 +5111,25 @@ Internet-Draft                   CalDAV                   September 2006
    |   |   |   |   |   +-----------------------------------------------+
    |   |   |   |   |   | Condition to evaluate                         |
    +---+---+---+---+---+-----------------------------------------------+
-   | Y | Y | N | * | * | (start  <= DTSTART+DURATION)  AND             |
-   |   |   |   |   |   | ((end   >  DTSTART)  OR                       |
-   |   |   |   |   |   |  (end   >= DTSTART+DURATION))                 |
+   | Y | Y | N | * | * | (start  <= DTSTART+DURATION)  AND             |
+   |   |   |   |   |   | ((end   >  DTSTART)  OR                       |
+   |   |   |   |   |   |  (end   >= DTSTART+DURATION))                 |
    +---+---+---+---+---+-----------------------------------------------+
-   | Y | N | Y | * | * | ((start <  DUE)      OR  (start <= DTSTART))  |
+   | Y | N | Y | * | * | ((start <  DUE)      OR  (start <= DTSTART))  |
    |   |   |   |   |   | AND                                           |
-   |   |   |   |   |   | ((end   >  DTSTART)  OR  (end   >= DUE))      |
+   |   |   |   |   |   | ((end   >  DTSTART)  OR  (end   >= DUE))      |
    +---+---+---+---+---+-----------------------------------------------+
-   | Y | N | N | * | * | (start  <= DTSTART)  AND (end >  DTSTART)     |
+   | Y | N | N | * | * | (start  <= DTSTART)  AND (end >  DTSTART)     |
    +---+---+---+---+---+-----------------------------------------------+
-   | N | N | Y | * | * | (start  <  DUE)      AND (end >= DUE)         |
+   | N | N | Y | * | * | (start  <  DUE)      AND (end >= DUE)         |
    +---+---+---+---+---+-----------------------------------------------+
-   | N | N | N | Y | Y | ((start <= CREATED)  OR  (start <= COMPLETED))|
+   | N | N | N | Y | Y | ((start <= CREATED)  OR  (start <= COMPLETED))|
    |   |   |   |   |   | AND                                           |
-   |   |   |   |   |   | ((end   >= CREATED)  OR  (end   >= COMPLETED))|
+   |   |   |   |   |   | ((end   >= CREATED)  OR  (end   >= COMPLETED))|
    +---+---+---+---+---+-----------------------------------------------+
-   | N | N | N | Y | N | (start  <= COMPLETED) AND (end  >= COMPLETED) |
+   | N | N | N | Y | N | (start  <= COMPLETED) AND (end  >= COMPLETED) |
    +---+---+---+---+---+-----------------------------------------------+
-   | N | N | N | N | Y | (end    >  CREATED)                           |
+   | N | N | N | N | Y | (end    >  CREATED)                           |
    +---+---+---+---+---+-----------------------------------------------+
    | N | N | N | N | N | TRUE                                          |
    +---+---+---+---+---+-----------------------------------------------+
@@ -5093,7 +5150,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 91]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -5104,9 +5161,9 @@ Internet-Draft                   CalDAV                   September 2006
       |   |   +--------------------------------------------+
       |   |   | Condition to evaluate                      |
       +---+---+--------------------------------------------+
-      | Y | Y | (start <= DTSTART)     AND (end > DTSTART) |
+      | Y | Y | (start <= DTSTART)     AND (end > DTSTART) |
       +---+---+--------------------------------------------+
-      | Y | N | (start <  DTSTART+P1D) AND (end > DTSTART) |
+      | Y | N | (start <  DTSTART+P1D) AND (end > DTSTART) |
       +---+---+--------------------------------------------+
       | N | * | FALSE                                      |
       +---+---+--------------------------------------------+
@@ -5133,10 +5190,10 @@ Internet-Draft                   CalDAV                   September 2006
       |   |   +----------------------------------------------+
       |   |   | Condition to evaluate                        |
       +---+---+----------------------------------------------+
-      | Y | * | (start <= DTEND) AND (end > DTSTART)         |
+      | Y | * | (start <= DTEND) AND (end > DTSTART)         |
       +---+---+----------------------------------------------+
-      | N | Y | (start <  freebusy-period-end) AND           |
-      |   |   | (end   >  freebusy-period-start)             |
+      | N | Y | (start <  freebusy-period-end) AND           |
+      |   |   | (end   >  freebusy-period-start)             |
       +---+---+----------------------------------------------+
       | N | N | FALSE                                        |
       +---+---+----------------------------------------------+
@@ -5149,14 +5206,14 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 92]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
       A VALARM component is said to overlap a given time range if the
       following condition holds:
 
-         (start <= trigger-time) AND (end > trigger-time)
+         (start <= trigger-time) AND (end > trigger-time)
 
       A VALARM component can be defined such that it triggers
       repeatedly.  Such a VALARM component is said to overlap a given
@@ -5167,7 +5224,7 @@ Internet-Draft                   CalDAV                   September 2006
       DTSTART, DUE and LAST-MODIFIED overlap a given time range if the
       following condition holds:
 
-          (start <= date-time) AND (end > date-time)
+          (start <= date-time) AND (end > date-time)
 
       Note that if DTEND is not present in a VEVENT, but DURATION is,
       then the test should instead operate on the 'effective' DTEND,
@@ -5180,14 +5237,14 @@ Internet-Draft                   CalDAV                   September 2006
 
    Definition:
 
-         
+         <!ELEMENT time-range EMPTY>
 
-         
+         <!ATTLIST time-range start CDATA #IMPLIED
+                             end   CDATA #IMPLIED>
          start value: an iCalendar "date with UTC time"
          end value: an iCalendar "date with UTC time"
 
-9.10.  CALDAV:calendar-multiget XML Element
+9.10.  CALDAV:calendar-multiget XML Element
 
    Name: calendar-multiget
 
@@ -5196,7 +5253,7 @@ Internet-Draft                   CalDAV                   September 2006
    Purpose: CalDAV REPORT used to retrieve specific calendar object
       resources.
 
-   Description: See Section 7.9.
+   Description: See Section 7.9.
 
 
 
@@ -5205,17 +5262,17 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 93]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
    Definition:
 
-         
+                                      DAV:prop)?, DAV:href+)>
 
-9.11.  CALDAV:free-busy-query XML Element
+9.11.  CALDAV:free-busy-query XML Element
 
    Name: free-busy-query
 
@@ -5224,29 +5281,29 @@ Internet-Draft                   CalDAV                   September 2006
    Purpose: CalDAV REPORT used to generate a VFREEBUSY to determine busy
       time over a specific time range.
 
-   Description: See Section 7.10.
+   Description: See Section 7.10.
 
    Definition:
 
-         
+         <!ELEMENT free-busy-query (time-range)>
 
 
-10.  Internationalization Considerations
+10.  Internationalization Considerations
 
    CalDAV allows internationalized strings to be stored and retrieved
-   for the description of calendar collections (see Section 5.2.1).
+   for the description of calendar collections (see Section 5.2.1).
 
-   The CALDAV:calendar-query report (Section 7.8) includes a text
+   The CALDAV:calendar-query report (Section 7.8) includes a text
    searching option controlled by the CALDAV:text-match element and
    details of character handling are covered in the description of that
-   element (see Section 9.7.5).
+   element (see Section 9.7.5).
 
 
-11.  Security Considerations
+11.  Security Considerations
 
    HTTP protocol transactions are sent in the clear over the network
    unless protection from snooping is negotiated.  This can be
-   accomplished by use of TLS as defined in [RFC2818].  In particular,
+   accomplished by use of TLS as defined in [RFC2818].  In particular,
    HTTP Basic authentication MUST NOT be used unless TLS is in effect.
 
    Servers MUST take adequate precautions to ensure malicious clients
@@ -5261,7 +5318,7 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 94]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -5287,20 +5344,20 @@ Internet-Draft                   CalDAV                   September 2006
    agent.  Clients and servers are not required to execute such
    procedure alarms.
 
-   Security considerations described in iCalendar [RFC2445] and iTIP
-   [RFC2446] are also applicable to CalDAV.
+   Security considerations described in iCalendar [RFC2445] and iTIP
+   [RFC2446] are also applicable to CalDAV.
 
    Beyond these, CalDAV does not raise any security considerations that
-   are not present in HTTP [RFC2616] and WebDAV [RFC2518], [RFC3253],
-   [RFC3744], as discussed in those documents.
+   are not present in HTTP [RFC2616] and WebDAV [RFC2518], [RFC3253],
+   [RFC3744], as discussed in those documents.
 
 
-12.  IANA Consideration
+12.  IANA Consideration
 
    This document uses one new URN to identify a new XML namespace.  The
-   URN conforms to a registry mechanism described in [RFC3688].
+   URN conforms to a registry mechanism described in [RFC3688].
 
-12.1.  Namespace Registration
+12.1.  Namespace Registration
 
    Registration request for the CalDAV namespace:
 
@@ -5317,11 +5374,11 @@ Internet-Draft                   CalDAV                   September 2006
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 95]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-13.  Acknowledgements
+13.  Acknowledgements
 
    The authors would like to thank the following individuals for
    contributing their ideas and support for writing this specification:
@@ -5336,100 +5393,100 @@ Internet-Draft                   CalDAV                   September 2006
    interoperability testing events to help refine it.
 
 
-14.  References
+14.  References
 
-14.1.  Normative References
+14.1.  Normative References
 
-   [I-D.newman-i18n-comparator]
+   [I-D.newman-i18n-comparator]
               Newman, C., "Internet Application Protocol Collation
-              Registry", draft-newman-i18n-comparator-13 (work in
+              Registry", draft-newman-i18n-comparator-13 (work in
               progress), August 2006.
 
-   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
-              Requirement Levels", BCP 14, RFC 2119, March 1997.
+   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
+              Requirement Levels", BCP 14, RFC 2119, March 1997.
 
-   [RFC2246]  Dierks, T. and C. Allen, "The TLS Protocol Version 1.0",
-              RFC 2246, January 1999.
+   [RFC2246]  Dierks, T. and C. Allen, "The TLS Protocol Version 1.0",
+              RFC 2246, January 1999.
 
-   [RFC2445]  Dawson, F. and Stenerson, D., "Internet Calendaring and
+   [RFC2445]  Dawson, F. and Stenerson, D., "Internet Calendaring and
               Scheduling Core Object Specification (iCalendar)",
-              RFC 2445, November 1998.
+              RFC 2445, November 1998.
 
-   [RFC2446]  Silverberg, S., Mansour, S., Dawson, F., and R. Hopson,
+   [RFC2446]  Silverberg, S., Mansour, S., Dawson, F., and R. Hopson,
               "iCalendar Transport-Independent Interoperability Protocol
               (iTIP) Scheduling Events, BusyTime, To-dos and Journal
-              Entries", RFC 2446, November 1998.
+              Entries", RFC 2446, November 1998.
 
-   [RFC2518]  Goland, Y., Whitehead, E., Faizi, A., Carter, S., and D.
+   [RFC2518]  Goland, Y., Whitehead, E., Faizi, A., Carter, S., and D.
               Jensen, "HTTP Extensions for Distributed Authoring --
-              WEBDAV", RFC 2518, February 1999.
+              WEBDAV", RFC 2518, February 1999.
 
-   [RFC2616]  Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
+   [RFC2616]  Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
               Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
-              Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
+              Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
 
-   [RFC2818]  Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000.
+   [RFC2818]  Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000.
 
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 96]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-   [RFC3253]  Clemm, G., Amsden, J., Ellison, T., Kaler, C., and J.
+   [RFC3253]  Clemm, G., Amsden, J., Ellison, T., Kaler, C., and J.
               Whitehead, "Versioning Extensions to WebDAV (Web
-              Distributed Authoring and Versioning)", RFC 3253,
+              Distributed Authoring and Versioning)", RFC 3253,
               March 2002.
 
-   [RFC3688]  Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
+   [RFC3688]  Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
               January 2004.
 
-   [RFC3744]  Clemm, G., Reschke, J., Sedlar, E., and J. Whitehead, "Web
+   [RFC3744]  Clemm, G., Reschke, J., Sedlar, E., and J. Whitehead, "Web
               Distributed Authoring and Versioning (WebDAV) Access
-              Control Protocol", RFC 3744, May 2004.
+              Control Protocol", RFC 3744, May 2004.
 
-   [RFC4346]  Dierks, T. and E. Rescorla, "The Transport Layer Security
-              (TLS) Protocol Version 1.1", RFC 4346, April 2006.
+   [RFC4346]  Dierks, T. and E. Rescorla, "The Transport Layer Security
+              (TLS) Protocol Version 1.1", RFC 4346, April 2006.
 
-   [W3C.REC-xml-20060816]
+   [W3C.REC-xml-20060816]
               Yergeau, F., Paoli, J., Bray, T., Sperberg-McQueen, C.,
               and E. Maler, "Extensible Markup Language (XML) 1.0
               (Fourth Edition)", World Wide Web Consortium
               Recommendation REC-xml-20060816, August 2006,
-              .
+              <http://www.w3.org/TR/2006/REC-xml-20060816>.
 
-14.2.  Informative References
+14.2.  Informative References
 
-   [I-D.ietf-webdav-rfc2518bis]
+   [I-D.ietf-webdav-rfc2518bis]
               Dusseault, L., "HTTP Extensions for Distributed Authoring
-              - WebDAV", draft-ietf-webdav-rfc2518bis-15 (work in
+              - WebDAV", draft-ietf-webdav-rfc2518bis-15 (work in
               progress), May 2006.
 
-   [RFC2426]  Dawson, F. and T. Howes, "vCard MIME Directory Profile",
-              RFC 2426, September 1998.
+   [RFC2426]  Dawson, F. and T. Howes, "vCard MIME Directory Profile",
+              RFC 2426, September 1998.
 
-   [RFC2739]  Small, T., Hennessy, D., and F. Dawson, "Calendar
-              Attributes for vCard and LDAP", RFC 2739, January 2000.
+   [RFC2739]  Small, T., Hennessy, D., and F. Dawson, "Calendar
+              Attributes for vCard and LDAP", RFC 2739, January 2000.
 
-   [RFC4331]  Korver, B. and L. Dusseault, "Quota and Size Properties
+   [RFC4331]  Korver, B. and L. Dusseault, "Quota and Size Properties
               for Distributed Authoring and Versioning (DAV)
-              Collections", RFC 4331, February 2006.
+              Collections", RFC 4331, February 2006.
 
-   [RFC4511]  Sermersheim, J., "Lightweight Directory Access Protocol
-              (LDAP): The Protocol", RFC 4511, June 2006.
+   [RFC4511]  Sermersheim, J., "Lightweight Directory Access Protocol
+              (LDAP): The Protocol", RFC 4511, June 2006.
 
 
 Appendix A.  CalDAV Method Privilege Table (Normative)
 
    The following table extends the WebDAV Method Privilege Table
-   specified in Appendix B of [RFC3744].
+   specified in Appendix B of [RFC3744].
 
 
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 97]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -5451,7 +5508,7 @@ Appendix B.  Calendar collections used in the examples
    returned by a CALDAV:calendar-query REPORT request designed to return
    all the calendar data in the collection:
 
-   >> Request <<
+   >> Request <<
 
    REPORT /bernard/work/ HTTP/1.1
    Host: cal.example.com
@@ -5459,45 +5516,45 @@ Appendix B.  Calendar collections used in the examples
    Content-Type: application/xml; charset="utf-8"
    Content-Length: xxxx
 
-   
-   
-    
-      
-      
-    
-    
-      
-        
-        
-      
-    
-   
+   <?xml version="1.0" encoding="utf-8" ?>
+   <C:calendar-query xmlns:D="DAV:"
+                    xmlns:C="urn:ietf:params:xml:ns:caldav">
+    <D:prop>
+      <D:getetag/>
+      <C:calendar-data/>
+    </D:prop>
+    <C:filter>
+      <C:comp-filter name="VCALENDAR">
+        <C:allprop/>
+        <C:allcomp/>
+      </C:comp-filter>
+    </C:filter>
+   </C:calendar-query>
 
-   >> Response <<
+   >> Response <<
 
    HTTP/1.1 207 Multi-Status
    Content-Type: application/xml; charset="utf-8"
    Content-Length: xxxx
 
-   
+   <?xml version="1.0" encoding="utf-8" ?>
 
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 98]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-   
+   <D:multistatus xmlns:D="DAV:"
+                 xmlns:C="urn:ietf:params:xml:ns:caldav">
 
-     
-       http://cal.example.com/bernard/work/abcd1.ics
-       
-         
-           "fffff-abcd1"
-           BEGIN:VCALENDAR
+     <D:response>
+       <D:href>http://cal.example.com/bernard/work/abcd1.ics</D:href>
+       <D:propstat>
+         <D:prop>
+           <D:getetag>"fffff-abcd1"</D:getetag>
+           <C:calendar-data>BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Example Corp.//CalDAV Client//EN
    BEGIN:VTIMEZONE
@@ -5527,26 +5584,26 @@ Internet-Draft                   CalDAV                   September 2006
    UID:74855313FA803DA593CD579A@example.com
    END:VEVENT
    END:VCALENDAR
-   
-         
-         HTTP/1.1 200 OK
-       
-     
+   </C:calendar-data>
+         </D:prop>
+         <D:status>HTTP/1.1 200 OK</D:status>
+       </D:propstat>
+     </D:response>
 
-     
-       http://cal.example.com/bernard/work/abcd2.ics
-       
-         
+     <D:response>
+       <D:href>http://cal.example.com/bernard/work/abcd2.ics</D:href>
+       <D:propstat>
+         <D:prop>
 
 
 
 Daboo, et al.            Expires March 17, 2007                [Page 99]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-           "fffff-abcd2"
-           BEGIN:VCALENDAR
+           <D:getetag>"fffff-abcd2"</D:getetag>
+           <C:calendar-data>BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Example Corp.//CalDAV Client//EN
    BEGIN:VTIMEZONE
@@ -5584,26 +5641,26 @@ Internet-Draft                   CalDAV                   September 2006
    UID:00959BC664CA650E933C892C@example.com
    END:VEVENT
    END:VCALENDAR
-   
-         
-         HTTP/1.1 200 OK
-       
-     
+   </C:calendar-data>
+         </D:prop>
+         <D:status>HTTP/1.1 200 OK</D:status>
+       </D:propstat>
+     </D:response>
 
-     
-       http://cal.example.com/bernard/work/abcd3.ics
-       
+     <D:response>
+       <D:href>http://cal.example.com/bernard/work/abcd3.ics</D:href>
+       <D:propstat>
 
 
 
 Daboo, et al.            Expires March 17, 2007               [Page 100]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-         
-           "fffff-abcd3"
-           BEGIN:VCALENDAR
+         <D:prop>
+           <D:getetag>"fffff-abcd3"</D:getetag>
+           <C:calendar-data>BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Example Corp.//CalDAV Client//EN
    BEGIN:VTIMEZONE
@@ -5638,26 +5695,26 @@ Internet-Draft                   CalDAV                   September 2006
    UID:DC6C50A017428C5216A2F1CD@example.com
    END:VEVENT
    END:VCALENDAR
-   
-         
-         HTTP/1.1 200 OK
-       
-     
+   </C:calendar-data>
+         </D:prop>
+         <D:status>HTTP/1.1 200 OK</D:status>
+       </D:propstat>
+     </D:response>
 
-     
-       http://cal.example.com/bernard/work/abcd4.ics
-       
-         
-           "fffff-abcd4"
+     <D:response>
+       <D:href>http://cal.example.com/bernard/work/abcd4.ics</D:href>
+       <D:propstat>
+         <D:prop>
+           <D:getetag>"fffff-abcd4"</D:getetag>
 
 
 
 Daboo, et al.            Expires March 17, 2007               [Page 101]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-           BEGIN:VCALENDAR
+           <C:calendar-data>BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Example Corp.//CalDAV Client//EN
    BEGIN:VTODO
@@ -5672,18 +5729,18 @@ Internet-Draft                   CalDAV                   September 2006
    END:VALARM
    END:VTODO
    END:VCALENDAR
-   
-         
-         HTTP/1.1 200 OK
-       
-     
+   </C:calendar-data>
+         </D:prop>
+         <D:status>HTTP/1.1 200 OK</D:status>
+       </D:propstat>
+     </D:response>
 
-     
-       http://cal.example.com/bernard/work/abcd5.ics
-       
-         
-           "fffff-abcd5"
-           BEGIN:VCALENDAR
+     <D:response>
+       <D:href>http://cal.example.com/bernard/work/abcd5.ics</D:href>
+       <D:propstat>
+         <D:prop>
+           <D:getetag>"fffff-abcd5"</D:getetag>
+           <C:calendar-data>BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Example Corp.//CalDAV Client//EN
    BEGIN:VTODO
@@ -5700,25 +5757,25 @@ Internet-Draft                   CalDAV                   September 2006
    END:VALARM
    END:VTODO
    END:VCALENDAR
-   
-         
-         HTTP/1.1 200 OK
-       
-     
+   </C:calendar-data>
+         </D:prop>
+         <D:status>HTTP/1.1 200 OK</D:status>
+       </D:propstat>
+     </D:response>
 
 
 
 Daboo, et al.            Expires March 17, 2007               [Page 102]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-     
-       http://cal.example.com/bernard/work/abcd6.ics
-       
-         
-           "fffff-abcd6"
-           BEGIN:VCALENDAR
+     <D:response>
+       <D:href>http://cal.example.com/bernard/work/abcd6.ics</D:href>
+       <D:propstat>
+         <D:prop>
+           <D:getetag>"fffff-abcd6"</D:getetag>
+           <C:calendar-data>BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Example Corp.//CalDAV Client//EN
    BEGIN:VTODO
@@ -5732,18 +5789,18 @@ Internet-Draft                   CalDAV                   September 2006
    UID:E10BA47467C5C69BB74E8722@example.com
    END:VTODO
    END:VCALENDAR
-   
-         
-         HTTP/1.1 200 OK
-       
-     
+   </C:calendar-data>
+         </D:prop>
+         <D:status>HTTP/1.1 200 OK</D:status>
+       </D:propstat>
+     </D:response>
 
-     
-       http://cal.example.com/bernard/work/abcd7.ics
-       
-         
-           "fffff-abcd7"
-           BEGIN:VCALENDAR
+     <D:response>
+       <D:href>http://cal.example.com/bernard/work/abcd7.ics</D:href>
+       <D:propstat>
+         <D:prop>
+           <D:getetag>"fffff-abcd7"</D:getetag>
+           <C:calendar-data>BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Example Corp.//CalDAV Client//EN
    BEGIN:VTODO
@@ -5756,25 +5813,25 @@ Internet-Draft                   CalDAV                   September 2006
    UID:E10BA47467C5C69BB74E8725@example.com
    END:VTODO
    END:VCALENDAR
-   
-         
-         HTTP/1.1 200 OK
-       
-     
+   </C:calendar-data>
+         </D:prop>
+         <D:status>HTTP/1.1 200 OK</D:status>
+       </D:propstat>
+     </D:response>
 
 
 
 Daboo, et al.            Expires March 17, 2007               [Page 103]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
-     
-       http://cal.example.com/bernard/work/abcd8.ics
-       
-         
-           "fffff-abcd8"
-           BEGIN:VCALENDAR
+     <D:response>
+       <D:href>http://cal.example.com/bernard/work/abcd8.ics</D:href>
+       <D:propstat>
+         <D:prop>
+           <D:getetag>"fffff-abcd8"</D:getetag>
+           <C:calendar-data>BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Example Corp.//CalDAV Client//EN
    BEGIN:VFREEBUSY
@@ -5791,13 +5848,13 @@ Internet-Draft                   CalDAV                   September 2006
    FREEBUSY:20060106T100000Z/20060106T120000Z
    END:VFREEBUSY
    END:VCALENDAR
-   
-         
-         HTTP/1.1 200 OK
-       
-     
+   </C:calendar-data>
+         </D:prop>
+         <D:status>HTTP/1.1 200 OK</D:status>
+       </D:propstat>
+     </D:response>
 
-   
+   </D:multistatus>
 
 
 Appendix C.  Changes (to be removed prior to publication as an RFC)
@@ -5821,7 +5878,7 @@ C.1.  Changes in -15
 
 
 Daboo, et al.            Expires March 17, 2007               [Page 104]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -5839,16 +5896,16 @@ C.2.  Changes in -14
    b.  Reinserted section describing preconditions/postconditions.
 
    c.  Removed redundant compliance statement in last paragraph of
-       Section 3.
+       Section 3.
 
    d.  Clarify that only text/calendar is allowed if supported-calendar-
        data property is not present.
 
    e.  Removed redundant compliance statement in Conformance paragraph
-       of Section 6.2.1.
+       of Section 6.2.1.
 
    f.  Removed redundant compliance statement in first paragraph of
-       Section 7.5.
+       Section 7.5.
 
    g.  Fixed incorrect whitespace in elements in example in Section
        7.7.6.
@@ -5870,14 +5927,14 @@ C.3.  Changes in -13
    e.  Changed 'undefined' to 'not specified here' in ETag behavior
        section.
 
-   f.  Added reference to RFC4346 with note that it obsoletes RFC2246
+   f.  Added reference to RFC4346 with note that it obsoletes RFC2246
 
 
 
 
 
 Daboo, et al.            Expires March 17, 2007               [Page 105]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -5913,11 +5970,11 @@ C.5.  Changes in -11
    g.  Now require 2518bis Class 3 behaviour.
 
    h.  Fixed indentation in examples and removed bogus whitespace before
-        tags.
+       </C:calendar-data> tags.
 
-   i.  Fixed  typo.
+   i.  Fixed </C:calendar-data/> typo.
 
-   j.  Added text to  element definition as a reminder
+   j.  Added text to <C:calendar-data> element definition as a reminder
        about the need to do XML character data encoding on any iCalendar
        data within that element.
 
@@ -5933,7 +5990,7 @@ C.5.  Changes in -11
 
 
 Daboo, et al.            Expires March 17, 2007               [Page 106]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -5989,7 +6046,7 @@ C.6.  Changes in -10
 
 
 Daboo, et al.            Expires March 17, 2007               [Page 107]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -6045,7 +6102,7 @@ C.7.  Changes in -09
 
 
 Daboo, et al.            Expires March 17, 2007               [Page 108]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -6101,7 +6158,7 @@ C.8.  Changes in -08
 
 
 Daboo, et al.            Expires March 17, 2007               [Page 109]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -6157,7 +6214,7 @@ C.9.  Changes in -07
 
 
 Daboo, et al.            Expires March 17, 2007               [Page 110]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -6167,7 +6224,7 @@ Internet-Draft                   CalDAV                   September 2006
    g.  Modified calendar-data XML element to support the attributes
        content-type and version.
 
-   h.  Reorganised sections 3, 4, 5 & 6 into two sections and re-ordered
+   h.  Reorganised sections 3, 4, 5 & 6 into two sections and re-ordered
        sub-sections.
 
    i.  Added comment about client not setting a duplicate displayname.
@@ -6213,7 +6270,7 @@ C.11.  Changes in -05
 
 
 Daboo, et al.            Expires March 17, 2007               [Page 111]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -6269,7 +6326,7 @@ C.12.  Changes in -04
 
 
 Daboo, et al.            Expires March 17, 2007               [Page 112]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -6325,7 +6382,7 @@ C.15.  Changes in -01
 
 
 Daboo, et al.            Expires March 17, 2007               [Page 113]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -6338,7 +6395,7 @@ Authors' Addresses
    USA
 
    Email: cyrus@daboo.name
-   URI:   http://www.apple.com/
+   URI:   http://www.apple.com/
 
 
    Bernard Desruisseaux
@@ -6349,7 +6406,7 @@ Authors' Addresses
    CA
 
    Email: bernard.desruisseaux@oracle.com
-   URI:   http://www.oracle.com/
+   URI:   http://www.oracle.com/
 
 
    Lisa Dusseault
@@ -6359,7 +6416,7 @@ Authors' Addresses
    US
 
    Email: lisa@osafoundation.org
-   URI:   http://www.osafoundation.org/
+   URI:   http://www.osafoundation.org/
 
 
 
@@ -6381,7 +6438,7 @@ Authors' Addresses
 
 
 Daboo, et al.            Expires March 17, 2007               [Page 114]
-
+
 Internet-Draft                   CalDAV                   September 2006
 
 
@@ -6401,7 +6458,7 @@ Intellectual Property Statement
    attempt made to obtain a general license or permission for the use of
    such proprietary rights by implementers or users of this
    specification can be obtained from the IETF on-line IPR repository at
-   http://www.ietf.org/ipr.
+   http://www.ietf.org/ipr.
 
    The IETF invites any interested party to bring to its attention any
    copyrights, patents or patent applications, or other proprietary
@@ -6438,3 +6495,8 @@ Acknowledgment
 
 Daboo, et al.            Expires March 17, 2007               [Page 115]
 
+
+
+


+ + diff --git a/htdocs/caldav.php b/htdocs/caldav.php index 2b303985..d9b6f337 100644 --- a/htdocs/caldav.php +++ b/htdocs/caldav.php @@ -1,5 +1,6 @@ LoginRequired(); + require_once("interactive-page.php"); + + require_once("RSCDSUser.php"); + + $user_no = intval(isset($_POST['user_no']) ? $_POST['user_no'] : $_GET['user_no'] ); + $user = new RSCDSUser($user_no); + if ( $user->user_no == 0 ) { + $c->page_title = ( $user_no != "" ? "User Unavailable" : "New User" ); + } + else { + $c->page_title = sprintf("%s (%s)", $user->Get("fullname"), $user->Get("username")); + } + $show = 0; + + if ( !$session->just_logged_in && isset($_POST['submit']) ) { + if ( $session->AllowedTo("Admin") || $session->AllowedTo("Support") + || ($user->user_no > 0 && $user->user_no == $session->user_no) ) { + $session->Log( "DBG: Record %s write type is %s.", $user->Table, $user->WriteType ); + $user->PostToValues(); + if ( $user->Validate() ) { + $user->Write(); + $user = new User($user->user_no); + $user->EditMode = true; + if ( $user->user_no == 0 ) { + $c->page_title = ( $user_no != "" ? "User Unavailable" : "New User" ); + } + else { + $c->page_title = $user->Get("user_no"). " - " . $user->Get("fullname"); + } + } + } + } + + if ( $session->AllowedTo("Admin") ) + $user_menu->AddOption("New User","/user.php?create","Add a new user", false, 10); + if ( $user->user_no > 0 && $user->AllowedTo('update') ) { + $user_menu->AddOption("View","/user.php?user_no=$user->user_no","View this user record"); + $user_menu->AddOption("Edit","/user.php?edit=1&user_no=$user->user_no","Edit this user record"); + } + + include("page-header.php"); + echo $user->Render($c->page_title); + include("page-footer.php"); +?> \ No newline at end of file diff --git a/htdocs/users.php b/htdocs/users.php index 54e10a1f..88cfd3fc 100644 --- a/htdocs/users.php +++ b/htdocs/users.php @@ -28,7 +28,7 @@ require_once("interactive-page.php"); $c->page_title = "Calendar Users"; -// if ( $session->AllowedTo("Support") ) + if ( $session->AllowedTo("Admin") ) $user_menu->AddOption("New User","/user.php?create","Add a new user", false, 10); $active_menu_pattern = "#^/user#"; diff --git a/inc/BasicAuthSession.php b/inc/BasicAuthSession.php index 8033c7d6..f52aba35 100644 --- a/inc/BasicAuthSession.php +++ b/inc/BasicAuthSession.php @@ -62,7 +62,7 @@ class BasicAuthSession { header( sprintf( 'WWW-Authenticate: Basic realm="%s"', $c->system_name) ); header('HTTP/1.0 401 Unauthorized'); echo 'Please log in for access to this system.'; - dbg_error_log( "Login", "User is not authorised" ); + dbg_error_log( "BasicAuth", ":Session: User is not authorised" ); exit; } } @@ -74,9 +74,9 @@ class BasicAuthSession { */ function CheckPassword( $username, $password ) { $qry = new PgQuery( "SELECT * FROM usr WHERE lower(username) = ? ", $username ); - if ( $qry->Exec('BAS::CheckPassword',__LINE,__FILE__) && $qry->rows == 1 ) { + if ( $qry->Exec('BasicAuth',__LINE,__FILE__) && $qry->rows == 1 ) { $usr = $qry->Fetch(); - dbg_error_log( "Login", "Name:%s, Pass:%s, File:%s", $username, $password, $usr->password ); + dbg_error_log( "BasicAuth", ":CheckPassword: Name:%s, Pass:%s, File:%s", $username, $password, $usr->password ); if ( session_validate_password( $password, $usr->password ) ) { return $usr; } @@ -103,7 +103,7 @@ class BasicAuthSession { function GetRoles () { $this->roles = array(); $qry = new PgQuery( 'SELECT role_name FROM role_member m join roles r ON r.role_no = m.role_no WHERE user_no = ? ', $this->user_no ); - if ( $qry->Exec('BAS::GetRoles') && $qry->rows > 0 ) { + if ( $qry->Exec('BasicAuth') && $qry->rows > 0 ) { while( $role = $qry->Fetch() ) { $this->roles[$role->role_name] = true; } diff --git a/inc/RSCDSUser.php b/inc/RSCDSUser.php new file mode 100644 index 00000000..d8a01f8e --- /dev/null +++ b/inc/RSCDSUser.php @@ -0,0 +1,71 @@ + +* @copyright Catalyst .Net Ltd +* @license http://gnu.org/copyleft/gpl.html GNU GPL v2 +*/ + +require_once("User.php"); + +/** +* A class for viewing and maintaining RSCDS User records +* +* @package rscds +*/ +class RSCDSUser extends User +{ + + /** + * Constructor - nothing fancy as yet. + */ + function RSCDSUser( $id , $prefix = "") { + parent::User( $id, $prefix ); + } + + /** + * Render the form / viewer as HTML to show the user + * @return string An HTML fragment to display in the page. + */ + function Render($title = "" ) { + $html = ""; + dbg_error_log("User", ":Render: type=$this->WriteType, edit_mode=$this->EditMode" ); + + $ef = new EntryForm( $REQUEST_URI, $this->Values, $this->EditMode ); + $ef->NoHelp(); // Prefer this style, for the moment + + $html = '
'; + if ( $title != "" ) { + $html .= "

$title

\n"; + } + + if ( $ef->editmode ) { + $html .= $ef->StartForm( array("autocomplete" => "off" ) ); + if ( $this->user_no > 0 ) $html .= $ef->HiddenField( "user_no", $this->user_no ); + } + + $html .= "\n"; + + $html .= $this->RenderFields($ef,""); + + $html .= $this->RenderRoles($ef); + + $html .= "
\n"; + $html .= "
"; + + if ( $ef->editmode ) { + $html .= ''; + $html .= $ef->EndForm(); + } + + return $html; + } + +} + +?> \ No newline at end of file diff --git a/inc/XMLElement.php b/inc/XMLElement.php new file mode 100644 index 00000000..8254044c --- /dev/null +++ b/inc/XMLElement.php @@ -0,0 +1,109 @@ + +* @copyright Catalyst .Net Ltd +* @license http://gnu.org/copyleft/gpl.html GNU GPL v2 +*/ +require_once("AWLUtilities.php"); + +/** +* A class for XML elements which may have attributes, or contain +* other XML sub-elements +* +* @package awl +*/ +class XMLElement { + var $tagname; + var $attributes; + var $content; + + /** + * Constructor - nothing fancy as yet. + */ + function XMLElement( $tagname, $content=false, $attributes=false ) { + $this->tagname=$tagname; + $this->content=$content; + $this->attributes = $attributes; + } + + /** + * Set an element attribute to a value + * + * @param string The attribute name + * @param string The attribute value + */ + function SetAttribute($k,$v) { + if ( gettype($this->attributes) != "array" ) $this->attributes = array(); + $this->attributes[$k] = $v; + } + + /** + * Set the whole content to a value + * + * @param mixed The element content, which may be text, or an array of sub-elements + */ + function SetContent($v) { + $this->content = $v; + } + + /** + * Add a sub-element + * + * @param object An XMLElement to be appended to the array of sub-elements + */ + function AddSubTag($v) { + if ( gettype($this->content) != "array" ) $this->content = array(); + $this->content[] = $v; + } + + /** + * Render the document tree into (nicely formatted) XML + * + * @param int The indenting level for the pretty formatting of the element + */ + function Render($indent=0) { + $r = substr(" ",0,$indent) . '<' . $this->tagname; + if ( gettype($this->attributes) == "array" ) { + /** + * Render the element attribute values + */ + foreach( $this->attributes AS $k => $v ) { + $r .= sprintf( ' %s="%s"', $k, $v ); + } + } + if ( (is_array($this->content) && count($this->content) > 0) || strlen($this->content) > 0 ) { + $r .= ">"; + if ( is_array($this->content) ) { + /** + * Render the sub-elements with a deeper indent level + */ + $r .= "\n"; + foreach( $this->content AS $k => $v ) { + if ( is_object($v) ) { + $r .= $v->Render($indent+1); + } + } + $r .= substr(" ",0,$indent); + } + else { + /** + * Render the content, with special characters escaped + * + * FIXME This should switch to CDATA in some situations. + */ + $r .= htmlspecialchars($this->content); + } + $r .= 'tagname.">\n"; + } + else { + $r .= "/>\n"; + } + return $r; + } +} + +?> \ No newline at end of file diff --git a/inc/always.php b/inc/always.php index 2c920d39..6d8f98e2 100644 --- a/inc/always.php +++ b/inc/always.php @@ -16,6 +16,7 @@ $c->system_name = "Really Simple CalDAV Store"; $c->domain_name = $_SERVER['SERVER_NAME']; $c->images = "/images"; $c->save_time_zone_defs = 1; +$c->stylesheets = array( "/rscds.css" ); // Kind of private configuration values $c->total_query_time = 0; diff --git a/inc/caldav-MKCALENDAR.php b/inc/caldav-MKCALENDAR.php new file mode 100644 index 00000000..9d737dec --- /dev/null +++ b/inc/caldav-MKCALENDAR.php @@ -0,0 +1,32 @@ + \ No newline at end of file diff --git a/inc/caldav-OPTIONS.php b/inc/caldav-OPTIONS.php index fdad0a39..589fcf3e 100644 --- a/inc/caldav-OPTIONS.php +++ b/inc/caldav-OPTIONS.php @@ -2,7 +2,7 @@ dbg_error_log("OPTIONS", "method handler"); header( "Content-type: text/plain"); // header( "Allow: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, COPY, MOVE, PROPFIND, PROPPATCH, LOCK, UNLOCK, REPORT, ACL"); - header( "Allow: OPTIONS, GET, PUT, DELETE, REPORT"); + header( "Allow: OPTIONS, GET, PUT, DELETE, REPORT, PROPFIND, COPY, MOVE"); // header( "DAV: 1, 2, 3, access-control, calendar-access"); - header( "DAV: 1, calendar-access"); + header( "DAV: 1, 2, calendar-access"); ?> \ No newline at end of file diff --git a/inc/caldav-PROPFIND.php b/inc/caldav-PROPFIND.php new file mode 100644 index 00000000..930bc757 --- /dev/null +++ b/inc/caldav-PROPFIND.php @@ -0,0 +1,142 @@ + 1, 'GETCONTENTLENGTH' => 1, 'GETCONTENTTYPE' => 1, 'RESOURCETYPE' => 1 ); +} + +foreach( $rpt_request AS $k => $v ) { + + switch ( $v['tag'] ) { + + case 'DAV::PROPFIND': + dbg_log_array( "PROPFIND", "DAV-PROPFIND", $v, true ); + break; + + case 'DAV::PROP': + dbg_log_array( "PROPFIND", "DAV::PROP", $v, true ); + break; + + case 'DAV::GETETAG': + case 'DAV::GETCONTENTLENGTH': + case 'DAV::GETCONTENTTYPE': + case 'DAV::RESOURCETYPE': + $attribute = substr($v['tag'],5); + $attribute_list[$attribute] = 1; + break; + + case 'DAV::HREF': + dbg_log_array( "PROPFIND", "DAV::HREF", $v, true ); + $href_list[] = $v['value']; + break; + + default: + dbg_error_log( "PROPFIND", "Unhandled tag >>".$v['tag']."<<"); + } +} + + +/** +* Here is the kind of thing we are going to do, returning a top-level collection +* response, followed by a response for each calendar (or other resource) within it. +* +* +* +* /caldav.php/path/they/sent/ +* +* +* +* httpd/unix-directory +* +* +* +* +* HTTP/1.1 200 OK +* +* +* +* /caldav.php/path/they/sent/calendar +* +* +* +* httpd/unix-directory +* +* +* +* +* +* HTTP/1.1 200 OK +* +* +* +*/ + +require_once("XMLElement.php"); + +if ( count($href_list) > 0 ) { + // Not supported at this point... + dbg_error_log("ERROR", " PROPFIND: Support for PROPFIND on specific URLs is not implemented"); +} +else { + $responses = array(); + $url = sprintf("http://%s:%d%s%s", $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $_SERVER['SCRIPT_NAME'], $find_path ); + $url = $_SERVER['SCRIPT_NAME'] . $find_path ; + $url = preg_replace( '#/$#', '', $url); + for ( $i=0; $i < 2; $i++ ) { + $props = array(); + if ( isset($attribute_list['GETCONTENTLENGTH']) ) { + $props[] = new XMLElement("getcontentlength" ); + } + if ( isset($attribute_list['GETCONTENTTYPE']) ) { + $props[] = new XMLElement("getcontenttype", "httpd/unix-directory" ); + } + if ( isset($attribute_list['RESOURCETYPE']) ) { + $resourcetypes = array( new XMLElement("collection") ); + if ( $i == 1 ) $resourcetypes[] = new XMLElement("calendar", false, array("xmlns" => "urn:ietf:params:xml:ns:caldav")); + $props[] = new XMLElement("resourcetype", $resourcetypes ); + } + $prop = new XMLElement("prop", $props ); + $status = new XMLElement("status", "HTTP/1.1 200 OK" ); + + $propstat = new XMLElement( "propstat", array( $prop, $status) ); + if ( $i == 1 ) $url .= "/calendar"; + $href = new XMLElement("href", $url ); + + $responses[] = new XMLElement( "response", array($href,$propstat)); + } + + $multistatus = new XMLElement( "multistatus", $responses, array('xmlns'=>'DAV:') ); +} + +header("HTTP/1.1 207 Multi-Status"); +header("Content-type: text/xml;charset=UTF-8"); + +echo''."\n"; +echo $multistatus->Render(); + +?> \ No newline at end of file diff --git a/inc/caldav-REPORT.php b/inc/caldav-REPORT.php index 514bacad..c3f1b1c2 100644 --- a/inc/caldav-REPORT.php +++ b/inc/caldav-REPORT.php @@ -114,10 +114,12 @@ foreach( $rpt_request AS $k => $v ) { break; case 'DAV::GETETAG': + case 'DAV::GETCONTENTLENGTH': + case 'DAV::GETCONTENTTYPE': + case 'DAV::RESOURCETYPE': if ( isset($report_properties) ) { - if ( $v['type'] == "complete" ) { - $report_properties['GETETAG'] = 1; - } + $attribute = substr($v['tag'],5); + $report_properties[$attribute] = 1; } break; @@ -157,8 +159,7 @@ header("Content-type: text/xml;charset=UTF-8"); $response_tpl = <<%s - - "%s"%s + %s HTTP/1.1 200 OK @@ -166,6 +167,11 @@ $response_tpl = <<"%s" +PROPERTYTPL; + $calendar_href_tpl = <<http://%s:%d%s%s @@ -187,7 +193,11 @@ REPORTHDR; for ( $i=0; $i <= $reportnum; $i++ ) { dbg_error_log("REPORT", "Report[%d] Start:%s, End: %s, Events: %d, Todos: %d, Freebusy: %d", $i, $report[$i]['start'], $report[$i]['end'], $report[$i]['calendar-event'], $report[$i]['calendar-todo'], $report[$i]['calendar-freebusy']); + if ( isset($report[$i]['calendar-event']) ) { + /** + * Produce VEVENT data. + */ if ( isset($report[$i]['include_href']) ) dbg_error_log( "REPORT", "Returning href event data" ); if ( isset($report[$i]['include_data']) ) dbg_error_log( "REPORT", "Returning full event data" ); $sql = "SELECT * FROM caldav_data NATURAL JOIN event WHERE caldav_type = 'VEVENT' "; @@ -201,11 +211,21 @@ REPORTHDR; } $sql .= $where; $qry = new PgQuery( $sql ); - if ( $qry->Exec() && $qry->rows > 0 ) { + if ( $qry->Exec("REPORT",__LINE__,__FILE__) && $qry->rows > 0 ) { while( $event = $qry->Fetch() ) { $calhref = ( isset($report[$i]['include_href']) ? sprintf( $calendar_href_tpl, $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $_SERVER['SCRIPT_NAME'], $event->dav_name ) : "" ); $caldata = ( isset($report[$i]['include_data']) ? sprintf( $calendar_data_tpl, $event->caldav_data ) : "" ); - printf( $response_tpl, $calhref, $event->dav_etag, $caldata ); + $properties = ""; + foreach( $report[$i]['properties'] AS $k => $v ) { + switch( $k ) { + case 'GETETAG': $value = $event->dav_etag; break; + case 'GETCONTENTLENGTH': $value = strlen($event->caldav_data); break; + case 'GETCONTENTTYPE': $value = "text/calendar"; break; + case 'RESOURCETYPE': $value = "VEVENT"; break; + } + $value = sprintf( $property_tpl, strtolower($k), $value, strtolower($k)); + } + printf( $response_tpl, $calhref, $value, $caldata ); dbg_error_log("REPORT", "ETag >>%s<< >>http://%s:%s%s%s<<", $event->dav_etag, $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $_SERVER['SCRIPT_NAME'], $event->dav_name); } @@ -229,7 +249,7 @@ REPORTHDR; } $sql .= $where; $qry = new PgQuery( $sql ); - if ( $qry->Exec() && $qry->rows > 0 ) { + if ( $qry->Exec("REPORT",__LINE__,__FILE__) && $qry->rows > 0 ) { while( $event = $qry->Fetch() ) { $calhref = ( isset($report[$i]['include_href']) ? sprintf( $calendar_href_tpl, $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $_SERVER['SCRIPT_NAME'], $event->dav_name ) : "" ); $caldata = ( isset($report[$i]['include_data']) ? sprintf( $calendar_data_tpl, $event->caldav_data ) : "" ); diff --git a/inc/interactive-page.php b/inc/interactive-page.php index deebf19e..7ff371af 100644 --- a/inc/interactive-page.php +++ b/inc/interactive-page.php @@ -10,5 +10,7 @@ $relationship_menu = new MenuSet('submenu', 'submenu', 'submenu_active'); $user_menu = new MenuSet('submenu', 'submenu', 'submenu_active'); $role_menu = new MenuSet('submenu', 'submenu', 'submenu_active'); +$user_menu->AddOption("My Details","/user.php?user_no=$session->user_no","View my own user record", false, 700); + $active_menu_pattern = '#^/(index.*)?$#' ?> \ No newline at end of file diff --git a/inc/page-header.php b/inc/page-header.php index 75f921a0..a7c0e5ec 100644 --- a/inc/page-header.php +++ b/inc/page-header.php @@ -4,21 +4,88 @@ if ( !isset($c->title) ) { $c->title = "Really Simple CalDAV Store"; } -echo <<AllowedTo("Admin") || $GLOBALS['session']->AllowedTo("Support") ) { + if ( strlen($display_url) > 30 ) { + $display_url = substr( $display_url, 0, 28 ) . "..." ; + } + } + else { + $display_url = "help"; + } + return " [$display_url] "; +} + + +function send_page_header() { + global $session, $c, $page_menu, $user_menu, $role_menu, $relationship_menu; + +// echo ''; + + echo << -$c->title - - - +$c->page_title + EOHDR; -if ( isset($page_menu) && is_object($page_menu) ) { - $page_menu->AddSubMenu( $relationship_menu, "Relationships", "/relationships.php", "Browse all relationships", false, 4050 ); - $page_menu->AddSubMenu( $user_menu, "Users", "/users.php", "Browse all users", false, 4100 ); - $page_menu->AddSubMenu( $role_menu, "Roles", "/roles.php", "Browse all roles", false, 4300 ); - $page_menu->MakeSomethingActive($active_menu_pattern); - echo $page_menu->Render(); + foreach ( $c->stylesheets AS $stylesheet ) { + echo "\n"; + } + if ( isset($c->local_styles) ) { + // Always load local styles last, so they can override prior ones... + foreach ( $c->local_styles AS $stylesheet ) { + echo "\n"; + } + } + + if ( isset($c->print_styles) ) { + // Finally, load print styles last, so they can override all of the above... + foreach ( $c->print_styles AS $stylesheet ) { + echo "\n"; + } + } + + if ( isset($c->scripts) && is_array($c->scripts) ) { + foreach ( $c->scripts AS $script ) { + echo "\n"; + } + } + + echo "\n\n"; + echo "
\n"; + + if ( isset($page_menu) && is_object($page_menu) ) { + $page_menu->AddSubMenu( $relationship_menu, "Relationships", "/relationships.php", "Browse all relationships", false, 4050 ); + $page_menu->AddSubMenu( $user_menu, "Users", "/users.php", "Browse all users", false, 4100 ); + $page_menu->AddSubMenu( $role_menu, "Roles", "/roles.php", "Browse all roles", false, 4300 ); + $page_menu->MakeSomethingActive($active_menu_pattern); + echo $page_menu->Render(); + } + + echo "
\n"; + + if ( isset($c->messages) && is_array($c->messages) && count($c->messages) > 0 ) { + echo "
    \n"; + foreach( $c->messages AS $i => $msg ) { + // ##HelpTextKey## gets converted to a "/help.phph=HelpTextKey" link + $msg = preg_replace_callback("/##([^#]+)##/", "make_help_link", $msg); + echo "
  • $msg
  • \n"; + } + echo "
\n
\n"; + } + } + +send_page_header(); + ?> \ No newline at end of file diff --git a/inc/vEvent.php b/inc/vEvent.php index 7b557987..05aaa174 100644 --- a/inc/vEvent.php +++ b/inc/vEvent.php @@ -2,7 +2,7 @@ /** * A Class for handling vEvent data * -* @package rscds +* @package awl * @subpackage iCalendar * @author Andrew McMillan * @copyright Catalyst IT Ltd @@ -13,7 +13,7 @@ /** * A Class for handling Events on a calendar * -* @package rscds +* @package awl */ class vEvent { /**#@+ diff --git a/rscds.webprj b/rscds.webprj index 4e4384cf..d238aa4b 100644 --- a/rscds.webprj +++ b/rscds.webprj @@ -41,6 +41,13 @@ - + + + + + + + +