Closed
Bug 411807
Opened 18 years ago
Closed 18 years ago
MIME-type issue with xml-stylesheet and CSS
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
People
(Reporter: brettz9, Unassigned)
Details
Attachments
(1 file)
|
392 bytes,
application/xhtml+xml
|
Details |
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
| Reporter | ||
Comment 1•18 years ago
|
||
Comment 2•18 years ago
|
||
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
Updated•18 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
| Reporter | ||
Comment 4•18 years ago
|
||
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.
Comment 5•18 years ago
|
||
Search a comment -> Change the criteria to contains all of the words/strings. I used "The stylesheet not loaded because its MIME type is not text/css"
Then UNSELECT everything under Resolution.
Here is the resulting query:
<https://bugzilla.mozilla.org/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr&long_desc=The+stylesheet+not+loaded+because+its+MIME+type+is+not+text%2Fcss&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&emailassigned_to1=1&emailtype1=exact&email1=&emailassigned_to2=1&emailreporter2=1&emailqa_contact2=1&emailtype2=exact&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=>
| Reporter | ||
Comment 6•18 years ago
|
||
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.
Description
•