W3C home > Mailing lists > Public > www-validator-css@w3.org > June 2010

Re: Question about CSS Validator Web Service

From: David Dorward <david@dorward.me.uk>
Date: Fri, 18 Jun 2010 20:14:04 +0100
Cc: <www-validator-css@w3.org>
Message-Id: <26ED70ED-9B9E-4A73-ABA2-E8BE7AABD137@dorward.me.uk>
To: Chen Sun <chsun@live.com>
On 17 Jun 2010, at 23:50, Chen Sun wrote: 
> I plan to design an CSS Validator which can validate a batch of files in the same directory. I have two questions hoping you can help me out.
>  
> http://jigsaw.w3.org/css-validator/validator?text=#oooouterx{marin:20x;border:1x solid #000;backgrod:blue url(images/lcolex1.gif) repeat-y left top;padding:5px;}
>  
> You will get "Congratulations! No Error Found."
>  
> But when I validate by direct input, a couple of errors there. 

# indicates the start of a fragment identifier in a URI, it and everything that follows it will not be passed to the server as it is only used by the client to identify part of the returned document.

> Did I use ?text=contentToValid right? Should I encode white space, etc?

Yes. And the "etc" is important. 

> 2. Is it possible to validate a local css file? How? I tried http://jigsaw.w3.org/css-validator/validator?uri=file:///C|/MyDocuments/test.css
> or ?uri=C:\MyDocuments\test.css
> or ?uri=\MyDocuments\test.css
> or ?uri=file://servername/publicShare/test.css 
> None worked.

You can't give the validator a private URI and have it fetch it. You have to upload the file.

If you are building a tool, you probably should be using the SOAP API: http://jigsaw.w3.org/css-validator/api.html

I also suggest you install a local copy of the validator rather than hammering the free, public service: http://jigsaw.w3.org/css-validator/DOWNLOAD.html

-- 
David Dorward
http://dorward.me.uk
Received on Friday, 18 June 2010 19:14:43 GMT

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