[uf-discuss] XFN is getting smoked by FOAF

23 views
Skip to first unread message

Costello, Roger L.

unread,
Mar 11, 2008, 8:32:34 AM3/11/08
to microforma...@microformats.org
Hi Folks,

I have been doing some digging into social networks that use XFN vice
FOAF.

Thus far, the only social network that I have found which uses XFN is
metafilter.com For an example, see:
http://www.metafilter.com/usercontacts/292 Thanks Scott Reynen for
pointing me to it.

Supposedly WordPress.com uses XFN but I have not been able to
demonstrate this (I have an account on WordPress and have tried
repeatedly to demonstrate the use of XFN but to no avail).

Conversely, I discovered that FOAF is used by many social networks.
Here is a list of 28 social networks that use FOAF:
http://esw.w3.org/topic/FoafSites

Here's an example of the use of FOAF on livejournal.com
http://danbri.livejournal.com/data/foaf (View >> Page Source to see the
actual FOAF document)

Another thing that I have discovered is that the relationship
information provided by FOAF is just "knows", e.g. Alice knows Bob.
XFN, on the other hand, has a rich set of relationship information,
e.g. Alice is a friend, co-worker, neighbor, and kin of Bob.
Furthermore, XFN is a much lighter-weight approach (just add the
relationship onto a link) than FOAF (create a complex RDF document).
So it would seem that XFN provides a richer and lighter-weight set of
information and would be a better choice for social networks.

WHY IS THERE SUCH LITTLE USE OF XFN BY SOCIAL NETWORKS?

/Roger

_______________________________________________
microformats-discuss mailing list
microforma...@microformats.org
http://microformats.org/mailman/listinfo/microformats-discuss

David Janes

unread,
Mar 11, 2008, 9:59:32 AM3/11/08
to Microformats Discuss
Weird -- I was just doing the same research and came up with somewhat
different conclusion! Sorry for the formatting here -- just cut and
paste from a spreadsheet. I'll have a look at your list though to
include in my master ;-)

Site Format
Buzznet FOAF
Del.icio.us N/A
Digg Custom, hCard
Facebook API
Flickr XFN
Jaiku XFN
Last.fm XFN
LiveJournal None
Ma.gnol.ia XFN, hCard
MSN Spaces a mess
MySpace API
Picassa no
Pownce XFN
Soup.io no
StumbleUpon Custom
Twitter API
Typepad FOAF
Tumblr No export
Upcoming Custom
Wordpress No
Vimeo Custom
YouTube Custom
Vox XFN

Regards, etc...

--
David Janes
Founder, BlogMatrix
http://www.blogmatrix.com
http://www.onaswarm.com
http://www.onamine.com

Tom Morris

unread,
Mar 11, 2008, 10:27:22 AM3/11/08
to Microformats Discuss
On Tue, Mar 11, 2008 at 1:59 PM, David Janes <david...@blogmatrix.com> wrote:
> Last.fm XFN

last.fm data is available as FOAF also thanks to a translator created
by Yves Raimond.

> LiveJournal None

LiveJournal supports FOAF.

> Pownce XFN

Pownce supports FOAF too.

> Twitter API

Twitter uses hCard/XFN and I provide a FOAF translator for data
available via their API.

--
Tom Morris
http://tommorris.org/

David Janes

unread,
Mar 11, 2008, 10:44:15 AM3/11/08
to t...@tommorris.org, Microformats Discuss
Hi Tom,

Thanks. I don't see Twitter friend information being publicly
available though; you need to be logged in, do you not? I was
compiling this table for my own benefit; once you get to logging it
gets worth taking about the API rather than microformats because you
don't have to worry about paging through results, such as here [1]

Regards, etc...

[1] http://twitter.com/scobleizer/friends/

--

Toby A Inkster

unread,
Mar 11, 2008, 11:36:59 AM3/11/08
to microforma...@microformats.org
Costello, Roger L. wrote:

> So it would seem that XFN provides a richer and lighter-weight set of
> information and would be a better choice for social networks.

XFN provides a richer set of *relationship* information, but FOAF provides
more than relationship information -- it also includes:

