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.

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.
So, we need a dtd for the book.xml documents and this should
work then for the documentation build.

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/XercesParser.java has
> setFeature validation=false. However, the default
> JaxpParser.java 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: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 

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

Reply via email to