Closed Bug 1566029 Opened 5 years ago Closed 5 years ago

XSLT not loaded from local file

Categories

(Core :: XSLT, defect)

68 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1565261

People

(Reporter: rubend, Unassigned)

Details

When loading a local XML file with a local XSLT style sheet, the style sheet is not applied. However when loading an XML file on the internet the XSLT style sheet is properly applied. Instead, Firefox just shows the contents of the XML file.

Locally, the file is not even loaded. This can be seen when loading an XSLT style sheet with syntax errors (e.g. unclosed XML tags). It won't even give an error.

Here's a minimal example in reproduce steps:

  1. Create a local file on your computer called test.xml with the following content:
    <?xml version="1.0" ?>
    <?xml-stylesheet type="text/xsl" href="test.xsl" ?>
    <document>
    <content>Hello, world!</content>
    </document>

  2. Create a local file on your computer called test.xsl with the following content:
    <?xml version="1.0" ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <xsl:template match="/">
    <html>
    <head>
    <title>The template was properly applied.</title>
    </head>
    <body>
    The XSL template was applied properly. Contents: <xsl:value-of select="document/content" />
    </body>
    </html>
    </xsl:template>

    </xsl:stylesheet>

  3. Open the test.xml file with Firefox (right click -> open with).

Expected results: The page says: The XSL template was applied properly. Contents: Hello, world!
Actual results: The page says: Hello, world!

As a secondary test, open the web page here where I put the two files: http://dulek.net/firefox-xslt-bug/test.xml
The expected results are met there. It only works properly if it's on an online web page.

I tried this with a brand new Firefox profile as well, and the results were the same. I tried this with all Firefox plug-ins disabled, and the results were still the same. This started happening in Firefox 68.0. I have not yet been able to try this on newer versions since I am unable to install those newer versions on this computer.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.