MIME info spec: Handling containers/multiple MIME types per glob pattern
chris at gnome-de.org
Tue Nov 15 12:12:11 PST 2005
On Di, 2005-11-15 at 14:48 -0500, Rodney Dawes wrote:
> On Tue, 2005-11-15 at 19:53 +0100, Christian Neumair wrote:
> > We'll run into the following issue in the long term:
> > There is an n:1 mapping between MIME types, and glob patterns, i.e.
> > "text/x-patch" has "*.diff" and "*.patch", but the "*.ogg" pattern
> > cannot have multiple MIME types associated.
> > Since we have a few container formats like Windows Media or Ogg, there
> > is no way of telling xdgmime clients that multiple applications match a
> > matched pattern, i.e. that a "*.ogg" file can be an Ogg Theora, or an
> > Ogg Vorbis stream, thus requiring the application to do MIME sniffing
> > before being able what MIME type the file actually is.
> In the OGG case, MIME sniffing won't help at all. There is an RFC for
> the application/ogg MIME type, and by definition, all OGG files should
> be that type, regardless of content. To fix the issue, we are going to
> have to come up with something that either goes beyond the MIME type
> itself, and checks other file data,
 proposes to introduce application/x-foo MIME types for the various
contents, and use application/ogg as a their parent, thus using
application/ogg as container type, but - if there was an API for
determining whether multiple patterns are associated with a particular
file name - informing that further investigation (sniffing) is required
for determining the contents type. One of the x-foo types will match, et
voila, we got the type.
Also note that the pattern "*.pot" matches gettext templates and PPT
presentations. The MIME type can also only be determined sniffing the
Christian Neumair <chris at gnome-de.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/xdg/attachments/20051115/09b94c1e/attachment.pgp
More information about the xdg