cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ross Burton" <ross.bur...@mail.com>
Subject Re: single xsp document which serves WML or HTML?
Date Mon, 10 Apr 2000 23:44:16 GMT
> How is "media" type gleaned?  Does "explorer" refer to MS Internet
> Explorer?  What are the media types for all other known web browsers?
> Seems like conditional logic (if WAP browser, generate WML, else
> generate XHTML) would be cleaner.

In Cocoon 1.x, the "media" attribute is taken my substring matching tags in
the user-agent header (see cocoon.properties).  In Cocoon 2.x, at present
this is not possible..  However, the framework is there and I started this
morning to write a user-agent matcher.  I plan in the end to have a
user-agent and operating system matcher, which will enable comprehensive
analysis of the user's browser.

Example:
    Windows, IE5 - send DHTML
    Mozilla - probably send XML and XSL (does Mozilla have decent XML
support?)
    Mac, Netscape 3 - send DHTML
    Mac, IE 3 - Designer Hell, send basic HTML only
    Lynx/AvantGo - plain text
    WAP - send WML

I hope to have this working so that you can match on capabilities (such as
working DHTML/XML/CSS support), not browser name and model.

> For example, I want to generate a completely
> different HTML based interface for a touch-screen kiosk based on the
> known static IP address of my kiosk.  How can I do that?

The kiosk site is also a perfect case study of the sitemap in Cocoon 2 - it
is simple to match on the user's IP address, and perform a seperate set of
transforms.  I haven't used XSP much, is it possible to obtain the user's IP
from the Servlet request and insert PIs depending on the address?

Ross Burton



Mime
View raw message