[uf-discuss] UID in iCalendar

Ryan King ryan at technorati.com
Wed Jul 5 14:58:55 PDT 2006


On Jul 3, 2006, at 7:37 PM, Dimitri Glazkov wrote:

> If I read the spec correctly, yes, UID is required for the VEVENT
> component, which means that UID is required for hCalendar.
>
> Okkayy... So, here's another stab at the implied algorithm:
>
> * if UID is specified, use it
> * otherwise, if id attribute is specified, construct full URL with
> fragment identifier and use it as UID

I hate to make this more complex, but the construction of the full  
URL is not going to be entirely simple. I think for it to be robust  
it needs to know about http://microformats.org/wiki/rel-bookmark.

One reason for this is that not only does UID need to be unique, but  
it should also not change. The reason for this is that it would allow  
consuming applications to be sure that the new item is an update to  
the previous item.

A suggestion for finding the "full URL":

1. If the item has a sibling like a[rel=~bookmark], use that @href as  
a the value.
2. Else - use document URL.

The URL yielded by this algorithm can then be joined[1]. To the @id  
value of the element to create the UID.

There's also room here for other compound microformats to provide  
more specific information, but since rel-bookmark is the common  
mechanism, this shouldn't be too tough.

Sidenote: This is a reason we re-use stuff like rel-bookmark - it  
allows nice interoperability without consumers having to know about  
every microformat. They just have to know about the external stuff  
that matters to them.



-ryan

1. In the sense of this: http://corelib.rubyonrails.org/classes/ 
URI.html#M001617



More information about the microformats-discuss mailing list