On 5/22/08, Luis Da Silva <massutt at gmail.com> wrote:
> I want to make a web application, using MATHML as data entry and MAXIMA
> who can interpret this xml and return the result of the mathematical
> expression written in MathML.
I have committed some changes to the maximaMathML package.
You can find the current versions at:
http://maxima.cvs.sourceforge.net/maxima/maxima/share/contrib/maximaMathML
After you load it, ordinary Maxima display is replaced by MathML display.
The function mathml reads and parses an input expression.
e.g.
load (maximaMathML);
sin(foo) + cos(bar);
=>
PRESENTATION-EXP
<math xmlns='http://www.w3.org/1998/Math/MathML'>
<mrow>
<mi>sin</mi><mo>⁡</mo>
<mrow>
<mo>(</mo><mi>foo</mi><mo>)</mo>
</mrow>
<mo>+</mo><mi>cos</mi><mo>⁡</mo>
<mrow>
<mo>(</mo><mi>bar</mi><mo>)</mo>
</mrow>
</mrow>
</math>
CONTENT-EXP
<math xmlns='http://www.w3.org/1998/Math/MathML'>
<apply>
<plus/>
<apply>
<sin/><ci>foo</ci>
</apply>
<apply>
<cos/><ci>bar</ci>
</apply>
</apply>
</math>
END-EXP
mathml (); /* next line is some input */
<math xmlns='http://www.w3.org/1998/Math/MathML'> <apply> <quotient/>
<cn type="integer">1</cn> <apply> <plus/> <cn type="integer">1</cn>
<apply> <tan/> <cn type="constant">γ</cn> </apply> </apply>
</apply> </math>
grind (%);
=> 1/(tan(%gamma)+1)$
You will probably find some bugs. Please open a bug report for any bug you find.
http://sourceforge.net/tracker/?group_id=4933&atid=104933
Hope this helps, & good luck.
Robert Dodier