cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zamek <za...@vili.pmmf.hu>
Subject getting username from session after authentication
Date Wed, 25 Feb 2004 16:42:00 GMT
Hello All,

I need authenticated user's name in my xsl stylesheet to make different 
menus.
There is a session transformer in my sitemap.xmap:

   <map:match pattern="*.html">
       <map:aggregate element="office:document">
         <map:part src="zip://content.xml@{1}.sxw"/>
         <map:part src="zip://meta.xml@{1}.sxw"/>
         <map:part src="zip://styles.xml@{1}.sxw"/>
       </map:aggregate>

       <map:transform type="session"/>
       <map:transform src="../style/ooo2html.xsl">

         <map:parameter name="username" value="{session-context:user}"/> 
<----------------------- Here is my trying to get username

         <map:parameter name="template" value="nomenu.xml"/>
         <map:parameter name="doc_name" value="{1}"/>
         <map:parameter name="metaFileURL" value="zip://meta.xml@{1}.sxw"/>
         <map:parameter name="stylesFileURL" 
value="zip://styles.xml@{1}.sxw"/>
         <map:parameter name="absoluteSourceDirRef" value="{1}.sxw"/>
       </map:transform>

       <map:serialize type="html"/>
   </map:match>


and username variable is empty when I logged in :-(

How can I retrieve logged username in my sitemap or my stylesheet?

users.xml is:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- $Id: userlist.xml,v 1.1 2003/03/09 00:02:23 pier Exp $ Description: All 
users -->
<authentication>
  <users>
    <user>
     <name>cocoon</name>
    </user>
    <user>
     <name>guest</name>
    </user>
  </users>
</authentication>


-- 
thx,
Zoltan Zidarics programmer
PTE University Pecs, Hungary
icq: 43288694


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


Mime
View raw message