W3C home > Mailing lists > Public > www-validator@w3.org > March 2011

Re: Possibility for on-site validity selfcheck

From: David Dorward <david@dorward.me.uk>
Date: Thu, 10 Mar 2011 23:18:40 +0000
Cc: <www-validator@w3.org>
Message-Id: <E63C5B62-AF21-4B17-B103-4DB6916A28AC@dorward.me.uk>
To: Olav Andreas Opedal <zodion@hotmail.com>

On 10 Mar 2011, at 15:59, Olav Andreas Opedal wrote:

> Is there a practical way to configure a site to perform a markup validation selfcheck, by means of html/php variables or other forms of scripting?

The validator has an API[1] so you can call it programatically. You can link this into your build script or development environment.

For example, I wrote a plugin[2] for the Catalyst framework that would check (X)HTML[3] documents going out of the system and replace them with a validation report if there were any errors.

[1] http://validator.w3.org/docs/api.html
[2] http://search.cpan.org/perldoc?Catalyst::TraitFor::View::MarkupValidation
[3] hmm… it would be nice if it could be configured for other markup documents, maybe it will get a new feature this year[4]
[4] … and I see I already have a TODO comment along those lines in the source. Whoops.

David Dorward
Received on Thursday, 10 March 2011 23:19:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:59:21 UTC