cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Sparkes <>
Subject Re: Session info to pipeline
Date Sun, 11 Dec 2005 00:22:38 GMT
Building on the  "samples\blocks\authentication-fw" sample in 2.1.8 you 
can use something like:

 <map:match pattern="*.htm">
         <map:generate src="xml/{1}.xml"/>
          <!-- add include elements -->
          <map:transform src="stylesheets/include.xsl"/>
           <!-- if this user has logged in get his id and insert it into 
the xml, if not the act is skipped and the cinclude is not actioned -->
            <map:act type="auth-loggedIn">
                    <map:parameter name="handler" value="wlUsers"/>
                    <map:transform type="cinclude"/>
                     <map:transform type="session"/>
             <map:transform src="stylesheets/xml2htm.xslt"/>
              <map:transform type="encodeURL"/>

I also put the cinclude files in a Protected area and use both the following

1.  To get the user's id from the session
<uid xmlns:session="">
     <session:getxml context="authentication" path="authentication/id"/>

2. To get other user info from database tables(too much to put it all in 
the session) - An xsp esql file which has its own pipeline.


>While waiting on some help with the question in my previous email, I
>discovered Martin Man's db-authenticator action in the
>"samples/protected" directory.
>Has a nifty descriptor file with a select element, which in turn has a
>"to-session" attribute that lets you send whatever you want to the
>session object from the db, without a lot of arcane futzing.
>Any particular disadvantage to using this action?
>Is everyone using CForms or what these days?
>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message