[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Re:

  • From: Didier PH Martin <martind@n...>
  • To: Frank Boumphrey <bckman@i...>, Lauren Wood <lauren@s...>,xml-dev@l...
  • Date: Sat, 12 May 2001 08:08:27 -0400

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@n...
Book: XML Professional (Wrox)
Articles: xml.com
Conference: Wireless One (Las Vegas)


  • Follow-Ups:
  • References:
    • Re: Re:
      • From: Frank Boumphrey <bckman@i...>

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.