[uf-discuss] hFoaF - Hypertext Friend of a Friend

Toby A Inkster mail at tobyinkster.co.uk
Thu Dec 4 11:05:24 PST 2008

Good work, Martin. As I am rubbish at XSLT, these few notes are  
mainly from a FOAF perspective:

1. RDF (and thus FOAF, which is an application of RDF) uses URIs to  
identify virtually everything. (There are exceptions: literals and  
blank nodes.) What is important for RDF to work is that each distinct  
resource (i.e. "thing") has a distinct URI. No two resources can  
share a URI - syntactically there is nothing to prevent them sharing,  
but semantically it doesn't work - things fall apart when you start  
feeding your data into any sort of reasoning system.

hFoaF, when dealing with XFN input creates RDF triples[1] like this:

	    <http://bob.example.com/> .

	    <http://bob.example.com/> .

Here you are clearly using the same URI to represent both Bob and  
Bob's web page. What if we added say, a creation date for <http:// 
bob.example.com/>? Would that mean that Bob was born on that date? Or  
perhaps it was the day he first uploaded some HTML to his server?

The easy solution is to use the URI to represent Bob's web page only  
and then choose a different URI for Bob. Choosing a different URI for  
Bob is pretty easy to do - simply give his web page a prefix or  
suffix. e.g. you could create these triples:

	    <x-person:http://bob.example.com/> .

	    <http://bob.example.com/> .

Where "x-person:" is a randomly made-up, unregistered URI scheme.  
Using an unregistered, made-up URI scheme is obviously suboptimal  
though, so if you wanted to get very fancy, you could use Google's  
(also unregistered, but at least not pulled out of thin air) "sgn:"  
URI scheme. SG Node Mapper[2] can be used to determine the sgn URI  
for a person from their web page's URI, but it may be tricky to use  
it in XSLT.

2. You seem to have rel=author and rev=made back to front. They are  
not for linking to stuff which you've authored/made; they are for  
linking *from* stuff that you've authored *to* you! If you want to  
link from *you* to stuff that you've authored, use rev=author or  

3. In your example output, your foaf:name is "MartinMcEvoy" (no space).

1. Using Turtle notation:
2. Google Social Graph Node Mapper:

Toby A Inkster
<mailto:mail at tobyinkster.co.uk>

More information about the microformats-discuss mailing list