Jump to content

Error when loading stylesheet in FireFox


lclqt12

Recommended Posts

[quote name='boen_robot' post='190545' date='Nov 16 2010, 01:20 PM']What's the XML and XSLT files?(If Firefox doesn't know the error, how should we?)[/quote]hi boen_robot, Thank you for your reply, below is my xml and xslXML : <?xml version="1.0" encoding="ISO-8859-1"?><?xml-stylesheet type="text/xsl" href="http://...../x.xsl"?><catalog> <cd> <title>Empire Burlesque</title> <artist>Bob Dylan</artist> <country>USA</country> <company>Columbia</company> <price>10.90</price> <year>1985</year> </cd></catalog>If i change href="http://...../x.xsl"?> to href="x.xsl", it work ok on FireFox. I think default firefox doesn't allow accessing xsl file across domain follow this link [url="http://code.google.com/p/ubiquity-xforms/wiki/CrossDomainSubmissionDeployment"]http://code.google.com/p/ubiquity-xforms/w...ssionDeployment[/url] But it seems everything that i edit in prefs.js will be erased when firefox restarted. I also create user.js file into the same folder with prefs.js ( default, i don't have user.js in folder ) and add user_pref("capability.policy.default.XMLHttpRequest.open", "allAccess"); into user.js file too. But the error is still occured.
Link to comment
Share on other sites

Strange... I thought Firefox allowed cross domain XSLT transformations... perhaps I was wrong (never did it myself anyway; I just remember seeing it once somewhere), or perhaps they changed it at some point... perhaps the change was too quick for the XSLT team to adjust error messages accordingly, hence the "unknown" error.Well, if they don't allow it, you should not try to work around that - that would be hackery, and at best will only work at the computer you try it on.Keep in mind that "XSLT via xml-stylesheet PI" and "XSLT via XMLHttpRequest" are two different things, governed by different policies. I don't know if Firefox has any setting explicitly for the xml-stylesheet PI, but if it doesn't, that means you'll have to revert back to something else... like executing the transformation "manually" with JavaScript embedded on another HTML page, and display the results accordingly. You can use something like Sarissa for cross browser XSLT execution in JavaScript.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...