I have searched through the docs on requests, sessions, the session
framework, and contexts, and still do not have my head around how to get
info from a database and pass it into a pipeline to dynamically choose a
document to be generated.

Using Cocoon 2.1.6, I create a login page with the target "do-login"
which points to the following matcher.

      <map:match pattern="do-login">
        <!-- try to login -->
        <map:act type="auth-login">
          <map:parameter name="handler" value="demohandler"/>
          <map:parameter name="parameter_username"
value="{request-param:username}"/>
          <map:redirect-to uri="protected"/>
        </map:act>
        <!-- something was wrong, try it again -->
        <map:redirect-to uri="login"/>
      </map:match>
      
The authentication resource.

        <map:match pattern="authenticate">
                <map:generate src="docs/user-db.xml"/>
                <map:transform type="sql">
                        <map:parameter name="use-connection" 
value="jdwilliams"/>
                        <map:parameter name="use-request-parameters" 
value="true"/>
                        <map:parameter name="show-nr-of-rows" value="true"/>
                        <map:parameter name="username" 
value="{request-param:username}"/>
                </map:transform>
                <map:transform src="stylesheets/pond-user-db.xsl"/>
             <map:serialize type="xml"/>
        </map:match>
        
What I would like to do is select a protected resource dynamically,
something like...

      <map:match pattern="protected-*">
        <map:act type="auth-protect">
          <map:parameter name="handler" value="demohandler"/> 
          <map:generate src="docs/{../1}.xml"/>
          <map:transform type="session"/>
          <map:transform src="stylesheets/simple-page2html.xsl"/>
          <map:transform type="encodeURL"/>
          <map:serialize/>
        </map:act>
        <!-- something was wrong, redirect to login page -->
        <map:redirect-to uri="login"/>
      </map:match>
      
The example above works fine, but only for the {request-param: username}

What I need to do is pull a keyword from the authentication database
table, as in the following XML that is returned from the authentication
resource, which queries a db.

<authentication>
<ID>foo</ID>
<role>admin</role>
<data>
<name>foo</name>
<keyword>megabanc</keyword>
</data>
<type>cocoon.authentication</type>
<media>html</media>
</authentication>

So, the question becomes, what is the proper place and syntax to pass
the keyword (from the db column cust_keywd) into the pipeline.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]