XML MIME type recognition



Hi, I cannot get a XML-based format (named generically *.xml,
unfortunately) recognized by nautilus, no matter what I do.

More precisely, having the standard /usr/share/mime database and another
in home (where the new type gets installed), then running

* XDG_DATA_DIRS=<standard> nautilus /path/to/files

  reports the files as application/xml

* XDG_DATA_DIRS=<home>:<standard> nautilus /path/to/files

  reports the files as application/xml

* XDG_DATA_DIRS=<home> nautilus /path/to/files

  makes nautilus complain about a hunderd missing things (of course),
  *but* it reports the files as application/x-smpl-spm
  
So, the format can get recognized, but something in the standard MIME
database overrides that.  At this moment my new MIME type looks like

<mime-type type="application/x-spml-spm">
  <comment>SPML data</comment>
  <magic priority="80">
    <match type="string" offset="0" value="&lt;?xml">
      <match type="string" offset="20:60" value="&lt;SPML"/>
    </match>
  </magic>
</mime-type>

but it does not work even with priority 100 and matching XML files:

<mime-type type="application/x-spml-spm">
  <comment>SPML data</comment>
  <magic priority="100">
    <match type="string" offset="0" value="&lt;?xml"/>
  </magic>
</mime-type>

I simply cannot convince nautilus to report XML files as something
different than application/xml.  Well, unless I include

  <glob pattern="*.xml/>

which makes *all* XML files recognized as application/x-spml-spm, so I
cannot do that.

What I'm doing wrong, or how can I figure out what I'm doing wrong?

I run Fedora's nautilus-2.24.2-1.fc10.x86_64, if it matters.

Yeti


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]