W3C home > Mailing lists > Public > public-swd-wg@w3.org > March 2008

Re: [Recipes] roadmap to the next draft

From: Diego Berrueta Muñoz <diego.berrueta@fundacionctic.org>
Date: Fri, 21 Mar 2008 18:13:42 +0100
Cc: "SWD Working Group" <public-swd-wg@w3.org>, <danbri@danbri.org>
Message-Id: <25B27491-2D1B-48F4-9138-F11AB9C77979@fundacionctic.org>
To: Alistair Miles <alistair.miles@zoo.ox.ac.uk>

Hi Alistair,

El 18/03/2008, a las 17:32, Alistair Miles escribió:
> > While I fully agree with Tim's proposal, I also think that this  
> will add
> > some complexity to some Recipes. Currently, we implement content
> > negotiation by means of rewrite rules. As far as I know, to  
> implement
> > Recipe 5 according to Tim's proposal we have to use a different  
> method,
> > such as Apache TypeMaps, which are difficult to set up.
>
> If I remember rightly, Tim's proposal is actually quite easy to
> implement, because you can use Apache's MultiViews to handle the  
> conneg
> from the generic document URI. You could alternatively use a TypeMap
> file, which provides more control over the conneg but is more work to
> implement.
>
> However, the main reason why we didn't go for this solution (again  
> if I
> remember rightly) was that it requires both the HTML and the RDF  
> content
> to reside on the same server (and I think in the same directory?).  
> Thus
> the solution doesn't generalise to the situation where RDF and HTML
> content are hosted in different locations, which is relevant to both  
> W3C
> and DCMI.
>
First of all, I'm not a guru in Apache, so the folowing may be wrong...

I've tried to implement the recipes with type-maps and MultiViews  
[1,2], and avoiding RewriteRules to implement content negotiation.  
Recipes 1 and 2 do not perform content-negotiation, so there is no  
need to change anything. Recipes 3 and 4 can be easily implemented  
with MultiViews, because there is a one-to-one relation between HTML  
and RDF representations.

However, I didn't manage to implement Recipe 5 using TypeMaps or  
MultiViews. Even if all the files are in the same directory, there is  
just one RDF file, but many HTML files. Apparently, TypeMaps require  
the files to have the same basename as the requested resource (i.e.,  
for resource ClassA, the files must be named ClassA.html and  
ClassA.rdf). The only way I found to meet this requirement is to make  
a copy of the RDF file for each resource, and this is probably  
unacceptable.
> A weaker reason for not going for Tim's solution was that it is
> different from the other recipes. We tried to keep the recipes as
> uniform and as simple as possible.
>
+1 on not using different implementation strategies for Recipes 1 to  
5. Therefore I support keeping the recipes as they are now, and adding  
a note to explain why we chose to implement content negotiation using  
rewrite rules.

Best,

Diego.

[1] http://httpd.apache.org/docs/2.0/es/content-negotiation.html
[2] http://httpd.apache.org/docs/2.0/es/mod/mod_negotiation.html

> Based on my current (still limited!) understanding of Apache
> configuration, the only way to solve the problem in general is to use
> conditional redirects. To do conditional redirects based on Accept
> headers, and properly take the q-values into account, is hard work (if
> not impossible) to do using Apache's built in conneg support. For
> example, the pattern I mooted at [1], while handling q-values, still
> doesn't handle partial URL redirects (i.e. redirects based on  
> substring
> or regex pattern matching), which are needed to make configuration of
> slash namespaces maintainable.
>
> If someone where to take an implementation of the conneg algorithm,  
> e.g.
> [2], and tweak it to do partial conditional redirects instead of serve
> content directly, then we might have a complete and generalisable
> solution that was (relatively) easy to install and configure. Until
> then, I support publication of the recipes as-is, because although  
> they
> are incomplete, they are more flexible than Tim's approach.
>
> As a last word, I'm no guru on either Apache or HTTP, so I might  
> easily
> have missed something here.
>
> Cheers,
>
> Alistair.
>
> [1] http://lists.w3.org/Archives/Public/public-swd-wg/2007Oct/ 
> 0063.html
> [2] http://search.cpan.org/~rse/lcwa-1.0.0/lib/lwp/lib/HTTP/Negotiate.pm
>
> --
> Alistair Miles
> Senior Computing Officer
> Image Bioinformatics Research Group
> Department of Zoology
> The Tinbergen Building
> University of Oxford
> South Parks Road
> Oxford
> OX1 3PS
> United Kingdom
> Web: http://purl.org/net/aliman
> Email: alistair.miles@zoo.ox.ac.uk
> Tel: +44 (0)1865 281993
Received on Friday, 21 March 2008 17:14:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 21 March 2008 17:14:38 GMT