[Kolab-devel] UIDs as url with urn::uuid::

Thomas Brüderli bruederli at kolabsys.com
Wed Mar 14 16:50:04 CET 2012


Christian Mollekopf wrote:
> Hey Thomas,
> 
> Yes, my "solution" was too sloppy. The reason is that xcard mandates an 
> uri scheme, not xCal though.
> You are right that this is an implementation detail, and should be 
> hidden in the conversion code.
> So I will add/remove the urn::uuid:: prefix internally.

Perfect!

But that doesn't solve the issue when other UIDs (e.g. from old Kolab
objects) are used because something like
"20101025160559.58545uuutb65kgsg at localhost" doesn't conform to the UID
scheme AFAIK. Any suggestions how to handle this case?

~Thomas

> 
> On 2012-03-14 12:21, Thomas Brüderli wrote:
>> Hello Christian
>>
>> I have another question about UIDs in libkolabxml. The lib offers 
>> getters
>> and setters for object UIDs and they're also generated automatically 
>> for
>> new objects. They are saved as URIs with the urn::uuid:: prefix in 
>> the xml.
>>
>> Now I was wondering whether the urn::uuid:: prefix is actually part 
>> of the
>> UID or is it just the protocol used for conforming the spec? 
>> Currently the
>> complete string is returned by uid() and I can also set an arbitrary 
>> string
>> without the prefix with setUid() which will result in an invalid URI 
>> saved
>> in the XML block. For the IMAP storage we also save the UID in the 
>> message
>> subject and use it for searching. This currently also includes the
>> urn::uuid: prefix.
>>
>> I think the setters and getters of the lib should handle pure UIDs 
>> without
>> the urn prefix but rather add it when saving (to conform with the 
>> spec of
>> the UID field being represented as an URI) and remove it when reading 
>> the
>> format.
>>
>> Here's an example of converting from the old Kolab format:
>> I have an object with UID 20101025160559.58545uuutb65kgsg at localhost. 
>> This
>> results in 
>> <uid><uri>20101025160559.58545uuutb65kgsg at localhost</uri></uid>
>> when saving into the new format which is IMO not correct. Without 
>> changing
>> UIDs of a converted object this should rather result in
>> <uid><text>20101025160559.58545uuutb65kgsg at localhost</text></uid>
>>
>> What was the reason to use URIs for saving UIDs anyways?
>>
>> Regards,
>> Thomas
>>
>> _______________________________________________
>> Kolab-devel mailing list
>> Kolab-devel at kolab.org
>> https://www.intevation.de/mailman/listinfo/kolab-devel
> 




More information about the devel mailing list