W3C home > Mailing lists > Public > www-validator@w3.org > April 2004

Re: Site validation

From: Beton, Richard <richard.beton@roke.co.uk>
Date: Tue, 20 Apr 2004 16:39:07 +0100
To: www-validator@w3.org
Message-ID: <4085441B.4090808@roke.co.uk>
Martin Salo wrote:

What do you think about an idea to develop a validator that validates
whole sites, not only pages. It could search for links in pages and when
a link is in the same domain (a subsection of the page) it validates it.
It should be limited (to about 200 pages or so) to avoid abuse.

Sounds reasonable, although for my websites I like to use offline tools:
(a) so they run quickly (b) so the don't clog up my webserver and (c) so
they don't clutter the access logs.

I do validation using Ant (ant.apache.org), with the Apache commons
resolver added.  The Ant buildfile looks something like this:

<><?xml version="1.0"?></>
<><project name="Website Validation" default="xhtml.validate"

  <xmlcatalog id="commonDTDs"></>
<>    <catalogpath></>
<></>      <pathelement path="xmlcatalog.xml"/>

  <target name="xhtml.validate" description="=== Validates all XHTML
files against their DTD ===">
      <xmlvalidate failonerror="no" warn="yes">
        <xmlcatalog refid="commonDTDs"/>
        <fileset dir="htdocs" includes="**/*.html"/>
        <attribute name=" http://xml.org/sax/features/validation
<http://xml.org/sax/features/validation> " value="true"/>


Rick :-)

You might prefer failonerror="yes".
There is an additional catalog file as follows (edit the local URIs to
point to the right place on your disk where you have local copies of the
W3C DTDs) :

<?xml version="1.0"?>
<!DOCTYPE catalog  PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog
<http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd> ">

<catalog xmlns="urn:oasis:names:tc:entity:xmlns: xml:catalog
<xml:catalog> " prefer="public">

     publicId="-//W3C//DTD XHTML 1.0 Strict//EN"
     publicId="-//W3C//DTD XHTML 1.0 Transitional//EN"
     publicId="-//W3C//DTD XHTML 1.1//EN"
     publicId="-//W3C//ENTITIES XHTML 1.1 Document Model 1.0//EN"



Visit our website at www.roke.co.uk

Registered Office: Roke Manor Research Ltd, Siemens House, Oldbury, Bracknell,
Berkshire. RG12 8FZ

The information contained in this e-mail and any attachments is confidential to
Roke Manor Research Ltd and must not be passed to any third party without
permission. This communication is for information only and shall not create or
change any contractual relationship.
Received on Tuesday, 20 April 2004 12:06:33 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:40 UTC