cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Noels <stev...@outerthought.org>
Subject Re: validation of config during build (Was: Re: sitemap validation is broken)
Date Fri, 07 Mar 2003 22:01:55 GMT
Stefano Mazzocchi wrote:

> Did I say that I consider having a sitemap schema descriptor harmful?
> 
> No, damn, I just said that I consider using that schema to validate the 
> sitemap harmful.

Let's agree that there exist multiple levels of validation, and that 
each of them has its own merits. Coincidentally however, XML grammars 
are also used to drive editors, and since the result of this editing is 
fed into Java code, it better tries to attain the same level of 
validation, as close as possible, if at possible.

'Which' schema do you mean here...: sitemap-v06.rng, or _any_ XSD/RNG 
grammar at all? Sorry - just want to know.

>>> Example, try
>>>
>>>  <generate uri="..."/>
>>>
>>> where the uri attribute is not allowed in generate (shoulc be 'src'), 
>>> the treeprocessor totally ignores this and sends the empty string to 
>>> the parser, resulting in the error
>>>
>>>  System ID not found!
>>>
>>> Sitemap validation has stopped us from fixing the error messaging 
>>> capabilities on mistakes.
>>
>>
>>
>> I don't parse this: in what way does the sitemap validation relieve 
>> somebody of the task of properly handling exceptions on the code level?
> 
> 
> The level of error-cheching of the treeprocessor isn't really that 
> pretty and know why? because validation removed most of the mistakes 
> that *us* developers do... but when users don't validate, they come up 
> with *wierd* error messages that don't give them *any* clue whatsoever 
> on how to fix the problem.

Agree on the user aspect. But I don't follow the logic that the lack of 
error-checking in code is _caused_ by the validation process. That's 
just too fast to conclude.

> My reasoning is that if we didn't have validation, we would see the same 
> mistakes the users see and fix the treeprocessor instead of patching 
> more and more the validation phase.

Looking at the history of sitemap-v06.rng, I can't see this has been 
happening a lot. Quite contrarily, some (myself included) have been 
advocating to relax it even further. But dropping it will effectively 
kill the small circle of people interested in maintaining such a thing.

Reasonable?

</Steven>
-- 
Steven Noels                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at            http://blogs.cocoondev.org/stevenn/
stevenn at outerthought.org                stevenn at apache.org


Mime
View raw message