You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Paolo <la...@arsenio.net> on 2001/09/18 10:33:39 UTC

CookiePropagatorAction and sitemap parameters substitution into descriptor files

I am developing a new action named CookiePropagator that lets the user
create Cookies in the response using an external descriptor file like
this:

<cookies-descriptor>
  <cookie name=".." value=".." maxage=".." (and other cookie fields)/>
  <cookie name=".." value=".." maxage=".." (and other cookie fields)/>
</cookies-descriptor>

The problem is that it should be useful to implement here the sitemap
parameters substitution to let the user insert values like "{myparam}"
instead of the constant directly. I wrote the first action that sets
cookies correctly but I want to implement that feature as soon as
possible because it gives me more flexibility. How can the "substitute"
method can be called from inside an action to replace an {name} entry
with its value?

Thanx everyone. I attach my code!

ByeBye,
Paolo Scaffardi
AIRVENT SAM S.p.A.


Re: CookiePropagatorAction and sitemap parameters substitution into descriptor files

Posted by Giacomo Pati <gi...@apache.org>.
Quoting Paolo <la...@arsenio.net>:

> I am developing a new action named CookiePropagator that lets the user
> create Cookies in the response using an external descriptor file like
> this:
> 
> <cookies-descriptor>
>   <cookie name=".." value=".." maxage=".." (and other cookie fields)/>
>   <cookie name=".." value=".." maxage=".." (and other cookie fields)/>
> </cookies-descriptor>
> 
> The problem is that it should be useful to implement here the sitemap
> parameters substitution to let the user insert values like "{myparam}"
> instead of the constant directly. I wrote the first action that sets
> cookies correctly but I want to implement that feature as soon as
> possible because it gives me more flexibility. How can the "substitute"
> method can be called from inside an action to replace an {name} entry
> with its value?

This "substitute" functionallity will be best implemented in the Action itself.

  <map:match pattern="*">
    <map:act type="cookie-prop">
      <map:param name="myparam" value="{1}"/>
      ...
    </map:act>
  </map:match>

Giacomo

> 
> Thanx everyone. I attach my code!
> 
> ByeBye,
> Paolo Scaffardi
> AIRVENT SAM S.p.A.
> 
> 

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