Re: Possibility for on-site validity selfcheck

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
http://dorward.me.uk

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