[DAS2] xsl/content-type/browser fun

Allen Day allenday at ucla.edu
Fri Jul 8 18:34:49 UTC 2005


So i figured a way around to get browser-viewable content from the server
with the ?format= GET parameter.  Not sure how much value there is in
this, but here is a very simple graphical display of regions on the
server, and their relative sizes.

http://das.biopackages.net/das/genome/chado/chado-Hsa-17/region?format=html

All that's happening here is that ifyou request format=html, the server
gives a Content-Type header of "text/xml" instead of
"text/x-das-whatever+xml".  The altered Content-Type, in combination with
a stylesheet directive pointing to an XSL, allows the browser to show you
a nice markup of the response.

-Allen


On Fri, 8 Jul 2005, Allen Day wrote:

> Hi Andrew,
> 
> I tried out your idea of having the XML returned by the DAS server include 
> an XSL reference at the top.  It works, but I had to make some changes 
> that I'm not happy with:
> 
> * the root XML element had to have the xmlns attribute removed, or the
> transform wouldn't work.  the xmlns:xlink and xml:base attributes were
> okay to leave in.
> 
> * my browser (firefox) refused to render the document unless i changed the 
> mimetype to text/xml.  it didn't want to display text/x-das-sources+xml
> 
> Any idea how to fix either of these?  I took the liberty to modify the 
> content-type and remove the xmlns attribute from the root element, so you 
> can see the result on the production server:
> 
> http://das.biopackages.net/das/genome
> 
> -Allen
> 



More information about the DAS2 mailing list