cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Passing values from an XSP back to the sitemap
Date Mon, 17 Dec 2007 06:13:43 GMT
On 12/17/07, Kamal Bhatt <> wrote:
> I should probably phrase the scenario better. I have a folder location
> that is specified in a database. I need to run a query on the database
> and generate XML (using an XSP) , as well, I need to get this folder
> location and use it to determine the location of some XSLTs that is
> later used to transform the generated XML. Seeing as I am querying the
> database for XML, I don't want a situation where I am querying twice.
> Something like this:
>        <map:match pattern="test-xsp-action">
>          <map:act type="xsp-action" src="my-xsp-action.xsp">
>            <map:generate type="file" src="test2.xml"/>
>            <map:transform src="{my-xsp-action-variable}/myxslt.xslt"/>
>          </map:act>
>          <map:serialize type="xml"/>
>        </map:match>
> However, I also have the added requirement that I need to support
> aggregation, which isn't working in this scenario (that is
> my-xsp-action-variable isn't available outside of  the associated
> match). I want to be able to setup a parameter that is available from
> any match/pipeline. In a similar way that flow attributes seem to be.
> Kamal Bhatt

Can you move your variable into the parameters of a new pipeline?

<map:match pattern="test-xsp-action">
   <map:act type="xsp-action" src="my-xsp-action.xsp">
      <map:generate src="cocoon:/parsexspaction/{my-xsp-action-variable}"/>
      <map:serialize type="xml"/>

<map:match pattern="parsexspaction/**">
   <map:generate type="file" src="test2.xml"/>
   <map:transform src="{1}/myxslt.xslt"/>
   <map:serialize type="xml"/>


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message