You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Sébastien Geindre <se...@meteo.fr> on 2006/12/04 18:57:15 UTC

Pass parameters to a generator

Hi,

Is it possible to give parameters to a directory generator ? and how to ?

Imagine, cocoon receive a httprequest with post data,
first, we transform the data included in th request

<map:generate type="stream">
	<map:parameter name="form-name" value="requestData"/>
</map:generate>

Then transform it to have better meta-data

<map:transform src="stylesheets/request2meta.xsl"/>

Then i 'd like to read the content of the directory pointed by meta-data

<map:generate type="directory" src="{meta/directory}">
    <map:parameter name="depth" value="2"/>
</map:generate>

will it work ??
how is it possible to 'feed' a generator ?

Thanx.
Seb


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


Re: Pass parameters to a generator

Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Dec 4, 2006, at 10:13 AM, I wrote:

> On Dec 4, 2006, at 9:57 AM, Sébastien Geindre wrote:
>
>> will it work ??
>
> Yes.  Use this:
>
> http://cocoon.apache.org/2.1/userdocs/concepts/modules- 
> ref.html#XMLFileModule

Actually, I guess that might not do it for you, because you have to  
hard-code the source URI into the configuration of the XMLFileModule  
instance :-(.

Still, there's probably a way to do this using some combination of  
input modules.  If not, then there should be :-)

—ml—


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


Re: Pass parameters to a generator

Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Dec 4, 2006, at 9:57 AM, Sébastien Geindre wrote:

> will it work ??

Yes.  Use this:

http://cocoon.apache.org/2.1/userdocs/concepts/modules- 
ref.html#XMLFileModule

HTH,
—ml—


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