Funkcjonalność tej witryny będzie ograniczona w czasie konserwacji. Jeśli artykuł nie rozwiązuje twojego problemu i chcesz zadać pytanie, to nasza społeczność wsparcia jest dostępna na @FirefoxSupport na Twitterze i /r/firefox na Reddicie.

Przeszukaj pomoc

Unikaj oszustw związanych z pomocą.Nigdy nie będziemy prosić Cię o dzwonienie na numer telefonu, wysyłanie SMS-ów ani o udostępnianie danych osobowych. Zgłoś podejrzaną aktywność, korzystając z opcji „Zgłoś nadużycie”.

Więcej informacji

XML file does not display if it is a local file and the XSLT file is on a server.

  • 2 odpowiedzi
  • 4 osoby mają ten problem
  • 1 wyświetlenie
  • Ostatnia odpowiedź od BDBaer

more options

If I have an local XML file with a local XSLT file the XML file displays as expected. If both files are on my server again the XML file displays correctly. However if the XML file is local and the XSLT file is on the server (and the XML file points to to the file on the server) I get the following error:

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

Using Firefox 41.0.1 on a Mac.

This problem does not occur on Safari

Any idea of where I'm going wrong? Searching on the web there are suggestions about changing the mime, but am not 100% sure what to do about that. In

Thanks,

Brian

If I have an local XML file with a local XSLT file the XML file displays as expected. If both files are on my server again the XML file displays correctly. However if the XML file is local and the XSLT file is on the server (and the XML file points to to the file on the server) I get the following error: Error loading stylesheet: An unknown error has occurred (805303f4) Using Firefox 41.0.1 on a Mac. This problem does not occur on Safari Any idea of where I'm going wrong? Searching on the web there are suggestions about changing the mime, but am not 100% sure what to do about that. In <?xml-stylesheet in the XML I've changed the type from "text/xsl" to "application/xml" (which did nothing) to "application/xsl" (which breaks the view on Safari). Thanks, Brian

Wybrane rozwiązanie

Guigs. Thanks for the information.

After doing a little digging I found this page:

 http://enable-cors.org/server_apache.html

Following this advice I added an .htaccess file to the directory on the server containing my .xslt file that contains the line:

   Header set Access-Control-Allow-Origin "*"

And that seems to have fixed my problem for Firefox!

Did not seem to fix the problem on Internet Explorer, but suspect that is a problem for another day (and perhaps a different forum).

Przeczytaj tę odpowiedź w całym kontekście 👍 0

Wszystkie odpowiedzi (2)

more options

You are running into the historical Same Single Origin rule in the Firefox browser. For your situation specifically these materials may help better explain:

more options

Wybrane rozwiązanie

Guigs. Thanks for the information.

After doing a little digging I found this page:

 http://enable-cors.org/server_apache.html

Following this advice I added an .htaccess file to the directory on the server containing my .xslt file that contains the line:

   Header set Access-Control-Allow-Origin "*"

And that seems to have fixed my problem for Firefox!

Did not seem to fix the problem on Internet Explorer, but suspect that is a problem for another day (and perhaps a different forum).