I want to check internal web pages, so I cannot use the W3C validation service directly. I managed to run the XHTML validator locally, however, I have some problems with the css-validator. I do not really want to setup Tomcat or Jigsaw in order to be able to run Java servlet, and the commandline option gives me an error message
Exception in thread "main" java.lang.NoClassDefFoundError:
org.w3c.tools.resources.ProtocolException at
org.w3c.css.css.CssValidator.main(CssValidator.java:164)
How can I validate local CSS on a Linux box?
You can invoke the W3C validator from the command line:
Update: To get it to work, I checked out the full distribution from CVS and ran
antusing the includedbuild.xml. It downloaded all dependencies except forservlet.jar. To deal with that, I downloaded the binary distribution of Tomcat 6 and extracted it. Then, I edited thebuild.xmlforcss-validatorto reflect the location ofservlet.lib:Then ran
antagain. This produced thecss-validator.jarfile in the top level of the directory checked out from CVS with thelibsubdirectory containing the otherjars it depends on. Then, I was able to run the validator successfully:C:\Temp\validator\2002\css-validator> java -jar css-validator.jar http://www.unur.com/