cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shai200 <shai...@gmail.com>
Subject Re: How to inject the result of an action into a generator
Date Tue, 25 Mar 2008 15:15:37 GMT

But I want the generator to take the XML output of my action and use that as
the text to pass down, and not read a file or a servlet.

How do I do that?


Vadim Gritsenko wrote:
> 
> On Mar 25, 2008, at 12:31 AM, shai200 wrote:
>>
>> This doesn't work for me for some reason. I get an error (see end of  
>> this
>> message).
> 
> <snip/>
> 
>> And my sitemap entry is:
>>
>> 	<map:match pattern="xmlaction">
>> 			<map:act type="xml-injection">
>> 				 <map:generate>
>>     			             <map:parameter name="param"  
>> value="{paramAction}"/>
>>   				</map:generate>
> 
> Generator must have src attribute pointing to source document it  
> should use. For example, following would work:
> 
>    <map:generate type="jx" src="pages/result.jx">
>      <map:parameter name="param" value="{paramAction}"/>
>    </map:generate>
> 
> 
> Vadim
> 
> 
>> 			</map:act>
>> 			<map:transform src="demo/welcome.xslt"/>
>> 			<map:serialize type="xhtml"/>
>> 		</map:match>
>>
>>
>> The error I get is as follows:
> 
> <snip/>
> 
>> 	Caused by: java.net.MalformedURLException: Invalid System ID
>> 		at
>> org 
>> .apache 
>> .cocoon 
>> .components 
>> .source.CocoonSourceResolver.resolveURI(CocoonSourceResolver.java:109)
>> 		at
>> org 
>> .apache 
>> .cocoon 
>> .components 
>> .source.CocoonSourceResolver.resolveURI(CocoonSourceResolver.java:182)
>> 		at
>> org.apache.cocoon.generation.FileGenerator.setup(FileGenerator.java: 
>> 108)
>> 		at
>> org 
>> .apache 
>> .cocoon 
>> .components 
>> .pipeline 
>> .AbstractProcessingPipeline 
>> .setupPipeline(AbstractProcessingPipeline.java:341)
>> 		... 58 more
>>
>>
>>
>> Joerg Heinicke wrote:
>>>
>>> On 17.03.2008 19:48, shai200 wrote:
>>>
>>>>> From the first glance at the Cocoon Core 2.2 documentation
>>>> (http://cocoon.apache.org/2.2/core-modules/core/ 
>>>> 2.2/1270_1_1.html), it is
>>>> unclear whether a String result of an Action (or perhaps a value  
>>>> passed
>>>> through the Map and Action returns) can be used to inject as the XML
>>>> content
>>>> generated by the generator, down the pipeline.
>>>>
>>>> If this is possible, how would I go about it?
>>>
>>> Yes, it is:
>>>
>>> <map:act>
>>>   <map:generate>
>>>     <map:parameter name="param" value="{paramAction}"/>
>>>   </map:generate>
>>> </map:act>
>>>
>>> 'paramAction' has to be an entry in the map returned by the action.
>>>
>>> Joerg
>>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-inject-the-result-of-an-action-into-a-generator-tp16108820p16275802.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message