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

Well, I just spent some time running MathPlayer under a debugger, trying
to see why MathPlayer doesn't fire on 

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

It seems like you've been experimenting a bit with MIME types and I was
working, but I've been using "Charles", an HTTP header sniffer, and
adding registry keys by hand under HKCR\PROTOCOLS\Filter for all the
various MIME types I see for that page coming from Charles. So I'm
fairly certain my debug copy of MathPlayer is configured to fire for the
declared MIME type for the content coming from that URL.

Unfortunately, what seems to be the case is that whenever content is
coming out of Tomcat (or any other dynamic source) and the URL doesn't
correspond to a filename, IE just doesn't honor the MIME type in the
HTTP Response header, and instead treats it as HTML.  If I set a
breakpoint in the code that is notified when IE thinks an
application/xhtml+xml document is coming down the wire, before any of
MathPlayer's code is executed, it simply isn't hit for 

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

but is hit for 

	
http://mat140.bham.ac.uk/~richard/blmath/index-xhtml-mathml.xhtml

Very frustrating.  

--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 ~


> -----Original Message-----
> From: www-math-request@w3.org [mailto:www-math-request@w3.org] On
Behalf
> Of Richard Kaye
> Sent: Friday, May 18, 2007 7:54 AM
> To: www-math@w3.org
> Subject: MathML won't display (or: what triggers mathplayer
behaviour?)
> 
> 
> Dear all
> 
> I have an annoying problem, and would be grateful for any help.
> 
> I have been trying to MathML-enable my blog, and I have
> the usual result: it works fine in Firefox but I can't
> get IE7 to behave.
> 
> The blog is at
> http://mat140.bham.ac.uk:8180/blojsom/blog/default/
> This address serves the main file as text/html and
> has incorrect headers, etc.  The version served
> as application/xhtml+xml with proper !DOCTYPE and
> so on is
>
http://mat140.bham.ac.uk:8180/blojsom/blog/default/?flavor=xhtmlplusmath
> ml
> As mentioned, it works as expected in firefox.
> 
> It doesn't work with IE7+MathPlayer however.
> The text/html version looks as before (maths incorrectly
> rendered) but the application/xhtml+xml version is just
> rendered as an XML listing, exactly as you would expect in
> IE7 when it downloads an XHTML document and no helper or plugin
> is triggered.
> 
> This is strange, as there should be enough stuff there to
> trigger Mathplayer into action. It's just the same as a hundred
> other pages I have written.  Hence the subtitle of this
> mail: is there somewhere definitive information on what
> in an xhtml document triggers the mathplayer plugin to do
> something?  (As an aside, I would also quite like to use
> mathplayer's behaviour - even if there is no visible mathematics
> in the webpage - to avoid these lengthy XML listings of XHTML.)
> 
> It gets stranger.  To investigate the problem further
> I wget'ed all the files and put them up on my apache server
> (the blog itself is served directly from Tomcat5.5).
> The results are all in
> http://mat140.bham.ac.uk/~richard/blmath/
> In this directory, the document
> index-default-orig.html
> is the original default text/html document
> and index-xhtml-mathml-orig.xhtml is the original
> application/xhtml+xml document, exactly as I got from wget.
> I also put in there index-default.html and
> index-xhtml-mathml.xhtml are the same except I edited
> these files by hand to make sure that the associated
> files (css, jpg, js) are all served from the same
> directory rather than from tomcat.  All the names are
> different, so I don't think there is a content-negotiation
> issue.
> 
> As you'd hope, everything looks identical under firefox.
> But this time with IE7, Mathplayer is triggered and both
> index-xhtml-mathml-orig.xhtml and index-xhtml-mathml.xhtml
> display mathematics.
> 
> So how does IE7/Mathplayer manage to display identical
> documents served from different servers in such different
> ways?
> 
> There are also some problems with the stylesheets and the
> pages with mathematics aren't actually rendered correctly
> in IE7/Mathplayer, though they are at least legible.
> This is something else I need to fix too, in time.
> Unfortunately, this example is not the simplest
> (since it comes from the blog software I am using) and
> there are a number of CSS and JS things in it I need to
> understand, but I ***am*** worried that MathPlayer and
> the CSS/JS or whatever it is aren't living together nicely.
> 
> For the record, I append some of the details of the servers
> and the HTTP headers they send when I do a wget.  (Sorry,
> the wget agent isn't quite the same as IE7 - but I don't
> think it really matters. If you want I can do other experiments.)
> 
> Thanks for reading this far, and (in advance) for any help you
> might have.
> 
> Richard
> 
> 
> 
> 
> richard@mat140:~/tmp$ wget -S
> http://mat140.bham.ac.uk/~richard/blmath/index-xhtml-mathml-orig.xhtml
> 
> --13:28:48--
> http://mat140.bham.ac.uk/~richard/blmath/index-xhtml-mathml-orig.xhtml
>            => `index-xhtml-mathml-orig.xhtml.1'
> Resolving mat140.bham.ac.uk... 147.188.55.51
> Connecting to mat140.bham.ac.uk|147.188.55.51|:80... connected.
> HTTP request sent, awaiting response...
>   HTTP/1.1 200 OK
>   Date: Fri, 18 May 2007 12:28:48 GMT
>   Server: Apache/2.2.3 (Debian) mod_jk/1.2.18 mod_python/3.2.10
> Python/2.4.4 PHP/4.4.4-8+etch2 mod_perl/2.0.2 Perl/v5.8.8
>   Last-Modified: Fri, 18 May 2007 11:44:31 GMT
>   ETag: "29524e-47e4-1b4065c0"
>   Accept-Ranges: bytes
>   Content-Length: 18404
>   Keep-Alive: timeout=15, max=100
>   Connection: Keep-Alive
>   Content-Type: application/xhtml+xml
> Length: 18,404 (18K) [application/xhtml+xml]
> 
>
100%[===================================================================
> =============>] 18,404        --.--K/s
> 
> 13:28:48 (58.20 MB/s) - `index-xhtml-mathml-orig.xhtml.1' saved
> [18404/18404]
> 
> richard@mat140:~/tmp$ wget -S
>
http://mat140.bham.ac.uk:8180/blojsom/blog/default/?flavor=xhtmlplusmath
> ml
> 
> --13:29:18--
>
http://mat140.bham.ac.uk:8180/blojsom/blog/default/?flavor=xhtmlplusmath
> ml
>            => `index.html?flavor=xhtmlplusmathml'
> Resolving mat140.bham.ac.uk... 147.188.55.51
> Connecting to mat140.bham.ac.uk|147.188.55.51|:8180... connected.
> HTTP request sent, awaiting response...
>   HTTP/1.1 200 OK
>   Server: Apache-Coyote/1.1
>   ETag: "3605938c728a24802ed11501eaa2860f"
>   Last-Modified: Thu, 17 May 2007 09:43:55 GMT
>   Content-Type: application/xhtml+xml;charset=UTF-8
>   Date: Fri, 18 May 2007 12:29:19 GMT
>   Connection: close
> Length: unspecified [application/xhtml+xml]
> 
> 
> [ <=>
>           ] 18,404        --.--K/s
> 
> 13:29:19 (19.49 MB/s) - `index.html?flavor=xhtmlplusmathml' saved
> [18404]
> 
> 
> 
> 
> 
> 

Received on Friday, 18 May 2007 17:27:05 UTC