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

Re: Conditions in formulas with MathML

From: Stan Devitt <jsdevitt@stratumtek.com>
Date: Sun, 23 Apr 2006 01:10:48 +0200
Message-ID: <ce9128ae0604221610j3f31c455q11edd15e0e4bc707@mail.gmail.com>
To: "Jan Moeller" <jmo@buerotiger.de>
Cc: www-math@w3.org
MathML is specifically designed to allow extensions such as the following:

<apply>
<csymbol definitionURL="http://bureotriger.de/moeller/if">IF</csymbol>
<apply><!-- condition goes here --></apply>
<apply><!-- first formula goes here --></apply>
<apply><!-- second formula goes here --></apply>
</apply>

This is certainly one markup that would work and is supported.

Note that 1) it is easily recognized as yours and 2) makes use of the
existing constructs.

The basic idea is that the specification should be flexible enough to enable
you to propose an encoding for something not covered by the spec.   If after
time a particular encoding sees wide spread use, it migh lead to some
tweaking of the spec to standardize the new constructs.


Stan Devitt

On 4/16/06, Jan Moeller <jmo@buerotiger.de> wrote:
>
>
> Hello,
>
> I've got a list of hundrets of simple mathematical formulas like
>
> f(x,y) = x*y
> or
> f(x,y) = (x-12)*y^2
>
> What I need is a representation of these formulas in a way that allows
> to distribute these information easily, e.g. with XML/MathML. Above
> formulas are easy to describe with MathML, but how do I describe
> formulas with conditions, e.g.:
>
> if(x < 127) then f(x) = x*2
> else f(x) = x*3
>
> Background: In the past these formulas were made available as a
> programming code (with "if" conditions in it). Different software
> systems just called the program method code with input variables as
> arguments and got back the function value. But now we need to distribute
> these formulas in a way that's not bound to a specific programming
> language, e.g. XML.
>
> Any hints?
>
> Thanks in advance!
> Jan
>
>
>
Received on Saturday, 22 April 2006 23:12:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 20 February 2010 06:12:58 GMT