posted
I've been trying to learn xsl, and I've been running into a frustrating issue in Firefox. I tried googling without any luck, and I was hoping someone here might know the answer. Basically, I am trying to include a css file in an xsl file so that the xsl can use classes defined in my css file. In IE 6 it works fine, but in firefox the color settings don't work. The positioning and size is correct, but the background and text colors aren't changed.
Does anyone have any idea what I might be doing wrong, or how I could go about debugging this?
Posts: 2437 | Registered: Apr 2005
| IP: Logged |
posted
Here's the code I am using. It is getting some of the information from the stylesheet, but anything effecting color seems to be ignored. When being used with an HTML file, everything works fine.
If I fix those errors and open the following xml document in firefox, with your stylesheet saved as style.css and your XSLT file saved as index.xsl, I get working colors:
code:
<?xml-stylesheet href="index.xsl" type="text/xsl"?> <list> <listItem> <url>http://example.org</url> <title>This Be My Title</title> <text>Orange!</text> </listItem> </list>
The reason it works with HTML only probably has to do with the difference between standards and quirks mode. Your HTML file probably loaded in quirks mode, but I bet the output of XSL Transformations only gets handled with standards mode. In standards mode, it doesn't know how to handle your CSS, because it isn't legal CSS.
Posts: 15770 | Registered: Dec 2001
| IP: Logged |
posted
Works just fine for me; blue background for the main page, link is no longer blue (not sure what color it is, its very dark), light grey for the main div background. Of course, some of your styles don't apply because elements that match the selectors don't exist.
What XML file are you trying this on? Have you tried it on mine?
Posts: 15770 | Registered: Dec 2001
| IP: Logged |