ietf-xml-mime
[Top] [All Lists]

Re: The role of media types for XML content

2005-06-13 08:24:46

Hey,

On Sat, Jun 11, 2005 at 03:50:03PM +0900, MURATA Makoto wrote:
Mark> >Although 
Mark> > your example can be addressed by specialized media types, my example 
Mark> > (schemas embedded within XHTML are referenced by XPointer) cannot.
Mark> 
Mark> Can you elaborate on that example please?  I don't think I've seen any
Mark> schemas embedded in XHTML before.

Consider the following XML document (say multi.xml).  This example is not 
artficial.  It is useful for literate programming.  As you know better
than me, W3C is trying to promote compound documents.

Right.  For those who weren't aware, the W3C has a Compound Document
Formats WG[1] that is trying to address some of these issues.  I'm on
the WG as a representative of Justsystem Corp.

I would like to reference to the embedded RNG schema using multi.xml#rng. 
What is the media type of this document?

You could use the text/html or application/xhtml+xml media types.  If
fallback rendering was a problem, you could add some styling directives,
or else just "display: None"-it and place an HTML description in there.
Fragment identifiers would work as expected.

You could use application/xml too, though as you know, you don't get
fragment identifers.  Also, IE doesn't make the same assumptions as
other browsers[2], and will only display the tree view.  Moreover, the
interpretation made by these other browsers isn't licensed by RFC 3023;

  An XML document labeled as text/xml or application/xml might contain
  namespace declarations, stylesheet-linking processing instructions
  (PIs), schema information, or other declarations that might be used
  to suggest how the document is to be processed.  For example, a
  document might have the XHTML namespace and a reference to a CSS
  stylesheet.  Such a document might be handled by applications that
  would use this information to dispatch the document for appropriate
  processing.

The CDF WG may or may not be defining a media type that is suitable for
what you need (I can't say until we publish), but I can say with
certainty that it isn't currently supported by any existing agent. 8-)

If it were me, I'd go with text/html if there was a reasonable
expectation that somebody with IE might want to plug a URI that returns
one of these documents into their location bar.  Otherwise I'd use
application/xhtml+xml.

And do you want to specify a 
specialized media type when you reference the embedded RNG?

Ideally, yes, I think that would be valuable for the reasons I gave
before concerning layering and security.

 [1] http://www.w3.org/2004/CDF/
 [2] http://www.markbaker.ca/2004/01/XmlDispatchTest/

Mark.
-- 
Mark Baker.  Ottawa, Ontario, CANADA.          http://www.markbaker.ca
Coactus; Web-inspired integration strategies   http://www.coactus.com