cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeroen Reijn <j.re...@hippo.nl>
Subject Re: Matcher parameter
Date Mon, 19 Feb 2007 13:48:17 GMT
Hi Gajo,

try using {../1} . If you are within an action you will have to fetch 
the parent parameter.

<map:generate type="file" src="docs/{../1}.xml"/> should do it!

Regards,

Jeroen Reijn

Gajo Csaba wrote:
> Hello,
> 
> I have a login page. If the user logs in, he can visit all the pages he 
> was visiting before, except a different stylesheet will be used to 
> generate the pages. The matcher matches "*.html". The problem I'm having 
> is that the {1} parameter I'm using is always empty!
> This is the code:
> 
> <map:match pattern="*.html">
>      <map:act type="session-validator">
>          <map:parameter name="descriptor" value="docs/config/params.xml"/>
>          <map:parameter name="validate" value="username,password"/>
>          <!-- user is logged in -->
>          <map:generate type="file" src="docs/{1}.xml"/>       <--- HERE
>          <map:transform src="stylesheets/default.xsl"/>
>          <map:serialize/>
>      </map:act>
>     
>      <!-- user is not logged in -->
>      <map:generate type="file" src="docs/{1}.xml"/>
>      <map:transform src="stylesheets/default.xsl"/>
>      </map:transform>
>      <map:serialize/>
> </map:match>
> 
> 
> So when the user is not logged in, he gets the docs/{1}.xml file without 
> any problems. So why does it not work in the case the user is logged in?
> I get an error saying "Cannot find .../docs/.xml"
> 
> Please help,
> Csaba
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 

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


Mime
View raw message