deutsch
W3C Validator offline
Installation
- Installing the msi version of Apache2 was not really difficult. Strangely enough though, this server offers [...]\Apache Group\Apache2 as the standard installation path. If 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.
- 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.
- The SGML parser only needs unzipping. Our destination: C:\Web\Apache2\OpenSP15.
- Both the W3C validator and its DTD's can be downloaded as tar.gz files. Our validator was installed into C:\Web\Apache2\validator
Fine Tuning
- 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). We found some good tips at Scottish Lass; her advice and the httpd.conf found in httpd\conf in the validator folder helped us set up the following:

Of course, there is a listing to copy and paste the settings from.
- 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
#!C:/Web/Perl/bin/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: CGI, Config-General, HTML-Template, Set-IntSpan, Text-Iconv, Net-IP
Some modules are not available from the servers of ActiveState. For Text-Iconv blechtrottel brodaktschns had to add the repository of the University of Winnipeg into ppm (http://theoryx5.uwinnipeg.ca/ppms/package.lst). How you search and include your own ressources is described in ActiveState's help. If all that does not help you and you still need some modules, try searching the internet or get assistance from a Perl expert.
- In the meantime the official web site of the OpenSP SGML parser at Sourceforge offers a Windows version for download. The zip archive only needs unpacking with full paths. In any case, the validation libraries (DTD's) should be replaced with the newest package form the W3C.
- Last but not least let us deal with the validator itself. In htdocs\config there is a file called validator.conf, in which two paths have to be adapted. Firstly, the Base for all other paths in line 24. Note: You have to use forward slashes in the paths:
Base = C:/Web/Apache2/validator
Secondly, in line 37 the path to the SGML Parser:
Parser = C:/Web/Apache2/OpenSP15/onsgmls.exe
There are a few obstacles within the script that have to be tackled when you want to use it under Windows. It needs some Perl tuning. In line 110 the base path is wanted:
my $base_path = 'C:/Web/Apache2/validator';
In line 114 it is the configuration file:
-ConfigFile => ('C:/Web/Apache2/validator/htdocs/config/validator.conf'),
In line 129 insert the path to OpenSP:
SGML => {Parser => 'C:/Web/Apache2/OpenSP15',
In earlier versions you had to exclude the -R option from the call of the SGML parser (lines 649ff), as it was not supported (under Windows?). This has changed in OpenSP 1.5.2 (since Validator 0.7.3). This note is for those who have followed these instructions before.
nextPart1 - Part2 - Part3