cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marco Pauck <>
Subject Re: Detecting USER_AGENT using cocoon 1.8
Date Tue, 10 Oct 2000 14:04:25 GMT
Richard Korthuis wrote:
> I would like to use different stylesheets (XSL) for different WAP-phones. I
> know this is possible by looking at the HTTP_USER_AGENT string in the
> HTTP-request.
> My question is what should I add to in order to be able to
> associate different stylesheets with different phones?
> I know the HTTP_USER_AGENT string from the Nokia 7110 is:
> Nokia 7110/1.0 (xx.yy)          xx.yy=software version
> The HTTP_USER_AGENT string from the Nokia 9110i Communicator is:
> Nokia-Communicator-WWW-browser/3.0 (Geos 3.0 Nokia-9110)

Well, I'm not going that far distinguishing different versions
of the Nokia browser but instead simply Nokia, (UP),
generic WML and generic HTML.

But to give you the idea, these are the definitions in

browser.0 = explorer=MSIE
browser.1 = pocketexplorer=MSPIE
browser.2 = handweb=HandHTTP
browser.3 = avantgo=AvantGo
browser.4 = imode=DoCoMo
browser.5 = opera=Opera
browser.6 = lynx=Lynx
browser.7 = java=Java
browser.8 = nokia=Nokia
browser.9 = up=UP.Browser
browser.10 = wap=Wapalizer
browser.11 = wap=Wap
browser.12 = mozilla5=Netscape6/
browser.13 = netscape=Mozilla

And these are the declarations in the XSP pages:

<?xml-stylesheet href="" type="text/xsl"?>
<?xml-stylesheet href=""  type="text/xsl" media="wap"?>
<?xml-stylesheet href=""    type="text/xsl" media="nokia"?>
<?xml-stylesheet href=""       type="text/xsl" media="up"?>

	Marco Pauck

View raw message