Hello all!

We are building a webapplication with cocoon and want to not only change the
style/syntax of our application depending on the client used (pda/mobile
phone/browser), but we also would like to differantiate between existing
pda's/mobile phones. For this purpose we found the WURFL-project
(http://wurfl.sourceforge.net/) to be very convenient and would now like to
combine Cocoon with WURFL.
  
I already asked Sylvain Wallez for some advice. (Thanks for the answer!)
Here are some details to our question and the Sylvains reply:

----------------------------------------------
To our problem he mentioned:

Do you know about the DELI block in Cocoon? It provides similar services
using CC/PP-UAProf. Now although not being a standard, WURFL is interesting
also as it seems to be more actively maintained.

----------------------------------------------
Our question:

>WURFL is a giant XML-file, mapping user-agent-strings with device 
>capabilities. The project is dedicated to keep track of all changes in 
>the mobile client-sector and incorporates more or less all 
>client-versions (identified by their user-agent-string). In the first 
>step we would like to discriminate between devices that are capable of 
>displaying just wml, xhtml-mp, and (x)html, so we can distinguish three 
>general types for our application. For this purpose we would need to 
>extract all user-agent-strings from the wurfl-file and map them to the 
>technology the client could "take", respectively. Then an incoming 
>request could be identified by the user-agent-string extracted from the 
>wurfl-file and a simple variable (e.g. wap/xhtml-mp/html) could be 
>returned, so the the sitemap could take a decision which
"application-track" to choose.
>
>Our question is, which is the best way to incorporate this idea into
cocoon?
>Our idea would have been, to write an own 
>WURFLBrowserSelector/WURFLNamedPatternsSelector - pair. Am I on the 
>right track, or is there a better/easier way, to accomplish this?

----------------------------------------------  
Sylvains answer:

That's a good approach, although it may not leverage all the information
that's contained in the WURFL. You may want the selector to test against
particular capabilities rather than just the user agent string.

Looking again at the WURFL, a weird idea comes to my mind to use at its best
all the information that's in this file. We could write a Javascript class
whose properties are directly mapped to WURFL capabilities. Combined with a
matcher and/or a selector, this can give powerful constructs like:

<map:match type="wurfl" pattern="wurlf.screenWidth > 200 &&
wurlf.screenHeight > 300">
  <map:transform type="large-screen.xsl"/> </map:match>

----------------------------------------------


We definitely agree, that this would be a powerful construct. Another way
could be, to pass the relevant wurfl-capabilities to the xsl as parameters
and let itsself decide, what to do with it. 

Thanks for any help!

Joerg Rasinger
-- 
ECCA - eTourism Competence Center Austria 
Technikerstrasse 21a
A-6020 Innsbruck
[EMAIL PROTECTED]

Reply via email to