You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Peter Klotz <pk...@iconet.wn.bawue.de> on 2003/02/05 10:44:41 UTC

Patterns in aggregation or sources

Hi,

I don't find the answer in the docu so maybe someone can tell me.
Is it possible to use patterns/regexp in source for a generator or in part
of a aggregation?

I'd like to do something like this e.g. in the sitemap:

<map:aggregate element="page">
  <map:map src="file:/tmp/*.xml"/>
</map:aggregate>

All examples always use a well-known set of files to aggregate but when
one wants to aggregate all files of a directory or with a certain pattern
how would one do it?

Or another case would be a request parameter with multiple values such as
results from checkbox values in a form. When I want to call some pipeline
for each value of this parameter how can one do it?

Here there is another problem that request parameters can have multiple
values (request.getParameterValues()) but the Parameters class that is
used to access sitemap parameters does only support single value
parameters with getParameter(). So one can for example use the
request-param action with multi-value request parameters but the XSP or
action only gets the first value, not all.


Best regards, Peter



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Patterns in aggregation or sources

Posted by Joerg Heinicke <jo...@gmx.de>.
Hello Peter,

I'm a bit late in reading Cocoon mails - I have about 1000 unread mails.

But the best solution for your problem - if you have not already solved 
it - is to use the directory generator and the C/XInclude transformer.

The sitemap aggregation is a more static aggregation.

Regards,

Joerg

Peter Klotz wrote:
> Hi,
> 
> I don't find the answer in the docu so maybe someone can tell me.
> Is it possible to use patterns/regexp in source for a generator or in part
> of a aggregation?
> 
> I'd like to do something like this e.g. in the sitemap:
> 
> <map:aggregate element="page">
>   <map:map src="file:/tmp/*.xml"/>
> </map:aggregate>
> 
> All examples always use a well-known set of files to aggregate but when
> one wants to aggregate all files of a directory or with a certain pattern
> how would one do it?
> 
> Or another case would be a request parameter with multiple values such as
> results from checkbox values in a form. When I want to call some pipeline
> for each value of this parameter how can one do it?
> 
> Here there is another problem that request parameters can have multiple
> values (request.getParameterValues()) but the Parameters class that is
> used to access sitemap parameters does only support single value
> parameters with getParameter(). So one can for example use the
> request-param action with multi-value request parameters but the XSP or
> action only gets the first value, not all.
> 
> 
> Best regards, Peter
> 
> 
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
> 
> 


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