logo der blechtrottel brodaktschns  blechtrottel brodaktschns
deutsch

W3C Validator offline

Installation

  1. Installing the msi version of Apache2 was not really difficult. Per default it offers to be installed into [...]\Apache Software Foundation\Apache2. Whenever you install (Windows ports of Linux) applications it is a good idea not to use folder names containing spaces. We therefore chose our path to be C:\Web\Apache2.
  2. ActivePerl is also available as an easy-to-install msi file. We recommend letting the installer include the path to perl.exe into the PATH environment variable. It will make adapting and testing Perl scripts easier. The downloaded package lacks a few modules that are needed by the Perl script of the validator. We will come back to that later. Our installation ended up in C:\Web\Perl.
  3. Both the W3C validator and its DTD's can be downloaded as tar.gz files. Our validator was extracted into C:\Web\Apache2\validator and C:\Web\Apache2\sgml-lib.

Fine Tuning

  1. The httpd.conf in the conf folder of Apache2 has to be adapted to your local installation. We will only touch the lines concerning the validator here. (Hint: your server must support CGI and SSI). The example under httpd/conf/httpd.conf can be copied almost identically. These are our settings:

    the adapted http.conf
    Of course, there is a listing to copy and paste the settings from.
  2. ActivePerl has to be updated with a few modules by using its package manager ppm. Before you do so you should rename the Perl script in validator\httpd\cgi-bin from check (without file extension) into check.pl and change the first line (Shebang) of the script into
    #!perl -w
    After that you can call the script in a DOS box by typing (including our example path)
    perl C:\Web\Apache2\validator\httpd\cgi-bin\check.pl
    The script gets as far as to the first missing module and produces an error message including the module's name. This can now be installed via ppm. (In ActivePerl's help you will find good instructions on how to use ppm) Having installed the module you can call the script anew, get to the next error message, aso. Since we have already done so you can alternatively simply search for the following modules: Config-General, Encode-HanExtra, HTML-Encoding, SGML-Parser-OpenSP.
    Some modules are not available from the servers of ActiveState. In these cases we recommend the repository of the University of Winnipeg (http://theoryx5.uwinnipeg.ca/ppms) or the following address: http://trouchelle.com/ppm/package.xml. All packages are contained in David Tibbe's ppm.zp. A working version of SGML-Parser-OpenSP ppd cannot be obtained elsewhere. In this zip you will also find other extensions needed for earlier versions of the Validator.
    SGML-Parser-OpenSP in the archive is included in version 0.99. The Validator nowadays works with version 0.99.1+, which is not available for Windows. So we have to change the version number in line 61 of check.pl:
    use SGML::Parser::OpenSP 0.99 qw();
    In our tests the Validator still worked after that.
  3. Last but not least let us deal with the validator itself. In htdocs\config there is a file called validator.conf, in which the Base for all other paths has to be given in line 22. Note: You have to use forward slashes in the paths
    Base = C:/Web/Apache2/validator
    Line 42 looks for the path to the sgml libraries:
    Library = C:/Web/Apache2/sgml-lib
    If you want to test files from local IP-addresses in your network check line 57:
    Allow Private IPs = yes
    As of version 0.8.0 of the validator the check.pl script has become quite simple to install. It needs the path to the configuration file in line 94:
    my $base => ($ENV{W3C_VALIDATOR_HOME} || 'C:/Web/Apache2/validator'),
    The script also needs base-help in lines 105/106:
    -ConfigFile => ('C:/Web/Apache2/validator/htdocs/config/validator.conf'),

nextPart1 - Part2 - Part3

 home  up one level  to the top 31/7/2010