Skip to main content


developerWorks  >  XML  >

Create multi-purpose Web content with XSLT

developerWorks

Level: Introductory

Nicholas Chase (nicholas@nicholaschase.com), Author, Studio B

18 Mar 2003

Register now or sign in using your IBM ID and password.

As more and more devices become Web enabled, it is crucial that your content be available in multiple forms, such as traditional Web pages, mobile phones or other small devices, or Web services. This tutorial shows you how to set up a Java servlet that detects the type of display that is necessary and automatically produces appropriate markup for the content that uses XSLT.

Prerequisites

This tutorial assumes that you are familiar with XML and with XSL Transformations, but the actual transformations themselves are a minor part of the tutorial.

An understanding of Java development is helpful, but not required.


System requirements

You will need JavaScript enabled on your browser.

To execute the examples, install and test the following tools before starting the tutorial:

  • IBM's WebSphere Studio V5. WebSphere Studio, although not required, contains all necessary tools for creating XML and XSLT files and Java classes, plus creating the Web service proxy. It also includes a test server environment for running the servlet, so you can accomplish all the development in this tutorial with this one tool. Download a trial version of WebSphere Studio V5 for either Windows or Linux at http://www7b.software.ibm.com/wsdd/downloads/WSsupport.html.
  • To see the mobile phone examples, download the Openwave SDK, which includes a simulator that works over HTTP, at http://developer.openwave.com/download/product_62.html. The WAP extension is not necessary for this tutorial.

If you choose not to use WebSphere Studio or another development environment, you can also complete the examples using:

  • A text editor to create XML and XSLT files.
  • A Java development environment such as Sun's Java 2 Standard Edition version 1.4, available at http://java.sun.com/j2se/1.4/. Version 1.4 has built-in XML support.
  • A servlet-capable Web server such as IBM's WebSphere Application Server, available at http://www-3.ibm.com/software/websphere/info/platformv5/wstrialv5.jsp, or Apache Tomcat, available at http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/. (Even if you use WebSphere Studio to create and test the application, you'll need a server on which to deploy your production application.)


Duration

Under one hour


Formats

html, pdf


Share this....

digg Digg this story del.icio.us del.icio.us Slashdot Slashdot it!


Back to top


Document options

Document options requiring JavaScript are not displayed


My developerWorks needs you!

Connect to your technical community