[DAS2] Re: New problem with content-type header in DAS/2 server responses!

Andrew Dalke dalke at dalkescientific.com
Mon Nov 14 11:47:09 UTC 2005


Steve:
> I raised some other issues regarding types and feature properties etc.  
> a
> couple of weeks ago that I'd like you to chime in on:
> http://portal.open-bio.org/pipermail/das2/2005-October/000271.html
>
> The latest message on this thread is:
> http://portal.open-bio.org/pipermail/das2/2005-November/000278.html

I'll take them part by part.

That last message suggested

   <FEATURES xmlns="http://www.biodas.org/ns/das/genome/2.00"
             xmlns:das="http://www.biodas.org/ns/das/genome/2.00"
             xml:base="http://www.wormbase.org/das/genome/volvox/1/"
             xmlns:xlink="http://www.w3.org/1999/xlink"
              
das:prop="http://www.biodas.org/ns/das/genome/2.00/properties">
     <FEATURE das:id="feature/cTel54X.1.2"
              das:type="type/curated_exon">
       <PROP das:ptype="property/genefinder-score">29</PROP>
       <PROP das:ptype="das:prop#phase">2</PROP>
       <PROP das:ptype="das:prop#protein_translation"
             xlink:type="simple"
    
xlink:href="http://www.wormbase.org/das/protein/volvox/2/feature/ 
CTEL54X.1
/>
     </FEATURE>


I couldn't figure out why the "das:" namespace was needed for the
attributes.  Why can't they be in the default namespace?

The "das:" in the value of an attribute doesn't know anything about
the currently defined namespaces.  So this "das:" must be something
completely different from the xmlns:das=... definition.

>  * the values of the 'das:id', 'das:type', and 'das:ptype' attributes
>    are URLs relative to xml:base unless they begin with 'das:prop#', in
>    which case they are relative to the das:prop namespace.

And from what I can tell about XML, there's no standard way to implement
this using one of the standard XML parsers.  How do you get the das:prop
namespace for a given element?  The parser often does the expansion
for you.  Eg, in one of the Python XML parsers it does the translations
into Clark notation, like

   {http://www.biodas.org/ns/das/genome/2.00}ptype

For more info on XML namespaces, see http://www.jclark.com/xml/xmlns.htm



					Andrew
					dalke at dalkescientific.com




More information about the DAS2 mailing list