Hi Sjur,

I do not know of any solution in the sitemap, but you are able to do this:

It should be something like this in pseudo-code:

<map:generate src="request.xml" type="jx/>
<map:transform type="include"/>
<map:serialize type="xml"/>

Step1. JX template generator

The generator generates a JX-template. The JX-template has the cocoon.request 
object available to iterate through.
You can create <include src="file"/> elements for the include transformer.

Step2. (C)Include transformer

The (C)Include transformer will fetch your documents from your DB.


For more information about both components please take a look at:

http://cocoon.apache.org/2.1/userdocs/flow/jxtemplate.html

and

http://cocoon.apache.org/2.1/userdocs/cinclude-transformer.html

I hope this will help you out.

Regards,

Reijn


Sjur Moshagen wrote:
Hello,

I would like to aggregate a dynamic list of documents following a certain pattern, but I can't find a way of doing it. I have been searching the user docs and the mailing lists, to no avail.

Here's what I would like to do, in some rough pseudo-code:

match on request parameter
  aggregate:
    for-each {value} in the {request parameter}
      cocoon:{value}/file
    end for-each
  end aggregate
  transform
  serialise

The request parameter would come from a multiple-selection list.

Is something like this possible? If so, how?

Background/use case:

I have an XML db (eXist) with collections of xml documents I need to query. Each collection contains different types of xml documents, and the query and subsequent processing needs to be tailored to each collection. As not all collections are public/searchable, or the user can specify a subset of them, I can't know in advance which collections I'm going to search, and subsequently aggregate the results from. Thus the need to aggregate based on a dynamic list.

Any help greatly appreciated.

Best regards,
Sjur


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Met vriendelijke groet,
Kind regards,

Jeroen Reijn

Hippo

Oosteinde 11
1017WT Amsterdam
The Netherlands
Tel  +31 (0)20 5224466


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]