[MOBY-l] XML namespaces

Paul Gordon gordonp at cbr.nrc.ca
Fri Oct 24 08:58:57 EDT 2003


Ken Steube wrote:

>How should I write my objects:  GenericSequence or moby:GenericSequence?
>The current batch of services are producing both and so I have to write my
>services to check for both, which is a serious complication.
>
>The only reason we should ever need an XML namespace like 'moby:' is if
>someone's using a non-standard ontology.
>
Or say for example you want to embed a working MOBY example in an XHTML 
page without changing the default namespace of the document section.

>We don't need 'moby:' and we should toss it from the XML generated by
>execute() and from the XML output of all the services before this gets out
>of hand.
>
>Maybe switching to a better XML parser might make all this easier, but
>it's not necessary to have the namespaces when an object comes from the
>one-and-only default ontology and they should go.
>  
>
While I agree that if you declare it as the default name space, you 
don't need the moby:, I **strongly** suggest you use an
XML parser that supports namespaces.  Part of the whole beauty of XML is 
that your application shouldn't care exactly how a document
is syntactically formatted, the XML semantics should be what you 
interpret.  As soon as you make assumptions about the syntax used, you 
introduce compatability issues with any other XML producer/consumer...

My CDN$0.02. :-)



More information about the moby-l mailing list