Wireless Markup Language (WML)

HOME Wireless Technology Mobile / Wireless Computing Software Languages


WML - An Introduction

The Wireless Markup Language is a simple markup language that was designed exclusively for the purpose of creating applications to be sent over wireless networks to WAP - enabled mobile devices. WML is an open standard and was developed by the WAP forum and the WML specification forms a part of the broader WAP specification. WML is an application of XML. WML has some distinct differences from other markup languages, for instance HTML.

WML looks quite like HTML, but there is a significant difference between them. HTML is mainly used for creating documents, which in turn are being designed to display information. But WML is being used for creating applications, which are designed for user interaction.

There is one more important difference. Basically Web contents are being accessed from powerful desktop computing systems that have bigger displays and fast, cheap, reliable wired network connections. The web browser is a sophisticated software package that offers a number of flexible and convenient features for the viewers. But wireless network connections are unreliable, slow and expensive and the micro browsers that are fitted in WAP-enabled mobile devices have very small displays, which in a way makes receiving and sending information inconvenient.

Considering the limitations of mobile devices and the wireless networks, WML has to be designed in such a way that it offsets many of those limitations. Also mobile communication, being expensive, the mobile users would visit sites seeking specific pieces of information and like to get them very quickly. WML meets these requirements quite successfully and brings a high degree of interaction with users.

The Structure of a WML Application

Cards and Decks are the two main parts in an WML application. WML approaches the above-mentioned needs by removing the idea of a page, which we have in the Web. Instead, WML applications are composed of one or more decks, which are containers of collections of cards. Each card typically contains some content, such as text and images that are displayed to the user, and some other content that is used by the micro browser to control how the user moves from one card to the next. Also a card may contain input fields for the user to ender data as we have the form functionality using HTML in web browsers.

WAP-enabled devices will display a single card at a time. If a card is too large to fit the display all at once, the device may split the card and show it as a sequence of screens or use use some mechanism such as scroll bars.

Normally a WML card is similar to an HTML page, but there is no way in HTML for bundling a collection of pages together. This distinct facility being offered by WML decks is more important for wireless Internet applications. That is, by combining related cards, several cards can be sent to microbrowsers at the same time. This has the potential of saving a great deal of time and by designing applications intelligently, it is feasible to reduce the number of decks to be passed to devices. If deck is too large, the wireless application developer has to split it up in the most logical way. One has to play off the benefits of having many cards on the WAP-enabled device at once against the time for a very large deck to travel from content server to mobile devices.

Since WML is an application of XML, it has to start with a document prolog. The prolog states that the particular WML belongs to which version of XML and the gives the location of the document type definition against which this document will be validated. The document type declaration tells that the root element in a WML document will be . There will be only one deck per document. The element defines a WML deck and there will be beginning and ending tags for each deck. There should be at least one card per deck. A deck also can contain elements and