Using XSLT To Serve Content to Multiple Devices
If you're a frequent reader of this site, you're already familiar with XML, so I won't bore you by trying to evangelize the XML family of technologies. If you need some evangelizing, feel free to pick up my book, XML and SQL: Developing Web Applications (Addison-Wesley, 2001, ISBN 0-201-65796-1). You probably also know about how useful XSLT is for transforming XML from one flavor to another. These techniques can be great at managing the complexity of web content applications: personalization, localization, and commerce applications all can benefit from programmatic content transformation according to translations rules.
With the advent of mobile connected devices, especially WAP phones, PDAs, and convergence devices (devices that straddle the line between phones and PDAs, for instance), the complexity of the web has taken an exponential leap forward. If you want to extend your reach onto these new devices and start addressing customers in these new mediums, you're suddenly confronted by a host of complex issues.
There are many phone manufacturers, each of which has made different implementation choices about how to implement the WAP standard. They've either OEMed a WAP browser from a software company like Phone.com or developed one in-house. But remember: Once that phone is out there in the marketplace, it usually can't be upgraded. You can't tell your user population to upgrade to the latest browser, because they can't. Oh, and by the way, the browser features vary considerably from phone to phone, and even within revisions of the same phone. Two outwardly identical 7110 phones could be running different microbrowser versions, and you would have no way of knowing this. And you thought the web was hard!
So Why Bother?
Why is it important to adapt your content to all of these different devices? Surely there's a "lowest common denominator" that works on most phones, right? Well, yes and no. It's true that there's a lowest common denominator for WML, for instance, but by limiting yourself to this level, you cut yourself off from using more interesting device-specific features, or being able to take advantage of newer device capabilities. For instance, some WAP phones support a landscape-shaped display (such as the Ericsson R380). Color phones now coming to market, such as the Ericsson T68 or the Trium eclipse, offer more possibilities for use of color text and graphics, allowing a more "web-like" user experience. Furthermore, the version and capabilities of WMLScript (the WAP equivalent of JavaScript) varies significantly from browser to browser. If you want to be able to take advantage of these capabilities, you can't use lowest-common denominator WML.