XSL JavaScript

Hallo
I want to transform XML documents via XSL into HTML. The XSL stylesheet includes the Javascript/Codesnippet. In Explorer, Safari and Opera the javascript is working, in Firefox not. What is wrong? I have no idea :frowning:
Thank you for help
M.

Certainly its helpful to see the code of the XSL stylesheet:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="www.w3.org/1999/XSL/Transform">
 <xsl:template match="/">
  <html>
   <head>
    <title>Test</title>
   </head>
   <body>
     <div id="contentMiddle">
      <div id="titel"><xsl:copy-of select="/*[1][name()='daten']/h2"/></div>
      <div id="text"><xsl:copy-of select="/*[1][name()='daten']/p"/></div>
     </div>

    <!-- Piwik -->
    <script type="text/javascript">
     var pkBaseURL = (("https:" == document.location.protocol) ? "www.example.net/piwik/" : "www.example.net/piwik/");
     document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
    </script><script type="text/javascript">
     try {
     var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
     piwikTracker.trackPageView();
     piwikTracker.enableLinkTracking();
     } catch( err ) {}
    </script><noscript><p><img src="www.example.net/piwik/piwik.php?idsite=1" style="border:0" alt=""/></p></noscript>
    <!-- End Piwik Tag -->

   </body>
  </html>

 </xsl:template>

</xsl:stylesheet>

If it works without the Piwik tracking code, it’s probably a parse error. In that case, reduce the JavaScript to the smallest reproduceable test case and submit to the Moz devs to fix.