cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergei Severin" <>
Subject Re: Cocoon and Nokia Toolkit
Date Thu, 25 Apr 2002 16:42:17 GMT
Thank you. This is exactly what I was looking for. I knew that it had to be something in the
sitemap. Your response totally makes sense. 

- Sergei 

---- Original Message ----- 
  From: Jeremy Crosbie 
  To: '' 
  Sent: Wednesday, April 24, 2002 7:59 PM
  Subject: RE: Cocoon and Nokia Toolkit

  Have you looked into Selectors? Here is what you can do with the default sitemap setup:


  <map:match pattern="*">
    <map:generate type="serverpages" src="pages/{1}.xml"/>


      <map:when test="wap">
        <map:transform src="pages/common2wap.xsl"/>

        <map:serialize type="wml" />



        <map:transform src="pages/common.xsl"/>

        <map:serialize type="xml"/>



  What you found on O'Reilly's site is what Cocoon used to use in 1.x. However, when you place
such a declaration in your file you violate one of the contracts defined in Cocoon: separation
of presentation from content from site management.


  -----Original Message-----
  From: Sergei Severin [] 
  Sent: Wednesday, April 24, 2002 2:54 PM
  Subject: Cocoon and Nokia Toolkit


  My question is on configuring Cocoon to work with Nokia WAP Toolkit. I am trying to build
and return a page based on the type of the device that sends a request. According to the documentation
that I found on Cocoon site, this functionality has been tested with Nokia WAP Toolkit so
I decided to give it a try.

  In my sitemap configuration I have the following entry in the pipeline:

  <map:match pattern="*">
    <map:generate type="serverpages" src="pages/{1}.xml"/>
    <map:transform src="pages/common.xsl"/>
    <map:serialize />

  I have also created a new XSL file, common2wap.xsl, that formats the content accroding to
WAP spec. What do I need to do in order to force Cocoon to use  common2wap.xsl instead of
common.xsl whenever I hit the page from Nokia simulator? So far, the only site that I found
to provide the answer to this is O'Reilly (
 Example 9-4 on this page suggests that I need to put

  <?xml-stylesheet href="pages\common2wap.xsl" type="text/xsl" media="explorer"?>

  in my XML file in order to use the stylesheet appropriate for WAP. I've tried that but it
did not work. The output is still built according to common.xsl. Is there a better way of
doing this or am I missing something here?

  Thank you,
  Sergei Severin

View raw message