Anne van Kesteren

OBJECT tests

I made a small object test today. It is written HTML 4.01 (yes, that old) and imports a MIDI file and a MathML2 file. It works perfectly in Mozilla (my version that is) and doesn't work at all in IE. The only surprise was that there was not a single way to control the damn music (music was taken without permission from Change That Tune, they don't care (I hope). The test can be found here: OBJECT TESTS.

Abbreviations, Acronyms, Initialisms, the definiteve guide. Vote for this bug: scrolling (keyboard or mouse wheel) does not work for elements such as div using overflow:auto|scroll;.

Comments

  1. In Safari, I can hear the MIDI file, but the test with MathML2 does not display anything.

    Posted by Sylvain at

  2. AFAIK it is MIDI, not MIDE.

    And that's a really good article by Lars Holst. Thanks for the link! I have added him to my blogroll.

    Posted by Ben de Groot at

  3. Great that safari supports it. I can live with the MathML, that was just to test if it was possible to use it within a HTML4.01 page (is XHTML unnessary... :)).

    The main problem is that you can't control the music without adding some JavaScript I think. And I don't like that! Because it should be useable when people don't have JavaScript turned on.

    Ben,
    I will fix that. Thanks.

    O and while everyone is reading this comment, read this: Inline XML (Extensible Markup Language) reviewed and Modularization of XHTML in XML Schema Last Call Published,

    Posted by Anne at

  4. You can embed MathML in HTML4, using object and the correct MIME type (as you have shown), but that means 1 file per equation. Since a typical MathML document might have dozens or hundreds of equations, this quickly becomes a difficult solution to maintain, unless you have a really good content managment system. An interesting question is whether this technique would allow people with the MathML plugin for IE to see the equation (unless I am misinformed, the major MathML plugin for IE will only support text/html, whereas Mozilla will only support an XML MIME type). If it did work (which I doubt), using object would be a viable solution for getting mathmatical content to IE and Mozilla users (Safari, Opera and almost** every other browser in existence have no support for MathML at all). However, it might be easier to use some server side magic to get the correct DOCTYPEs to the correct people.

    **The exception being Amaya, which has an approximate userbase of 12***

    *** Yes, I made that figure up

    Posted by jgraham at

  5. It's worse than that.

    There's no way to meaningfully predict the size of box to allocate to a MathML fragment included via the object tag. That depends on rendering details (everything from the font-size of the surrounding text to the fonts available on the user's system to rendering behaviour of the UA) which cannot be predicted ahead of time. For display equations, the result just looks bad. For inline equations, it's more or less impossible to get them to work.

    You're much better off serving up your equations the "old-fashioned" way, as a bunch of GIF images. That way, at least, they have predictable sizes and universal browser support.

    If, on the other hand, you're gonna waste time using MathML, there's only one way to go -- including it inline in an XHTML 1.1+MathML 2.0 document.

    Posted by Jacques Distler at

  6. Note that I have exactly the opposite attitude to SVG. I don't see much use for inline SVG, but am quite happy including it via the object element.

    Posted by Jacques Distler at