Wireless Markup Language
- Wireless Markup Language
- A Deck of Cards
- Layout and Presentation
- A Note on Examples
WAP, the Wireless Application Protocol ™, is a set of standards specifically designed to meet the challenges of the wireless Internet. An important part of WAP is the Wireless Markup Language (WML), used to define content for WAP devices.
WML version 1.2 is an approved standard, although most current devices only support WML 1.1. Like HTML, WML is a markup language providing layout, data entry, and navigation. However, WML differs from HTML in many areas as it must address the limitations of wireless devices—small displays, lightweight processors, and slow connections. WML provides an explicit navigation model that helps wireless devices ensure that navigation elements are visible to the user despite the limited display area. The deck/card layout of WML reduces network round-trips, and simple built-in field validation reduces the need to code CPU-intensive scripts.
At its most basic, WML gives us the following:
A deck and card content model
Layout and presentation for text and images
In this article, we'll introduce these features through a series of related examples from a hypothetical health inspection application. More advanced topics—including events, variables, timers, and history—will be covered in the third article of the series, Wireless Markup Language—Beyond the Basics.
A Note on XML
WML has its roots in HDML (Unwired Planet's Handheld Device Markup Language), which itself is based on HTML. However, WML has been defined using Extensible Markup Language (XML); familiarity with XML is very useful when writing WML. What this means for the developer is that WML markup requirements are much more strict that those placed on an HTML developer. Attention to case (e.g., <deck> is not the same as <DECK>), correct pairing of tags, and use of an XML prologue are required; incorrect WML will not be displayed by wireless devices! For further information on XML, please refer to http://www.oasis-open.org/. In addition, Robin Cover's XML pages are an excellent resource for XML tutorials and tools.