Internet Engineering Task Force (IETF) C. Daboo Request for Comments: 6321 Apple, Inc. Category: Standards Track M. Douglass ISSN: 2070-1721 RPI S. Lees Microsoft August 2011
xCal: The XML Format for iCalendar
Abstract
This specification defines "xCal", an XML format for iCalendar data.
Status of This Memo
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc6321.
Copyright Notice
Copyright (c) 2011 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
Daboo, et al. Standards Track [Page 1]
RFC 6321 xCal August 2011
Table of Contents
1. Introduction ....................................................3 2. Conventions Used in This Document ...............................4 3. Converting from iCalendar to xCal ...............................4 3.1. Pre-Processing .............................................4 3.2. iCalendar Stream (RFC 5545, Section 3.4) ...................5 3.3. Components (RFC 5545, Section 3.6) .........................6 3.4. Properties (RFC 5545, Sections 3.7 and 3.8) ................6 3.4.1. Special Cases for Properties ........................8 3.4.1.1. Multi-Valued Properties ....................8 3.4.1.2. GEO Property ...............................9 3.4.1.3. REQUEST-STATUS Property ....................9 3.5. Parameters (RFC 5545, Section 3.2) ........................10 3.5.1. VALUE Parameter ....................................11 3.6. Values (RFC 5545, Section 3.3) ............................11 3.6.1. Binary (RFC 5545, Section 3.3.1) ...................12 3.6.2. Boolean (RFC 5545, Section 3.3.2) .................12 3.6.3. Calendar User Address (RFC 5545, Section 3.3.3) ....12 3.6.4. Date (RFC 5545, Section 3.3.4) .....................12 3.6.5. Date-Time (RFC 5545, Section 3.3.5) ................13 3.6.6. Duration (RFC 5545, Section 3.3.6) .................13 3.6.7. Float (RFC 5545, Section 3.3.7) ....................13 3.6.8. Integer (RFC 5545, Section 3.3.8) ..................14 3.6.9. Period of Time (RFC 5545, Section 3.3.9) ...........14 3.6.10. Recurrence Rule (RFC 5545, Section 3.3.10) ........14 3.6.11. Text (RFC 5545, Section 3.3.11) ...................15 3.6.12. Time (RFC 5545, Section 3.3.12) ...................15 3.6.13. URI (RFC 5545, Section 3.3.13) ....................15 3.6.14. UTC Offset (RFC 5545, Section 3.3.14) .............16 3.7. Extensions ................................................16 4. Converting from xCal into iCalendar ............................16 4.1. Converting XML Extensions into iCalendar ..................16 4.2. The XML Property for iCalendar ............................17 5. Handling Unrecognized Properties or Parameters .................18 6. Security Considerations ........................................19 7. IANA Considerations ............................................20 7.1. Namespace Registration ....................................20 7.2. Media Type ................................................20 7.3. iCalendar Property Registrations ..........................21 8. Acknowledgments ................................................22 9. References .....................................................22 9.1. Normative References ......................................22 9.2. Informative References ....................................22
Daboo, et al. Standards Track [Page 2]
RFC 6321 xCal August 2011
Appendix A. RELAX NG Schema .......................................23 Appendix B. Examples ..............................................49 B.1. Example 1 ..................................................49 B.1.1. iCalendar Data .........................................49 B.1.2. XML Data ...............................................49 B.2. Example 2 ..................................................50 B.2.1. iCalendar Data .........................................50 B.2.2. XML Data ...............................................51
The iCalendar data format [RFC5545] is a widely deployed interchange format for calendaring and scheduling data. While many applications and services consume and generate calendar data, iCalendar is a specialized format that requires its own parser/generator. In contrast, XML-based formats are widely used for interoperability between applications, and the many tools that generate, parse, and manipulate XML make it easier to work with than iCalendar.
The purpose of this specification is to define "xCal", an XML format for iCalendar data. xCal is defined as a straightforward mapping into XML from iCalendar, so that iCalendar data can be converted to XML, and then back to iCalendar, without losing any semantic meaning in the data. Anyone creating xCal calendar data according to this specification will know that their data can be converted to a valid iCalendar representation as well.
Key design considerations are:
Round-tripping (converting an iCalendar instance to xCal and back) will give the same semantic result as the starting point. That is, all components, properties, and property parameters are guaranteed to be preserved, with the exception of those that have default values.
xCal preserves the semantics of the iCalendar data. While a simple consumer can easily browse the calendar data in xCal, a full understanding of iCalendar is still required in order to modify and/or fully comprehend the calendar data.
xCal has the ability to handle many extensions to the underlying iCalendar specification without requiring an update to this document.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].
When XML element types in the namespace "urn:ietf:params:xml:ns:icalendar-2.0" are referenced in this document outside of the context of an XML fragment, the string "IC:" will be prefixed to the element types.
Some examples in this document contain "partial" XML documents used for illustrative purposes. In these examples, three periods "..." are used to indicate a portion of the document that has been removed for compactness.
iCalendar uses a line folding mechanism to limit lines of data to a maximum line length (typically 72 characters) to ensure maximum likelihood of preserving data integrity as it is transported via various means (e.g., email) -- see Section 3.1 of [RFC5545]. Prior to converting iCalendar data into xCal, all folded lines MUST be unfolded.
iCalendar data uses an "escape" character sequence for text values and property parameter values. When such text elements are converted into xCal, the escaping MUST be removed.
iCalendar uses a base64 encoding for binary data. However, it does not restrict the encoding from being applied to non-binary value types. So, the following rules MUST be applied when processing a property with the "ENCODING" property parameter set to "BASE64":
o If the property value type is "BINARY", the base64 encoding MUST be preserved.
o If the value type is not "BINARY", the "ENCODING" property parameter MUST be removed, and the value MUST be base64 decoded.
When base64 encoding and decoding are used, they MUST conform to Section 4 of [RFC4648], which is the base64 method used in [RFC5545].
Daboo, et al. Standards Track [Page 4]
RFC 6321 xCal August 2011
One key difference in the formatting of values used in iCalendar and xCal is that, in xCal, the specification uses date/time and UTC offset values aligned with the syntax of [W3C.REC-xmlschema-2-20041028] to aid with XML processing.
At the top level of the iCalendar object model is an "iCalendar stream". This object encompasses multiple "iCalendar objects". In xCal, the entire stream is contained in the root IC:icalendar XML element.
An iCalendar stream can contain one or more iCalendar objects. Each iCalendar object, delimited by "BEGIN:VCALENDAR" and "END:VCALENDAR", is enclosed by the IC:vcalendar XML element.
iCalendar objects are comprised of a set of "components", "properties", "parameters", and "values". A "component" can contain other "components" or "properties". A "property" has a value and a set of zero or more "parameters".
In xCal, component elements, for example, IC:vevent and IC:vtodo, are contained within an IC:components XML element. Within the component element, another IC:components element could appear (representing components nested within components) or the IC:properties XML element could appear. IC:properties is used to encapsulate iCalendar properties.
Each iCalendar property will be mapped to its own XML element as described below. Within each of these elements, there is zero or one IC:parameters XML element used to encapsulate any iCalendar property parameters. Additionally there will be one or more XML elements representing the value of the iCalendar property.
Each calendar component in the "VCALENDAR" object, delimited by "BEGIN" and "END", will be converted to an enclosing XML element with the same name, but in lowercase. As an example, the table below shows iCalendar-to-xCal mappings for current iCalendar components. Any new iCalendar components added in the future will be converted in the same way.
+-----------+--------------+--------------------+ | Component | XML element | XML Definition | +-----------+--------------+--------------------+ | VEVENT | IC:vevent | Appendix A # 3.6.1 | | VTODO | IC:vtodo | Appendix A # 3.6.2 | | VJOURNAL | IC:vjournal | Appendix A # 3.6.3 | | VFREEBUSY | IC:vfreebusy | Appendix A # 3.6.4 | | VTIMEZONE | IC:vtimezone | Appendix A # 3.6.5 | | STANDARD | IC:standard | Appendix A # 3.6.5 | | DAYLIGHT | IC:daylight | Appendix A # 3.6.5 | | VALARM | IC:valarm | Appendix A # 3.6.6 | +-----------+--------------+--------------------+
iCalendar properties, whether they apply to the "VCALENDAR" object or to a component, are handled in a consistent way in the xCal format.
Daboo, et al. Standards Track [Page 6]
RFC 6321 xCal August 2011
iCalendar properties are enclosed in the XML element IC:properties.
Each individual iCalendar property is represented in xCal by an element of the same name as the iCalendar property, but in lowercase. For example, the "CALSCALE" property is represented in xCal by the IC:calscale element.
Each property can contain an IC:parameters XML element encapsulating any iCalendar property parameters associated with the iCalendar property.
Each property will contain one or more "value" XML elements as described below representing the value of the iCalendar property.
As an example, the table below shows iCalendar-to-xCal mappings for current iCalendar properties. Any new iCalendar properties added in the future will be converted in the same way.
+------------------+---------------------+-----------------------+ | Property | XML element | XML Definition | +------------------+---------------------+-----------------------+ | CALSCALE | IC:calscale | Appendix A # 3.7.1 | | METHOD | IC:method | Appendix A # 3.7.2 | | PRODID | IC:prodid | Appendix A # 3.7.3 | | VERSION | IC:version | Appendix A # 3.7.4 | | ATTACH | IC:attach | Appendix A # 3.8.1.1 | | CATEGORIES | IC:categories | Appendix A # 3.8.1.2 | | CLASS | IC:class | Appendix A # 3.8.1.3 | | COMMENT | IC:comment | Appendix A # 3.8.1.4 | | DESCRIPTION | IC:description | Appendix A # 3.8.1.5 | | GEO | IC:geo | Appendix A # 3.8.1.6 | | LOCATION | IC:location | Appendix A # 3.8.1.7 |
Daboo, et al. Standards Track [Page 7]
RFC 6321 xCal August 2011
| PERCENT-COMPLETE | IC:percent-complete | Appendix A # 3.8.1.8 | | PRIORITY | IC:priority | Appendix A # 3.8.1.9 | | RESOURCES | IC:resources | Appendix A # 3.8.1.10 | | STATUS | IC:status | Appendix A # 3.8.1.11 | | SUMMARY | IC:summary | Appendix A # 3.8.1.12 | | COMPLETED | IC:completed | Appendix A # 3.8.2.1 | | DTEND | IC:dtend | Appendix A # 3.8.2.2 | | DUE | IC:due | Appendix A # 3.8.2.3 | | DTSTART | IC:dtstart | Appendix A # 3.8.2.4 | | DURATION | IC:duration | Appendix A # 3.8.2.5 | | FREEBUSY | IC:freebusy | Appendix A # 3.8.2.6 | | TRANSP | IC:transp | Appendix A # 3.8.2.7 | | TZID | IC:tzid | Appendix A # 3.8.3.1 | | TZNAME | IC:tzname | Appendix A # 3.8.3.2 | | TZOFFSETFROM | IC:tzoffsetfrom | Appendix A # 3.8.3.3 | | TZOFFSETTO | IC:tzoffsetto | Appendix A # 3.8.3.4 | | TZURL | IC:tzurl | Appendix A # 3.8.3.5 | | ATTENDEE | IC:attendee | Appendix A # 3.8.4.1 | | CONTACT | IC:contact | Appendix A # 3.8.4.2 | | ORGANIZER | IC:organizer | Appendix A # 3.8.4.3 | | RECURRENCE-ID | IC:recurrence-id | Appendix A # 3.8.4.4 | | RELATED-TO | IC:related-to | Appendix A # 3.8.4.5 | | URL | IC:url | Appendix A # 3.8.4.6 | | UID | IC:uid | Appendix A # 3.8.4.7 | | EXDATE | IC:exdate | Appendix A # 3.8.5.1 | | RDATE | IC:rdate | Appendix A # 3.8.5.2 | | RRULE | IC:rrule | Appendix A # 3.8.5.3 | | ACTION | IC:action | Appendix A # 3.8.6.1 | | REPEAT | IC:repeat | Appendix A # 3.8.6.2 | | TRIGGER | IC:trigger | Appendix A # 3.8.6.3 | | CREATED | IC:created | Appendix A # 3.8.7.1 | | DTSTAMP | IC:dtstamp | Appendix A # 3.8.7.2 | | LAST-MODIFIED | IC:last-modified | Appendix A # 3.8.7.3 | | SEQUENCE | IC:sequence | Appendix A # 3.8.7.4 | | REQUEST-STATUS | IC:request-status | Appendix A # 3.8.8.3 | +------------------+---------------------+-----------------------+
The following iCalendar properties can have values that consist of a list of "standard" iCalendar values separated by a specific delimiter. In xCal, these properties are represented by an XML element that contains multiple "value" elements (Section 3.6).
Daboo, et al. Standards Track [Page 8]
RFC 6321 xCal August 2011
+------------+---------------+-----------------------+ | Property | XML element | XML Definition | +------------+---------------+-----------------------+ | CATEGORIES | IC:categories | Appendix A # 3.8.1.2 | | RESOURCES | IC:resources | Appendix A # 3.8.1.10 | | FREEBUSY | IC:freebusy | Appendix A # 3.8.2.6 | | EXDATE | IC:exdate | Appendix A # 3.8.5.1 | | RDATE | IC:rdate | Appendix A # 3.8.5.2 | +------------+---------------+-----------------------+
In iCalendar, the "GEO" property value is defined as a semicolon- separated list of two "FLOAT" values; the first representing latitude and the second longitude.
In xCal, the value for the IC:geo element is represented by two XML elements. These are an IC:latitude element and an IC:longitude element, each of which contains float values. See Appendix A # 3.8.1.6.
In iCalendar, the "REQUEST-STATUS" property value is defined as a semicolon-separated list of two or three "TEXT" values. The first represents a code, the second a description, and the third any additional data.
In xCal, the value for the IC:request-status element is represented by two or three XML elements. These are an IC:code element, an IC: description element, and an IC:data element, each of which contains the corresponding "TEXT" values. If there is no additional data in the iCalendar value, the IC:data element (which would be empty) SHOULD NOT be present. See Appendix A # 3.8.8.3.
iCalendar property parameters are enclosed in the XML element IC: parameters, which occurs in each property XML element. If there are no iCalendar property parameters, the IC:parameters element (which would be empty) SHOULD NOT be present.
Each individual iCalendar property parameter is represented in xCal by an element of the same name as the iCalendar property parameter, but in lowercase. For example, the "PARTSTAT" property parameter is represented in xCal by the IC:partstat element.
Each XML parameter element contains one or more child XML elements representing iCalendar value types.
Daboo, et al. Standards Track [Page 10]
RFC 6321 xCal August 2011
As an example, the table below shows iCalendar-to-xCal mappings for current iCalendar parameters. Any new iCalendar parameters added in the future will be converted in the same way.
+----------------+-------------------+---------------------+ | Parameter | XML element | XML Definition | +----------------+-------------------+---------------------+ | ALTREP | IC:altrep | Appendix A # 3.2.1 | | CN | IC:cn | Appendix A # 3.2.2 | | CUTYPE | IC:cutype | Appendix A # 3.2.3 | | DELEGATED-FROM | IC:delegated-from | Appendix A # 3.2.4 | | DELEGATED-TO | IC:delegated-to | Appendix A # 3.2.5 | | DIR | IC:dir | Appendix A # 3.2.6 | | ENCODING | IC:encoding | Appendix A # 3.2.7 | | FMTTYPE | IC:fmttype | Appendix A # 3.2.8 | | FBTYPE | IC:fbtype | Appendix A # 3.2.9 | | LANGUAGE | IC:language | Appendix A # 3.2.10 | | MEMBER | IC:member | Appendix A # 3.2.11 | | PARTSTAT | IC:partstat | Appendix A # 3.2.12 | | RANGE | IC:range | Appendix A # 3.2.13 | | RELATED | IC:related | Appendix A # 3.2.14 | | RELTYPE | IC:reltype | Appendix A # 3.2.15 | | ROLE | IC:role | Appendix A # 3.2.16 | | RSVP | IC:rsvp | Appendix A # 3.2.17 | | SENT-BY | IC:sent-by | Appendix A # 3.2.18 | | TZID | IC:tzid | Appendix A # 3.2.19 | +----------------+-------------------+---------------------+
iCalendar defines a "VALUE" property parameter (Section 3.2.20 of [RFC5545]). This property parameter is not mapped to an xCal XML element. Instead, the value type is handled by having different XML elements for each value, and these appear inside of property elements. Thus, when converting from iCalendar to xCal, any "VALUE" property parameters are skipped. When converting from xCal into iCalendar, the appropriate "VALUE" property parameter MUST be included in the iCalendar property if the value type is not the default value type for that property.
In the typical case, iCalendar value types are mapped into XML elements with a matching name in all lowercase. In the case of the value for a recurrence rule (see below), iCalendar defines "structured" values, and these are mapped into separate child elements for each value element.
Description: iCalendar "BINARY" property values are represented by the IC:binary XML element. The content of the element is base64 encoded data, conforming to Section 4 of [RFC4648], which is the base64 method used in [RFC5545]. Whitespace MAY be inserted into the data at any point to "wrap" the data to reasonable line lengths. When converting back to iCalendar, the whitespace MUST first be removed.
Description: iCalendar "DATE" property values are represented by the IC:date XML element. The content of the element is the same date value specified by [RFC5545], with the exception that the date components are separated by "-" characters, for consistency with [W3C.REC-xmlschema-2-20041028].
Description: iCalendar "DATE-TIME" property values are represented by the IC:date-time XML element. The content of the element is the same date-time value specified by [RFC5545], with the exception that the date components are separated by "-" characters, and the time components are separated by ":" characters, for consistency with [W3C.REC-xmlschema-2-20041028]. Note that while [W3C.REC-xmlschema-2-20041028] allows for a UTC offset to be included in date/time values, xCal does not use that, and instead follows the iCalendar behavior of using time zone definitions via the "TZID" property parameter.
Description: iCalendar "DURATION" property values are represented by the IC:duration XML element. The content of the element is the same duration value specified by [RFC5545].
Description: iCalendar "FLOAT" property values are represented by the IC:float XML element. The content of the element is a text representation of a floating point number.
Description: iCalendar "INTEGER" property values are represented by the IC:integer XML element. The content of the element is a text representation of an integer number.
Description: iCalendar "PERIOD" property values are represented by the IC:period XML element. The content of the element is child elements representing the start, end, or duration components of the period.
Description: iCalendar "RECUR" property values are represented by the IC:recur XML element. The content of the element is child elements representing the various components of a recurrence rule.
Description: iCalendar "TIME" property values are represented by the IC:time XML element. The content of the element is the same time value specified by [RFC5545], with the exception that the time components are separated by ":" characters, for consistency with [W3C.REC-xmlschema-2-20041028]. Note that while [W3C.REC-xmlschema-2-20041028] allows for a UTC offset to be included in date/time values, xCal does not use that, and instead follows the iCalendar behavior of using time zone definitions via the "TZID" property parameter.
Description: iCalendar "UTC-OFFSET" property values are represented by the IC:utc-offset XML element. The content of the element is the same UTC offset value specified by [RFC5545], with the exception that the hour, minute, and second components are separated by a ":" character, for consistency with [W3C.REC-xmlschema-2-20041028].
iCalendar extension properties and property parameters (those with an "X-" prefix in their name) are handled in the same way as other properties and property parameters: the property or property parameter is represented by an XML element with the same name, but in lowercase, e.g., the "X-FOO" property in iCalendar turns into the IC: x-foo element in xCal. However, see Section 5 for how to deal with default values for unrecognized extension properties or property parameters.
When converting component, property, and property parameter values, the names SHOULD be converted to uppercase. Although iCalendar names are case insensitive, common practice is to keep them all uppercase following the actual definitions in [RFC5545].
BACKSLASH character encoding and line folding MUST be applied to the resulting iCalendar data as required by [RFC5545].
Non-binary value types MUST NOT be base64 encoded.
XML extensions are converted back to iCalendar in one of two ways, depending on whether the extensions are in the iCalendar XML namespace or in an external namespace.
Extensions that are part of the iCalendar XML namespace MUST have element names that begin with "x-", and will be converted back to the equivalent extension property in iCalendar. For example, the "x-foo" element will convert to the "X-FOO" iCalendar property.
Daboo, et al. Standards Track [Page 16]
RFC 6321 xCal August 2011
Extensions that are in a namespace other than the iCalendar XML namespace SHOULD be preserved in the iCalendar representation using the "XML" iCalendar property described in Section 4.2. Only those extension elements that are immediate child elements of the IC: properties element are converted, any others are ignored.
This section describes an extension property for iCalendar, as covered in Section 8.2.3 of [RFC5545].
Property name: XML
Purpose: To embed extended XML-encoded iCalendar data in the iCalendar format.
Value type: The default value type is "TEXT". The value type can also be set to "BINARY" to indicate base64 encoded content.
Property parameters: IANA, non-standard, inline encoding, and value data type property parameters can be specified on this property.
Conformance: The property can be specified multiple times in any calendar component.
Description: The value of this property is a single XML 1.0 [W3C.REC-xml-20081126] element. The "XML" property MUST NOT be used to contain properties that are already defined in iCalendar. Since all elements in the urn:ietf:params:xml:ns:icalendar-2.0 namespace convert to a well-defined iCalendar object, the elements in this property MUST NOT be in the urn:ietf:params:xml:ns:icalendar-2.0 namespace. The XML element that is the value of this property MUST have an XML namespace declaration.
The default value type for this property is "TEXT", and normal BACKSLASH character encoding rules for that value MUST be applied. Note that the source XML can contain characters not allowed in "TEXT" property values. If this is the case, then the XML data MUST be base64 encoded. As required by [RFC5545], the "ENCODING" property parameter MUST be present and set to "BASE64", and the "VALUE" property parameter MUST be present and set to "BINARY".
The ordering of "XML" properties is not preserved in the conversion between xCal and iCalendar.
Format definition: This property is defined by the following notation:
Example: The following is an example of a location embedded in KML markup inside the "XML" property.
XML:<kml xmlns="http://www.opengis.net/kml/2.2">\n <Document>\n <name>KML Sample</name>\n <open>1</open>\n <description>An incomplete example of a KML docum ent - used as an example!</description>\n </Document>\n </kml>
In iCalendar, properties have a default value type specified by their definition, e.g., "SUMMARY"'s value type is "TEXT" and "DURATION"'s is "DURATION". When a property uses its default value type, the "VALUE" property parameter does not need to be specified on the property.
When new properties are defined or "X-" properties are used, an iCalendar<->xCal converter might not recognize them, and know what the appropriate default value types are, yet they need to be able to preserve the values. A similar issue arises for unrecognized property parameters. As a result, the following rules are applied when dealing with unrecognized properties and property parameters:
o When converting iCalendar into xCal:
* Any property that does not include a "VALUE" property parameter and whose default value type is not known MUST be converted using the value type XML element IC:unknown. The content of that element is the unprocessed value text.
* Any unrecognized property parameter MUST be converted using the value type XML element IC:unknown, with its content set to the property parameter value text, treated as if it were a "TEXT" value or list of "TEXT" values.
Daboo, et al. Standards Track [Page 18]
RFC 6321 xCal August 2011
o When converting xCal into iCalendar:
* Any IC:unknown property value XML elements are converted directly into iCalendar values. The containing property MUST NOT have a "VALUE" property parameter.
* Any IC:unknown parameter value XML elements are converted as if they were IC:text value type XML elements.
Example: The following is an example of an unrecognized iCalendar property (that uses a "DATE-TIME" value as its default) and the equivalent xCal representation of that property.
Example: The following is an example of an unrecognized iCalendar property parameter (that uses a "DURATION" value as its default) specified on a recognized iCalendar property, and the equivalent xCal representation of that property and property parameter.
For security considerations specific to calendar data, see Section 7 of [RFC5545]. Since this specification is a mapping from iCalendar, no new security concerns are introduced related to calendar data.
Daboo, et al. Standards Track [Page 19]
RFC 6321 xCal August 2011
The use of XML as a format does have security risks. Section 7 of [RFC3470] discusses these risks. See also the security discussion for the application/xml type in [RFC3023].
This section defines the MIME media type for use with iCalendar in XML data.
Type name: application
Subtype name: calendar+xml
Required parameters: None
Optional parameters: method, component, and optinfo as defined for the text/calendar media type in [RFC5545]; charset as defined for application/xml in [RFC3023]; per [RFC3023], use of the charset property parameter with the value "utf-8" is STRONGLY RECOMMENDED.
Encoding considerations: Same as encoding considerations of application/xml as specified in [RFC3023].
The authors would like to thank the following for their valuable contributions: Toby Considine, Bernard Desruisseaux, Keith Moore, Filip Navara, Simon Perreault, Arnaud Quillaud, Peter Saint-Andre, and Dave Thewlis. This specification originated from the work of the XML technical committee of the Calendaring and Scheduling Consortium.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC3023] Murata, M., St. Laurent, S., and D. Kohn, "XML Media Types", RFC 3023, January 2001.
[RFC3470] Hollenbeck, S., Rose, M., and L. Masinter, "Guidelines for the Use of Extensible Markup Language (XML) within IETF Protocols", BCP 70, RFC 3470, January 2003.
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, January 2004.
[RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data Encodings", RFC 4648, October 2006.
[RFC5545] Desruisseaux, B., "Internet Calendaring and Scheduling Core Object Specification (iCalendar)", RFC 5545, September 2009.
[W3C.REC-xml-20081126] Sperberg-McQueen, C., Yergeau, F., Bray, T., Paoli, J., and E. Maler, "Extensible Markup Language (XML) 1.0 (Fifth Edition)", World Wide Web Consortium Recommendation REC- xml-20081126, November 2008, <http://www.w3.org/TR/2008/REC-xml-20081126>.
[W3C.REC-xmlschema-2-20041028] Malhotra, A. and P. Biron, "XML Schema Part 2: Datatypes Second Edition", World Wide Web Consortium Recommendation REC-xmlschema-2-20041028, October 2004, <http://www.w3.org/TR/2004/REC-xmlschema-2-20041028>.
Below is a RELAX NG schema for iCalendar in XML. The schema is non- normative and given for reference only.
This schema uses the compact notation of RELAX NG. The numeric section numbers given in the comments refer to sections in [RFC5545]. The ordering of elements follows the section ordering of [RFC5545].
The RELAX NG compact notation "?" operator is used to indicate an unordered list of items. However, that operator, as defined, allows "mixing" each element that it operates on at any depth within the other elements, rather than just allowing "mixing" of siblings only. As a result, the schema provided allows certain constructs that are not allowed in iCalendar. Given that there is no sibling-only unordered list operator in RELAX NG, this is the best representation that can be given.
Patterns for date/time, duration, and UTC offset values are given because those differ from the values used in iCalendar. More restrictive schema with patterns and numerical limits could be derived from the example schema here if more comprehensive schema validation is required.
VERSION:2.0 PRODID:-//Example Corp.//Example Client//EN BEGIN:VTIMEZONE LAST-MODIFIED:20040110T032845Z TZID:US/Eastern BEGIN:DAYLIGHT DTSTART:20000404T020000 RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4 TZNAME:EDT TZOFFSETFROM:-0500 TZOFFSETTO:-0400 END:DAYLIGHT BEGIN:STANDARD DTSTART:20001026T020000 RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 TZNAME:EST TZOFFSETFROM:-0400 TZOFFSETTO:-0500 END:STANDARD END:VTIMEZONE BEGIN:VEVENT DTSTAMP:20060206T001121Z DTSTART;TZID=US/Eastern:20060102T120000 DURATION:PT1H RRULE:FREQ=DAILY;COUNT=5 RDATE;TZID=US/Eastern;VALUE=PERIOD:20060102T150000/PT2H SUMMARY:Event #2 DESCRIPTION:We are having a meeting all this week at 12 pm fo r one hour\, with an additional meeting on the first day 2 h ours long.\nPlease bring your own lunch for the 12 pm meetin gs. UID:00959BC664CA650E933C892C@example.com END:VEVENT BEGIN:VEVENT
Daboo, et al. Standards Track [Page 50]
RFC 6321 xCal August 2011
DTSTAMP:20060206T001121Z DTSTART;TZID=US/Eastern:20060104T140000 DURATION:PT1H RECURRENCE-ID;TZID=US/Eastern:20060104T120000 SUMMARY:Event #2 bis UID:00959BC664CA650E933C892C@example.com END:VEVENT END:VCALENDAR
<count>5</count> </recur> </rrule> <rdate> <parameters> <tzid><text>US/Eastern</text></tzid> </parameters> <period> <start>2006-01-02T15:00:00</start> <duration>PT2H</duration> </period> </rdate> <summary> <text>Event #2</text> </summary> <description> <text>We are having a meeting all this week at 12 pm for one hour, with an additional meeting on the first day 2 hours long.
Please bring your own lunch for the 12 pm meetings.</text> </description> <uid> <text>00959BC664CA650E933C892C@example.com</text> </uid> </properties> </vevent> <vevent> <properties> <dtstamp> <date-time>2006-02-06T00:11:21Z</date-time> </dtstamp> <dtstart> <parameters> <tzid><text>US/Eastern</text></tzid> </parameters> <date-time>2006-01-04T14:00:00</date-time> </dtstart> <duration> <duration>PT1H</duration> </duration> <recurrence-id> <parameters> <tzid><text>US/Eastern</text></tzid> </parameters> <date-time>2006-01-04T12:00:00</date-time> </recurrence-id> <summary> <text>Event #2 bis</text>