On Apr 7, 2008, at 6:04 AM, Yitzchak Scott-Thoennes wrote:
On Sun, April 6, 2008 9:28 pm, Gabor Szabo wrote:
Is there a W3C validator that works locally on my computer?
All the modules I found so far use the http://validator.w3.org/
service
including Test::HTML::W3C but that's not really usable in a
frequently
running test suit.
The source for that is available as described on
http://validator.w3.org/source/
It would non-trivial to package because it requires opensp4, which is
a native sgml parsing library. I run the w3c validator under my Mac
laptop's apache and hit it with WebService::Validator::HTML::W3C with
source derived from Test::WWW::Mechanize::Catalyst.
My notes from when I installed it said that I did:
---------------
#http://validator.w3.org/docs/install.html
cvs -d :pserver:[EMAIL PROTECTED]:/sources/public co -r
validator-0_8_2-release validator
[Remove -T from validator/httpd/cgi-bin/check to allow custom $ENV
{PERL5LIB}]
[Edit validator/htdocs/conf/validator.conf]
fink install opensp4
cpan install Config::General
cpan install HTML::Template
cpan install Set::IntSpan
cpan install Text::Iconv
cp validator/httpd/conf/httpd.conf my_httpd.conf
[edit my_httpd.conf]
sudo echo "Include $PWD/my_httpd.conf" >> /etc/httpd/httpd.conf
sudo apachectl graceful
---------------
I can't promise that those notes are complete... I wrote them over a
year ago.
I tried to do the same for the jigsaw.jar CSS validator, but
eventually gave up and now just use the live jigsaw.w3.org. In both
cases, I cache the validator response using the MD5 of the HTML or
CSS source as the cache key. That cache makes for a huge speedup in
my test runs and prevents me from abusing jigsaw.w3.org.
Chris