
if the photo software in this p800 camera-phone knew how to talk to a bluetooth GPS, ...
someday... foaf + location + photos ...
not yet... when?
Here's how to add a foaf:weblog property to a FOAF document.
Anywhere there is an element describing a Person (or for that matter a company, group etc), you can include a sub-element that mentions their weblog(s):
So, if you start out with markup like this:
(Nicole just asked me how to do this, so she gets to be the example...)
<foaf:Person> <foaf:name>Nicole Sullivan</foaf:name> <foaf:homepage rdf:resource="http://www.apocalypse.org/~nicole/"/> </foaf:Person>
...and add a weblog property of the Person described, it should look like this:
<foaf:Person> <foaf:name>Nicole Sullivan</foaf:name> <foaf:homepage rdf:resource="http://www.apocalypse.org/~nicole/"/> <foaf:weblog rdf:resource="http://www.stubbornella.org/"/> </foaf:Person>
It doesn't matter exactly where you put the foaf:weblog entry, so long as it is immediately 'inside' the foaf:Person element. You can have the foaf:homepage bit first, or foaf:img, foaf:workplaceHomepage etc. there too., all alongside each other in any order.
This same technique works if you are describing your friends and collaborators in a FOAF file; just add in a foaf:weblog property inside the foaf:Person section that describes them.
That's all there is to it. Your FOAF file now describes the address of your weblog, making it easier to find for FOAF and other Semantic Web tools.
Note that If you have multiple weblogs, list them each separately, one after another. Note also that each foaf:weblog described in FOAF has to be the weblog of one 'thing' (whether Person, Company or whatever). So describing collaboratively edited weblogs is a topic I'll come back to in a future article.
Ben Trott has uploaded version 0.02 of XML::FOAF to CPAN. This is a Perl module designed to make it easier for programmers to work with FOAF documents. It builds upon the RDF::Core module from Ginger Alliance and can use Crypt::OpenPGP to check digitally signed FOAF files. Version 0.02 of XML::FOAF adds autodiscovery support. The documentation shows how to load FOAF from a URI, which can either be a directly named FOAF file, or an HTML page which references a FOAF file using the following markup:
<link rel="meta" type="application/rdf+xml" title="FOAF" href="http://foo.com/my.foaf" />See Ben's earlier Fun with FOAF article for more examples of usage and potential applications.
Ken MacLeod has announced a new tool, 'FOAF Check', which reads a FOAF file, checks its PGP signature and extracts portions of the RDF, eg. for inclusion in weblog comments (via. Movable Type cookies etc.).
This approach provides a way to avoid re-entering the same data over and again across multiple sites - you just point them at your FOAF document and let them read what you've already said about yourself. Ken's writeup points to previous work on FOAF/PGP-based decentralised profiles.
This is really cool, basically. Looking at the detail it does suggest we need to do a little more work on the FOAF vocabulary for clarifying which of several people mentioned in any given FOAF file is the topic of that file. There are currently several ways we could indicate this; one needs to be picked and documented more clearly in the FOAF spec. It also isn't immediately clear (to me!) how we get from knowing that a FOAF file validates against some PGP key to knowing that the PGP identity is the one that our application wants it to be. But it's a step in the right direction...
Also the combination of foafbot and tools like foaf-check provide good reason for people to actually start using PGP (or GNU Privacy Guard (GPG), the Free GNU version), That can only be a good thing.
One other topic this throws up: is it reasonable to expect people to remember and quote their FOAF URLs? Or should we ask for their homepage, and look for a LINK REL in their homepage markup pointing to their FOAF data?
UserCreations have just announced the release of Spring v1.3.1 for MacOS X.
Spring provides a canvas-style desktop interface, replacing the ageing 'documents and folders' metaphor with a UI based on several content types (people, places, products, books, music, ...), with appropriate kinds of action associated with each type of thing. So you might invite a person to an event, draw a map of a location, etc.
Version 1.3 added 'drag and drop' FOAF support:
Friend of a Friend (FOAF) format is an increasingly common web format for people. If you see a FOAF button on a web page, drag it in to Spring
This support is improved in v1.3.1: a "Refesh From Web" feature allowing FOAF-derived person entries in Spring to pick up the changes from remote FOAF files.
So needless to say, I've been experimenting with Spring on my Mac laptop, and it looks pretty interesting and a hint at what desktops might evolve into. I really like the way it associates actions with entity-types in a way that takes advantage of remote Web services. That, coupled with the "refresh from Web" approach to using remote RDF/XML descriptions (FOAF etc.) is quite a compelling combination.
So in practice, I found the FOAF support worked with some but not all FOAF files from the public FOAFBulletinBoard. I'm not sure what the issue is, perhaps something to do with the mime-types these documents are served up as, or perhaps Spring has certain expectations for the syntactic form of a FOAF document. If others are trying out the FOAF support, perhaps leave comments here or at the UserCreations article, perhaps we can figure out how to help.
From the oops-I-forgot-to-post-this drafts folder: Microsoft have a new thing called three degrees that may be of interest to FOAF developers and others working on standards-based collaborative tools. Does anyone know whether it's a closed box, or whether there is some prospect of interop with other systems?
This is a quick writeup of an application of RDF query tools to the problems of weblog discovery and filtering. It shows off RDF's ability to merge XML-encoded data from multiple sources, answering queries which couldn't be answered by considering each source separately.
Imagine you are looking for Weblog URLs (and perhaps their associated RSS feeds) of people who have written Perl software that is in CPAN. At our disposal are two data sources: a data dump listing the SHA1 hashes of CPAN author email addresses. For each author, we have an @cpan address, plus one of their normal addresses (cpan2foaf.pl). A second RDF/XML source of FOAF data is a document listing other information about several people who happen to write for CPAN. That file is a stand-in for their real FOAF files, which would typically be collected from each of their sites individually. For simplicity, we show that data as a single document.
The first datasource mentions several hundred people who contribute to CPAN, and enough information to identify them (by hash of email address). The second datasource contains some of the same identifiers (their hashed home email address) plus, more interestingly, information about their names, homepages, weblogs and suchlike. How can we get answers to questions like "find me weblog addresses for CPAN contributors?".
So... we load the RDF up into an (SQL-backed) RDF database, make sure to merge the data (more on which another time), and it is available for query.
Here's the SquishSQL query we send to the RDF software:
SELECT ?name, ?homepage, ?weblog, ?x, ?feed,
WHERE (foaf::name ?x ?name)
(dc::contributor ?x http://www.cpan.org/)
(foaf::homepage ?x ?homepage)
(foaf::weblog ?x ?weblog)
(foaf::rssfeed ?weblog ?feed)
USING dc for http://purl.org/dc/elements/1.1/
foaf for http://xmlns.com/foaf/0.1/
This RDF query language is called Squish as it is loosly SQL-ish in the way it is used. We send the database a question asking for a selection of fields, and we get back a table of results. Here are name/homepage/weblog 'hits' corresponding to the rows returned by the query system:
Earle Martin (http://downlode.org/ weblog: http://downlode.org/blog.pl) Jo Walsh (http://www.zooleika.org.uk weblog: http://www.zooleika.org.uk/blog.html) Norm Walsh (http://nwalsh.com/ weblog: http://norman.walsh.name/)
Here is a simple Ruby lookup script which extracts the tabular result set from the database. The query extracts information (in this case weblog address etc) about people who contribute to CPAN and are known to the database.
Bugs and disclaimers:
I used the dc:contributor property incorrectly in this demo. It should relate a document to one of its contributors. I used it backwards, and slightly incorrectly, by relating a person to a homepage of a project they contribute to. I should use foaf:project instead.
The demo links are also a bit inconsistent, in that I added in a clause to the query which also asks for the RSS feed of a weblog, but didn't commit the new resultset output to the website yet. I'll try to get that fixed.
This brief writeup assumes perhaps a bit too much background knowledge for those new to RDF to follow in detail, also things like SHA1 'hashing' could do with elaboration. Still I hope the basic approach is clear: RDF allows us to merge disparate datasources and get back answers that depend on their combination. And that we can use that for filtering and discovery of weblogs, given a description of some weblogs and their authors.
Some interesting work with FOAF and XSLT documented in a Japanese weblog. The links to foaf.xml, foafstyle.xsl and foaf.html show the generation of an HTML Web page from RDF/XML source using an XSLT transformation. The article also references another foaf.xsl, another Weblog post about FOAF and a Japanese Wiki page about FOAF. So the relatively new foaf:weblog property seem to be catching on, presumably since it was covered in Masahide Kanzaki's Introduction to FOAF.
Apologies for the shallow writeup, I wish I could read these pages! I couldn't even manage copy a foaf:name my browser into this weblog entry... Feel free to add more details using the 'comments' feature if you can read Japanese.
IndyMedia is a project well worth supporting. The mainstream media industry is great and all, but after a while, it gets boring being lied to. IndyMedia is a brave effort towards a more inclusive approach to media access, although currently it lacks much by way of trust and 'provenance' infrastructure. Slashdot, the geek news site, has more filtering and trust machinery than most current IndyMedia sites. IndyMedia risks being drowned out by noise and spam...
So I've been experimenting with a proposal for FOAF augmented RSS feeds in the Mir content management system which now powers the UK IMC. It raises issues about privacy, identity, and (most immediately) technical concerns about the proper use of 'dc:creator' in RSS 1.0 feeds.This is a modest step towards some machinery for filtering IndyMedia news through 'web of trust' machinery. Not censorship, just a way of keeping track of who said what, and what other things those sayers have said...
...is to engineer more coincidences in the world. There are several reasons for FOAF, and this is one that hasn't yet been documented. After my mostly unexpected involvement in the W3C Semantic Web Tour as it hit London, I was chatting to Matt Biddulph about FOAF and the 'vapourware for the masses' thing, and it occured to me that I'd never written this up. FOAF was designed as technology to encourage coincidence. You're walking past a pub... you go to a conference... you're standing at the barracades... or sitting in an interview... and the last thing you'd expect... a friend of a friend. Everything's connected. Who'd have thought it?
To pull this off, we need to ground FOAF in the real word. Foaffinger (a wireless / rendevous FOAF detector), RDF GeoInfo, Bluetooth and more are all part of the picture. Every new gadget, every new dataset, makes the unexpected more expected.

I'm experimenting with Eric Sigler's
FOAF plugin software for use with Six Apart's Movable Type. In passing, I've upgraded the rdfweb.org MT installation and installed Ben Trott's OpenPGP and XML::FOAF Perl modules from CPAN. This in turn uses
Ginger Alliance's RDF::Core module (which in turn uses XML::Parser, Expat etc...).
So after installing this stack of interesting software on rdfweb.org, I'm back reading the manual for Movable Type and musing on how the FOAF MT plugin relates to MT's commenting system and ideas for using FOAF for login information, distributed identity description and suchlike. And also, to be honest, geting used to the fact that there's a Perl module for FOAF now. Interesting times...
So anyway, I'll be fiddling around with the comments system on this site, Advance apologies if I break anything. At this point, all I've done is install the software, I'll be experimenting with it in my spare time over the next week or few.
Nearby in the Web: efforts to use MT plugins and FOAF at Burning Man
Masahide Kanzaki has announced a new introduction to FOAF, written in Japanese. It is quite detailed, and illustrated with examples, and figures, covering recent additions to the FOAF vocabulary. And, like the rest of his Semantic Web and RDF site, it looks glorious. I only wish I could read Japanese; the babelfish translation is a poor substitute. FOAF may now be better documented in Japanese than it is in English!
Masahide Kanzaki's FOAF document is also of technical interest, since it references an XSLT transformation which, in modern Web browsers, generates an XHTML page. (IE5/mac viewers should be warned that it crashed my browser; Mozilla seems happy, by contrast).
Japanese readers may also find these other RDF-related links useful.
Foaf-a-matic, Leigh Dodd's popular Javascript FOAF creation tool, is now available in multiple languages.
Current offerings include Japanese, French, Spanish, Danish, and Swedish. See Leigh's 'translating the foaf-a-matic' article for more details, and the lengthy list of credits to all those who have helped with this. Many thanks to everyone who contributed :)
Nearby in the Web, Leigh reports on his progress towards foaf-a-matic version 2, which is a rewrite in Java. Incidentally, the main foaf-a-matic page is made available using HTTP language negotiation, so for users whose browser is set to a language that there's a translation for, you should automatically see the appropriate version.
FOAFBot, Edd Dumbill's RDF-based IRC bot, is back!. Not content with writing readable introductions to FOAF (also in Japanese, Chinese), Edd created one of the most interesting tools that consume FOAF. FOAFBot hangs out in an IRC channel and answers questions about people based on data it found by indexing the Web of interlinked FOAF documents.
FOAFBot is particularly interesting because it keeps track of 'who said what' in the RDF data it collects, even using PGP signatures of the data files where available. This also explains why FOAFBot was offline for a while. Edd's second article on FOAF explained the way in which the original FOAFBot kept track of this 'provenance' or 'attribution' metadata. FOAFBot is written in Python, on top of Dave Beckett's Redland RDF toolkit.
Since FOAFBot was created, Redland and its parser, Raptor, has improved in many ways; in particular Dave added native support for provenance-tracking, via a 'contexts' mechanism. This allows each RDF statement in a database to be tagged with its origins, and allowed Edd to rewrite FOAFBot in a faster and sleeker form. Nice work all round :)
Furthermore, since FOAFBot's data-structures now use Redland's built-in way of representing contexts, FOAFBot databases can now be accessed from all languages that Redland has bindings to (Python, Java, Perl, Ruby, ...). This means that a developer can install Redland and FOAFBot, create an index of FOAF data by running FOAFBot as a harvester ('scutter'), and then access that database from, say, Perl to create alternate views of the data, eg in HTML or SVG.
You can read more on Edd's FOAFBot page or stop by the #foaf IRC channel to see it in action (or talk to other FOAF folk if the bot is offline).