[tdwg-content] DwC Examples, and Question

"Markus Döring (GBIF)" mdoering at gbif.org
Thu Oct 14 09:04:28 CEST 2010


Rich,
as hilmar and gregor already said content negotiation is the preferred solution. Its also more "restful" if you like that.
For apache, setting up content negotiation is really not hard. The easiest is to provide different urls/scripts for each content, usually with the appropiate suffix:

for content negotiation:
http://abc.org/xyz

same resource for rdf
http://abc.org/xyz.rdf

for xml
http://abc.org/xyz.xml

for json
http://abc.org/xyz.json

for html
http://abc.org/xyz.html


then you can let apache do the content negotiation work for you and do 303 redirects to the format specific url.
See http://www.w3.org/TR/swbp-vocab-pub/#apache

Aparently there is also a mod_negotiation module for apache which is recommended over mod_rewrite, but I havent used that so far:
http://httpd.apache.org/docs/current/mod/mod_negotiation.html


Note that for rdf in the linked data context at least its highly recommended to do the 303 redirect and NOT use the same url for the different content.
That is dont try to use some conditionals inside your code/template to respond differently based on the http header.

Markus



On Oct 13, 2010, at 21:45, Richard Pyle wrote:

> 
> OK, thanks.  I'll start by generating the zoological Nomenclatural example,
> using real ZooBank records.  Following your lead on the Species Checklist
> example, I'll create one normalized version, and one demoralized. If no one
> else on this list can generate a real example for the botanical and/or
> bacteriological Code, then I'll see if I can make one. I just can't give it
> resolvable GUIDs (yet).  By early 2011, we should have a functional instance
> of GNUB, at which time I'll swap out the examples to that.
> 
> As the subject line indicates, I also have a question:
> 
> At the moment, the ZooBank HTTP proxy only resolves to human-readable HTML:
> http://zoobank.org/urn:lsid:zoobank.org:pub:68376390-7809-46FF-9EC4-1371B4AA
> D0FF
> 
> However, later today I want to modify the site to redirect appropriate
> requests to RDF:
> http://zoobank.org/authority/metadata/?lsid=urn:lsid:zoobank.org:pub:6837639
> 0-7809-46FF-9EC4-1371B4AAD0FF
> 
> My understanding is that several people have opted for a solution that uses
> HTTP_USER_AGENT to determine whether the client is a browser vs. some other
> app, and if a browser then return HTML, and if another app then return RDF.
> 
> My question is: is this an acceptable (interim) solution?  Or is there a
> better way to deal with this?  Yes, I know what we should probably do is
> return XML with a stylesheet, but that will take me more than this afternoon
> to implement.
> 
> Please forgive me if I've just revealed and/or emphasized how uneducated I
> am as a web developer....
> 
> Aloha,
> Rich
> 
> 
> 
>> -----Original Message-----
>> From: "Markus Döring (GBIF)" [mailto:mdoering at gbif.org] 
>> Sent: Wednesday, October 13, 2010 9:17 AM
>> To: Richard Pyle
>> Cc: tuco at berkeley.edu; tdwg-content at lists.tdwg.org; 'Roger 
>> Hyam'; tdwg-bioblitz at googlegroups.com; 'Jerry Cooper'
>> Subject: Re: [tdwg-content] What I learned at the TechnoBioBlitz
>> 
>>> Maybe we should start with term-value pairs, but I think it 
>> would also 
>>> be useful to render each in XML and RDF as well.
>> technology specific examples are surely needed at some point. 
>> Once we have a set of key value pair examples we could 
>> translate them into xml, rdf and csv so we have the same data 
>> in various formats. 
>> 
>> The trouble with RDF though is that we dont yet have any guidelines. 
>> Once Steve et al have settled on something we can then take 
>> the rdf examples forward.
>> 
>>> 
>>>> what about a nomenclatural example, maybe separate ones 
>> for each code?
>>> 
>>> Yes, I'll get on it tomorrow (today is a full schecule).
>>> 
>>> I notice the existing examples don't use GUIDs.  Is that 
>> intentional, 
>>> or should I use actual examples with resolbavle GUIDs?
>> 
>> Do whatever you have as real data examples. If you happen to 
>> have guids in gnub or alike thats brilliant.
>> There is a recommendation to use guids for ids, but its no 
>> requirement. Most datasources dont have guids and there is no 
>> need to forces them. The example I used for mammal species of 
>> the world is real data - and they dont have guids.
>> 
>>> 
>>> Rich
>>> 
>>> 
>>> _______________________________________________
>>> tdwg-content mailing list
>>> tdwg-content at lists.tdwg.org
>>> http://lists.tdwg.org/mailman/listinfo/tdwg-content
>> 
> 
> 
> _______________________________________________
> tdwg-content mailing list
> tdwg-content at lists.tdwg.org
> http://lists.tdwg.org/mailman/listinfo/tdwg-content



More information about the tdwg-content mailing list