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.ukReceived on Friday, 18 June 2010 19:14:43 UTC
This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:01:08 UTC