Bug 19201 - Use namespaceURI in detection
Summary: Use namespaceURI in detection
Status: RESOLVED MOVED
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: freedesktop.org.xml (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Shared Mime Info group
QA Contact:
URL:
Whiteboard:
Keywords:
: 26316 (view as bug list)
Depends on: 21316
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-20 07:26 UTC by Daniel Leidert
Modified: 2018-10-13 10:36 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
testcase (application/xhtml+xml) (450 bytes, application/xhtml+xml)
2009-02-09 13:07 UTC, Daniel Leidert
Details
testcase 2 (only kmime) (86 bytes, application/xml)
2009-02-09 13:12 UTC, Daniel Leidert
Details

Description Daniel Leidert 2008-12-20 07:26:41 UTC
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.
Comment 1 Bastien Nocera 2009-01-08 07:44:13 UTC
Please upload specific test cases.
Comment 2 Bastien Nocera 2009-02-09 06:53:39 UTC
As mentioned in the upstream bug, we need test cases. Reopen when you have some.
Comment 3 Daniel Leidert 2009-02-09 13:07:29 UTC
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).
Comment 4 Daniel Leidert 2009-02-09 13:12:09 UTC
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.
Comment 5 Daniel Leidert 2009-02-09 13:17:17 UTC
I attached two testcases. Reopening. I tested on a recent Debian Sid. Can you reprosuce the issue?
Comment 6 Bastien Nocera 2009-04-21 01:53:11 UTC
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.
Comment 7 Daniel Leidert 2010-01-29 13:15:01 UTC
*** Bug 26316 has been marked as a duplicate of this bug. ***
Comment 8 GitLab Migration User 2018-10-13 10:36:11 UTC
-- 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.