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

RE: Question about CSS Validator Web Service

From: Chen Sun <chsun@live.com>
Date: Tue, 10 Aug 2010 16:42:34 -0700
Message-ID: <BAY147-w3703364668C818CC8497F9C0950@phx.gbl>
To: <www-validator-css@w3.org>
CC: <david@dorward.me.uk>

Anybody can help me out?
 
Thanks,
Chen
 


From: chsun@live.com
To: david@dorward.me.uk
CC: www-validator-css@w3.org
Subject: RE: Question about CSS Validator Web Service
Date: Mon, 9 Aug 2010 15:35:53 -0700




Hi David,
 
I have another question to bother you.
 
I want to download CssValidator to my local machine. I have Java installed on c:\Program Files\Java\jdk1.6.0_21.
 
I am not a Java person at this moment so I am unwilling to install and config CVS; Ant; Appach; Tomcat; etc. 
 
I downloaded css-validator.jar at c:\Program Files\Java\jdk1.6.0_21\css-validator.jar which is exact the same level as c:\Program Files\Java\jdk1.6.0_21\lib
 
The issue is:
 
C:\Program Files\Java\jdk1.6.0_21>java -jar css-validator.jar http://www.w3.org
Exception in thread "main" java.lang.NoClassDefFoundError: org/w3c/tools/resourc
es/ProtocolException
Caused by: java.lang.ClassNotFoundException: org.w3c.tools.resources.ProtocolExc
eption
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: org.w3c.css.css.CssValidator. Program will exit.

 I guess I missed a lot. Do I have to go through all these Ant-Appach-Tomcat things? What is the easiest way to run CSSValidator on local machine?
 
Thanks a lot!
 
Chen
 


From: chsun@live.com
To: david@dorward.me.uk
CC: www-validator-css@w3.org
Subject: RE: Question about CSS Validator Web Service
Date: Thu, 24 Jun 2010 17:02:30 -0700



Thank you very much, David!
 
Do you know why CSS Validator POST request does not work now? It used to work fine.
 
Thanks,
Chen
 


Subject: Re: Question about CSS Validator Web Service
From: david@dorward.me.uk
Date: Fri, 18 Jun 2010 20:14:04 +0100
CC: www-validator-css@w3.org
To: 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



The New Busy is not the old busy. Search, chat and e-mail from your inbox. Get started. 		 	   		  
Received on Tuesday, 10 August 2010 23:43:09 GMT

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