>>>>> "Colin" == Colin Paul Adams <[EMAIL PROTECTED]> writes:

>>>>> "David" == David Crossley <[EMAIL PROTECTED]> writes:
    David> How will we do that "sitemap validation during the build
    David> process"? That sounds to me like a job for Anteater and
    David> Relax NG validation. We could use the new sitemap DTD to
    David> generate an RNG grammar.

    Colin> Well perhaps. But simplest (?) would be just to parse all
    Colin> sitemaps with Xerces, with validation turned on (adding
    Colin> doctypes to point to the dtd via the catalog, to all
    Colin> sitemaps), wouldn't it?

I've knocked up a simple stand-alone java application that does just
that. (Well, actually it uses jaxp parser, which seems to be crimson
on my system, but no matter). It also uses Norman Walsh's catalog
resolver (in xml-commons). I knocked up a one-entry xml catalog, added
a doctype to one of the sitemaps, and then ran it against that
sitemap, and another one without a doctype declaration.
In the first case, it prints a messages saying <filename> validated
OK and exits code 0. In the latter it prints out an exception trace
and exits code 1. Presumably this is enough to put into ant (I guess
maybe it needs to be wrapped up as an ant task?)
-- 
Colin Paul Adams
Preston Lancashire

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to