cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Newland" <chris.newl...@emorphia.com>
Subject RE: What is happening to {1} in this case?
Date Mon, 25 Feb 2002 13:48:24 GMT
Hi Raul,

When you use wildcard parameters with actions, the parameters are treated
like they are on a stack so that for each action you execute, your original
parameters are pushed down the stack. You must then specify which level of
the stack you want to retrieve the parameters from.

Your parameter is inside 1 level of action so to access it you need to do
the following:

<map:pipeline>
         <map:match pattern="*-store">
             <map:act type="web-action">
                 <map:generate src="docs/{../1}-input.xml"/>
                 <map:transform type="xslt" src="stylesheets/xml2html.xsl"/>
                 <map:serialize type="html"/>
             </map:act>
         </map:match>
</map:pipeline>

If it was inside 2 nested actions you would access it like {../../1} etc.

Hope this helps,

Regards,

Chris

> -----Original Message-----
> From: Fiedler, Raul [mailto:Raul.Fiedler@ecb.int]
> Sent: 25 February 2002 13:39
> To: 'cocoon-users@xml.apache.org'
> Cc: Shaw, Chris
> Subject: What is happening to {1} in this case?
>
>
> What is happening to {1} in this case?
>
> I have a form(s) called:
>    xxxxx-input.xml
> which has an action sending data to the URI:
>   xxxxx-store
>
> When it is successful I want it to re-direct back to:
>   xxxxxx-input.xml
>
> But what is happening instead is that Cocoon is trying to re-direct to:
>     xxxxxx-store
> which is wrong (and it also throws a 404 page not found error).
>
> What is happening to {1} in this case? and why is the rest, ie -input.xml,
> being ignored in my generate tag????
>
> <map:pipelines>
>     <map:pipeline>
>         <map:match pattern="*-store">
>             <map:act type="web-action">
>                 <map:generate src="docs/{1}-input.xml"/>
>                 <map:transform type="xslt"
> src="stylesheets/xml2html.xsl"/>
>                 <map:serialize type="html"/>
>             </map:act>
>         </map:match>
>     </map:pipeline>
>     <map:pipeline>
>         <map:match pattern="*.xml">
>             <map:generate type="file" src="docs/{1}.xml"/>
>             <map:transform type="xslt" src="stylesheets/xml2html.xsl"/>
>             <map:serialize/>
>         </map:match>
>     </map:pipeline>
> </map:pipelines>
>
> > Raul Fiedler
> > European Central Bank
> > DG Information Systems - Business Development
> > *   +49 (0) 69 1344 6870
> > * raul.fiedler@ecb.int
> >
>
> Any e-mail message from the European Central Bank (ECB) is sent
> in good faith but shall neither be binding nor construed as
> constituting a commitment by the ECB except where provided for in
> a written agreement.
> This e-mail is intended only for the use of the recipient(s)
> named above. Any unauthorised disclosure, use or dissemination,
> either in whole or in part, is prohibited.
> If you have received this e-mail in error, please notify the
> sender immediately via e-mail and delete this e-mail from your system.
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>
>



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

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


Mime
View raw message