Revision as of 01:43, 1 November 2007 by Admin (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


The FoafVocab includes a property 'foaf:weblog' which relates an Agent to a document that is their weblog.

Here is some example markup showing how to describe someone and their weblog (taken from Joshua's XML listing of Microsoft bloggers).

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf=""
  <foaf:name>Joshua Allen</foaf:name>
  <foaf:workplaceHomepage rdf:resource=""/>
    dc:title="Better Living Through Software" 
    dc:description=" Life at Microsoft, the software industry from a rational perspective"   
  <rdfs:seeAlso rdf:resource=""/>
  <!-- this last property is a slight stretch since the referenced feed currently uses RSS2, but is imho ok... -->


Since this is RDF, it could be decorated with further information, eg. an rdfs:seeAlso to a FOAF file for the blogger, etc. Here we show the use of the foaf:workplaceHomepage property which relates a Person to the homepage of somewhere they work.

Here is a graph of the data structure encoded in the RDF/XML markup shown above. It was generated using W3C's online parser, validator and visualisation service, and reveals the underlying "entities and relationships" graph structure that RDF uses. You can see nodes in the diagram that correspond to the things we're describing: Joshua, his Blog, and the homepage of a place he works.

Generating the FOAF using XSLT

Here's a simple XSLT stylesheet that takes the XML listing of Microsoft bloggers and converts it into a FOAF document.

At the time of writing there's a slight issue with processing the XML listing as the encoding seems to be incorrect (should be iso-8859-1). If that were corrected then we could could perform the conversion automatically.