Closed Bug 411807 Opened 17 years ago Closed 17 years ago

MIME-type issue with xml-stylesheet and CSS

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 61675

People

(Reporter: brettz9, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b2) Gecko/2007121120 Firefox/3.0b2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b2) Gecko/2007121120 Firefox/3.0b2

After retrieving a document served as application/xhtml+xml and which uses the standard XHTML practice (
http://www.w3.org/TR/xhtml1/#C_14 ) of adding a stylesheet processing
instruction for internal style tags in such a form:

<?xml-stylesheet href="#style_tag_id1" type="text/css"?>

...

<style type="text/css" id="style_tag_id1">
 h2 {color:blue;}
 .cl1 {color:green;}
 .cl2:visited {color:green;}
</style>


I sometimes get the following error (at other times, the same exact document gave me errors instead about the selectors, but I cannot replicate that now):

Error: The stylesheet
http://127.0.0.1:8080/zamir/vres/index.php?langu=en-US#style_tag_id1 was
not loaded because its MIME type, "text/html", is not "text/css".

This error message is also not correct on account of the fact that the document is correctly being served as application/xhtml+xml (as confirmed by Tools->Page Info), if it is using the contentType as a cue.

Errors also occur when I add an additional xml-stylesheet, such as:
<?xml-stylesheet href="/dr_mainstyles.css" type="text/css" media="screen"?>


Reproducible: Always

Steps to Reproduce:
1. Retrieve a document served as application/xhtml+xml with an internal xml-stylesheet reference (labeled as text/css -- labeling it incorrectly as application/xhtml+xml makes the problem go away) and with a style tag with corresponding  id
2. Open the Error Console
3. See the error(s)
Actual Results:  
Sometimes get the following errors (other times, they are about CSS selectors):

Error: The stylesheet
http://127.0.0.1:8080/zamir/vres/index.php?langu=en-US#style_tag_id1 was
not loaded because its MIME type, "text/html", is not "text/css".

Expected Results:  
No errors
Brett I did ask you to search bugzilla for existing bug reports on this issue first. See Bug 267161 and Bug 61675
Component: General → Style System (CSS)
OS: Windows XP → All
Product: Firefox → Core
QA Contact: general → style-system
Hardware: PC → All
Version: unspecified → Trunk
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
Thanks for the lecture, but I did search and found nothing... xml-stylesheet and MIME, xml-stylesheet and CSS... The search engine at this site, Google it is not. 
I appreciate the tip... I'll try to use the Advanced form next time (hadn't even seen that before)... 
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: