W3C home > Mailing lists > Public > www-math@w3.org > October 2002

Re: HOWTO implement cross-browser-compatible MathML

From: David Carlisle <davidc@nag.co.uk>
Date: Wed, 16 Oct 2002 17:59:11 +0100
Message-Id: <200210161659.RAA23242@penguin.nag.co.uk>
To: qgruyxzhqfzt@spammotel.com
CC: www-math@w3.org

Bill has already replied pointing at the XSL stylesheet which helps 
address many of the problems with cross browser support, but
I may comment on some of your individual points.

  a. Convert all symbolic entities to the corresponding unicode
     (e.g., '&hslash;' to '&#x210F;').

This is probably a good idea anyway as it saves the reader 
having to read the DTD, however it isn't strictly necessary as long as
you use a doctype whose final path name ends "mathml2.dtd" in this case
mozilla (although it won't read the specified dtd) will read its own
copy of the mathml dtd.

  b. Delete 'mml:' in all MathML commands and adjust the <html>
     tag accordingly.

You should not need to do this (and you don't need to do that for 
IE, amaya, mozilla or netscape)

  c. Correct <math> tags if they do not specify xmlns.

Yes the mathml should be in the mathml namespace, although if you use a
prefixed form you only need declare the namespace once at the top of the
file, not in every math element.

  d. Add the reference to mathml.xsl or pmathml.xsl if missing.

That helps.

  Rename the file to *.xml, make it XML compliant 

actually the name doesn't matter, what matters is the mime type,
although using a file extension of .xml is an easy way to get the right
mime type.

 (add <?xml>,

 That isn't necessary unless the file is in a non default encoding,
 in which case it is needed for the file to be XML, not a specific
 restrication for mathml.

 convert all tags to the lower case, etc.) 

 all element names in xhtml and mathml are lower case so this is
 just a requirement of the specifications not a workaround to get cross
 browser support.

 (remove unnecessary <style>, <object> and <?import> tags, etc.)

 well, if they are unnecessary then you can remove them, but 
 they should do no harm if they are there as long as the contents are
 well formed xml.

  a. Combine xhtml-lat1.ent, xhtml-symbol.ent, xhtml-special.ent and
     mmlalias.ent into a local DTD, say, math.dtd.
  b. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML
       2.0//EN" "math.dtd">

if you call the file "math.dtd" then mozilla will not read it unless you
copy the file into the $MOZILLAHOME/res/dtd directory on the client. If 
you had called the file mathml2.dtd (or used the official mathml2 dtd)
then as I said above, mozilla will read its mathml2.dtd that is in teh
distribution  $MOZILLAHOME/res/dtd directory.

 a. http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd is not
    properly parsed by MSIE (it does not understand IGNORE tag).

two points here, there is an updated DTD in
(as specified in teh mathml errata) and if you update to IE6 SP1
the bugs in its XML parser are fixed so it can parse th edtd.

 b. Mozilla never loads external entities from the web, so you
    can not create a custom <!DOCTYPE> either.

true but if you call your dtd mathml2 mozilla will read a dtd that
defines all the mathml entities.


This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.
Received on Wednesday, 16 October 2002 12:59:38 UTC

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