MIME info spec: Handling containers/multiple MIME types per glob pattern

Christian Neumair chris at gnome-de.org
Tue Nov 15 10:53:04 PST 2005


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.

Therefore, I propose to break the n:1 mapping between MIME types and
glob patterns, and extend the xdgmime library API to provide a helper
that returns either all MIME candidates for the best match, or all
candidates (any match). xdgmime clients like GnomeVFS can now build an
API on top of that allowing you to tell whether the MIME type for a
particular filename is unique, or whether sniffing is required to make a
final decision.

Comments?

-- 
Christian Neumair <chris at gnome-de.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/xdg/attachments/20051115/8498b348/attachment.pgp 


More information about the xdg mailing list