You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Zhu Di <fl...@gmail.com> on 2006/07/06 13:50:11 UTC

About session-context:authentication Input

hello, all

I had met a strange problem. I had write a pipeline to read session context,
it correctly provide session information as it should be:

 <resource>
   <authentication>
     <ID>0</ID>
     <data>test</data>
     <type>cocoon.authentication</type>
     <media>html</media>
  </resource>
</authentication>

but when I try to use

<map:parameter name="user-id" value="
{session-context:authentication/authentication/ID}"/>

in sitemap, it couldn't get any value.

anybody can give me some hints?

Re: Fwd: About session-context:authentication Input

Posted by Peter Sparkes <pe...@didm.co.uk>.
Try something like

<map:act type="auth-protect">
     <map:parameter name="handler" value="myhandler"/>
      --------
     <map:transform src="stylesheets/mystylesheet.xslt">
             <map:parameter name="user-id" value="{ID}"/>
      </map:transform>
     --------
</map:act>

Hope this helps

Peter
>
> hello, all
>  
> I had met a strange problem. I had write a pipeline to read session 
> context, it correctly provide session information as it should be:
>
>  <resource>
>    <authentication>
>      <ID>0</ID>
>      <data>test</data>
>      <type>cocoon.authentication</type>
>      <media>html</media>
>   </resource>
> </authentication>
>  
> but when I try to use
>
> <map:parameter name="user-id" value 
> ="{session-context:authentication/authentication/ID}"/>
>
> in sitemap, it couldn't get any value.
>
> anybody can give me some hints?
>

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


Re: About session-context:authentication Input

Posted by Zhu Di <fl...@gmail.com>.
Yes, that works. and finally I understand why I couldn't get value directly
from "{session-context:authentication/authentication/ID}", because this
session-context only worked under authentication protection.

thank you,


2006/7/6, Zhu Di <fl...@gmail.com>:
>
>
>  hello, all
>
> I had met a strange problem. I had write a pipeline to read session
> context, it correctly provide session information as it should be:
>
>  <resource>
>    <authentication>
>      <ID>0</ID>
>      <data>test</data>
>      <type>cocoon.authentication</type>
>      <media>html</media>
>   </resource>
> </authentication>
>
> but when I try to use
>
> <map:parameter name="user-id" value ="
> {session-context:authentication/authentication/ID}"/>
>
> in sitemap, it couldn't get any value.
>
> anybody can give me some hints?
>

Re: Fwd: About session-context:authentication Input

Posted by Simone Gianni <s....@thebug.it>.
Could it be simply that it's resource/authentication/ID ? Not sure
because the XML you provided is not wellformed.

Simone

Zhu Di wrote:

>
> hello, all
>  
> I had met a strange problem. I had write a pipeline to read session
> context, it correctly provide session information as it should be:
>
>  <resource>
>    <authentication>
>      <ID>0</ID>
>      <data>test</data>
>      <type>cocoon.authentication</type>
>      <media>html</media>
>   </resource>
> </authentication>
>  
> but when I try to use
>
> <map:parameter name="user-id" value
> ="{session-context:authentication/authentication/ID}"/>
>
> in sitemap, it couldn't get any value.
>
> anybody can give me some hints?
>
 --
Simone Gianni

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


Fwd: About session-context:authentication Input

Posted by Zhu Di <fl...@gmail.com>.
 hello, all

I had met a strange problem. I had write a pipeline to read session context,
it correctly provide session information as it should be:

 <resource>
   <authentication>
     <ID>0</ID>
     <data>test</data>
     <type>cocoon.authentication</type>
     <media>html</media>
  </resource>
</authentication>

but when I try to use

<map:parameter name="user-id" value ="
{session-context:authentication/authentication/ID}"/>

in sitemap, it couldn't get any value.

anybody can give me some hints?