Unexpected Firefox CSS Behavior During XSL Transformations
Posted on December 6th, 2005
Today at work I ran across the weirdest of problems. Firefox 1.5 was steadfastly refusing to apply CSS to an XML document that was being converted to HTML via an XSL stylesheet. Nevermind that the setup in question had been running just fine for a long long time, and that previous versions of Firefox had worked with it just fine. Firefox 1.5 wasn't having any of it.
The symptom was that the HTML displayed by the browser looked as if the stylesheet had been ignored completely. I could tell from the Apache logs though that Firefox 1.5 clients were requesting the stylesheet, so wasn't a case of the stylesheet somehow being dropped.
I did find a a bug report that seemed to describe the situation perfectly. But it was only after careful study of one of the feeds provided by Feedburner.com that I realized the problem was with the case of my CSS selectors. As a matter of style, when I write CSS selectors that refer to HTML tags I use uppercase. Not any more! As soon as I downcased all my selectors Firefox 1.5 was happy again and the problem vanished.
This must be a bug. There's no case sensitivity at play with regular HTML files-- it seems to be specific to situations involving XSL.