Yvan Peter wrote: > > 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 > <map:action name="req-params" src="org.apache.cocoon.acting.RequestParameterExistsAction"/> <map:action name="session-propagator" src="org.apache.cocoon.acting.SessionPropagatorAction"/>
<map:act type="req-params"> <map:parameter name="parameters" value="device"/> <map:act type="session-propagator"> <map:parameter name="device" value="{device}"/> </map:act> </map:act> -- Robert J. (Bobby) Mitchell Systems Administrator NASA Institute for Advanced Concepts 555A 14th St Atlanta, Ga. 30318 Phone: (404)347-9633 Fax: (404)347-9638 --------------------------------------------------------------------- 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]>