hFoaf (Hypertext Friend of a Friend) has recently been updated to version 0.3, this one has been an important update because basically the XSLT needed a lot of tidying, refining, which also gave me an opportunity to add a few more actions such as being able to extract things that a user has made or authored, and a more complete expansion of XFN
What may be a good idea now would be to give you some clues on how to build hFoaf in a quick and dirty howto, but first... hFoaf is not a microformat or a proposed one, although it does rely heavily on microformats to determine the output of a FOAF RDF document.
- <div class="vcard" id="weborganics">
- <p class="fn n">
- <span class="given-name">Martin</span>
- <span class="family-name">McEvoy</span>
- <p><img alt="weborganics" src="http://weborganics.co.uk/images/me.jpg" class="photo"/></p>
- <p>Contact: <a class="email" href="mailto:email@example.com"
- <p>Web: <a rel="me" class="url" href="http://weborganics.co.uk/">WebOrganics</a></p>
- <div class="geo">
- <p>Location: <abbr title="53.7552" class="latitude">N 53.7552</abbr>,
- <abbr title="-2.3675" class="longitude">W -2.3675</abbr><p>
hCard classes and how they map to FOAF are as follows...
"url org"=> foaf:workplaceHomepage
Lastly The value of
foaf:mbox_sha1sum uses the
id="" of class
XFN relationship values are also expanded and added to your FOAF output.
rel="me" values that are links to popular social networking sites are mapped to
foaf:holdsAccount, although not all rel me links are added to the output, a list of supported sites are as follows...
- <a rel="me" href="http://delicious.com/weborganics">delicious</a>
All XFN relationships are defined as
foaf:weblog along with its XFN value eg:
- <a rel="friend met" href="http://www.djkippax.com/" title="James Kippax">James Kippax</a>
Interests and things that have been made or authored by a user are simply defined as
foaf:interest maps to hAtom
And thats it, easy eh? There is a Demo of how to use hFoaf With GRDDL along with some copy and paste code and some example output available at hFoaf Demo and also a webservice available at TransFormr that extracts a FOAF document