[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Dynamic stylesheet selection

Subject: RE: Dynamic stylesheet selection
From: Peter.FLYNN@xxxxxxxxxxxx
Date: Wed, 4 Apr 2001 15:27:03 +0100
dynamic stylesheet
If you were developing a servlet, you could check the User-Agent and
User-Accept values for the browser.  The eMobile example (part 1 and 2) on
java.sun.com is a good example that takes you through Servlets, XML and XSL.

In your servlet code, basically just have:

String userAgent = request.getHeader("User-Agent");
String userAccept = request.getHeader("Accept");

The User-Agent contains the browser type (e.g. Mozilla/4.51) 
The Accept value will contain many values about what document types the
browser can accept, for HTML based browsers one of the values will be
text/html.

WAP browsers generally have text/wml.

You can then check what documents your browser can accept, and modify the
java code accordingly to use the correct XSL stylesheet.

Regards,
Peter Flynn


***********************************************************************

Check us out at http://www.syntegra.com

***********************************************************************

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.