Re: Validator in PHP

On Tue, 29 Jul 2003, SAQIB wrote:

> I was wondering why the Validator has no PHP port. Are there some
> constraints with PHP language that will render is useless to write a
> validator?

Should be perfectly feasible.  I expect the task will be pretty similar
to writing one in Perl.  But Terje and Liam are Perl hacks, so that's
what we've got for the W3C and WDG validators.

You might also be interested in my validator code in C++, which eliminates
many of the overheads in the Perl validators.

> I think a PHP validator would be a lot easier to install and maintain.

If you're starting from scratch, you'll have a fair bit of work to do.
But you could end up with a good product!

> So I have started writing a PHP validator. To test drive the PHP based
> validator please visit http://www.xml-dev.com/blog/test.php
>
> Right now it can only handle HTML 4.01 and outut is primitive at best, but
> I plan to improve upon it.

Looks like an OpenSP backend.  You could support more document types
by downloading an SGML catalogue, such as the one available at
http://www.webthing.com/software/validator-lite/

Does (or should) your validator deal with "exotic" charsets?

-- 
Nick Kew

In urgent need of paying work - see http://www.webthing.com/~nick/cv.html

Received on Tuesday, 29 July 2003 18:15:26 UTC