Have you tried the SessionSelector: that is used as the Parameter selector to match against an arbitrary session attribute;
More about Parameter Selector in: Parameter Selector: http://xml.apache.org/cocoon/userdocs/selectors/parameter-selector.html Antonio Gallardo El Jueves, 12 de Septiembre de 2002 00:39, Yvan Peter escribió: > Hello, > > Here is the behavior i would like to achieve in the sitemap : > > A first access will be with an URL of that pattern : > http://localhost/login?device={Voice, WAP or Web} > > Then the device parameter is not given anymore and of course, i need > to remember it to choose the appropriate XSL... > > I did not find how to put a request parameter in a session and get > it back latter from that session for use in the sitemap. > > Here is the "best" solution i could achieve after a whole day > trying to fill in the blanks without success... > > <map:match pattern="test/*"> > <map:match type="request-parameter" pattern="device"> > <!-- how to create the session and put device in it ? --> > <map:redirect-to uri="cocoon:/good-test/{../1}" /> > </map:match> > <!-- how to extract the value from session rather than hard code a > default value for the test ? --> > <map:redirect-to uri="cocoon:/good-test/{1}"> > <map:parameter name="device" value="Web" /> > </map:redirect-to> > </map:match> > > <map:match pattern="good-test/*"> > <map:generate src="test/{1}.xml" /> > <map:select type="request-parameter"> > <map:parameter name="parameter-name" value="device" /> > <map:when test="Wap"> > <map:transform src="test/XML2WML.xsl" /> > </map:when> > <map:when test="Voix"> > <map:transform src="test/XML2VXML.xsl" /> > </map:when> > <map:otherwise> > <map:transform src="test/XML2HTML.xsl" /> > </map:otherwise> > </map:select> > <map:serialize /> > </map:match> > > I used a redirection because i could not even imagine doing this in > one pipeline... > > Any help in that matter would be greatly appreciated :-) > > Yvan --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>