[clahey at ximian.com: docbook mime type detection]

Bastien Nocera hadess at hadess.net
Tue Jul 26 23:58:45 EEST 2005

Hey Luis,

On Tue, 2005-07-26 at 16:48 -0400, Luis Villa wrote:
> <?xml version="1.0" encoding="UTF-8"?>
> <mime-info
> xmlns="http://www.freedesktop.org/standards/shared-mime-info">
>  <mime-type type="application/docbook+xml">
>   <sub-class-of type="text/xml"/>
>   <comment xml:lang="en">Docbook XML Document</comment>
>   <magic priority="60">
>    <match type="string" value='docbookx.dtd' offset="0:200"/>

Do you really need to go 200 bytes into the file? The further you need
to go into the file, the more expensive it is. I would also add that my
text file mentioning "docbookx.dtd" would get detected as a docbook
file, not good.

>   </magic>
>   <glob pattern="*.xml"/>

That's not good. text/xml files are already detected with *.xml.

>  </mime-type>
> </mime-info>

You got the gist of it, but it's not commitable.


Bastien Nocera <hadess at hadess.net> 

More information about the xdg mailing list