I’ve spent a few days thinking about pCard format, here are the initial results of my work…
This is the XTHML microformat, which is completely compatible with hCard microformat:
<div class="vcard">
<span class="class">Public</span>
<span class="fn">Mark Pesce</span>
<span class="nickname">mpesce</span>
<span class="uid">6fa459ea-ee8a-3ca4-894e-db77e160355e</span>
<img class="photo" src="http://upload.wikimedia.org/wikipedia/en/3/3d/Mark-cafelife.jpg" atl="Mark Pesce" />
<a class="url" href="twitter:mpesce">Twitter</a>
<a class="url" href="feed:http://blog.futurestreetconsulting.com/?feed=rss2">The Human Network</a>
<a class="url" href="flickr:hyperpeople">Flickr</a>
<a class="url" href="delicious:mpesce">del.icio.us</a>
<span class="rev">2010-07-11T11:39:00</span>
</div>
Which renders to the equivalent in JSON:
{ "vcard" : [
{ "class": "Public" },
{ "fn": "Mark Pesce" },
{ "nickname": "mpesce" },
{ "uid": "6fa459ea-ee8a-3ca4-894e-db77e160355e" },
{ "photo": "http://upload.wikimedia.org/wikipedia/en/3/3d/Mark-cafelife.jpg" },
{ "twitter": "mpesce", "id": "Twitter" },
{ "feed": "http://blog.futurestreetconsulting.com/?feed=rss2", "id": "The Human Network" },
{ "flickr": "hyperpeople", "id": "Flickr" },
{ "delicious": "mpesce", "id": "del.icio.us" },
{ "rev": "2010-07-11T11:39:00" } ]
}
Then there’s the XHTML microformat for a Private pCard (contains more sensitive contact information):
<div class="vcard">
<span class="class">Private</span>
<span class="fn">Mark Pesce</span>
<span class="nickname">mpesce</span>
<span class="uid">6fa459ea-ee8a-3ca4-894e-db77e160355e</span>
<img class="photo" src="http://www.abc.net.au/unleashed/images/mark_pesce_100.jpg" atl="Mark Pesce" />
<abbr title="1962-12-08" class="bday">Dec 8 1962</abbr>
<div class="tel"><span class="type">Cell</span>
<span class="value">+61 418 653 187</span></div>
<a class="email" href="mailto:mark@markpesce.com">mark@markpesce.com</a>
<a class="url" href="feed:http://blipvert.markpesce.com/?feed=rss2">Blipvert Blog</a>
<a class="url" href="steganoflickr:mpesce">How Not To Be Seen</a>
<span class="rev">2010-07-11T12:05:00</span>
</div>
And its JSON equivalent:
{ "vcard" : [
{ "class": "Public" },
{ "fn": "Mark Pesce" },
{ "nickname": "mpesce" },
{ "uid": "6fa459ea-ee8a-3ca4-894e-db77e160355e" },
{ "photo": "http://www.abc.net.au/unleashed/images/mark_pesce_100.jpg" },
{ "bday": "1962-12-08" },
{ "telephone": { "type": "Cell", "value": "+61 418 653 187" } },
{ "email": "mark@markpesce.com" },
{ "feed": "http://blipvert.markpesce.com/?feed=rss2", "id": "Blipvert Blog" },
{ "steganoflickr": "mpesce", "id": "How Not To Be Seen" },
{ "rev": "2010-07-11T12:05:00" } ]
}
This draft of pCard format is not meant to be exhaustive. I’ve left out some of the existing hCard data in these examples, but they could easily be put into the pCard, as the format is entirely backward-compatible. No changes need be made to hCards to support pCards – the differences are all semantic, not grammatical. I know this because I ran these two pCards through the hCard validator, and they came up as 100% validated.
Everything here is probably fully self explanatory except, in the case of the XHTML pCard, for the URL accessor methods, which don’t read ‘http:’, as they normally do, but instead read ‘twitter’ and ‘feed’ and ‘steganoflickr’, etc. In this case, the accessor method has been replaced by the service name to be used as an accessor. There is a one-to-one correspondence between service names and sharer/listener modules. This is the place where a specific module is bound to a particular entry on the pCard. In the case where a complete URL is required, the URL accessor method is provided after the service specifier.
I will post this all to the wiki presently so that we can start to explore it.