Hi,
I'm working with MEI files, which are XML files. Unfortunately, they are detected as HTML. My problem: I'd rather have them open in the XML editor by default, and HTML files in the browser.
The smallest "legal" MEI file looks like
Code:
<?xml version="1.0"?>
<mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="2012">
<meiHead>
<fileDesc>
<titleStmt>
<title/>
</titleStmt>
<pubStmt/>
</fileDesc>
</meiHead>
<music/>
</mei>
xdg-mime tells me for this file:
Code:
$ xdg-mime query filetype mimeTest.mei
text/html
My suspicion was that it might see the <title/> tag and for some strange reason think "ah, I know that, that's HTML". But for
Code:
<?xml version="1.0"?>
<mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="2012">
<meiHead>
<fileDesc>
<titleStmt/>
<pubStmt/>
</fileDesc>
</meiHead>
<music/>
</mei>
it still says
Code:
$ xdg-mime query filetype mimeTest.mei
text/html
Only if I remove the <titleStmt/> entirely, it gives me
Code:
$ xdg-mime query filetype mimeTest.mei
application/xml
As /etc/mime.types says:
Users can add their own types if they wish by creating a ".mime.types" file in their home directory.
I created ~/.mime.types with content
Code:
application/xml mei
But that didn't change anything.
Can anyone give me some advice on this?
Bookmarks