[Kolab-devel] UIDs as url with urn::uuid::
Christian Mollekopf
mollekopf at kolabsys.com
Wed Mar 14 13:42:18 CET 2012
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.
Cheers,
Christian
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
--
Christian Mollekopf
Software Engineer
Kolab Systems AG
Zürich, Switzerland
e: mollekopf at kolabsys.com
w: http://kolabsys.com
pgp: EA657400 Christian Mollekopf
More information about the devel
mailing list