- From: James Cerra <jfcst24_public@yahoo.com>
- Date: Wed, 10 Nov 2004 07:10:23 -0800 (PST)
- 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 UTC