W3C home > Mailing lists > Public > www-math@w3.org > February 2006

Re: *.xhtml filenames, mimetypes and and mathML problem

From: Jason Davis <jason_davis@brown.edu>
Date: Thu, 23 Feb 2006 23:06:12 -0500
Message-ID: <43FE8634.3010600@brown.edu>
To: www-math@w3.org

Masatran (Deepak), R. wrote:
> * William F Hammond <hammond@csc.albany.edu> 2006-02-23
> Content Negotiation works well for my XHTML+MathML webpage
> <http://research.iiit.ac.in/~masatran/model/>. It is accepted as
> XHTML+MathML by XHTML-aware browsers. It is present in Google's cache at
> <>.
> The only problem is that Google's cache serves it as plain HTML.

Then instead of checking for the presence of "application/xhtml+xml" in
the accept variable (that, incidentally, leaves out Safari which
otherwise understands XML/XHTML just fine), you could also check for the
presence of "googlebot" in the user agent variable, and send that the
XHTML mime-type as well.

To make it even more complicated, consider the case where the user is
browsing with Internet Explorer and has the DesignScience MathML plugin
installed. His browser suddenly can accept application/xhtml+xml and
text/xml documents, and the page is *internally* converted to HTML (in
client memory) so that the MathML will render using IE's weird
implementation of HTML namespaces (it will actually internally rewrite
all the MathML to use an mml prefix, and insert two special tags into
the head of the document). Internet Explorer without the DesignScience
plugin will just either not understand the mime-type or display the XML
tree. Fortunately, the MathML plugin inserts a "MathPlayer" into the
user-agent of Internet Explorer, letting you detect it.

To summarize, for XHTML content negotiation, if the user-agent contains
"AppleWebKit", "Googlebot", or "MathPlayer", or the accept variable
includes "application/xhtml+xml", then you can send as
application/xhtml+xml, otherwise send as text/html.

-Jason Davis
Received on Friday, 24 February 2006 05:28:02 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:27:37 UTC