Re: Media types

+1

Please emphasise that "usually"!

Namespaces provide namespaces, nothing more. They do *not* identify
the "type" of document. In some cases, they can be used like this,
but the conditions under which this is true have to be explicitly
specified.

Using the top-level namespace to identify a document's application is
tempting, but doesn't always prove useful. Media types and namespaces
are used for different purposes, in different manners, and should not
be thought of as a one-to-one mapping.

Cheers,


On Mon, Jan 14, 2002 at 03:58:35PM +0100, Jacek Kopecky wrote:
>  Norman,
>  I don't think that multiple namespaces in a single document 
> should be a reason for not providing the type information. 
>  It is true that general XML documents can contain multiple 
> namespaces, but it is the root namespace that (IMHO usually) 
> defines what to do with the contents. In some cases the contained 
> namespaces are even a limited set, predicated again by the root 
> namespace.
>  For example in SOAP there is the top-level namespace and then
> each header and each body entry can (must actually) be in its own
> namespace. Nevertheless, the overall handling is dictated by the 
> top-level namespace, not by the lower-level ones.
>  Even if you say that application/xml or text/xml is sufficient
> since the processor can check the namespace(s) itself, I think it
> too would check only the root namespace and decide upon that.
>  So I think having MIME type per XML Language is natural, 
> assuming of course that it is the MIME processors that dispatch 
> the messages to the appropriate XML processor, which it seems 
> many people think is the case.
>  I myself can see us going in either direction with benefits -
> clearer responsibilities if we force the dispatch upon namespaces
> and not MIME types; more preprocessing (/dispatching) possible if
> we provide the which-XML-language-it-is information in the MIME
> type.
>  Best regards,
> 
>                    Jacek Kopecky
> 
>                    Senior Architect, Systinet (formerly Idoox)
>                    http://www.systinet.com/
> 
> 
> 
> On Mon, 14 Jan 2002, Norman Walsh wrote:
> 
>  > I'm not sure I fully grok all of the issues surrounding media types
>  > and their interactions with XML vocabularies, so the following
>  > question probably stems from naivete as much as anything else.
>  > 
>  > In general, is there really any value in declaring specific media
>  > types for XML vocabularies?
>  > 
>  > Imagine that I've got text/foo+xml and text/bar+xml. If I send a
>  > document that's just 'foo' or just 'bar', those may have value. But as
>  > soon as I start mixing foo and bar together, I don't see that there's
>  > any right answer as to what media type I should use.
>  > 
>  > It seems to me that I might as well say text/xml and let the receiver
>  > figure it out from the namespace URIs (XML is self-describing for just
>  > this reason, no?). About the only useful distinction I can see is a
>  > flag to indicate that the document only uses a single namespace (so
>  > that I know from the root element what namespace its in).
>  > 
>  > Clearly there are problems with this approach, but I'm not sure that
>  > having specific MIME types really solves any of them in the general
>  > case of mixed namespace documents.
>  > 
>  >                                         Be seeing you,
>  >                                           norm
>  > 
>  > 
> 
> 

-- 
Mark Nottingham
http://www.mnot.net/
 

Received on Tuesday, 15 January 2002 01:22:58 UTC