cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Poetz <>
Subject Re: More problems with implementing servlet services
Date Mon, 14 May 2007 14:54:22 GMT
Daniel Fagerstrom wrote:
>> What about reversing the logic: Instead of
>> >>> <map:match pattern="test5">
>> >>>   <map:generate type="servletService" src="test.html">
>> >>>     <map:parameter name="service" 
>> value="servlet:test2:/extract-html"/>
>> >>>   </map:generate>
>> >>>   <map:serialize type="xml"/>
>> >>> </map:match>
>> we could use
>> <map:match pattern="test5">
>>   <map:generate type="servletService" src="servlet:test2:/extract-html">
>>     <map:parameter name="data" value="test.html"/>
>>   </map:generate>
>>   <map:serialize type="xml"/>
>> </map:match>
>> It doesn't make that much difference for generators, but would save 
>> one line each for serializers and transformers.
>> WDYT?
> It would save a line, but especially for the generator it would obscure 
> the function. For all other generators the src parameter is used for 
> *reading* stream input. With your proposal the data parameter would 
> instead get that role and the src parameter would be used as something 
> that is a service that you post something to. I think that would be more 
> confusing.
> Also for the servlet service transformer and serializer, "src" sound 
> like something you read from rather than something you post to.

hmm, the "src" attribute of generators desribes, what is feed into the 
component. In the case of a servlet service generator, the output stream of a 
servlet is used as stream input.

The "data" parameter defines the content that is passed to the servlet service. 
IMO that's not the starting point of the generator.

Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}


View raw message