[uf-discuss] the role of the X-WR-CALNAME property of iCalendar

Barry Cornelius barry.cornelius at oucs.ox.ac.uk
Wed Jan 9 02:58:56 PST 2008


We have been successfully using Brian Suda's xhtml2vcal.xsl (available 
from http://suda.co.uk/projects/X2V/) to transform some hCalendar embedded 
in an Atom 1.0 newsfeed to iCalendar format.  It is used as part of a 
local application for generating newsfeeds called OXITEMS.  After 
switching from Outlook 2003 to Outlook 2007, a colleague is reporting a 
problem with the iCalendar that OXITEMS is generating.

It appears that if the iCalendar provides an X-WR-CALNAME property, 
Outlook 2007 will not import the event(s) into your main Outlook Calendar 
but it will create a new calendar with a name that is the value of the 
X-WR-CALNAME property.

Currently, xhtml2vcal.xsl always generates an X-WR-CALNAME property and 
gives it the value of the title element of the input document (using an 
empty string if there is no title element in the input).

We often provide web pages listing events with iCalendar buttons for each 
event.  The aim is to make it easy for a user to import details of an 
event into whatever calendaring system they are using.  It would be silly 
if the user got a new calendar every time they clicked on an iCalendar 
button.  The OXITEMS system also has the ability to send out a message 
with an iCalendar attachment whenever an event item is added to a 
newsfeed.  Again it would be silly if the recipient of this message got a 
new calendar created if they opened the attachment.

Here's an analysis of what happens for various calendar clients.

If the X-WR-CALNAME property is present, Outlook 2007 behaves as follows:
(a) If you open an iCalendar file, Outlook 2007 will create a new 
calendar.  If you open it again, it will create another new calendar (with 
the same name).
(b) If, in Outlook 2007, you explicitly import an iCalendar file, it will 
ask you whether you want to create a new calendar or import the event(s) 
into your calendar.  If you choose the later, it assumes you only have one 
calendar even though Outlook 2007 allows you to create as many calendars 
as you wish.  If instead you choose "new calendar", it will create a new 
calendar.  If you repeat the import it will create another new calendar 
with the same name.

If the X-WR-CALNAME property is absent, Outlook 2007 will import the 
event(s) into your main Outlook Calendar.

Google Calendar, Outlook 2003 and WebCalendar ignore the contents of the
X-WR-CALNAME property if it is present.  If you have more than one calendar, 
Google Calendar allows you to select the calendar you want to import into.

With Apple iCal, you get the same behaviour no matter whether there is an 
X-WR-CALNAME property or not.  iCal asks you whether you want to import 
the event(s) into a new calendar or into an existing calendar and if the 
latter it asks which one.  This happens both when you double-click an 
iCalendar file and also when you explicitly import the file.

I'm trying to work out what to do:
(a) continue as now (always providing an X-WR-CALNAME property) making it
     an inconvenience for Outlook 2007 users;
(b) always omit the X-WR-CALNAME property which, for Outlook 2007, would
     mean that all the events would go into your main calendar which may
     be not what you want;
(c) include the X-WR-CALNAME property only if there is more than one
     event in the calendar.

--
Barry Cornelius            Computing Services, University of Oxford
                                13 Banbury Road, Oxford, OX2 6NN, UK 
barry.cornelius at oucs.ox.ac.uk  Phone:01865 273267 or +441865 273267
http://www.barrycornelius.com        Reception:273200    Fax:273275



More information about the microformats-discuss mailing list