cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Panagiotidis" <a...@telecom.ntua.gr>
Subject selectors problem
Date Mon, 17 Dec 2001 13:14:02 GMT

Hello everybody.
I have a problem and I think you may know about it.

I want to use only a url eg.  mysite.com/sport
to display some info to several browser, mainly html and wml.
But the wap simulator of Ericsson and Nokia do not present the wml,
but the always take the data as html or unknown format.

take a look at my sitemap.xmap: =20

ANY IDEAS? regards Andreas.

<!-- ****************** UNIQUE NAME FOR ALL BROWSERS =
************************************     -->
   <map:match pattern=3D"sport">
   <map:generate src=3D"ntua/sport.xml"/>
=20
   <map:select>

   <map:when test=3D"explorer">
           <map:transform  src=3D"ntua/main.xsl"/>
   </map:when>
  =20
   <map:when test=3D"wap">
        <map:transform  src=3D"ntua/wml.xsl"/>
   </map:when>
  =20
   <map:otherwise>
        <map:transform src=3D"ntua/wml.xsl"/>
   </map:otherwise>
  =20
   </map:select>
   <map:serialize/>
   </map:match>

<!--***************** /END UNIQUE NAME FOR ALL BROWSERS =
********************************  -->

ALSO THE SELECTORS DATA

  <map:selectors default="browser">
   <map:selector name="browser" src="org.apache.cocoon.selection.BrowserSelector">
    <!-- # NOTE: The appearance indicates the search order. This is very important since
         #       some words may be found in more than one browser description. (MSIE is
         #       presented as "Mozilla/4.0 (Compatible; MSIE 4.01; ...")
    -->
    <browser name="explorer" useragent="MSIE"/>
    <browser name="pocketexplorer" useragent="MSPIE"/>
    <browser name="handweb" useragent="HandHTTP"/>
    <browser name="avantgo" useragent="AvantGo"/>
    <browser name="imode" useragent="DoCoMo"/>
    <browser name="opera" useragent="Opera"/>
    <browser name="lynx" useragent="Lynx"/>
    <browser name="java" useragent="Java"/>
    <browser name="wap" useragent="Nokia"/>
    <browser name="wap" useragent="Ericsson"/>
    <browser name="wap" useragent="UP"/>
    <browser name="wap" useragent="Wapalizer"/>
    <browser name="mozilla5" useragent="Mozilla/5"/>
    <browser name="mozilla5" useragent="Netscape6/"/>
    <browser name="netscape" useragent="Mozilla"/>
   </map:selector>
   <map:selector name="parameter" src="org.apache.cocoon.selection.ParameterSelector"/>
  </map:selectors>


Mime
View raw message