Grzegorz, you are right. It's kind of a hacky way, but if you want to have a quick solution and don't want to dive into the code I guess it's the fastest solution.
Regards, Jeroen Reijn -----Original Message----- From: Grzegorz Kossakowski [mailto:[EMAIL PROTECTED] Posted At: Wednesday, January 03, 2007 3:05 PM Posted To: Cocoon User List Conversation: Test Session attribute exists from the sitemap Subject: Re: Test Session attribute exists from the sitemap Jeroen Reijn napisaĆ(a): > Hi Olivier, > > you can use the SessionAttribute input module to select the attribute and use > the parameter selector to see if the attribute has a value. > > http://cocoon.apache.org/2.1/userdocs/parameter-selector.html > > http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/components/modules/input/SessionAttributeModule.html > > Kind regards, > Isn't it that parameter-selector selects on _value_ of parameter but on not existence? Non-existing session attr will have '' value AFAIR so it could be used in "hacky" way: <map:select type="parameter"> <map:parameter name="parameter-selector-test" value="{session-attr:YOURATTR}"/> <!--YOURATTR does not exist or has null value or is just empty string --> <map:when test=""> <!-- do something --> </map:when> <!-- YOURATTR exists --> <map:otherwise> <map:transform src="all_others.xsl" </map:otherwise> </map:select> -- Best regards Grzegorz Kossakowski --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
