cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pier Fumagalli <p...@betaversion.org>
Subject Re: validation block: RELAX-NG, XML-Schema, any other languages required?
Date Thu, 08 Sep 2005 08:23:04 GMT
On 8 Sep 2005, at 07:14, Bertrand Delacretaz wrote:

> Le 7 sept. 05, à 21:49, Pier Fumagalli a écrit :
>
>> ...Any other languages that _seriously_ deserve some attention  
>> before marking the block as "stable" ?
>>
>> I'm thinking about DTDs using the same Xerces internals, WDYT?
>>
>
> Yes, DTDs are still in widespread use, to it would be cool to have  
> a validating transformer for that.
>
> Just curious, do your validators "just" stop processing when they  
> find an error, or can they let the XML flow go through with  
> validation errors added as annotations (inline namespaced XML  
> elements for example)?
>
> My use-case is for example a content management system, where it  
> would be cool to be able to accept a document for storage, while  
> noting that it is not valid.

By default the validator fails. But that is dependant on a  
ErrorHandler. If (for example) the ErrorHandler given in the  
construction of the validating ContentHandler swallows exceptions (or  
logs them, or something else, as longs as it doesn't throw them),  
then it won't fail.

In terms of modifying the document, well, no, it doesn't do that. But  
you can implement this (if you need to) extending the  
ValidationTransformer and making it output annotations derived from a  
custom ErrorHandler you write...

     PIer


Mime
View raw message