cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Koch <>
Subject Cocoon2: select with 'accepts()'
Date Mon, 18 Feb 2002 19:20:04 GMT
Hi there,

in [1] Stefano Mazzocchi gives the following example:

<map:match pattern="images/logo">
 <map:generate src="./images/logo.svg"/>
 <map:select type="browser">
  <map:when test="accepts('image/png')">
   <map:serialize type="svg2png"/>
   <map:serialize type="svg2jpg"/>

He uses 'accepts()' in the value for the test attribute.

I tried the following with no success (Cocoon 2.0 on Tomcat 4.0, Win NT
4.0 SP6):

<map:match pattern="test/">
  <map:generate src="docs/test/index.xml"/>
  <map:select type="browser">
    <map:when test="accepts('text/vnd.wap.wml')">
      <map:transform src="stylesheets/test/wap/test.xsl"/>
      <map:serialize type="wap"/>
      <map:transform src="stylesheets/test/screen/test.xsl"/>
      <map:serialize type="html"/>

I used the Nokia Mobile Toolkit. The string 'text/vnd.wap.wml' is part
of the Accept Header. But the HTML version was served. What is wrong
with my example?

Johannes Koch  . IT Developer
Pixelpark AG   .
Rotherstra├če 8 . 10245 Berlin  .  Germany
phone: +49 30 5058 - 1288  .  fax: - 1355

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message