W3C home > Mailing lists > Public > public-qa-dev@w3.org > August 2007

Re: HTML or CSS ?

From: olivier Thereaux <ot@w3.org>
Date: Tue, 14 Aug 2007 10:09:30 +0900
Message-Id: <03CC37F0-0EE5-498C-9A41-9194800EBFBF@w3.org>
Cc: Public Quality Assurance archives <public-qa-dev@w3.org>
To: Bert Bos <bert@w3.org>

[pruning dist list as most
On Aug 13, 2007, at 23:02 , Bert Bos wrote:
> Maybe "no special type" is better called "automatic"?

Agreed, shorter and implies that the validator will try by itself.

>> Those included a change in base.css :
>> (it was 50em before)
>> I changed it so what I added is always on the same line as the other
>> drop down menus.
> I'm not sure I like that. My window is much narrower than 63em...

Don't worry too much about the CSS. Down the road is an update of the  
UI from the existing to what we've worked on in the past months, and  
already released on markup validator.


>> To check if it's a css file :
>> - if this is a file uploaded, I just check if it is a .css file. But
>> it may be a better a idea to check if this .html, .xhtml, .htm, ...
>> to test the file as an HTML file and as a CSS file in every other
>> cases...
> In the case of file upload, the browser is supposed to send not only a
> file name, but also a Content-Type header. So you don't have to check
> the extension.

Right. The easiest algorithm for this would be:

read content-type HTTP header
if necessary, strip charset parameter, extract media type
if media-type is text/css, parse as CSS
else parse as html

hmm, I thought the validator could parse SVG, too, guess not.

> (I don't know how good browsers are at sending the Content-Type,  
> but my
> browser seems to do it correctly.)

Most do. Some versions of IE have been broken in this regard, sending  
HTML content as text/plain, but this bug was fixed in most versions:

Received on Tuesday, 14 August 2007 01:08:45 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:54:52 UTC