cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <jer...@media.demon.co.uk>
Subject Re: JXPath leniency in JXTemplateGenerator
Date Thu, 23 Oct 2003 10:04:06 GMT

On Tuesday, October 21, 2003, at 03:33 PM, Sylvain Wallez wrote:

> Hi team,
>
> I'd like to add the use of leniency to JXPath expressions in 
> JXTemplateGenerator: currently, if a path does not exist, a nice 
> exception is thrown. This may be good in some circumstances (avoids 
> endless hair pulling sessions to finally discover a small typo), but 
> is also required in some situations where the template writer _knows_ 
> that a path may not exist.
>
> Here's what I want to do:
> - add a global "lenient-xpath" sitemap parameter to the generator. 
> This allows to set a global leniency mode (default is false, meaning 
> exceptions are raised)
> - set leniency always to true on test instructions (<jx:if> and 
> <jx:when>)
> - add an optional "lenient" attribute to the <jx:out> and <jx:forEach> 
> statements (would default to the sitemap parameter value above).
>
> What do you think?

+1

JXTemplate (which I like and use) always seems very touchy :)
Maybe it could log the times when it had to be lenient.

regards Jeremy


Mime
View raw message