W3C home > Mailing lists > Public > www-math@w3.org > December 2006

RE: Math Display Problem

From: Waters, Michael, Springer US <Mike.Waters@springer.com>
Date: Sat, 02 Dec 2006 18:59:58 -0500
To: sahoo.byomokesh@gmail.com
Cc: www-math@w3.org
Message-id: <F9A426730B49D8489A32B966BBF03D5703C9934C@NY-EX001.springer-sbm.com>

> I have downloaded and attached mathml.xsl, ctop.xsl and
> pmathml.xsl. But Math Equation is not converting properly. It's
> display as a normal text. Please anyone can help me and guide me
> what is wrong.

Hi Byomokesh,

It's not clear how you want to display your results. Right now, you're not outputting XHTML or HTML.

Even so, if you need to, you can get the math to display in Firefox (not IE) if you have some control over the source XML: set your math element to have a default MathML namespace, i.e.,

	<math xmlns="http://www.w3.org/1998/Math/MathML">

Note that if you don't bind the math to the MathML namespace, your math is matching against the default template in pmathml.xsl:

<xsl:template match="*|comment()">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>

rather than:

<xsl:template match="mml:math" priority="22">
<xsl:choose>
<xsl:when test="$activex='techexplorer-plugin'">
<embed  type="text/mathml" height="75" width="300">
<xsl:attribute name="mmldata">
<xsl:apply-templates mode="verb" select="."/>
</xsl:attribute>
</embed>
</xsl:when>
<xsl:otherwise>
<xsl:element name="mml:{local-name(.)}">
 <xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

If you're looking to display the math in IE and Firefox, you should think in terms of creating XHTML+MathML. See the simple example at:

http://www.dessci.com/en/products/mathplayer/author/sample.xht

Nowadays, with the modern browser versions, there's no real need to use mathml.xsl or pmathml.xsl if things are set up properly in your stylesheet.

Regards,
Mike
Received on Sunday, 3 December 2006 00:00:13 GMT

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