W3C home > Mailing lists > Public > public-lod@w3.org > February 2013

Re: Content negotiation for Turtle files

From: Ivan Herman <ivan@w3.org>
Date: Wed, 6 Feb 2013 09:49:40 +0100
Cc: Linking Open Data <public-lod@w3.org>
Message-Id: <B00A3273-0593-4138-8097-69FBE5F61F41@w3.org>
To: Bernard Vatant <bernard.vatant@mondeca.com>
Bernard,

(forget my W3C hat, I am not authoritative on Apache tricks, for example...)

When I put up a vocabulary onto www.w3.org/ns/, for example, I publish it both in ttl and rdf/xml. Actually, we also publish the file in HTML+RDFa (which very often is the master copy and I convert it into ttl and rdf/xml before publishing). Additionally, we put there a .var file. This is the .var file for the http://www.w3.org/ns/r2rml:

r2rml.var
---------
URI: r2rml

URI: r2rml.html
Content-Type: text/html

URI: r2rml.rdf
Content-Type: application/rdf+xml; qs=0.4

URI: r2rml.ttl
Content-Type: text/turtle; qs=0.5

that seems to work well, at least I have not heard complaints:-)

One can do a further trick by adding to .htaccess entries to convert, say, r2rml.html to r2rml.ttl on the fly; I did not do that to reduce the load on our servers.

There is somewhere a flag in the apache configuration allowing apache to handle these .var files; I am not sure it is there by default.

I hope this helps

Ivan




 
On Feb 6, 2013, at 24:49 , Bernard Vatant <bernard.vatant@mondeca.com> wrote:

> Hello all
> 
> Back in 2006, I thought had understood with the help of folks around here, how to configure my server for content negotiation at lingvoj.org.
> Both vocabulary and instances were published in RDF/XML.
> 
> I updated the ontology last week, and since after years of happy living with RDF/XML people eventually convinced that it was a bad, prehistoric and ugly syntax, I decided to be trendy and published the new version in Turtle at http://www.lingvoj.org/ontology_v2.0.ttl
> 
> The vocabulary URI is still the same : http://www.lingvoj.org/ontology, and the namespace  http://www.lingvoj.org/ontology# (cool URI don't change)
> 
> Then I turned to Vapour to test this new publication, and found out that to be happy with the vocabulary URI it has to find some answer when requesting application/rdf+xml. But since I have no more RDF/XML file for this version, what should I do? 
> I turned to best practices document at http://www.w3.org/TR/swbp-vocab-pub, but it does not provide examples with Turtle, only RDF/XML.
> 
> So I blindly put the following in the .htaccess : AddType application/rdf+xml .ttl
> I found it a completely stupid and dirty trick ... but amazigly it makes Vapour happy.
> 
> But now Firefox chokes on http://www.lingvoj.org/ontology_v2.0.ttl because it seems to expect a XML file. Chrome has not this issue. 
> The LOV-Bot says there is a content negotiation issue and can't get the file. So does Parrot.
> 
> I feel dumb, but I'm certainly not the only one, I've stumbled upon a certain number of vocabularies published in Turtle for which the conneg does not seem to be perfectly clear either.
> 
> What do I miss, folks? Should I forget about it, and switch back to good ol' RDF/XML?
> 
> Bernard
> 
> -- 
> Bernard Vatant
> Vocabularies & Data Engineering
> Tel :  + 33 (0)9 71 48 84 59
> Skype : bernard.vatant
> Blog : the wheel and the hub
> --------------------------------------------------------
> Mondeca                             
> 3 cité Nollez 75018 Paris, France
> www.mondeca.com
> Follow us on Twitter : @mondecanews
> ----------------------------------------------------------
> 
> Meet us at Documation in Paris, March 20-21
> 
> 


----
Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
FOAF: http://www.ivan-herman.net/foaf.rdf







Received on Wednesday, 6 February 2013 08:50:03 UTC

This archive was generated by hypermail 2.3.1 : Sunday, 31 March 2013 14:24:46 UTC