Hi Paul, I'm back working on the linked data publication.
On 26/07/2011 13:12, Paul Libbrecht wrote: > one version is active now. It was manually contributed by our sysadmin and > worked for the xhtml case. > Another version is coming up in a few minutes which is almost the > same as your file. Thanks, the redirects seem to work. I have just tried "cdname" with different Accept headers and it looks all fine. BTW, contrary to the original .htaccess file that I sent you, I think it would make sense to redirect requests to "cdname" without an Accept header to the *.ocd files instead of *.xhtml. That mainly addresses users of command-line clients such as wget, and it would help to make them aware of the original implementation of the CDs in the OCD format. > thanks for feedback > There's an amount of URLs that need to be checked, including: > - http://www.openmath.org/cd/cdname.xhtml > - http://www.openmath.org/cd/cdname (with a diversity of accept > headers) these work > - http://www.openmath.org/cd/cdname.html (historical) That ultimately redirects to cdname.xhtml, as desired, but for some strange reason the redirect goes via the intermediate step cdname.html.xhtml (in case of "Accept: text/html") or via cdname.html.rdf (if there is no Accept header): --- %< --- %< --- %< --- %< --- %< --- %< --- %< --- %< --- %< --- %< --- $ wget --header="Accept: text/html" -O /dev/null -S http://www.openmath.org/cd/a lg1.html --2011-07-27 11:33:57-- http://www.openmath.org/cd/alg1.html Resolving www.openmath.org (www.openmath.org)... 134.96.184.220 Connecting to www.openmath.org (www.openmath.org)|134.96.184.220|:80... connecte d. HTTP request sent, awaiting response... HTTP/1.1 303 See Other Date: Wed, 27 Jul 2011 09:33:56 GMT Server: Apache/2.0.50 (Linux/SUSE) Location: http://www.openmath.org/cd/alg1.html.xhtml Content-Length: 337 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html; charset=iso-8859-1 Location: http://www.openmath.org/cd/alg1.html.xhtml [following] --2011-07-27 11:33:58-- http://www.openmath.org/cd/alg1.html.xhtml Reusing existing connection to www.openmath.org:80. HTTP request sent, awaiting response... HTTP/1.1 301 Moved Permanently Date: Wed, 27 Jul 2011 09:33:56 GMT Server: Apache/2.0.50 (Linux/SUSE) Location: http://www.openmath.org/cd/alg1.xhtml Content-Length: 333 Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Content-Type: text/html; charset=iso-8859-1 Location: http://www.openmath.org/cd/alg1.xhtml [following] --2011-07-27 11:33:58-- http://www.openmath.org/cd/alg1.xhtml Reusing existing connection to www.openmath.org:80. HTTP request sent, awaiting response... HTTP/1.1 200 OK Date: Wed, 27 Jul 2011 09:33:56 GMT Server: Apache/2.0.50 (Linux/SUSE) Last-Modified: Mon, 25 Apr 2011 22:18:18 GMT ETag: "73daa-878e-95a39e80" Accept-Ranges: bytes Content-Length: 34702 Keep-Alive: timeout=15, max=98 Connection: Keep-Alive Content-Type: application/xhtml+xml Length: 34702 (34K) [application/xhtml+xml] Saving to: `/dev/null' 100%[======================================>] 34,702 --.-K/s in 0.1s 2011-07-27 11:33:58 (319 KB/s) - `/dev/null' saved [34702/34702] --- %< --- %< --- %< --- %< --- %< --- %< --- %< --- %< --- %< --- %< --- > - http://www.openmath.org/cd/cdname.xml (historical) That one does not yet work. BTW, what should *.xml redirect to? To *.xhtml, or to *.ocd, or to *.rdf? Note that all of these are XML formats. > Maybe we need to add more redirects. > I am wondering if redirect (303 in your case) is the right thing to do. > I believe it is ok to actually server the resource, which gives all the right > headers, under > http://www.openmath.org/cd/cdname > or? For answering that I have to dig into linked data specifications. The short answer is that 303 redirects are part of the linked data best practices, and that most linked data clients won't work otherwise. One can test that in a very nice way using the http://validator.linkeddata.org/vapour validator. The long version, quoting from http://www.w3.org/TR/cooluris/#r303gendocument --- %< --- %< --- %< --- %< --- %< --- %< --- %< --- %< --- %< --- %< --- … to use a special HTTP status code, 303 See Other, to give an indication that the requested resource is not a regular Web document. Web architecture tells you that for a thing resource (URI) it is inappropriate to return a 200 because there is, in fact, no suitable representation for those resources. However, it is useful to provide information about those resources. The W3C's Technical Architecture Group proposes in its httpRange-14 resolution [httpRange] document a solution that is to direct you to a document which has information about the thing you asked about. By doing this we avoid ambiguity between the original, real-world object and the resource that represents it. --- %< --- %< --- %< --- %< --- %< --- %< --- %< --- %< --- %< --- %< --- In short: The cdname.rdf RDF/XML file, which is the target of the redirect, is not the same as "the 'cdname' OpenMath CD". E.g. the cdname.rdf file may have metadata such as dc:creator = "Christoph Lange", dc:date = "2011-07-27" (because I created it), whereas the actual OpenMath CD, i.e. the thing described by the URI <http://www.openmath.org/cd/cdname> (and not by the URI <http://www.openmath.org/cd/cdname.rdf>) would rather have metadata such as dc:creator = "James Davenport", dc:date = "2004-06-30". For our day-to-day practice this distinction is rather philosophical, but, as I said above, linked data tools expect 303 redirects nevertheless. > Robin Berjon had a particularly nice post here: > http://berjon.com/blog/2009/12/xmlbp-non-http-namespaces.html > where he says... don't name the technology of your namespace document! > Another day it's going to be another technology... I understand this as the > fact that we should share URLs without the nitty gritty details that made us > use .xml one day and .xhtml another day... just use one name and do the right > thing (of today and in the future). I completely agree with that, and I think that with the improved redirects we achieved exactly that. Cheers, Christoph -- Christoph Lange, Jacobs University Bremen http://kwarc.info/clange, Skype duke4701 Workshop: Ontologies come of Age in the Semantic Web (OCAS) Ontology User Experience Challenge (1st prize US$ 2000) October 23 or 24 at the Intl. Semantic Web Conference, Bonn, Germany Submission deadline August 15, http://ocas.mywikipaper.org _______________________________________________ Om mailing list [email protected] http://openmath.org/mailman/listinfo/om
