<!DOCTYPE math:math 
    PUBLIC "-//W3C//DTD MathML 2.0//EN"
           "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd" [
    <!ENTITY % MATHML.prefixed "INCLUDE">
    <!ENTITY % MATHML.prefix "math">
]>
<math:math xmlns:math="http://www.w3.org/1998/Math/MathML"
           xmlns:html="http://www.w3.org/1999/xhtml">
  <math:apply id="start">
    <math:eq/>
    <math:ci>y</math:ci>
    <math:apply id="apply_plus">
      <math:minus/>
      <math:apply id="apply_power">
        <math:power/>
        <math:ci id="container_x">x</math:ci>
        <math:cn id="container_2">2</math:cn>
      </math:apply>
      <math:cn>3</math:cn>
    </math:apply>
  </math:apply>
  <html:script type="application/javascript" src="http://weblogs.mozillazine.org/weirdal/math/removeWhitespace.js"/>
  <html:script type="application/javascript" src="http://weblogs.mozillazine.org/weirdal/math/contentMathEval.js"/>
  <html:script type="application/javascript"><![CDATA[

window.addEventListener("load", function runTest() {
  removeWhitespaceByNamespace(document, "http://www.w3.org/1998/Math/MathML");

  var variableSet = {
    x: 3,
    y: new TargetVariable()
  }

  var output = "";
  output += (variableSet.toSource()) + "\n";

  output += (getComputedValue(document.getElementById("start"), variableSet)) + "\n";
  var func = getComputingFunction(document.getElementById("start"));
  output += (func(variableSet)) + "\n";
  output += (variableSet.toSource()) + "\n";

  variableSet.x = 4;
  variableSet.y.reset();
  output += (variableSet.toSource()) + "\n";

  output += (func(variableSet)) + "\n";
  output += (variableSet.toSource()) + "\n";

  alert(output);
}, true);

  ]]></html:script>
</math:math>
