<?xml-stylesheet href="" type="text/xsl"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns="http://www.w3.org/2000/svg"
                version="1.0">

  <xsl:template match="/">
    <svg onload="document.getElementById('not').textContent = ''">
      <text x="10" y="20">Script ran <tspan id="result">XXX</tspan> document was parsed.</text>
      <text x="10" y="40">onload did <tspan id="not">not</tspan> run.</text>
      <script>
        document.getElementById("result").textContent = (document.getElementById("x") ? "after" : "while");
      </script>
      <text id="x" x="10" y="60"/>
      <script>
        document.getElementById("x").textContent = "Done.";
      </script>
    </svg>
  </xsl:template>
</xsl:stylesheet>
