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

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

From: Chris Chiasson <chris@chiasson.name>
Date: Sat, 19 May 2007 21:45:52 -0500
Message-ID: <acbec1a40705191945p55e9a67eu2225d180f43ffe43@mail.gmail.com>
To: R.W.Kaye@bham.ac.uk
Cc: "Robert Miner" <robertm@dessci.com>, www-math@w3.org

is there a way to put a registry key with a meta character or regular
expression so that you can match multiple mime types?

On 5/19/07, Richard Kaye <R.W.Kaye@bham.ac.uk> wrote:
>
> Robert,
>
> I notice Mathplayer adds some registry entries
> for other mimetypes other than application/xhtml+xml
> For example, I noticed one for "application/xhtml+xml; charset=utf-8"
> (I typed that exactly, including getting the case right and the
> space after the ;)
>
> Are you sure that these registry entries are actually working?
>
> I ask because I just set up a document at
> http://mat140.bham.ac.uk/~richard/blmath/index-uhtml-mathml.uhtml
> which is served statically by apache with header containing
> Content-Type: application/xhtml+xml; charset=utf-8
> and this doesn't display in my IE7+MathPlayer
>
> I am wondering if IE does something strange with such
> mime types, perhaps modifying or removing the charset before
> matching against the registry keys, or perhaps there is some
> invisible character in there, or carriage-return or line-feed.
>
> As for my Tomcat and the java servlets, I am stuck.  I can
> reproduce the problem with a "hello world" type of servelet at
> http://mat140.bham.ac.uk:8180/sample/hello
> but I cannot reprogram this servelet to omit the charset.
> It seems that tomcat's programmers read the specs as saying
> that charset is manditory and the implementation always adds
> a default.
>
> Richard
>
> On Fri, 2007-05-18 at 10:26 -0700, Robert Miner wrote:
> > 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]
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
>
>
>


-- 
http://chris.chiasson.name/
Received on Sunday, 20 May 2007 02:45:55 GMT

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