cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@odoko.co.uk>
Subject Re: AW: AW: How to use cocoon servlet only for rendering documents?
Date Wed, 15 Feb 2006 16:55:11 GMT
Peter Hunsberger wrote:
> On 2/15/06, Upayavira <uv@odoko.co.uk> wrote:
>> Peter Neu wrote:
>>> Hello Bertrand,
>>>
>>> I managed to send my xml in a post request to cocoon and retrieve the ouput
>>> back in pdf. But one thing I couldn't figure out so far is how to actually
>>> read the xml from the post request into my sitemap. Can you please provide a
>>> short code snippet?
>>>
>>> The relevant part looks like this:
>>>
>>> <map:match pattern="pdf">
>>>   <map:generate src="data/user.xml"/>  //still a hard coded resource
>>>   <map:transform src="stylesheets/user.xsl"/>
>>>   <map:serialize type="fo2pdf"/>
>>>  </map:match>
>> You need the stream generator:
>>
>>  <map:match pattern="pdf">
>>   <map:generate type="stream"/>
>>   <map:transform src="stylesheets/user.xsl"/>
>>   <map:serialize type="fo2pdf"/>
>>  </map:match>
>>
>> I think that is enough. Try it.
> 
> Ahh, I get what he's trying to do.  Won't the request generator also
> do the trick at this point?  Or will it muck the embedded XML?

RequestGenerator will give far too much info (assuming it gives the
stream content, which I'm not sure). The StreamGenerator is really easy,
although it might need a little configuring. It can either take data
sent with PUT, or take a particular form field sent by POST.

Upayavira

Mime
View raw message