cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: What is happening to {1} in this case?
Date Mon, 25 Feb 2002 14:35:51 GMT
Read some clarifications below,

Regards,
Vadim

> From: Chris Newland [mailto:chris.newland@emorphia.com]
> 
> 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,

Read: ...for each action, selector, matcher you execute...

> your original parameters are pushed down the stack

and parameters from the executed action/selector/matcher are appended to
this stack.

>. You must then specify which
> level of the stack you want to retrieve the parameters from

using directory-like (or XPath-like) path, where '../' expression allows
to access parameters on one level down from the top of the stack.


> 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
> > >


---------------------------------------------------------------------
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