Bug 726 - XML/HTML
Summary: XML/HTML
Status: RESOLVED INVALID
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: freedesktop.org.xml (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Jonathan Blandford
QA Contact:
URL:
Whiteboard:
Keywords:
: 1321 (view as bug list)
Depends on: 2692
Blocks:
  Show dependency treegraph
 
Reported: 2004-06-06 09:28 UTC by Sebastien Bacher
Modified: 2007-02-05 08:17 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Sebastien Bacher 2004-06-06 09:28:30 UTC
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 ?
Comment 1 Jeroen Hoek 2004-07-21 02:04:38 UTC
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.
Comment 2 Christophe Fergeau 2004-12-10 11:16:27 UTC
*** Bug 1321 has been marked as a duplicate of this bug. ***
Comment 3 Bastien Nocera 2007-02-05 08:17:34 UTC
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.