RE: Math Display Problem

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