From: William P. <wil...@ya...> - 2009-07-04 01:25:21
|
On Jul 3, 2009, at 6:16 PM, Rutger Vos wrote: >> I notice that while the following produces a hit of one record: >> http://8ball.sdsc.edu:6666/treebase-web/phylows/taxon/find?query=tb.title.taxon==Homo >> ...yet I'm unable to get any results via rss: >> http://8ball.sdsc.edu:6666/treebase-web/phylows/taxon/find?query=tb.title.taxon==Homo&format=rss1 >> Is my syntax incorrect? > > I don't know - I *am* getting an rss feed with a single item returned. > Maybe you should "view source" to see it? Ah... indeed, it works for FireFox and Camino, but it does not work for Safari (says "zero articles"). >> Also, I believe that this should give me a list of trees: >> http://8ball.sdsc.edu:6666/treebase-web/phylows/taxon/find?query=tb.title.taxon==Homo&recordSchema=tree >> but instead it gives me a list of taxa. Perhaps my syntax is wrong? > > The recordSchema switch is only used in combination with format=rss1, > the thinking being that the web interface behaviour should stay the > same (we can switch tabs anyway to project a result set into a > different context) but for programmatic access we do need recordSchema > (because - no tabs). Ok. Although perhaps this could be a low-priority feature to be added later. (I can imagine this being a useful feature for web sites like tolweb.org and eol.org, in which for each species page they can have a simple hyperlink called "trees in TreeBASE with taxon x" -- thus avoiding users to have to make another mouse-click on a tab once they get to TreeBASE. I can't figure out why your rss does not work in Safari. For example, these two urls produce, more or less, the same content since they are making the same query: http://8ball.sdsc.edu:6666/treebase-web/phylows/taxon/find?query=tb.title.taxon==Homo&recordSchema=tree&format=rss1 http://purl.org/phylo/treebase/phylows/find/tree/?query=taxon_name+any+Homo&operation=searchRetrieve&recordSchema=pc ...by yours says "0 articles" in Safari while mine says "25 articles". Could you try adding "<?xml version="1.0" encoding="utf-8"?>" as a header? Thats the only substantive difference between the two, as far as I can tell. (also, it would be cool if yours included some other human-readable metadata -- like tree name, tree title, article citation, etc -- just a little synopsis so that people can use this in an RSS client) bp |