[DAS2] xsl/content-type/browser fun

Chervitz, Steve Steve_Chervitz at affymetrix.com
Fri Jul 15 19:07:53 UTC 2005


Neat trick, but I'm getting a server error now.

Steve


> From: Allen Day <allenday at ucla.edu>
> Date: Fri, 8 Jul 2005 11:34:49 -0700 (PDT)
> To: Andrew Dalke <dalke at dalkescientific.com>
> Cc: <das2 at portal.open-bio.org>
> Subject: [DAS2] xsl/content-type/browser fun
> 
> 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
>> 
> _______________________________________________
> DAS2 mailing list
> DAS2 at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/das2




More information about the DAS2 mailing list