cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject Re: Generators now allowed in <map:handle-errors>
Date Wed, 02 Apr 2003 09:01:40 GMT
Vadim Gritsenko wrote:

> Sylvain Wallez wrote:
>
>> However, allowing a generator in <map:handle-errors> is incompatible 
>> with the current syntax.
>
> The idea was to allow it and make it *optional*. I.e., if no generator 
> specified - use <noifier>, if user specified some generator - use it 
> instead of default. As you see, syntax here is fully compatible.


Nicola Ken Barozzi wrote:

> Sylvain Wallez wrote, On 01/04/2003 23.35:
>
>> Hi team,
>>
>> I finally implemented the very old todo about allowing generators in 
>> <map:handle-errors> (see [1]).
>
> Thanks man, very much appreciated :-)
>
> But isn't it possible to keep compatibility by inserting the 
> NotifyingGenerator when there is no Generator?


The compatibility is ensured by specifying a 'type' attribute, whose 
presence triggers the addition of the implicit NotifyingGenerator.

I prefer the user to explicitely specify which type of error handling is 
wanted (2.0 or 2.1 mode) rather than having a generator automagically 
added. This will prevent difficult bugs in sitemaps that may occur when 
the user wants 2.1 mode but forgot a <map:generate> or if the 
matcher/action path doesn't include one.

Now from an implementation point of view, finding if a generator is 
present by analyzing the sitemap is difficult, if not impossible, since 
a generator can be inside a matcher/action/selector (will we go in that 
path or not ?), or included in a resource also used in the "normal" 
pipeline. Also, checking this at request processing time is difficult, 
since the pipeline fails if a transformer is added when no generator is 
present.

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



Mime
View raw message