Hi Team,
i have one jsp to display Mathdata along with others. in our project we are using xslt translations to render input from xml data source.
my sample xsl file
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
extension-element-prefixes=" mml"
>
<xsl:output method="xml" indent="yes"/>
<xsl:template match="mml:math">
<div>
<pre class="mathmldata" style="">
<xsl:apply-templates />
</math>
</pre>
</div>
</xsl:template>
<xsl:template match="mml:*">
<xsl:element name="{local-name(.)}">
<xsl:apply-templates select="@* | node()" />
</xsl:element>
</xsl:template>
<xsl:template match="@*">
<xsl:attribute name="{local-name(.)}">
<xsl:value-of select="." />
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>
In this file if i am getting input math ml with mml prefix i am removing and dispalying as html5 does not support name space prefix to render math ml
after that it started displaying math ml formulas in firefox browser
sample output of that:
<div>
<pre style="" class="mathmldata">
<math mode="display" display="block">
<mrow>
<mrow>
<msub>
<mi>ß</mi>
<mi>t</mi>
</msub>
<mo>=</mo>
<mfrac>
<msub>
<mi>?</mi>
<mi>t</mi>
</msub>
<mrow>
<mn>1</mn>
<mo/>
<msub>
<mi>?</mi>
<mi>t</mi>
</msub>
</mrow>
</mfrac>
</mrow>
<mo>,</mo>
</mrow>
</math>
</pre>
</div>
but same thing not working for IE and chrome browsers and from internet i got to know that mathjax will do that rending for these.
so i included as below in my project main-tiles.xml for the view as i downloaded mathjax to my local and used the same
<put-list-attribute name="prejs">
<add-attribute value="lib/MathJax-2.6-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" />
</put-list-attribute>
but still formulas are not rending
i checked by clicking on page-view source and laoded as below.along with below we are loading many other js files required for our project.
point here is
1) when i try with sample html with mathML and the above script working fine in chrome but in our project its not
i tried many options from different sites but i could not get resolution
Could you please help me to solve this issue?
Thanks in advance.