[MOBY] Re: [MOBY-l] Policy on the use of prefix 'moby'?

Paul Gordon gordonp at cbr.nrc.ca
Tue Apr 13 19:45:22 UTC 2004


>> There should probably be a caveat at the start of the MOBY-S API 
>> saying that the use/lack of prefixes in the examples is not 
>> canonical.  To XML aware applications, whether you use a default 
>> prefix, moby:, or even xhtml: (if you're crazy), makes no difference 
>> at all, since the namespace should always resolve to 
>> http://www.biomoby.org/moby in the examples implicitly. 
>
<snip />

>>
>> I agree that all those 'moby:' prefixes make the code hard to read.  
>> My guess is that the least cluttered version for the first example 
>> above would be
>>
>>        <?xml version="1.0" encoding="UTF-8"?>
>>        <MOBY xmlns="http://www.biomoby.org/moby">
>>              xmlns:moby="http://www.biomoby.org/moby">
>>          <Query>
>>            <queryInput moby:queryID='a1'>
>>              <Simple moby:articleName=''>
>>                <Object moby:namespace="Genbank/gi" moby:id="163483"/>
>>              </Simple>
>>            </queryInput>
>>          </Query>
>>        </MOBY>
>>
>> ...since there's no away around using a prefix if we want attribute 
>> names such as id to belong to the MOBY namespace.
>
Indeed, all of the statements you made are correct.  My point with the 
xhtml prefix is that people who aren't familiar with namespaces might 
confuse the moby: prefix with the MOBY namespace, or not pick up that 
the unprefixed examples really should have a default namespace binding 
to MOBY, hence we should put a caveat in the API examples.  The 
following document is equivalent to the one you list above.

<?xml version="1.0" encoding="UTF-8"?>
       <MOBY xmlns="http://www.biomoby.org/moby">
             xmlns:xhtml="http://www.biomoby.org/moby">
         <Query>
           <xhtml:queryInput xhtml:queryID='a1'>
             <Simple xhtml:articleName=''>
               <Object xhtml:namespace="Genbank/gi" xhtml:id="163483"/>
             </Simple>
           </xhtml:queryInput>
         </Query>
       </MOBY>

The fact that the prefix used is not moby: doesn't make it any less 
valid as a MOBY document (though of course it does make it more 
confusing :-)).  You make a good point with the attributes too.  
Currently, like the element names, I don't require the MOBY namespace 
the peer-to-peer implementation, but do exclude attributes explicitly 
declared in another namespace...
It's either be strict and have half the services fail, or parse 
forgivingly and have all of them work.  My users prefer the latter. :-)

We definitely need a systematic feedback mechanism for the service 
providers...

>>
>> Incidentally, I've come across both http://www.biomoby.org/moby and 
>> http://www.biomoby.org/moby-s as the namespace for MOBY keywords.  
>> Which one is preferable?
>
All of the examples in the API state http://www.biomoby.org/moby, so we 
should probably stick with that.  If we were really nice about it, we'd 
put a RDDL document at that URL...

>>
>> Gabriel
>>
>> _______________________________________________
>> moby-l mailing list
>> moby-l at biomoby.org
>> http://biomoby.org/mailman/listinfo/moby-l
>>





More information about the moby-l mailing list