OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

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

RE: Re:



Hi

Sounds like this light subject seems to become more and more serious :-))

Frank said:
A file type is defined by its mime type not by it's suffix.

Didier replies:
Yes mostly in the case of an HTTP or SMTP transaction where the MIME type is
either necessary or sufficient. But the MIME type is not necessary in the
context of some desktop’s file management where the file extension may be
more important since it is used to associate the right program to a file
type. For instance, xml spy can be associated to all the “.xml” files and
thus when the user double click on an xml file, xml Spy is automatically
started. In this last case, the MIME type is irrelevant. So, to go back to
the original problem, notepad save the xml document as text not as xml.
Since notepad is present on the windows platform, the “.txt” files are
associated to notepad, not the “.xml”. To do so, the system registry has to
be modified so that the “.xml” file extension is associated to the notepad
program. To the person who originally asked this question, one word of
advice: “go get an xml editor”, when you edit an xml document at least you
won’t have to remember all the tags and where they go. A good editor will
help you by showing the appropriate tags in a context menu or in a list and
you’ll get other useful features too.

Frank said:
The suffix (txt, htm,asp, ppf, cfm) is a convenient way for an
application to decide which files to send to a processor, and which
not.

Didier replies:
Yes but on some platforms the extension is used to retrieve the MIME type.
For instance on Windows, the file extension may be used to retrieve the MIME
type. On other platform like Linux, this is not the case but, in this
context, the extension can be used to recognize a particular vocabulary or
simply the format. For instance, a docbook (the Linux documentation is based
on a Docbook like format) document based on SGML can easily be recognized if
the extension is ".sgml" and if the document is based on xml, then the
extension ".xml" convey enough information to indicate that we are dealing
with an XML document.

Conclusion: on some platforms, the extension may be useful to retrieve the
MIME type, or it could be useful for human beings to convey some information
about the file's content. In the context of HTTP server however, you’ll need
most of the time (at least on several HTTP server present on the market) the
file extension to associate to it the right MIME type. The HTTP server, need
that information to insert the right “content-type” HTTP header. Otherwise,
without that the HTTP server will have to deduce the file MIME type with
some magic (and in this case the magic has a cost: time) So, from the
pragmatic point of view, the file extension is more important than it seems
at first sight.

Hope we all came back to earth now and that our fellow who asked the
question at first will buy an xml editor :-)

cheer
Didier PH Martin
mailto: martind@netfolder.com
Book: XML Professional (Wrox)
Articles: xml.com
Conference: Wireless One (Las Vegas)