Hi All,
On Friday 27 February 2004 14.45, Laurent Trillaud wrote:
> Declare this match in you sitemap
> <map:match pattern="session-account.ccn">
> <map:act type="auth-protect">
> <map:parameter name="handler" value="demohandler" />
>
> <map:generate src="session-account.xml"/>
> <map:transform type="session"/>
> <map:serialize type="xml" />
> </map:act>
> </map:match>
> with the following session-account.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <doc xmlns:session="http://apache.org/cocoon/session/1.0">
> <session:getxml context="authentication" path="/"/>
> </doc>
> You should see something like
> <doc>
> <authenticate>
> <ID>MyLoginName</ID>
> ... and so on depends of your authenticate.xsl
> ... the tag ID depends also of your authenticate.xsl
> </authenticate>
> </doc>
Yes I see this:
<page>
<doc>
<authentication>
<ID>guest</ID>
<type>cocoon.authentication</type>
<media>html</media>
</authentication>
</doc>
<doc>
<authenticate>
<ID>MyLoginName</ID>
... and so on depends of your authenticate.xsl
... the tag ID depends also of your authenticate.xsl
</authenticate>
</doc>
</page>
It means there is original authenticating context merged your xml.
> Assuming that the login is store in the ID tag. To access it use the
> following pipeline
> <map:match pattern="show-login">
> <map:generate src="dummy.xml"/>
> <map:transform src="xml2html.xsl">
> <map:parameter name="username" value="{ID}"/
> </map:transform>
> <map:serialize type="html"/>
> </map:match>
Sorry username is empty :-(
--
thx,
Zoltan Zidarics programmer
PTE University Pecs, Hungary
icq: 43288694
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]