cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <>
Subject Re: More problems with implementing servlet services
Date Sun, 13 May 2007 07:46:09 GMT
Alexander Klimetschek pisze:
> Grzegorz Kossakowski schrieb:
>> In generator we already use src attribute for different purpose.
> Hmm, after looking at the proposed sitemap syntax in [1], I think it can 
> be optimized. I personally think a generator should only generate XML 
> from some kind of source. Doing two things (or 4 when including the POST 
> request and the response) at once makes it kinda difficult to understand:
> <!-- This is a test of basic servlet services functionality
>      servletService generator makes a HTTP POST request on
>      servlet:test2:/basic-service.
>      Generator posts content of test.xml file and returns to the
>      pipeline result of service call.
>   -->
> <map:match pattern="test5">
>   <map:generate type="servletService" src="test.xml">
>     <map:parameter name="service"
>         value="servlet:test2:/basic-service?caller=generator"/>
>     </map:generate>
>   <map:serialize type="xml"/>
> </map:match>
> The use of the transformer below seems more intuitive for me (when 
> including the shorter version using src=""):

Alexander, I guess that you forgot original Daniel's proposal [1]. Generator calling service
can POST it a file that is not valid XML and 
that's main difference from transformer. One could write for example:
<map:match pattern="test5">
   <map:generate type="servletService" src="test.html">
     <map:parameter name="service" value="servlet:test2:/extract-html"/>
   <map:serialize type="xml"/>

where service would look like:
<map:match pattern="basic-service">
   <map:generate src="service-consumer:" type="html"/>
   <map:serialize type="xml"/>


Grzegorz Kossakowski

View raw message