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

If-conditions & how to evaluate mathml expressions

From: Jan Moeller <jmo@buerotiger.de>
Date: Sun, 23 Apr 2006 12:36:22 +0200
Message-ID: <444B58A6.7080507@buerotiger.de>
To: www-math@w3.org


A few days ago I asked how to express if-statements with MathML. Thank 
you all for your replies! What I do know is using content MathML with 
piecewise/piece elements. That's fine for me...

Another short questions:
I need to evaluate a MathML expression within Java. That is, I want to 
read an input stream with MathML/XML content and get back the function 
value the modelled MathML formular would evaluate to.

E.g. a formula like x*y^2 is expressed like this:


This stream expresses f(x,y)=x*y^2, but I do not code the f(...) in MathML.

I need a method to set the variables x and y (in general all ci-elements 
within the content MathML) with values and get the calculated value 
back. E.g. if x=2 and y=3, then I need a class that's able to take an 
MathML input stream & all variables and returns the function value (18).

Does anyone know whether there's an easy way to do this? I searched the 
web, but didn't find anything. This one seems to do the other way 
(create MathML output):


Thank you!

Received on Sunday, 23 April 2006 10:43:22 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:27:37 UTC