[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Media types for XSL stylesheets

John Cowan writes:
> MURATA Makoto scripsit:
> > I think that such an embedded portion INHERITS the media type of the 
> > document.  Even if a stylesheet linking PI specifies a different media type, 
> > it is merely ignored.
> Not necessarily.  A portion of image/gif is by no means an image/gif.
> Media types exist so that uninterpreted bytes get an interpretation,
> but internal resources have already been interpreted.

The GIF format indeed defines a set of chunk codes, so embeddings in
GIF are implicitly typed by the GIF spec and do not need MIME.

On the other hand, if you have a format that allows a wide, maybe even
open-ended range of things to be embedded in it, such as a multipart
MIME message, or the SCRIPT element of HTML, then you need a more
flexible way to label the embedding. MIME types seem to do that very
well, so both these formats have adopted them as the labeling

That leads to another issue: MIME type are not only used to get the
interpretation started, but also to negotiate capabilities between a
client and a server, e.g., in HTTP. In that context, sending a
document with embedded XSL to a client that has indicated not being
able to handle XSL is not very smart.

In other words, that document with its embedded XSL needs not just a
MIME type for its first byte, but also a description (a "profile") of
the other capabilities a client needs. That would be something like a
CC/PP[1] profile, I assume, and inside that there *would* be an entry
that says "application/xsl" (or whatever the MIME type will be).

[1] http://www.w3.org/Mobile/CCPP/

  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos/                              W3C/INRIA
  bert@xxxxxx                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France