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

-- 
------------------------------------------------------------------
| Yvan Peter                    | phone (33) 3.20.43.32.64       |
| CUEEP/Laboratoire TRIGONE     | fax   (33) 3.20.43.32.79       |
| Bat. B6                       | mail [EMAIL PROTECTED] |
| Cite Scientifique             |                                |
| 59655 Villeneuve d'Ascq Cedex |                                |
------------------------------------------------------------------



---------------------------------------------------------------------
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]>

Reply via email to