W3C home > Mailing lists > Public > www-validator-css@w3.org > February 2006

Re: No style sheet found when html tag has namespace attribute

From: Kravvitz <Kravvitz@DynamicSiteSolutions.com>
Date: Sun, 12 Feb 2006 17:30:16 -0500
Message-ID: <43EFB6F8.4040402@DynamicSiteSolutions.com>
To: David Rand <rand@videotron.ca>
CC: www-validator-css@w3.org


You're welcome. :)

Both the X/HTML and CSS validators aren't perfect.

This case is complicated because other uses of the link element don't 
require the type attribute -- it's only required when you're linking to 
a stylesheet.
<http://www.w3.org/TR/html401/struct/links.html#h-12.3>
<http://www.w3.org/TR/html401/present/styles.html#h-14.3.2>

The HTML Validator extension for Firefox catches some errors that the 
W3C Validator misses. 
<https://addons.mozilla.org/extensions/moreinfo.php?id=249&application=firefox>

  -- Kravvitz

http://www.DynamicSiteSolutions.com/

David Rand wrote:
> Thanks, the addition of the "type" attribute has evidently solved
> the problem. However, should not the XHTML validator flag this
> omission?
> 
> I will change the case of the CSS selectors as you recommend.
> 
> FYI, I use Firefox more often than IE.
> 
> Thanks again,
> David Rand
> ====================================
> Kravvitz wrote:
> 
>> Well for one thing, the type attribute is missing on those link elements.
>>
>>
>> <link media="screen" title="screen" rel="StyleSheet" 
>> href="./css/vsr.css" />
>>
>> should be
>>
>> <link media="screen" title="screen" rel="StyleSheet" type="text/css" 
>> href="./css/vsr.css" />
>>
>>
>> Also, since XHTML is case-sensitive, the selectors used in CSS that is 
>> applied to XHTML documents are also case-sensitive. You'll need to 
>> make the element type selectors lowercase, for example "BODY" should 
>> be "body".
>>
>> I may as well take the oppurtunity to tell you that the XML 
>> declaration puts IE6 in backwards compatibility mode (aka Quirks 
>> Mode), which can be a bad thing. I've heard they have fixed the bug in 
>> IE7 beta2 but haven't tested it myself.
>>
>> -- Kravvitz
>>
>> http://www.DynamicSiteSolutions.com/
>>
>> David Rand wrote:
>>
>>>
>>> I have a problem with a web page which validates correctly
>>> as XHTML 1.0 transitional and whose CSS validates correctly
>>> when I aim the validator at the CSS file directly. The
>>> problem occurs only when the <html> tag contains a namespace,
>>> like this:
>>>
>>>      <html xmlns="http://www.w3.org/1999/xhtml">
>>>
>>> If the namespace attribute is removed, then CSS validation
>>> work fine with that XHTML page. Is this a bug in the validator,
>>> or am I doing something wrong?
>>>
>>> Here are the URLs two simple web pages:
>>>
>>>      An XHTML page whose CSS validates:
>>>      http://atheisme.ca/test_ok.html
>>>
>>>      An XHTML page whose CSS does NOT validate:
>>>      http://atheisme.ca/test_bad.html
>>>
>>> The only difference between the two (other than the name) is
>>> the xmlns attribute on the html tag.
>>>
>>> Thanks,
>>> David Rand.
> 
> 
> 
> 
> 
Received on Sunday, 12 February 2006 22:32:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 June 2012 00:14:16 GMT