The Sun BabelFish Blog
Don't panic !
I have a web 3.0 name !
Given the time I have been speaking about foaf, and given that I even went to the Foaf Galway conference a couple of years ago, it's long been overdue for me to put together my foaf file.
So today I have. I now have left behind me my old rusty human name, and assigned myself a Web 3.0 name. I am http://bblfish.net/people/henry/card#me :-). Friends can call me bblfish:me .
Notes
-
that file is served by default as
rdf/xml. But if you ask for it to be served as N3 then you will get my original hand written version:curl -L -H "Accept: text/rdf+n3" http://bblfish.net/people/henry/card - I should point out that you don't have to give yourself a URL. That is just something Tim Berner's Lee recommended recently, to make it easier to find information on the semantic web. You can also choose to be identified by one of the inverse functional properties, such as your email address or home page. This is how I identify Simon Phipps in the foaf file. He has the inverse functional relation foaf:mbox_sha1sum to the string "ee513cd82fea84825b803a44228fd9b765baf6d5".
- A slightly tricky thing is knowing how the directory structure of your ftp server relates to the mapping of your web server.
In my case for example I had to place my file at
/usr/home/hjs/www/htdocs/people/henryonbblfish.netfor it to appear athttp://bblfish.net/people/henry/card. Clearly if this is going to get popular it will be important to use a RESTful protocol suchy as WebDav or Atom APP to hide all this complexity from the end user. -
Oh, and of course to get the nice HTTP magic, I just followed the Best
Practice Recipes for Publishing RDF Vocabularies, though perhaps
it was not stricly necessary to work so hard at that. (I just did not
want to have a name such as ...foaf.rdf#me, which would have tied my
name a little to closely to the rdf/xml representation.)
Again, as mentioned in the previous point, using WebDav or Atom APP would really simplify the task of publishing such files. One just need to specify the mime type of the application during the HTTP PUT or POST operation, instead of having to do the following...
Below is the
.htaccessfile I am using inspired by the above best practices guide.> cat .htaccess # Turn off MultiViews Options -MultiViews # Directive to ensure *.rdf files served as appropriate content type, # if not present in main apache config AddType "application/rdf+xml" .rdf AddType "text/rdf+n3; charset=utf-8" .n3 # Rewrite engine setup RewriteEngine On RewriteBase /people/henry # Rewrite rule to serve HTML content from the vocabulary URI if requested #RewriteCond text/html [OR] #RewriteCond application/xhtml\+xml [OR] #RewriteCond ^Mozilla/.* #RewriteRule ^card$ card.rdf [R=303] # Rewrite rule to serve N3 content from the vocabulary URI if requested RewriteCond text/rdf\+n3 RewriteRule ^card$ card.n3 [R=303] # Rewrite rule to serve N3 content from the vocabulary URI if requested # Rewrite rule to serve RDF/XML content from the vocabulary URI if requested RewriteCond application/rdf\+xml RewriteRule ^card$ card.rdf [R=303] # Rewrite Rule to redirect cards to foaf. timbl has me down as card RewriteRule ^foaf$ card [R=303] # Choose the default response # --------------------------- # Rewrite rule to serve the RDF/XML content from the vocabulary URI by default RewriteRule ^card$ card.rdf # Rewrite rule to serve HTML content from the vocabulary URI by default (disabled) # (To enable this option, uncomment the rewrite rule below, and comment # out the rewrite rule directly above) # RewriteRule ^example3$ example3-content/2005-10-31.html [R=303]
-
Notice that my name is
http://bblfish.net/people/henry/foaf#me, but the document you get when you click on the link is eitherhttp://bblfish.net/people/henry/foaf.n3orhttp://bblfish.net/people/henry/foaf.rdf. I am not a document. - Sorry, I have not placed as many relations to people I know as I should in my foaf file. That's quite a lot of work. I'll be doing that next.
- Now for the fun. My URL works with Tim Berner's Lee's Tabulator. (After setting the Firefox security preferences, as explained in the "Help" section). By highlighting lattitude and longitude columns, then clicking save current query, one can get locations to appear on the Maps tab! neat! I have placed an image online here for those who just want a quick impression of what it does.
Posted at 07:23PM Aug 03, 2006 [permalink/trackback] by Henry Story in SemWeb | Comments[4]
Note on comments:
- I know the forms below are a little small. We have asked for years for this to be changed, but I don't think it's going to happen soon. In Apple's Safari you can resize the entry box with you mouse. For people using other browsers click on this javascript link, that should allow you to resize your form.
- Comments are moderated, so they will take a little time to appear. Currently moderation means I have to read them personally. Hopefully with OpenId deployment, this will become more automated.
- HTML markup no longer works here, due to some decision made somewhere. Sorry about that.
- Check your comments by using the preview button...


Posted by Chris Quenelle on August 07, 2006 at 09:46 PM CEST #
Just to clarify, when I used the shorthand bblfish:me I was supposing that bblfish is a prefix defined in N3 has follows
But you are right: if people made the mistake often enough, I could also give myself a bblfish.com name, and then add in each file a statement such as
But I don't think it will come to that ;-) You can use the foaf-a-matic tool to put yours together. But you are right. There are not enough tools. If you look up the last comment in RDF and Metcalf's law you will find a link to a thread on the W3C Semantic Web mailing list with quite a few links to tools in development on OSX. My next version of BlogEd really should be produce a foaf file for each user. Hopefully as more developers start playing with this, we will have more tools to play with.Posted by Henry Story on August 07, 2006 at 10:04 PM CEST #
The .htaccess file above is much more complex than needed I realised. First, there is no need for 303 redirection here, because I use # urls in my foaf file. So none of the URLs is a name for a non information resource. We may as well just have the /people/henry/card resource return different representations depending on the request. We can maintain the specialised resources card.n3 and card.rdf for names of resources that return a particular representation in preference to others.
So here is one that is much simpler. Create a .htaccess file containing the following:
# Turn on MultiViews
Options MultiViews
# Directive to ensure *.rdf files served as appropriate content type,
# if not present in main apache config
AddType "application/rdf+xml" .rdf
AddType "text/rdf+n3; charset=utf-8" .n3
AddHandler type-map .var
Then create a card.var file that is not world readable with the following content:
URI: card
URI: card.n3
Content-type: text/rdf+n3
URI: card.rdf
Content-type: application/rdf+xml
It would be nice if one could define a pattern like this for a whole tree of directories.
Posted by Henry Story on December 06, 2007 at 03:03 AM CET #
Henry -- I'm trying to work this out for myself, so this is post is really useful. But what would you do if you also want an HTML representation of your card data?
Posted by Bruce D'Arcus on March 16, 2008 at 05:28 PM CET #