Grokbase Groups Perl qa August 2005

On Saturday 06 August 2005 13:41, Bjoern Hoehrmann wrote:
* Gábor Szabó wrote:
Reading the blog of Geoff about the OSCON session
I just remembered an open issue for me.

How do you test if an HTML page is in one of the w3 standards ?
There is the w3 validator online at but I cannot
use that for my ongoing tests. I need something command line or better
yet somthing like Test::W3 ?
Well, the W3C Markup Validator is just a "thin" wrapper around the
OpenSP SGML processor (the onsgmls command line too to be precise),
it just does some character encoding detection and deals with mime
types and doctypes, other than that it's just a HTML formatter. With
my (experimental) HTML::Encoding, HTML::Doctype, SGML::Parser::OpenSP
and the (experimental, only in CVS) OpenSP version 1.5.2 you could
write a command line tool for that in < 100 lines, see e.g. the script
at <>.
Interesting. In any case, there's also html-tidy which is more self-contained:

It has a Perl interface on CPAN:

(there seems to be more related modules in the search).

It's nice, but I recall that with the same input file, it did not catch some
problems that the W3C Validator then yelled at. (I don't recall what file it
was, sorry).


Shlomi Fish

Shlomi Fish

Tcl is LISP on drugs. Using strings instead of S-expressions for closures
is Evil with one of those gigantic E's you can find at the beginning of

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 4 | next ›
Discussion Overview
groupqa @
postedAug 6, '05 at 10:35a
activeAug 6, '05 at 2:20p



site design / logo © 2021 Grokbase