473,320 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

XML w/ XSL in Firefox

I have an XSL file that I have created to format some XML files into a
viewable report for a browser. Viewing it locally I have no problems
in IE v6.0 or Firefox v1.5.0.1.

We plan on distirbuting the .xml files for our clients to view. So we
uploaded the .xsl file to our webserver (ex:
www.mydomain.com/xml/style.xsl) Then in the .xml files we updated the
style sheet reference from pointing to the local copy to the one on the
webserver.
was: <?xml-stylesheet type="text/xsl" href="style.xsl"?>
now to: <?xml-stylesheet type="text/xsl"
href="http://www.mydomain.com/xml/style.xsl"?>

After this change was made the .xml appeared as it should on any
machine that had a web connection when using IE. But it stopped
working when viewing with Firefox. Firefox just displays the raw data
as one string and when viewing the page source it appears just as the
xml file does.

In IIS I have setup .xsl as a registered file type using the content
type of "text/xsl". This did not fix the issue.

What am I doing wrong?

Mar 28 '06 #1
2 14089
In message <11*********************@g10g2000cwb.googlegroups. com>,
CColvin <b_*************@yahoo.com> writes
We plan on distirbuting the .xml files for our clients to view. So we
uploaded the .xsl file to our webserver (ex:
www.mydomain.com/xml/style.xsl) Then in the .xml files we updated the
style sheet reference from pointing to the local copy to the one on the
webserver.
was: <?xml-stylesheet type="text/xsl" href="style.xsl"?>
now to: <?xml-stylesheet type="text/xsl"
href="http://www.mydomain.com/xml/style.xsl"?>

After this change was made the .xml appeared as it should on any
machine that had a web connection when using IE. But it stopped
working when viewing with Firefox. Firefox just displays the raw data
as one string and when viewing the page source it appears just as the
xml file does.


It may be a domain-crossing issue.

Try just using a local HREF from the XML to the stylesheet, rather than
an absolute one:

<?xml-stylesheet type="text/xsl" href="freddy.xsl"?>

This simple example certainly works for me in Firefox:

http://richardlight.org.uk/freddy.xml

Richard Light
--
Richard Light
SGML/XML and Museum Information Consultancy
ri*****@light.demon.co.uk

Mar 29 '06 #2


CColvin wrote:

was: <?xml-stylesheet type="text/xsl" href="style.xsl"?>
now to: <?xml-stylesheet type="text/xsl"
href="http://www.mydomain.com/xml/style.xsl"?>

After this change was made the .xml appeared as it should on any
machine that had a web connection when using IE. But it stopped
working when viewing with Firefox.


It is a security restriction, you can only load a stylesheet from the
same origin the XML file comes from.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Mar 29 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jeremy Epstein | last post by:
I've got a 4-page form that lets users enter a whole lot of information, which is then submitted and emailed at the end. All the fields are stored as session data. The whole thing works fine: ...
6
by: Geoff | last post by:
When trying to focus a field in Firefox, I get the following error: Error: " nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame ::...
87
by: expertware | last post by:
Dear friends, My name is Pamela, I know little about CSS, but I would like to ask a question I have an image on a web page within a css layer: <DIV ID=MyLayer STYLE = "position:...
14
by: expertware | last post by:
Ok! to avoid confusion I will start a new argument. Thanks!! FIREFOX 1.0.7 AND IE6 viewed through DATATIME: a summary REPORT ===============================================================...
5
by: SPE - Stani's Python Editor | last post by:
Hi, During optimizing SPE for Ubuntu, I found something strange. I have Ubuntu 5.10 "The Breezy Badger" and unfortunately this code is not working: >>> import webbrowser >>>...
7
by: Coder | last post by:
Hi I have the following code in java script, it is not giving proper output in FIREFOX but running fine in IE... can anybody help me out to make this run in FIREFOX . <script...
12
by: amit | last post by:
Hello group, I'm kinda skeptical about a code is being used in my js program. All it does is checking what browser is being run and finds out if FLASH is installed or not. This code works...
6
by: scotty | last post by:
I have a script that loops through an existing table list and prepares each href element node to trigger a function when an image is clicked. The function that will be run passes a property value...
7
by: Carlos Mendonça | last post by:
Has anyone managed to get ClickOnce to work with Firefox? It seems to me that it still has the same issues VS 2K5 had. I appreciate any comments or tips.
3
by: SAL | last post by:
Hello, I did google this issue and found some stuff related to BrowserCaps section of either web.config or machine.config but it didn't work. It seems that most pages in my webapp are okay but a...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.