1. hCard-like contact information, but richer in in some ways,
having built-in support for a bunch of different instant
messaging types (as against hCard where these are hacked onto
the "URL" property), different types of URL, etc;

2. topics and interests;

3. group/club membership;

All of which are beyond the determined scope of XFN. Having that kind of
thing makes FOAF very useful for social-networking type sites.

In terms of relationships, FOAF *can* go beyond foaf:knows by taking
advantage of two things:

1. Implicit relationships. If two people have the same
foaf:workHomepage, then they are probably co-workers.

2. FOAF is RDF. You can mix and match RDF vocabularies.
http://vocab.org/relationship/

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 41 days, 21:39.]

The Semantic Web
http://tobyinkster.co.uk/blog/2008/03/09/sw/

Tom Morris

unread,
Mar 11, 2008, 2:19:02 PM3/11/08
to Microformats Discuss
On Tue, Mar 11, 2008 at 3:36 PM, Toby A Inkster <ma...@tobyinkster.co.uk> wrote:
> Costello, Roger L. wrote:
> > So it would seem that XFN provides a richer and lighter-weight set of
> > information and would be a better choice for social networks.
>
> XFN provides a richer set of *relationship* information, but FOAF provides
> more than relationship information -- it also includes:
>

It's not a choice - you can use both, and you can extend your FOAF
with other predicates - for example, the Relationships Ontology:
http://vocab.org/relationship/

Toby A Inkster

unread,
Mar 11, 2008, 4:26:42 PM3/11/08
to microforma...@microformats.org
Tom Morris wrote:

> It's not a choice - you can use both, and you can extend your FOAF
> with other predicate


Indeed. One could even use XFN with FOAF:

<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xfn="http://gmpg.org/xfn/11#"
xmlns:foaf="http://xmlns.com/foaf/0.1/">
<foaf:Person rdf:nodeID="p1">
<foaf:name>Alice</foaf:name>
<foaf:knows rdf:nodeID="p2"/>
<xfn:friend rdf:nodeID="p2"/>
</foaf:Person>
<foaf:Person rdf:nodeID="p2">
<foaf:name>Bob</foaf:name>
<foaf:knows rdf:nodeID="p1"/>
<xfn:friend rdf:nodeID="p1"/>
</foaf:Person>
</rdf:RDF>

Going the other way around:

<p about="#alice">Alice <a rel="foaf:knows friend" href="#bob">Bob</
a>.</p>
<p about="#bob">Bob <a rel="foaf:knows friend" href="#alice">Alice</
a>.</p>

--
Toby A Inkster
<mailto:ma...@tobyinkster.co.uk>
<http://tobyinkster.co.uk>

Premasagar Rose

unread,
Mar 11, 2008, 6:53:01 PM3/11/08
to Microformats Discuss
Toby A Inkster wrote:
> Going the other way around:
>
> <p about="#alice">Alice <a rel="foaf:knows friend"
> href="#bob">Bob</a>.</p>

> <p about="#bob">Bob <a rel="foaf:knows friend"
> href="#alice">Alice</a>.</p>

Now that's something I'd never thought of...

Prem.

--
http://premasagar.com | http://dharmafly.com

Tom Morris

unread,
Mar 11, 2008, 7:22:21 PM3/11/08
to Microformats Discuss
On Tue, Mar 11, 2008 at 10:53 PM, Premasagar Rose <p...@premasagar.com> wrote:
> Toby A Inkster wrote:
> > Going the other way around:
> >
> > <p about="#alice">Alice <a rel="foaf:knows friend"
> > href="#bob">Bob</a>.</p>
> > <p about="#bob">Bob <a rel="foaf:knows friend"
> > href="#alice">Alice</a>.</p>
>
> Now that's something I'd never thought of...
>

This is using the RDFa syntax. Some people like RDFa syntax, but I
think that it can often lead to repetition. In this scenario, you are
using XFN rel values to map to foaf:knows. It's probably a better idea
to simply use the XFN syntax, and then use a GRDDL profile to map that
to the underlying RDF semantics.

<p class="person" id="alice">Alice knows <a href="#bob" rel="friend">Bob</a></p>
<p class="person" id="bob">Bob knows <a href="#alice" rel="friend">Alice</a></p>

