Bioimages home page
back to the Globally Unique Identifiers page

Some content negotiation tests


Testing the "Link" method of directing a Linked Data client to RDF metadata.

I have placed five files on several servers to test their behavior:

test-baskauf
test-baskauf.htm
test-baskauf-rdfa
test-baskauf-rdfa.htm
test-baskauf-html
test-baskauf-html.htm
test-baskauf.rdf

The first two pair of files are identical and in XHTML format.  The second pair are identical and in RDFa HTML format.  The third pair of files are identical and in generic HTML format.  The last file is the RDF file that contains the metadata.  You can get the files by adding
http://bioimages.vanderbilt.edu/pages/
in front of the file name, e.g. http://bioimages.vanderbilt.edu/pages/test-baskauf.htm
You can view the page source if you want to see how the files are different. 

The XHTML files have a link tag:
<link rel="meta" type="application/rdf+xml" title="RDF" href="test-baskauf.rdf" />

in the <head> section which should meet the Linked Data requirement for providing an RDF representation of a resource.

The files were tested using the Vapour Linked Data validator:
http://validator.linkeddata.org/vapour

Test 1. URI: http://people.vanderbilt.edu/~steve.baskauf/test-baskauf

Vapour reported that the server sent the file as Content-type: text/plain (therefore web browsers display the page source and don't show it with its HTML markup).  Vapour did not enable "Further options".

Running the same tests on
http://people.vanderbilt.edu/~steve.baskauf/test-baskauf.htm
showed Vapour reporting that the server sent the file as Content-type: text/html (therefore web browsers display the page with HTML markup).   Vapour enabled the "Run the RDFa Distiller service" option.  Running this test caused the generation of RDF that asserted this triple:

http://people.vanderbilt.edu/~steve.baskauf/test-baskauf.htm --> http://www.w3.org/1999/xhtml/vocab#meta --> 
http://people.vanderbilt.edu/~steve.baskauf/test-baskauf.rdf

which is not the correct semantics (test-baskauf.rdf provides metadata about .../test-baskauf, not .../test-baskauf.htm)

Running the same tests on the
http://people.vanderbilt.edu/~steve.baskauf/test-baskauf-rdfa.htm
RDFa file produces the same kind of result as the previous test on test-baskauf.htm.

Test 2. URI: http://www.cas.vanderbilt.edu/bsci110a/test-baskauf

Vapour reported that the server sent the file as Content-type: text/html (therefore web browsers display the page with HTML markup).  On the basis of this Vapour concluded that the URI was an information resource (an incorrect conclusion).  Vapour enabled the "Run the RDFa Distiller service" option.  Running this test caused the generation of RDF that asserted this triple:

http://people.vanderbilt.edu/~steve.baskauf/test-baskauf --> http://www.w3.org/1999/xhtml/vocab#meta --> 
http://people.vanderbilt.edu/~steve.baskauf/test-baskauf.rdf

which is semantically correct.  Running the same tests on the RDFa file produced the same kind of results.

Conclusions:

A server which identifies an extension-less file as Content-type: text/html can provide content negotiation using the "link" method without additional action.  At least using the RDFa Distiller service, the type of HTML (HTML, XHTML, or RDFa) did not seem to matter - the "link" tag seemed to provide the necessary information for the distiller to infer the URI of the RDF metadata file. 

A server which identifies an extension-less file as Content-type: text/plain cannot provide content negotiation using the "link" method without additional action.  In this case a rewrite rule adding ".htm" to the URIs of extension-less files would be necessary.