MIME subclasses

David Faure dfaure at trolltech.com
Fri Oct 3 22:59:16 EEST 2003


On Friday 03 October 2003 21:15, Jonathan Blandford wrote:
> Perhaps a system where we returned a multiple mime-types
> depending on what attributes the file has makes more sense.

I like this idea very much.

Indeed an OOo or KOffice file is "both <native mimetype> and application/x-zip".
This is even more flexible than saying "this mimetype is always this other one too".
Of course we need to make the list of mimetypes for a given file *ordered*,
so that the file is "first this, then that (secondarily)".

But this is indeed very good for all the gzipped formats (like .ps.gz etc.).
(Yes, at the moment we have x-postscript and x-gzpostscript, and that sucks.)

In fact anywhere where we use inheritance currently, can be easily turned into
"this is mimetype A but also mimetype B" - actually the "inheritance" is defined
by X-KDE-IsAlso in the mimetype definition :)
That's something that could stay: if files of type A are always of type B too,
then let's say so in the mimetype definition once and for all.
But in more complex examples (like optionally compressed or encrypted files),
let's leave that to the code that detects the mimetype of a given file.

I am very much in favor of this idea, nice solution.

-- 
David FAURE, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).



More information about the xdg mailing list