On 25 apr 2006, at 23.55, Jonathan Johnson wrote:


Yes. Xhtml comes to mind, rss feeds, etc.


Then it is an valid rss (with an declaration in the beginning of the file) file and so on. (Not HTML) But i begin to see an explanation, many on this list looks to say if the MacType = TEXT, then all files are valid (hrml, xhtml,xml.rss, css, txt, plist) files, with or without extension.


Could an valid html file have an extension .txt ? or .jpg?

Yes, it could, depending on how it was written.

I think the answer is NO.
I can't find on w3.org any html or xhtml files that could have the extension .txt or jpg. And there are not so many ways to write it.



The moral of the story is while all what Joe is suggesting will help filter files more accurately and more to the common experience on the Macintosh, you should never rely on the extension or MacType when reading a file. Instead, as you're opening the file, try to examine the data to figure out what format it's in. Most files have a few bytes up front that serve as a "magic" code.

-Jon


And I would help the user to do less mistakes!
If the user should grab an .xml file, why should he select an file in .txt, .html, xhtml, .c, .bas, and so on..

It is an big difference if we talk about jpeg files there are not hundreds of valid extensions.

Regards,
Sven E

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to