After read shared-mime-info spec and add my own types in /usr/share/mime/packages. I have refreshed the database:
$ update-mime-database /usr/share/mime
I have try with gvfs-info, it return the right mime. So unix command file use libmagic and libmagic use his own database /usr/share/misc/magic . I would like to know if they are a way to convert xml file to magic file for libmagic ?