[MOBY-dev] BioMOBY namespace and attributes

Mark Wilkinson markw at illuminae.com
Wed Apr 16 16:53:18 UTC 2008


I think the honest answer would be "we have never really made a decision".

My understanding of the spec is as follows:

articleName  is the same as moby:articleName  so long as the default  
(xmlns="...") namespace and the moby namespace (xmlns:moby="...") are the  
same.

I'm not certain if Moby Central or the Moby server software currently adds  
a defaut namespace, but it would be a good idea to do so.  I could go  
through the code and make sure... would that help?

M




On Wed, 16 Apr 2008 08:09:15 -0700, Pieter Neerincx  
<pieter.neerincx at wur.nl> wrote:

> Hi,
>
> I'm having trouble with an XML parser in combination with a recent  
> version of CommonSubs.pm and was wondering what the official rules are  
> for applying the BioMOBY namespace (I'm talking about the xmlns thingy  
> not the namespace atribute in BioMOBY objects). Therefore I have have  
> the following questions:
>
> 1. Is the BioMOBY namespace required for BioMOBY object nodes?
> 2. Is the BioMOBY namespace required for the id, namespace and  
> articleName attributes of BioMOBY object nodes?
> 3. Is the BioMOBY namespace required for the other attributes in BioMOBY  
> XML? (for example the queryID attribute of the mobyData node.)
>
> With xmlns:moby='http://www.biomoby.org/moby' and  
> xmlns='http://www.biomoby.org/moby'  for the default namespace defined  
> somewhere higher up the tree are the following Object objects legal?:
>
> A. <     Object      namespace=''      id=''      articleName=''/>	 
> legal:yes/no
> B. <moby:Object      namespace=''      id=''      articleName=''/>	 
> legal:yes/no
> C. <     Object moby:namespace='' moby:id='' moby:articleName=''/>	 
> legal:yes/no
> D. <moby:Object moby:namespace='' moby:id='' moby:articleName=''/>	 
> legal:yes/no
>
> The problem I have is that the default namespace only applies to element  
> names, but not to attribute names as per XML spec. Therefore A and B are  
> equivalents as are C and D, but moby:articleName is not the same  
> attribute as articleName without the moby namespace prefix....
>
> Cheers,
>
> Pi
>
>
>
>
> _______________________________________________
> MOBY-dev mailing list
> MOBY-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/moby-dev



-- 
Mark D Wilkinson, PI Bioinformatics
Assistant Professor, Medical Genetics
The James Hogg iCAPTURE Centre for Cardiovascular and Pulmonary Research
Providence Heart + Lung Institute
University of British Columbia - St. Paul's Hospital
Vancouver, BC, Canada




More information about the MOBY-dev mailing list