This is an XFN file
XFN (XHTML Friends Network) is a simple way to represent human relationships using hyperlinks. In recent years, blogs and blogrolls have become the fastest growing area of the Web. XFN enables web authors to indicate their relationship(s) to the people in their blogrolls simply by adding a 'rel' attribute to their tags.
This is an attempt to extract RDF/FOAF form XFN marked XHTML. For example, I assert here that I know Dan Brickley and Leigh Dodds. Each <a>
element contains rel
attribute with relevant XFN relationship value.
A sample XLST file provided to extract FOAF/RDF from this file. Use W3C online XSLT service, or if it doesn't work (sometimes shows '502 Proxy Error'), try this local conversion.
This XLST assumes:
- The mail address of the author is provided via <link> element whose
rev
attribute has value "made", andhref
attribute has mbox uri. href
attribute of each <a> element (with XFN rel) has a uri of the friend's homepage (hence, foaf:homepage). This could be foaf:weblog.- The content of above <a> element is the name of the person
- Optionally, if a <meta> element with
name="author"
presents, use itscontent
as the name of the subject foaf:Person
Similar approach found at the discussion by Dan Connolly, and his XLST grokXFN.xsl.