[MOBY] Re: [MOBY-l] XML namespaces
Paul Gordon
gordonp at cbr.nrc.ca
Fri Oct 24 11:51:57 EDT 2003
As an addendum:
If you want to not have moby: or the xmlns= default attribute in each
document, you can fix the attribute in the schema or DTD. I do this for
AGAVE documents, but of course because I'm not the standard's author, I
need to use the language extension mechanism in the DOCTYPE declaration
for each XML file:
<!DOCTYPE sciobj PUBLIC '-//EBI//DoubleTwist, Inc. AGAVE DTD//EN'
'http://www.bioxml.info/dtd/agave.dtd'
[
<!ATTLIST sciobj
xmlns:agave CDATA #FIXED
"http://www.bioxml.info/dtd/agave.dtd"
xmlns CDATA #FIXED
"http://www.bioxml.info/dtd/agave.dtd">
These attributes (adjusted for the MOBY namespace of course) could be
included in the default DTD or Schema for MOBY, so the document Ken sent
previously would be correct.
Paul Gordon wrote:
> The "" prefix in this document does not map to any namespace. There
> is no default namespace, so CrossReference is not attached to any DTD
> or Schema. In order for this document to be semantically correct as a
> MOBY document, it requires the root element to have a default
> namespace declaration:
>
> <MOBY xmlns='http://www.biomoby.org/moby-s'
> xmlns:moby='http://www.biomoby.org/moby-s'>
>
> so that all the tags, with and without the "moby:" are part recognized
> as MOBY data.
>
> This would be the case even if you had included a doctype declaration
> saying it's a moby document. When you code XHTML with a doctype
> declaration, the root HTML element still requires the
> xmlns="http://www.w3.org/1999/xhtml" default namespace attribute.
>
>> <?xml version='1.0' encoding='UTF-8'?>
>> <moby:MOBY xmlns:moby='http://www.biomoby.org/moby-s'>
>> <moby:Query>
>> <moby:queryInput>
>> <moby:Simple>
>> <moby:AminoAcidSequence namespace='AGI_LocusCode' id='At3g19100'
>> moby:articleName='seqA'>
>> <moby:Integer namespace='' id=''
>> articleName='Length'>947</moby:Integer>
>> <moby:String namespace='' id='' articleName='SequenceString'>
>> <CrossReference>
>> <Object namespace='taxon' id='9913'/>
>> <Object namespace='Global_Keyword' id='Bos taurus'/>
>> <Object namespace='NCBI_Acc' id='M80838'/>
>> </CrossReference>
>> sequence a
>> </moby:String>
>> </moby:AminoAcidSequence>
>> </moby:Simple>
>> </moby:queryInput>
>> <moby:queryInput>
>> <moby:Simple>
>> <moby:AminoAcidSequence namespace='NCBI_gi' id='At3g19101'
>> moby:articleName='seqB'>
>> <moby:Integer namespace='' id=''
>> articleName='Length'>947</moby:Integer>
>> <moby:String namespace='' id=''
>> articleName='SequenceString'>sequence b</moby:String>
>> </moby:AminoAcidSequence>
>> </moby:Simple>
>> </moby:queryInput>
>> </moby:Query>
>> </moby:MOBY>
>>
>>
>> _______________________________________________
>> moby-l mailing list
>> moby-l at biomoby.org
>> http://biomoby.org/mailman/listinfo/moby-l
>>
>>
>>
>
>
> _______________________________________________
> moby-l mailing list
> moby-l at biomoby.org
> http://biomoby.org/mailman/listinfo/moby-l
>
More information about the moby-l
mailing list