Closed Bug 315380 Opened 19 years ago Closed 18 years ago

Firefox 1.5 RC1 don't support CSS into XML (and XSLT)

Categories

(Firefox :: General, defect)

1.5.0.x Branch
x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 322461

People

(Reporter: dzolivier-kat, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8) Gecko/20051025 Firefox/1.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8) Gecko/20051025 Firefox/1.5

Since FireFox 1.5 RC1, CSS is not supported into XML documents and XSLT stylesheet

If XML document link to CSS file and/or XSLT stylesheet which build HTML document which link to CSS file and/or contain "STYLE" tag, and/or contain tags with "styles=" attribute... Firefox 1.5 RC1 don't load (and use) these properties.

Reproducible: Always

Steps to Reproduce:
1.Create RSS feed
2.Add CSS or XSLT like this:
<?xml-stylesheet type="text/xsl" href="http://pagesperso.laposte.net/yahooplus/francais/gui/xsl/rss-20/"?>
This XSLT stylesheet build HTML document with this tag:
<link rel="stylesheet" href="common/gui/rss-20.xsl.css" type="text/css"/>
3.CSS properties are not loaded (from stylesheet and from "styles=" attributes or from "STYLE" tag)

Actual Results:  
See RSS or XML without CSS settings


I try under Windows 98, XP Professionnal

This bug don't exist with FireFox 1.0.x

Notice that FireFox 1.0.x shutdown if XSLT include Javascript... I didn't try with FF1.5RC1
Version: unspecified → 1.5 Branch
DOM explorer see Link tag but don't load CSS file
Same problem with FireFox 1.6a1
Related to Core bug 308797 (or maybe Core bug 272385 and Core bug 145684)?
Yes, but notice that problem is more heavy that notice "bug 308797"...

FF not load CSS file linked in XSLT rendering*. And FF dont use CSS attributes or tags like "<STYLE>" or "<TAG STYLE='...' />" build by XSLT
(*) but XSLT rendering in HTML work fine.

And the problem is not only for XSLT stylesheet... If in my RSS/XML document I add this code bellow, FF dont load and dont use CSS file :
<?xml-stylesheet type="text/css"
href="http://pagesperso.laposte.net/yahooplus/common/gui/rss-20.xsl.css"?>

Lot of RSS feed use only single CSS stylesheet without XSL-Transform to show preview and help.
I ran into this problem myself and discovered that Firefox 1.5 is case-sensitive about CSS selectors during XSLT transforms. If you edit your .css file and downcase your selectors to match the lowercase html tags being written in your xsl, the styles should work again. Here is an example of an ATOM feed which Firefox 1.5 is correctly able to style:

http://atom.pubsub.com/84/7f/9cfff586f48de92aeda1947cd4.xml
(In reply to comment #5)
> I ran into this problem myself and discovered that Firefox 1.5 is
> case-sensitive about CSS selectors during XSLT transforms.

It's right, I tried with lower-case tags names and my stylesheet work fine :o)

But, it's a bug of Firefox or a mistake of mine (while I used upper-case) ?
It is the case (pun intended) that selector case doesn't matter when Firefox renders an HTML page. In the example fragment below, Firefox renders the text in both paragraphs in red.

 P { color: #ff0000; }

...

<P>This text is in a HTML "P" (uppercase) tag.</P>
<p>This text is in a HTML "p" (lowercase) tag.</p>

The title/summary is somewhat misleading as the problem is not that CSS is not used but that even though XSLT output is set to "html" the browser treats the CSS links as if they are "xhtml" CSS rules.

See https://svn.code-host.net/browser-tests/test6.html vs https://svn.code-host.net/browser-tests/test2.html

(Test #6 uses upper case CSS tag selectors which is valid in HTML but not in XHTML)
The summary here is incorrect/misleading as CSS does work in XML/XSLT generated documents, just that certain behaviors are a bit unexpected under certain conditions.

See bug #327902 for more details as to what is wrong.

*** This bug has been marked as a duplicate of 327902 ***
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---

*** This bug has been marked as a duplicate of 322461 ***
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago18 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.