W3C home > Mailing lists > Public > www-html@w3.org > November 2004

Re: Identifying (X)HTML without MIME

From: James Cerra <jfcst24_public@yahoo.com>
Date: Wed, 10 Nov 2004 07:10:23 -0800 (PST)
Message-ID: <20041110151023.55789.qmail@web61104.mail.yahoo.com>
To: www-html@w3.org
Cc: James Cerra <jfcst24_public@yahoo.com>, Lachlan Hunt <lachlan.hunt@iinet.net.au>, trejkaz@xaoza.net

Thanks for the responses.  To summarize: I take it
that this algorithm makes the most sense:

1) Is MIME type explicitly set via some interface?

   I mean that the program is explicitly told the MIME
type in advance (e.g. through parsing a file
containing that the metadata for various files in an
archive).

   If so then use it, otherwise:

2) Does the environment transmit the MIME type? [1]

   For example, if the file system transmits that info
or if the file is transmitted via HTTP.

   If so then use it, otherwise:

3) Does the extension indicate the mime type [2] using
the following map:

	MIME type		Extensions
	text/html		htm html
	application/xml		xml
	application/xml+xhtml	xht xhtm xhtml

   This is mainly for compatibility with old DOS
conventions. :-/

   If so then use it, otherwise:

4) Else give up - the MIME type is ambiguous.

Is that the safest way to figure out the media type of
a file?  One other question - is there a
XHTML+MathML+SVG MIME type?

-- Jimmy Cerra

[1]
http://lists.w3.org/Archives/Public/www-html/2004Nov/0042.html

[2] http://lists.w3.org/Archives/Public/www-html/2004Nov/0039.html


		
__________________________________ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 
Received on Wednesday, 10 November 2004 15:10:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:01 GMT