Wireless application protocol (WAP) (Open Mobile Alliance, 2003) is a suite of network protocols that specifies ways of sending data across the airwaves. A wireless device is said to be WAP-compatible if, and only if, it has software that is fully capable of handling all WML 1.1 DTD entities. WML (Wireless Markup Language) (Open Mobile Alliance, 2001) is the XML-based language that is used in conjunction with WAP to format documents. As with all such protocol suites, WAP is organized hierarchically. At the bottom there are low-level protocols that are used for basic operations such as establishing connections, coding alphanumeric characters, and so on. At the top are the high-level protocols such as WML, which passes on page information. For more information on other WAP protocols, please visit http://www.wapforum.org/. WML script writing and applications will be discussed in Chapters 6 through 9:
From inception, WAP has been designed to take into account the limitations inherent in handsets and networks. Because networks are slow, and handsets are unable to carry significant amounts of either memory or power, it is important that all of its elements are as efficient as possible. It is not yet clear whether this has been achieved at the cost of functionality; this will only become apparent when fast mobile networks are commonplace and handset technology has improved. However, it seems reasonable to expect that WAP’s efficiency will continue to contribute towards its success. WAP protocols are not the same as web (HTTP) protocols, although WML content can be stored on Web servers. WML content is served up to mobile phones (and other portables) through ‘gateways’ that stand at the borders of WAP and Web networks. These gateways act as intermediaries between the two types of network, translating from one system to the other and as they are provided by the mobile phone network providers WML developers do not need to install gateway software into their products.
WML is the language now used to write content for WAP phones; the alternative, HDML (Handheld Device Markup Language), has effectively become obsolete. WML is a markup language, which means that WML pages are written and saved as text files using tags like those found in HTML [W3C (World Wide Web Consortium), 1999]. Programmers familiar with HTML should find learning WML fairly easy. There are, however, some important general differences between HTML and WML. These stem from the fact that WML is specified in XML (eXtensible Markup Language) [W3C (World Wide Web Consortium), 2004] and XML specifies a general way to define different types of markup languages, with the following quirks:
XML-specified languages are case sensitive. For example, the tag <Wml> is different from the tag <wml>. In HTML, case is generally ignored.
XML-specified languages are strict. Most HTML editors are very forgiving about badly coded HTML pages, and do their best to show some content, but WML editors will simply report an error if given a badly coded WML page.
All the attributes of elements must be contained within either double (“) or single (') quotes. This is slightly different from HTML, where attributes need not be contained within quotation marks for most browsers.
One way in which WML is strict is that all tags require closure: an opening <wml> tag must have a closing </wml> tag. Some tags do not come in pairs and are allowed to close themselves; these must have a forward slash at the end of their text, for example <br />
WML is all about text. Tags that would slow down communications with handheld devices are not a part of the WML standard, and the use of tables and images is strongly restricted. Since WML is an XML application, all tags are case sensitive (<wml> is not the same as <WML>), and all tags must be properly closed.