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 06:14:07 GMT
Grzegorz Kossakowski wrote:
> In this case content of test.html is POSTed to the service and is 
> available to it by "service-consumer:" source. Generator in service 
> pipeline reads data from "service-consumer:" so this effectively means 
> that it reads "test.html" file, parsers it and returns SSAX stream 
> representing html content back to the calling pipeline.
> Service generator and its behavior fits current meaning of a generator 
> component. Currently, we call a component "generator" if it takes some 
> input data (may it be non-XML) and emits SAX events based on provided 
> data, right?
> Now, with service generator it means that generator redirects (posts) 
> incoming raw data to the service and expects SAX events as output that 
> it will pass down to the pipeline.
> I hope this helps.

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:serialize type="xml"/>

It doesn't make that much difference for generators, but would save one line 
each for serializers and transformers.


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

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


View raw message