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

Steve Chervitz Steve_Chervitz at affymetrix.com
Mon Nov 14 23:33:09 UTC 2005


Andrew Dalke <dalke at dalkescientific.com> wrote on 14 Nov 05:
> 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?

Attributes don't have a default namespace (though one might think such a
thing would be useful). See http://www.w3.org/TR/REC-xml-names/#defaulting

This is a point which has been subject to much consternation:
http://www.rpbourret.com/xml/NamespacesFAQ.htm#q5_3
http://lists.xml.org/archives/xml-dev/200002/msg00094.html
 
> 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.

No, it refers to the xmlns:das definition in the parent FEATURES element.
 
>>  * 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?

You've identified the key weakness of my proposal: Knowing how to expand
'das:prop' occurring within attribute values would be a DAS-specific
convention ('hack') for mapping to a controlled vocabulary for property
values. So I'm not quite satisfied with this either.

In another message of yours today, you propose an alternative to this:
http://portal.open-bio.org/pipermail/das2/2005-November/000313.html

See my reply to that for more ideas on this topic.

Steve




More information about the DAS2 mailing list