There is some problems with nautilus due to the fact that many xhtml files use a .html extension but are in fact xml files. Is there any way to say that .html can also be used for xml files ?
This problem seems to be bigger then just HTML files. XML files can be many different types of files (XSL, XHTML, NRG, Mime-type database). Are there plans for supporting mime-type detection based on the used doctype or primary xmlns? This does seem to go beyond simple file header magic though, perhaps a seperate routine for XML files? Let mime-types have an optional "xmlns" attribute perhaps? The base XML mime-type should only be used as a fall-back for unknown forms of XML.
*** Bug 1321 has been marked as a duplicate of this bug. ***
There's already data to match against when trying to detect XHTML files, for example: <mime-type type="application/xhtml+xml"> <sub-class-of type="application/xml"/> <_comment>XHTML page</_comment> <glob pattern="*.xhtml"/> <root-XML namespaceURI='http://www.w3.org/1999/xhtml' localName='html'/> </mime-type> If your XHTML files don't mention http://www.w3.org/1999/xhtml in the namespace, then they need fixing. If detecting by data for those XML files still fails, then it's probably a bug in the implementation, so you'd need to file a bug against gnome-vfs, or whatever bit of code is responsible for detecting mime-types in your desktop environment.
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.