Stefano Mazzocchi wrote:
Sylvain Wallez wrote:
<snip/>
So it seems to me validation is good to easily write a syntax checker and let the java code in treeprocessor concentrate on more detailed "semantic" validation.
too bad this is not done.
So what about *requiring* schema-validation to happen each time a sitemap is loaded, i.e. have the use of a validating parser be hard-coded in the treeprocessor. This schema-validation phase would be a part of the global consistency checks performed by the treeprocessor, implemented by tools adequate for this task.
I'm only concerned about getting useful error messages out of sitemap loading. I don't care how this is achieved.
Now the problem, AFAIU, comes more from the fact that we're trying to validate not only the sitemap, but also the configuration of each component, which may take very various forms and obey to some complicated logic.
yes, but this is an argument on how the sitemap descriptor is defined. Why does everybody think that validation and schemas are synonims?
I don't think they are synonyms, but that a schema is an adequate tool to easily perform the first phase of a global validation process.
From a developer's point of view, sure. From a error message readability point of view, I strongly doubt it since treeprocessor can have much better and meaningful error messages than any validation stage.
I'm not being negative, I'm just trying to reduce the number of misconfiguration questions that will happen on cocoon-users as soon as we release cocoon 2.1