cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <>
Subject Re: XML validation during build docs
Date Tue, 30 Oct 2001 08:11:33 GMT
Carsten wrote:
> Hi David,
> I just updated the JaxpParser of 2.1 to be configurable. Currently
> you can turn on validation by specifying the parser in the cocoon.xconf
> and add a parameter: <parameter name="validate" value="true"/> to the
> configuration. This is the good news.

Excellent. I tweaked the documentation/cocoon.xconf
and validation works as expected.

> The bad news is: now all xml documents are validated. Whereas this seems
> great in the first run, you now need a dtd for every document as 
> the errorhandler for the parser always throws an exception if
> the document cannot be validated.

I think good news on both fronts. Cocoon needs to be able
to rely on its own config files, documentation, and samples.
Good news because it forces us to create a reliable framework.

> So, we need a dtd for the book.xml documents and this should
> work then for the documentation build.

I have jumped the first validation hurdles by writing quick-and-dirty 
internal DTDs for ...
... that enabled the validation run to start.

That brought up more issues with other documents that do
not declare their structure, e.g. documentation/svg/header.xml
(Anyway, it is a journey.)

The next issue would be for cocoon.xconf and sitemap.xmap
There is an initial "sitemap.dtd" dated 2001-07-15
I do not know its status.

> Carsten
> David Crossley wrote:
> > 
> > Has the "build docs" stopped doing validation of xdocs, or
> > do i imagine that? I recall that when the build was controlled
> > by Ant, then it was doing full XML validation. I am sure that
> > i often received validation errors while developing my xdocs.
> > 
> > Now that the build is run by Cocoon then it only does a
> > well-formedness check. I tested the current situation by
> > deliberately breaking index.xml by removing the mandatory
> > <title> element, then by just removing the closing tag.
> > 
> > I think that i know why. The Ant build used Xerces directly
> > where validation was probably default true. Whereas, in
> > Cocoon the parser should, and does, have validation=false.
> > 
> > I see that components/parser/ has
> > setFeature validation=false. However, the default
> > does not setFeature validation in any way.
> > 
> > I would think it desible to have validation happening for
> > the documentation build, and of course, not happening
> > while running as a servlet. Is there a way?
> > 
> > --David

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

View raw message