Closed Bug 502342 Opened 15 years ago Closed 15 years ago

xml-stylesheet fails when loading a cross-domain stylesheet

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows Vista
defect
Not set
major

Tracking

()

RESOLVED INVALID

People

(Reporter: bugzilla, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.1) Gecko/20090624 Firefox/3.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.1) Gecko/20090624 Firefox/3.5

Here's a perfectly valid XHTML page using the XHTML 1.1 plus MathML 2.0 plus SVG 1.1 DTD and making use of xml-stylesheet to load http://www.w3.org/Math/XSL/mathml.xsl

In Firefox 3.0, Opera and Google Chrome, this page loads as expected. In Firefox 3.5, you get the following error:

"Error loading stylesheet: An unknown error as occurred (805303f4)

http://www.w3.org/Math/XSL/mathml.xsl"

I've narrowed it down to xml-stylesheet via the following option, commenting out the xml-stylesheet line allows Firefox 3.5 to display the page correctly:
http://www.neothermic.com/testing/firefox/testcase.php?noxmlsheet=1

Further still, the fact that it's a cross-domain policy issue can be verified by using a local copy of the mathml.xsl (and the two included files):
http://www.neothermic.com/testing/firefox/testcase.php?localsheet=1

If this is as intended, then xml-stylesheet has been broken for no reason at all; quite a few pages which use MathML use xml-stylesheet to render MathML with the w3c's style document.


I tried to test on a nightly, but as it stands the last nightly build doesn't start correctly for me.

Reproducible: Always

Steps to Reproduce:
1. Open Firefox 3.5
2. Load http://www.neothermic.com/testing/firefox/testcase.php
3. View Error
Actual Results:  
Error loading stylesheet: An unknown error as occurred (805303f4)

http://www.w3.org/Math/XSL/mathml.xsl

Expected Results:  
This is a test. If you see this, the test has worked
Confirmed on Windows Vista.

Error: no element found
Source File: http://www.w3.org/Math/XSL/mathml.xsl
Line: 1

Regression range is http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=1949346e6006&tochange=6e39da3e3e20

Maybe Bug 389508?
Blocks: xxx
Status: UNCONFIRMED → NEW
Component: General → DOM
Ever confirmed: true
Product: Firefox → Core
QA Contact: general → general
Version: unspecified → Trunk
We're behaving as intended here.

Old versions of firefox would ignore the xml-stylesheet pointing to a cross-origin stylesheet. However firefox 3.5 will try to apply it. However it doesn't work since the stylesheet doesn't have the proper security headers. Specifically applying a XSLT stylesheet counts as reading data, so we require CORS [1] headers to be sent.

[1] http://dev.w3.org/2006/waf/access-control/
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
(In reply to comment #2)
> We're behaving as intended here.

If this is intended behaviour, then I suggest the error message be changed. "An unknown error as occurred" is neither helpful or correct (it's not unknown and not an error).
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.