cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colin Paul Adams <co...@colina.demon.co.uk>
Subject Re: sitemap DTD
Date Sun, 20 Oct 2002 14:04:23 GMT
>>>>> "Colin" == Colin Paul Adams <colin@colina.demon.co.uk> writes:

>>>>> "David" == David Crossley <crossley@indexgeo.com.au> 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: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message