cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <>
Subject Re: Validating sitemap
Date Fri, 30 Nov 2001 03:01:35 GMT
S├ębastien Koechlin wrote:
> someone else wrote:
> > > Approach with <map:parameter name="target" value="welcome"/>
> > > generates code
> > > in wrong place, which cause compilation error of sitemap.
> > > So I guess it could be treated as a BUG.
> There is something that could save a lot of time to people working with
> Cocoon2 : having a option to validate sitemap against DTD while
> compiling it.

Thanks for raising this Sebastien. I too would like to see this
capability (and have tried to discuss it before). Even if this just
happens during the initial Ant build then it would be a good start.

> Having an exception about a non-valid document is better than an
> exception
> about a failed compilation.
> Can we add in cocoon.xconf something like :
> 	<sitemap 
> 		file="sitemap.xmap" 
> 		reload-method="asynchron" 
> 		check-reload="yes"
> 		validate="true"/>

I am not sure, i did not realise that there was such a parameter.

I wonder how does this setting differs from the "validate" parameter
of the <parser> component is cocoon.xconf
I recall that when i have been experimenting with that parameter
to try to get validation happening, that it had no effect. I reasoned
that the processing of the sitemap was happening by a different
parser than the one defined in xconf. There are other things that
led me to think that. The entity resolver did not seem to be set for
certain xml parses (i presumed *.xconf and *.xmap and *.roles).

> There are already two files named sitemap.dtd in the CVS (one would be
> enought).

The current *DRAFT* Sitemap DTD is sitemap-v02.dtd
as defined in the OASIS Catalog at webapp/resources/entities/catalog
(Drat ... i forgot to cvs remove the old sitemap.dtd ... the v02
one is based on that - done now.)

However, if you are reffering (by "two files named ...") to the
fact that there are two copies of all DTDs, then that is deliberate
until we are sure that the entity catalog resolver is functioning
(belt-and-braces). The official set are at webapp/resources/entities/
and the copy set is at documentation/xdocs/dtd/
(We should leave this duplication in place until after the move of
some parts of entity resolver to Avalon.)

Here is the Declaration that you need to add to each sitemap.xmap
to get the parser to find the relevant DTD ...
<!DOCTYPE map:sitemap PUBLIC "-//APACHE//DTD Cocoon Sitemap V0.2//EN" 

I did offline validation of sitemaps using "xmlvalid" to flesh
out the initial sitemap DTD. Please see the Notes inside DTD.
It is just reverse-engineered from current sitemaps and
needs proper review.

There are a couple of other relevant threads ...
towards reliable */sitemap.xmap
Date: Thu, 8 Nov 2001

status of sitemap DTD
Date: Wed, 28 Nov 2001


> Doing the same for XSP is more difficult because of namespace and
> taglibs, but would also be very usefull.
> -- 
> S├ębastien Koechlin - IVision -

To unsubscribe, e-mail:
For additional commands, email:

View raw message