Hi Rui,

You have to factorize your first pipeline into a <map:resource> (using sitemap 
parameters) and use it in stand-alone mode or with your
2nd pipeline :

For your resource, you can use the SimpleSelector instead of the request selector :

<map:resource name="dump-report-definition">
  <map:select type="simple">
    <map:parameter name="reportType" value="{reportType}"/>
     <map:when test="myReport">
       <map:generate src="" ...
     </map:when>
     <map:otherwise>
       <map:generate src="" ...
     </map:otherwise>
   </map:select>
   <map:serialize type="xml"/>
 </map:resource>

And then use can use this by mapping request parameters to the right parameters...

HTH
--
Olivier Billard

Rui Alberto L. GonÃalves wrote:
> Hi all,
>
> I have this pipeline that dumps a XML file according the parameters
> in the request.
> <!--
> REQUEST PARAMETERS
> $folder
> $report_id
> $report_type (system | myReport)
> -->
> <map:match pattern="dump-report-definition">
>  <map:select type="request">
>    <map:parameter name="parameter-name" value="report_type"/>
>     <map:when test="myReport">
>       <map:generate src="" ...
>     </map:when>
>     <map:otherwise>
>       <map:generate src="" ...
>     </map:otherwise>
>   </map:select>
>   <map:serialize type="xml"/>
> </map:match>
>
>
> Then, I have another pipeline that calls the previous:
> <!--
> REQUEST PARAMETERS
> $folder
> $report_id
> $op_folder
> $op_report_id
> -->
> <map:match pattern="change_report_definition">
>  <map:aggregate element="page">
>   <map:part src="cocoon:/dump-report-definition">
>   ...
>  </map:aggregate>
> </map:match>
>
> The problem is, I need to call "cocoon:/dump-report-definition"
> with the request parameters switched. Like:
>
> cocoon:/dump-report-definition?folder=op_folder&report_id=op_report_id
> and not maintain the folder and report_id with the values as they appear
> in the original request.
>
> I tryed:
> <map:part
>
> src="cocoon:/dump-report-definition?folder={op_folder}&amp;report_id={op_report_id}">
> but without success!
>
> Any idea? Thanks for any help.
>
> Rui


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



Reply via email to