Alan Horkan wrote:
you are presuming opening the application first and opening the document from there.
Well, actually I was thinking of once an application is sent a doc, generally by double-clicking on it in some file manager. The app gets opened and fed a file, at which point it can figure out what it is.
I'm thinking of clicking on a document from withing a file manager. Of course if the new extension is properly registered the point is moot, but the small point I'm making is that you would need to bother adding any sort of association if the file was named .xml
Actually, I don't.
I just copied a file to have both .xml and .inx versions. Nautilus tried to preview the .svg version, but then drew the generic SVG icon for the .xml and .inx versions with no work at all on my part. They all show up with a MIME type of image/svg when I right-click on them and get properties.
Also... when I double-click them, they all open up in an automatically-spawned instance of Sodipodi.
So my guess would be that the file manager recognized them as XML and then further knows how to inspect XML and take a peek at doctypes and such to know what it is.
And what ammount of work is needed for that?
In general, just double-click on the .inx file, the OS will ask what program to open it with and give you a checkbox to remember the choice.
i dont know about you but I find the interface for that in Windows to be slightly unpleasant and downright horrible in Gnome.
Then your Gnome must be very different from mine.
I just right-click and pick "open with" and choose the app.
Then I can also add the new mime type with minimal effort.
there is no benefit _yet_ in associating the files with anything especially, if and when there is a benefit I'll drop the objection.
Actually, for me there *is* a benefit today. I can get them to open in Emacs instead of Mozilla. I'd want to edit them, not view them as raw XML.
Oh, and if I create a new file with XML content but an unknown extension, it opens it with the default text editor. Sounds like about what I'd want it to do for general users.