This is my code, eventually, which is what you've written down basically.
Thank you

           <map:match pattern="reports/*/*.html">
               <map:select type="parameter">
<map:parameter name="parameter-selector-test" value="ended{session-attr:dbase}"/> <map:when test="ended">
                       <map:redirect-to  uri="../../session.xsp"/>
                   </map:when>
                   <map:otherwise>
<map:generate src="xsp/html-report.xsp" type="serverpages"/>
                       <map:transform type="xinclude"/>
                       <map:transform src="xsl/output_html.xsl"/>
                       <map:serialize type="html" />
                   </map:otherwise>
               </map:select>
           </map:match>



Ard Schrijvers wrote:
in your map:components in map:selectors define:

<map:selector name="simple" src="org.apache.cocoon.selection.SimpleSelector"/>

in your sitemap, do something like:
<map:select type="simple">
   <map:parameter name="value" value="{session-attr:username}"/>
      <map:when test="">
        <map:generate src="inlogform.xml"/>
       </map:when>
       <map:otherwise>
          <!-- when session not empty -->
          <map:generate src="query.xml">
                <map:parameter name="username" value="{session-attr:username}"/>
</map:generate> <map;transform type="sql"/> </map:otherwise>
etc etc

Hope this helps...

Regards Ard


Don't know, that's what I was asking (kind of)

Ard Schrijvers wrote:
Can't you use a map:selector to test wether the session is empty?
Regards Ard

Hi,

My session object contains the data of the database it has
to connect
to. When the session expires, I get an error when trying
to connect.
I could capture this in my code, but I would rather do it in my sitemap.

Can I do this ?

I would like to start a different generator based up the session variable "database"

Regards
Yves Vindevogel



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

Reply via email to