Re: proposal for MIME behavior in GNOME

On Fri, 2003-12-05 at 12:47, Daniel Veillard wrote:
> On Fri, Dec 05, 2003 at 11:54:29AM -0500, Jonathan Blandford wrote:
> > Murray Cumming Comneon com writes:
> > 
> > > > Presumably valid xml files will appear as text/xml, and not 
> > > > as text/plain.
> > > 
> > > And will that be handled the same as application/octet-stream files, or just
> > > opened silently with a default XML-editing application such as gedit?
> > 
> > What do you want it to do?  What's the 'right' behavior when you get an
> > unknown xml file.  Should it open in an application like conglomerate or
> > in a text editor.
>   Unfortunately Mime-Type is clearly inadequate now for specifying
> the default processing of a resource in the face of XML usage.
> One way is to try to detect namespaces in the document first kbyte
> or so, grepping for common strings might be sufficient. But it is
> outside purely Mime-Type handling...

While MIME type may not really be adequate to completely describe 
a XHTML+SVG file or whatever, we have to remember that we are not
aiming for a complete cataloging system, but rather something
that describes a file well enough to know what the default viewer/editor
for should be for the file and what actions are possible on it.

And we need this system to be comprehensible to the user. 

Sticking to the idea that a file has a single type really seems 
pretty much essential. For an XML file, typically the root node
of the document is going to belong to some namespace/DTD/spec, 
and that namespace is going to determine the right viewer. I don't think
you want one viewer for xhtml+svg and a different viewer for
xhtml+mathml. That's just describing a broken situation for the

In some cases (a generic container format) it may be that the
XML structure of the document doesn't tell you what the "type"
of the file is, but the user's model is still going to be:

 - I created this document with GnomeFrobinator
 - Hence it's a GnomeFrobinator document
 - And when I click on it, I want GnomeFrobinator to open it

And it's this user model that we are trying to represent. Not
the internal structure of the file.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]