Assume the trivial case of a XSL file whose only job is to create a document with scriptaculous:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<html>
<head>
<script SRC="javascript/prototype.js" TYPE="text/javascript"></script>
<script SRC="javascript/scriptaculous.js" TYPE="text/javascript"></script>
</head>
<body>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Problem:
The above XSL file, if invoked with a XML file, causes Firefox to hang on the page.
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="example.xsl"?>
<anytag/>
Observations:
- Firefox (v2.0.0.2 Win and OS X) hangs with the above XSLT file.
- Internet Explorer does not.
- Other non-scriptaculous JavaScript librarys, such as jQuery, have no problem loading from XSLT code.
- The HTML portion, if placed in a .html file, works perfectly fine in the browser.
Suspicions:
If I had to hazard a guess, I'd assume that Scriptaculous's method for conditionally including files has a portability problem with Firefox, or indeed, Firefox may actually have a bug (though not sure how to prove it).
Cause for concern:
Using XSL templates to produce AJAX code based on Scriptaculous won't run under Firefox.