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
> >>
> >>
> >>
>
--
Hippo
Oosteinde 11
1017WT Amsterdam
The Netherlands
Tel +31 (0)20 5224466
-------------------------------------------------------------
[EMAIL PROTECTED] / http://www.hippo.nl
--------------------------------------------------------------
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]