Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #7919 (closed defect: invalid)

Opened 2 years ago

Last modified 2 years ago

Scriptaculous Fails to Load using XSLT on Firefox

Reported by: wls Assigned to: madrobby
Priority: normal Milestone: 1.x
Component: script.aculo.us Version: edge
Severity: normal Keywords:
Cc:

Description

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.

Attachments

report.xsl (414 bytes) - added by wls on 03/26/07 19:19:46.
Here's an XSLT file
report.xml (115 bytes) - added by wls on 03/26/07 19:21:28.
Here's an XML file to call the XSLT file

Change History

03/26/07 19:19:46 changed by wls

  • attachment report.xsl added.

Here's an XSLT file

03/26/07 19:21:28 changed by wls

  • attachment report.xml added.

Here's an XML file to call the XSLT file

05/16/07 11:13:48 changed by Tobie

  • status changed from new to closed.
  • resolution set to invalid.

scriptaculous.js uses document.write() (because that's the only thing Safari understands) to load the script.aculo.us effect.js, dragdrop.js, controls.js, etc. files which is incompatible with pages served as application/xml.

If you include the effects.js, controls.js, etc. files directly (and not by using scriptaculous.js), everything should work perfectly.

Closing this as invalid. Feel free to drop by on the mailing list if you have questions.