I'm not sure, if this is an issue in gvfs/gio and kmime or in the database. ATM several XML files are detected as text/html. E.g. XHTML files are detected as text/html, although they have an XML declaration and use the correct namespace URI and local name. In my case, an XML file format, which uses a <header> element is detected as text/html. I've opened a bug report against GIO at http://bugzilla.gnome.org/565176. Maybe you can comment here (or in the gnome bugzilla) on this issue, if this should be fixed in the database or in gvfs/gio and kmime.
Please upload specific test cases.
As mentioned in the upstream bug, we need test cases. Reopen when you have some.
Created attachment 22732 [details] testcase (application/xhtml+xml) The attached file is a valid XHTML document but is not detected as such (neither by kmimetypefinder nor gnomevfs-info nor gvfs-info).
Created attachment 22733 [details] testcase 2 (only kmime) This is a (stripped-down) testcase, which doesn't work for kmimetypefinder. kmime detects it as text/html, although this is a simple XML document (not even HTML). file, gnomevfs and gvfs correctly detect the MIME type. So this second testcase is more related to the kmime implementation than to the shared-mime-info database.
I attached two testcases. Reopening. I tested on a recent Debian Sid. Can you reprosuce the issue?
Not sure how to fix the bflang file, but the xhtml file would be fixed if xdgmime actually used the namespaceURI defined in the database. I've committed both test files, but disabled for now.
*** Bug 26316 has been marked as a duplicate of this bug. ***
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xdg/shared-mime-info/issues/4.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.