[Prev][Next][Index][Thread]

Content markups, piecewise functions, conditions



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2919.6307" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,<BR><BR>I am thinking about how I =
could code a=20
piecewise function using<BR>content markups. I need content markups =
because I=20
aim at making a small<BR>MathML "parser-compiler". I didn't understood =
exactly=20
how conditions were<BR>working. So as to code the sign function (returns =
-1 when=20
x&lt;0, 0 when x=3D0<BR>and +1 when x&gt;0) what do you think of this ? =
How can I=20
tell that those 3<BR>definitions belongs to the same function =
?<BR><BR>&lt;?xml=20
version=3D"1.0" encoding=3D"UTF-8"?&gt;<BR>&lt;!DOCTYPE math SYSTEM "<A=20
href=3D"file://localhost/S:/java/xerces/mathml/mathml.dtd">file://localho=
st/S:/java/xerces/mathml/mathml.dtd</A>"=20
&gt;<BR>&lt;math&gt;<BR>&nbsp; &lt;!--If x&lt;0 then -1--&gt;<BR>&nbsp;=20
&lt;lambda&gt;<BR>&nbsp;&nbsp;&nbsp;=20
&lt;bvar&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;ci&gt;x&lt;/ci&gt;<BR>&nbsp;&nbsp;&nbsp; =
&lt;/bvar&gt;<BR>&nbsp;&nbsp;&nbsp;=20
&lt;apply&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;bvar&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;ci&gt;x&lt;/ci&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;/bvar&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;condition&gt;<BR>&nbsp;&nbsp;&nb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p;&nbsp;=20
&lt;condition&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;reln&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;eq/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;ci&gt;x&lt;/ci&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;=20
&lt;cn&gt;0&lt;/cn&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;/reln&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;/condition&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;cn&gt;1&lt;/cn&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/apply&gt;<BR>&nbsp;=20
&lt;/lambda&gt;<BR>&lt;/math&gt;<BR><BR>Thanks for your=20
help,<BR>Gerald.<BR><BR></FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>________________________________<BR>G=E9rald=20
QUINTANA<BR>&nbsp; <A=20
href=3D"mailto:gerald.quintana@ecl2000.ec-lyon.fr">gerald.quintana@ecl200=
0.ec-lyon.fr</A><BR>&nbsp;=20
<A=20
href=3D"http://www.multimania.com/gquintana">http://www.multimania.com/gq=
uintana</A></FONT></DIV></BODY></HTML>

Follow-Ups: