I have a web 3.0 name !
By bblfish on Aug 03, 2006
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
bblfish.netfor it to appear at
http://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 either
http://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.