cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Smirnoff" <asmirn...@vistar.ca>
Subject Re: L&F: passing parameters to resource
Date Tue, 27 Nov 2001 20:41:13 GMT
Thanks Cris,

Again you saved me, man. Thanks.

This works now:
....
<map:resources>
     <map:resource name="transf">
         <map:transform src="stylesheets/xsl/{target}.xsl"/>
         <map:serialize/>
     </map:resource>
</map:resources>
...
<map:match pattern="home">
     <map:generate src="content/xml/welcome.xml"/>
     <map:redirect-to resource="transf" target="welcome"/>
</map:match>
...
Approach with <map:parameter name="target" value="welcome"/> generates code
in wrong place, which cause compilation error of sitemap. So I guess it
could be treated as a BUG.

Regards,
Alex.

> On 27.Nov.2001 -- 01:22 PM, Alexander Smirnoff wrote:
> > Is there any way to pass parameters to resource from redirect-to point.
for
> > example:
> >
> >     <map:resources>
> >         <map:resource name="transf">
> >             <map:transform src="stylesheets/xsl/{file}.xsl"/>
> >             <map:serialize/>
> >         </map:resource>
> >     </map:resources>
> >
> >     <map:pipelines>
> >         <map:pipeline>
> >             <map:match pattern="home">
> >                 <map:parameter name="file" value="welcome"/> <!-- This
> > doesn't work -->
> >                 <map:generate src="content/xml/welcome.xml" />
> >                 <map:redirect-to resource="transf"/>
> >             </map:match>
> >         </map:pipeline>
> >     </map:pipelines>
>
> Alexander,
>
> all sitemap parameters are still available after the redirection. In
> addition you can give it an additional attribute @target which will
> show up as additional sitemap parameter {target}. Obviously,
> redirect-to resource introduces a new layer of parameters, thus {1}
> before will be {../1} afterwards.
>
> HTH
>
> Chris.
>
> --
> C h r i s t i a n       H a u l
> haul@informatik.tu-darmstadt.de
>     fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08
>
> ---------------------------------------------------------------------
> 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