::[ Empty Spaces ]::

Wandering through, a journey within.

Installing the W3C HTML validator on OS X [2]

Back in July, we mentioned a step by step guide posted on the Apple web site describing the installation process of the W3C HTML Validator on your local hard disk underr Mac OS X. While upgrading to a new computer, we discovered that Apple has updated this article with much easier instructions.

Installing went smoothly, nearly. We again had a problem with the configuration of CPAN (Perl Libraries), which was easily fixed. Upon launching the validator from localhost, we hit a snag. Ms Validator returned an error… sadness on our face. Taking the issue to the W3C mailing list for the validator issues (www-validator) revealed the problem: while editing the validator.conf file, we had used the pico command line editor. And this editor had inserted some line breaks on the wrong place, namely between a parameter and its value. This of course caused the scripts to return errors. The offending lines:

# Mapping tables etc...
Element Map	file:///Library/WebServer/Documents/validator/htdocs/config/eref.cfg
FPI to Text	file:///Library/WebServer/Documents/validator/htdocs/config/fpis.cfg
Error to URI	file:///Library/WebServer/Documents/validator/htdocs/config/frag.cfg
File Type	file:///Library/WebServer/Documents/validator/htdocs/config/type.cfg
Doctypes	file:///Library/WebServer/Documents/validator/htdocs/config/doctypes.cfg
Charsets	file:///Library/WebServer/Documents/validator/htdocs/config/charset.cfg

Each pair should be on one line, with the parameter name separated from the value by a [tab]. The sample file included in Apples’s article is correct. Opening the validator.conf file in SubEthaEdit showed the problem immediately (one nil for the GUI interface). Once corrected, Ms Validator was running smoothly on our Powerbook.

One additional note: if you use the virtual host directive, and create special domains on your local hard disk for purpose of developing client’s sites, the validator.conf file needs one little tweak. Towards the bottom of the file change the value from 0 to 1 in the line:

# Whether to allow checking resources located at private IP addresses.
Allow Private IPs	0

And your good to go.