[microformats-discuss] Wanted: Sample code to convert vcard to hcard

brian suda brian.suda at gmail.com
Mon Aug 8 08:49:29 PDT 2005


Julian Bond wrote:
My own vcard looks like this

>
> BEGIN:VCARD
> N:julian.bond
> X-SKYPE-USERNAME:julian.bond
> FN:Julian Bond
> X-SKYPE-SEX:1
> X-SKYPE-LANGUAGE:en
> X-SKYPE-COUNTRY:gb
> X-SKYPE-PROVINCE:Herts
> X-SKYPE-CITY:Ware
> TEL;HOME:01920 412 433
> TEL;WORK:01920 412 433
> TEL;CELL:07759 072173
> EMAIL:julian.bond at voidstar.com julian.bond at ecademy.com
> julian_bond at voidstar.com
> URL:http://ecademy.com/account.php?id=1
>
> They've effectively created their own name space. So how would this
> translate into hCard?
>
> And finally, what would a Skype phone number look like both in vcard
> and hcard?
>
There has been a discussion about encoding SIP phone numbers in hCard.
Since hCard is structured from the RFC there is currently no way to do
so. The current solution being developed is to encode this as a URL with
a specific protocol. So your SKYPE phone would be something like:
<a href="skype://123.456.7890" class="url">My Skype Number</a>
Obviously, the protocol would be specific to the application (aim://
msn:// tapi:// skype:// sip:// ...) but the class="url" would be the
same and you would change the protocol value to the USERNAME or phone
number, etc.

As for the X-SKYPE-... namespace, there is no way for an hCard->vCard
transforming application to be aware all different types of X-PARAMs
possible. Because you could mix both CSS class names and Microformat
properties on the same element, it is impossible to determine if
X-SKYPE-SEX is a special hCard value outside the scope of the profile, a
CSS style, or something else!

I hope this answes your question.
-brian



More information about the microformats-discuss mailing list