W3C home > Mailing lists > Public > www-math@w3.org > May 2007

RE: MathML won't display (or: what triggers mathplayer behaviour?)

From: Richard Kaye <R.W.Kaye@bham.ac.uk>
Date: Wed, 30 May 2007 19:58:21 +0100
To: www-math@w3.org
Message-Id: <1180551501.4663.20.camel@mat140.bham.ac.uk>

Dear all

I have finally succeeded in getting my blog server to emit
 Content-Type: application/xhtml+xml
in the HTTP header.  This was with quite a lot of help from 
the support group for Tomcat and David Czarnecki who wrote
the blog software (blojsom) I am using.  The details aren't
particularly important, except to say that it was necessary to 
treat XML data as binary data and output it to a stream rather 
than a text Writer.  (Java supports all the usual encodings so 
it is almost trivial to support those other than the default 
UTF-8. This will be done.)

I've tested it all quickly and it seems to work on all the 
platforms and browsers I have available, including IE+MathPLlayer.
You can try it yourself at

http://mat140.bham.ac.uk:8180/blojsom/blog/default/?flavor=xhtmlplusmathml

(The output is legible, but I still need to do some design tweaks.
You are not supposed to worry about those details right now.)

I learnt a lot in the process :) Thanks everyone for your interest 
and help!

Richard


On Tue, 2007-05-29 at 14:59 -0400, Waters, Michael, Springer US wrote:
> Hi Robert,
> 
> Recent tests on serving static .xhtml files led me to agree with Richard's assessment: the problem with MathPlayer not being triggered "is due to the presence of "; charset=utf-8" or something in the server's Content-Type header".
> 
> Just now I confirmed that observation by alternately adding and removing a "AddCharset UTF-8" directive to Apache's httpd.conf file. By adding that 1 directive, stopping/starting the server, >>AND<< removing the local browser cache, not just refreshing the page, I was able to prevent the triggering of MathPlayer on the simplest MathML demo page, thereby showing the XML tree. To re-enable the correct MathPlayer behavior, I removed the directive, stoppped/started the server, >>AND<< removed the local browser cache, going back to the default application/xhtml+xml MIME type for .xhtml and .xht files.
> 
> I haven't looked closely at various registry settings and I'm no web server expert, but these quick tests indicate to me that "application/xhtml+xml" works in IE6+MathPlayer, but "application/xhtml+xml; charset=utf-8" is problematic. (I haven't yet tested IE7.)
> 
> ----
> Mike Waters
> Springer
> Process and Content Management
> ----
> 233 Spring St. | New York, NY 10013 | USA
> Tel: +1 212 620-8457
> Fax: +1 212 647-1898
> mike.waters@springer.com
> ----
> www.springer.com
> www.springerlink.com
>  
> 
> 
> 
> 
> > -----Original Message-----
> > From: www-math-request@w3.org 
> > [mailto:www-math-request@w3.org] On Behalf Of Robert Miner
> > Sent: Tuesday, May 29, 2007 11:49 AM
> > To: Jacques Distler
> > Cc: R.W.Kaye@bham.ac.uk; www-math@w3.org; William F. Hammond
> > Subject: RE: MathML won't display (or: what triggers 
> > mathplayer behaviour?)
> > 
> > 
> > Hi Jacques,
> > 
> > There isn't a direct connection between the charset and the XML tree.
> > But just as IE doesn't seem to always follow the rules for determining
> > the encoding, it also does not play by the rules for determining the
> > MIME type (as I'm sure you know).  
> > 
> > The XML tree shows up when IE doesn't believe the http header's
> > declaration that the MIME type is application/xhtml+xml and doesn't
> > start up MathPlayer.  Somewhere later on, it must realize the document
> > is XML at least, since it displays the tree.  But at the point it is
> > supposed to invoke MathPlayer if the MIME type is 
> > application/xhtml+xml,
> > the call never comes, at least as far as I can determine by setting a
> > breakpoint in the relevant routine in the debugger.
> > 
> > We had been experimenting with the charset parameter, on the 
> > hypothesis
> > that somehow that might be preventing IE from recognizing the MIME
> > declaration in the http header. But it doesn't seem to.  
> > Mostly it seems
> > like if the document is dynamically generated, so there isn't a file
> > name in the http header, IE just sniffs the content and get's it wrong
> > for purposes of firing off MathPlayer.  At least that is what the
> > experimental evidence seems to suggest to me.
> > 
> > I thought perhaps Richard's comment about the BOM meant that if there
> > was a BOM, suddenly IE's sniffer did the right thing and 
> > recognized the
> > content as application/xhtml+xml and fired up MathPlayer.  But I guess
> > not.
> > 
> > --Robert
> > 
> > Robert Miner
> > Director, New Product Development
> > 
> > Design Science, Inc.
> > 140 Pine Avenue, 4th Floor
> > Long Beach, California  90802
> > USA
> > Tel:  (651) 223-2883
> > Fax:  (651) 292-0014
> > robertm@dessci.com
> > www.dessci.com
> > ~ Makers of MathType, MathFlow, MathPlayer, WebEQ, Equation Editor,
> > TexAide ~
> 
> 
Received on Wednesday, 30 May 2007 18:58:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 20 February 2010 06:12:59 GMT