Dorward's Ramblings

Presenting RDF to XML capable user agents

Published on

As usual I posted a URI in to #rdfig while forgetting that the bot would send it to RSS readers all over the world. Ho hum.

This little accident has caused me to turn the problem in to something a little more useful. Consider this page a work in progress (without the benefit of my content management system, or my spell checker) for the time being. The objective is to allow browsers which understand XML to present that data to the user rather then presenting them with the usual "Would you like to download this file or pick an application to open it in?" prompt.

Currently the mod_rewrite voodoo goes something like this:

RewriteCond %{REQUEST_URI} \.rdf$
RewriteCond %{HTTP_ACCEPT} application\/xml
RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml
RewriteRule .* - "[T=application/xml; charset=ISO-8859-1]"

This appears to be working so the next step is finding suitable style sheets for various RDF types or altering it to deal with transformation on the server.

It also needs editing to ensure that it doesn't send the wrong type of data to user agents which explicitly say they don't support format X.