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

  <xsl:template match="/">
    <html>
      <body onload="document.getElementById('not').textContent = ''">
        <p>Script ran <span id="result">XXX</span> document was parsed.</p>
        <p>onload did <span id="not">not</span> run.</p>
        <script>
          document.getElementById("result").textContent = (document.getElementById("x") ? "after" : "while");
        </script>
        <span id="x"/>
        <script>
          document.getElementById("x").textContent = "Done.";
        </script>
      </body>
    </html>
  </xsl:template>
</xsl:stylesheet>
