Bug 26315 - XSLT files are always detected as application/xml
Summary: XSLT files are always detected as application/xml
Status: RESOLVED FIXED
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All All
: high major
Assignee: Shared Mime Info group
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-29 05:11 UTC by Daniel Leidert
Modified: 2011-04-03 02:37 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
testcase, simple XSLT file (207 bytes, application/xslt+xml)
2010-01-29 05:11 UTC, Daniel Leidert
Details
proposed patch (920 bytes, patch)
2010-01-29 05:29 UTC, Daniel Leidert
Details | Splinter Review

Description Daniel Leidert 2010-01-29 05:11:06 UTC
Created attachment 32894 [details]
testcase, simple XSLT file

The detection of xslt files always results in detection of the application/xml MIME type for both gvfs-info and kmimetypefinder. A testcase is attached.

This might be a general problem with XML-based MIME types or a "bug" in the written standard/implementation.

If you think, this is implementation related, please give me a hint and I will forward this to the GNOME and KDE bug trackers.

Maybe adding a a glob-pattern for *.xsl solves the problem (it does at least for gvfs, but not for kmimetypefinder).
Comment 1 Bastien Nocera 2010-01-29 05:16:59 UTC
Did you actually test this with the latest shared-mime-info master?
Comment 2 Daniel Leidert 2010-01-29 05:29:11 UTC
Created attachment 32895 [details] [review]
proposed patch

This is the proposed patch adding the global pattern *.xsl (maybe *.xslt should be added too) and the XSLT namespace.
Comment 3 Bastien Nocera 2010-01-29 05:41:39 UTC
Seriously, look closely at your patch and answer the questions that were asked.
Comment 4 Daniel Leidert 2010-01-29 05:51:46 UTC
apt-cache policy shared-mime-info:
    Installed: 0.70-1

So this was the latest release I tested with. You are right. I missed, that you already added the global pattern. Sorry for that. But you should also add the namespace as proposed in the patch. It is defined in the XSLT specs.

BTW: If there are only a few minutes between my posts, you can safely assume, that I did not yet necessarily read your comment. So you could have forbeared from sending your second comment. I don't bother you for my very own pleasure (especially when I try to follow your recently announced requirements!). Thanks.
Comment 5 Pino Toscano 2010-01-29 06:23:42 UTC
Problem is confirmed with current Git 787c97105ce3673c2e37d762955c35c24586dd28 (Release-0-70-41-g787c971).
The failure is in the 'data' checking, which recognizes the file as application/xml.

Bastien: xdgmime does not support check of XML namespaces, does it?
Comment 6 Bastien Nocera 2010-02-01 05:43:22 UTC
(In reply to comment #5)
> Problem is confirmed with current Git 787c97105ce3673c2e37d762955c35c24586dd28
> (Release-0-70-41-g787c971).
> The failure is in the 'data' checking, which recognizes the file as
> application/xml.
> 
> Bastien: xdgmime does not support check of XML namespaces, does it?

Nope, so the data check in the test suite can be expected to fail.


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.