commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Tedone" <>
Subject Re: [jelly] About Tag data validation
Date Thu, 27 Apr 2006 17:41:00 GMT
I do see the reason of having such method in the Tag class. Validation is a 
common activity to perform from within a concrete Tag. By inserting a 
validate() method in the Tag interface, you would tell your clients: 'Ok, I 
thought about validation' and having a validate() method available instead 
of having to write one for every single Tag would make (at least mine) life 
easier. But it's not my needs we are discussing here, rather the community's 

As regards exceptions, I believe that having JellyException as a 
SAXException, provided that SAX is in the long run the way Jelly wants to 
go, it's a good idea.

My 2 cents
----- Original Message ----- 
From: "Paul Libbrecht" <>
To: "Jakarta Commons Users List" <>
Sent: Thursday, April 27, 2006 9:42 AM
Subject: Re: [jelly] About Tag data validation

> Except for the change of exception type (JellyTagException vs 
> SAXException), I see no real reason to have such instead of inserting this 
> validation within doTag.
> Do you see one Marco ?
> As for the exception types, we could maybe ease up propagation with 
> JellyException.asSAXException() (for use within doTag) and new 
> JellyException(SAXException) (for use in others, which would undress a 
> wrapped jelly-exception). Indeed, these long wraps of exceptions as dumped 
> to console sometimes, e.g. by maven, are quite ugly.
> An alternative would be to have JellyException be a SAXException... not 
> sure it's a good idea but it would ease up things.
> paul
> Marco Tedone wrote:
>> May I suggest to add the method:
>> public void validate(XMLOutput output) throws JellyTagException to the 
>> Tag interface? I'm writing some tags, and I realize that for the quite 
>> totality of them I need to validate some data (like the attributes). It 
>> would be nice if the Tag interface defined such method which could be 
>> implemented by TagSupport without doing actually any behaviour, and then 
>> concrete Tags could override the method providing a custom 
>> implementation.
>> Marco
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

[This E-mail has been scanned for viruses but it is your responsibility 
to maintain up to date anti virus software on the device that you are
currently using to read this email. ]

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

View raw message