<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by hAtom2Atom.xsl (2007-08-09) -->
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en" xml:base="http://weborganics.co.uk/">
  <updated><!--
Using the newest datetime from the entry level.

Here is a sorted list from all the dates at the feed level:

20090102T121425 (2009-01-02T13:14:25+01:00)

-->2009-01-02T13:14:25+01:00</updated>
  <id>http://weborganics.co.uk/#content</id>
  <link rel="alternate" href="http://weborganics.co.uk/#content" type="text/html"/>
  <title>WebOrganics - The Web, Naturally!</title>
  <entry>
    <title>Hypertext Friend of a Friend</title>
    <id>http://weborganics.co.uk/articles/show/hypertext-friend-of-a-friend</id>
    <link rel="alternate" href="http://weborganics.co.uk/articles/show/hypertext-friend-of-a-friend" title="Hypertext Friend of a Friend" type="text/html"/>
    <updated>2009-01-02T13:14:25+01:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
<p><a href="http://weborganics.co.uk/hFoaF/">hFoaf</a> (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 <a rel="nofollow" href="http://gmpg.org/xfn/11">XFN</a> <code>rel="me"</code>.</p>

<p>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 <a href="http://xmlns.com/foaf/0.1/">FOAF</a> RDF document.</p>
<p>The first step is to create a <a href="http://microformats.org/wiki/hcard">hcard</a>, then add an <code>id=""</code> to the hcard and a <code>class="url"</code> with the <a href="http://gmpg.org/xfn/11">XFN</a> relationship <code>rel="me"</code></p>
<p>Example:</p>
<ol class="code">
<li>&lt;div class="vcard" id="weborganics"&gt;</li>
<li>&lt;p class="fn n"&gt;</li>
<li>	&lt;span class="given-name"&gt;Martin&lt;/span&gt; </li>
<li>	&lt;span class="family-name"&gt;McEvoy&lt;/span&gt;</li>
<li>&lt;/p&gt;</li>
<li>&lt;p&gt;&lt;img alt="weborganics" src="http://weborganics.co.uk/images/me.jpg" class="photo"/&gt;&lt;/p&gt;</li>
<li>&lt;p&gt;Contact: &lt;a class="email" href="mailto:weborganics@googlemail.com" </li>
<li>   id="sha1:3cc1a719a5023e9087ced9c74610b66cfbb58d54"&gt;weborganics@googlemail.com&lt;/a&gt;&lt;/p&gt;</li>
<li>&lt;p&gt;Web: &lt;a rel="me" class="url" href="http://weborganics.co.uk/"&gt;WebOrganics&lt;/a&gt;&lt;/p&gt;</li>
<li>&lt;div class="geo"&gt;</li>
<li>	&lt;p&gt;Location: &lt;abbr title="53.7552" class="latitude"&gt;N 53.7552&lt;/abbr&gt;,</li>
<li>	&lt;abbr title="-2.3675" class="longitude"&gt;W -2.3675&lt;/abbr&gt;&lt;p&gt;</li>
<li>&lt;/div&gt;</li>
<li>&lt;/div&gt;</li>
</ol>
<p>hCard classes and how they map to FOAF are as follows...</p>
<ul>
	<li><code>"vcard"</code> =&gt; foaf:Person</li>
	<li><code>"fn"</code> =&gt; foaf:name</li>
	<li><code>"given-name"</code> =&gt; foaf:givenname</li>
	<li><code>"family-name"</code> =&gt; foaf:family_name</li>
	<li><code>"email"</code> =&gt; foaf:email</li>
	<li><code>"url"</code> =&gt; foaf:homepage</li>
	<li><code>"url org"</code> =&gt; foaf:workplaceHomepage</li>
	<li><code>"photo"</code> =&gt; foaf:img</li>
</ul>
<p>The <a href="http://microformats.org/wiki/geo">geo</a> component of hcard maps to <code>foaf:based_near</code> and defined using the <a href="http://www.w3.org/2003/01/geo/wgs84_pos">WGS84 Geo Positioning RDF vocabulary</a>...</p>
<ul>
	<li><code>"geo"</code> =&gt; geo:Point</li>
	<li><code>"latitude"</code> =&gt; geo:lat</li>
	<li><code>"longitude"</code> =&gt; geo:long</li>
</ul>
<p>Lastly The value of <code>foaf:mbox_sha1sum</code> uses the <code>id=""</code> of class <code>email</code> prefixed with <code>"sha1:"</code></p>
<p>XFN relationship values are also expanded and added to your FOAF output. <code>rel="me"</code> values that are links to popular social networking sites are mapped to <code>foaf:holdsAccount</code>, although not all rel me links are added to the output, a list of supported sites are as follows...</p>
<ul>
<li>twitter</li>
<li>flickr</li>
<li>digg</li>
<li>ma.gnolia</li>
<li>last.fm</li>
<li>delicious</li>
<li>pownce</li>
<li>youtube</li>
</ul>
<p>Example:</p>
<ol class="code">
<li>&lt;a rel="me" href="http://delicious.com/weborganics"&gt;delicious&lt;/a&gt;</li>
</ol>
<p>All XFN relationships are defined as <code>foaf:knows</code>, <code>foaf:Person</code>, <code>foaf:name</code> and <code>foaf:weblog</code> along with its XFN value eg: <code>xfn:met</code>.</p>
<p>Example:</p>
<ol class="code">
<li>&lt;a rel="friend met" href="http://www.djkippax.com/" title="James Kippax"&gt;James Kippax&lt;/a&gt;</li>
</ol>
<p>Interests and things that have been made or authored by a user are simply defined as <code>foaf:interest</code> maps to <a href="http://microformats.org/wiki/hatom">hAtom</a> <code>rel="bookmark"</code>.</p>
<p>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 <a href="http://weborganics.co.uk/demo/hfoaf.html">hFoaf Demo</a> and also a webservice available at <a href="http://transformr.co.uk/">TransFormr</a> that extracts a FOAF document</p>
</div>
    </content>
    <author>
      <name>Martin</name>
    </author>
    <category term="hFoaf" scheme="http://weborganics.co.uk/taggings/" label="hFoaf"/>
    <category term="microformats" scheme="http://weborganics.co.uk/taggings/" label="microformats"/>
    <category term="FOAF" scheme="http://weborganics.co.uk/taggings/" label="FOAF"/>
  </entry>
</feed>
