-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I would like to be able to render a MathML expression inside the cell of a grid. Take this link for example.
http://www.w3.org/Math/XSL/pmathml2.xml
It uses the stylesheet
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="pmathml.xsl"?>
to render the mathml expression created by the following.
<math xmlns="http://www.w3.org/1998/Math/MathML">
<matrix>
<matrixrow>
<cn> 0 </cn> <cn> 1 </cn> <cn> 0 </cn>
</matrixrow>
<matrixrow>
<cn> 0 </cn> <cn> 0 </cn> <cn> 1 </cn>
</matrixrow>
<matrixrow>
<cn> 1 </cn> <cn> 0 </cn> <cn> 0 </cn>
</matrixrow>
</matrix>
Any thought?
</math>
Well looks like firefox has mathml support build in. So all I needed to do was something like
Listcell c = new Listcell();
c.appendChild(new Html(
"<math xmlns=\"&mathml;\">"
+ "<mrow>"
+ "<mi>a</mi>"
+ "<msup>"
+ "<mi>x</mi>"
+ "<mn>2</mn>"
+ "</msup>"
+ "<mo>+</mo>"
+ "<mi>b</mi>"
+ "<mi>x</mi>"
+ "<mo>+</mo>"
+ "<mi>c</mi>"
+ "<mo>=</mo>"
+ "<mn>0</mn>"
+ "</mrow>"
+ "</math>"));
Asked: 2012-01-25 02:53:40 +0800
Seen: 118 times
Last updated: Jan 25 '12