is a more natural HTML syntax* (you could go further and replace the
'person' class with an hCard (although you would then have to add
extra child elements to these elements to make them into valid
hCards). You then put together a GRDDL document which translates the
HTML above into the relevant RDF/XML syntax.

* It is also representable in HTML 4 and XHTML 1.0. Only a limited
subset of RDFa can be represented in HTML 4 or XHTML 1.0 - while the
more expressive parts require you use the W3C's RDFa+XHTML 1.1 DTD if
you want it to validate.

Anyway, that's just my opinion and not strictly on-topic for
microformats-discuss. Read the GRDDL Primer at:
http://www.w3.org/TR/grddl-primer/
Ask in #swig on irc.freenode.net or e-mail me off-list if you want to know more.

David Janes

unread,
Mar 11, 2008, 8:13:57 PM3/11/08
to t...@tommorris.org, Microformats Discuss
Two funny things:

- Typepad uses FOAF, but I can't find a single example of non-trivial FOAF files
- When I'm searching for foaf & xfn stuff right now on Google, this
discussion is already first page...

Regards, etc...
David

Costello, Roger L.

unread,
Mar 12, 2008, 9:47:00 AM3/12/08
to Microformats Discuss

A few days ago I was browsing through Twitter and at somebody's web
page I viewed the page source and found XFN being used. Unfortunately,
I didn't bookmark that page. Since then I have been unable to find any
pages on Twitter that contains XFN. Can someone point me to a web page
on Twitter which contains XFN?

/Roger

Tom Morris

unread,
Mar 12, 2008, 10:36:25 AM3/12/08
to Microformats Discuss
On Wed, Mar 12, 2008 at 1:47 PM, Costello, Roger L. <cost...@mitre.org> wrote:
>
> A few days ago I was browsing through Twitter and at somebody's web
> page I viewed the page source and found XFN being used. Unfortunately,
> I didn't bookmark that page. Since then I have been unable to find any
> pages on Twitter that contains XFN. Can someone point me to a web page
> on Twitter which contains XFN?
>

Almost every profile page.
http://twitter.com/tommorris
View source and search for rel="contact". It's there!

Angus McIntyre

unread,
Mar 12, 2008, 3:53:27 PM3/12/08
to Microformats Discuss
Costello, Roger L. wrote:
>
> A few days ago I was browsing through Twitter and at somebody's web
> page I viewed the page source and found XFN being used. Unfortunately,
> I didn't bookmark that page. Since then I have been unable to find any
> pages on Twitter that contains XFN. Can someone point me to a web page
> on Twitter which contains XFN?

The individual user pages on Twitter contain XFN.

For example:

http://twitter.com/microformats

The only catch here is that the only relation represented is 'contact',
and the link is to the user's Twitter page rather than an external site.

However, you could do a two-stage parse: follow the link to the user's
Twitter page, and then look for a link with 'rel="me"' to discover their
website (because links to the user's website are also XFN-marked, using
the 'me' relation).

Angus

Martin McEvoy

unread,
Mar 12, 2008, 10:27:24 AM3/12/08
to Microformats Discuss
hello roger

All the user pages on twitter have xfn attached to people who they are
following using rel="contact" in hcard

sample:

<span class="vcard">
<a title="Jack Dorsey" rel="contact" class="url"
href="http://twitter.com/jack"><img width="24" height="24"
src="http://s3.amazonaws.com/twitter_production/profile_images/49893972/Photo_22_mini.jpg" id="profile-image" class="photo fn" alt="Jack Dorsey"/></a>
</span>

>From Tantek's page
http://tinyurl.com/2y62zn

I haven't seen much else though, hope this helps.

Martin.

On Wed, 2008-03-12 at 09:47 -0400, Costello, Roger L. wrote:
> A few days ago I was browsing through Twitter and at somebody's web
> page I viewed the page source and found XFN being used.
> Unfortunately,
> I didn't bookmark that page. Since then I have been unable to find
> any
> pages on Twitter that contains XFN. Can someone point me to a web
> page
> on Twitter which contains XFN?

_______________________________________________

Reply all
Reply to author
Forward
0 new messages