mime-type icons, a proposal

Waldo Bastian bastian at kde.org
Fri Oct 1 18:29:45 EEST 2004


On Friday 01 October 2004 16:28, Alexander Larsson wrote:
> > Your file-type detection returns a type and then you ask "is this type a
> > wordprocessor document", and then it will return yes or no, depending on
> > whether the type inherits from the generic wordprocessor document type.
>
> Thats not right. Right now the "inheritance" in the mime database is
> specifies actual physical compatibility. E.g. application/python-src
> inherits from text/plain. We don't want to overload this with another
> type of inheritance ("is a file used by the same sort of application").

No, the inheritance specifies "is also". The mimetype itself specifies actual 
physical compatibility. Files of type "text/plain" have certain 
characteristics ("application/x-gzip" would make a better example since it 
would actually imply a certain well-defined file-format) So when 
"application/python-src" inherits from "text/plain", we say it "is also" of 
type text/plain: it has also all the charactestics typical for the 
"text/plain" format (If it had inherited from "application/x-gzip" it would 
mean that files of the "application/python-src" type had the gzip file format 
by definition)

The "wordprocessor document" type means "document generated with a 
wordprocessor", this doesn't translate to a particular on-disk file format 
(which is why the file type determination function will never return it as 
type) but the inheritance relationship is the same, if another MIME-type 
inherits it it means that having a file of this other MIME-type also implies 
that the file has all the characteristics of "wordprocessor document".

Cheers,
Waldo
-- 
bastian at kde.org  |  Wanted: Talented KDE developer  |  bastian at suse.com
  http://www.suse.de/de/company/suse/jobs/suse_pbu/developer_kde.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xdg/attachments/20041001/b035cc8d/attachment.pgp 


More information about the xdg mailing list