Make your own free website on

Home Page

Back to Papers

Introduction - Why WAP?



The Oracle XDK

An Example Application

Our first XSQL Page

Browser Sensitivity

A WML Stylesheet

WML Output

An HTML Stylesheet

Conclusion and Resources

Please note this page has moved to You will be redirected in 5 seconds but it would be better to update your bookmarks ;-)

WML - The Wireless Markup Language

The mark-up language defined by the WAP protocol is WML. A full description and tutorial is beyond the scope of this paper, but I've found it an extremely simple language to use and I have included links to the WAP standards documentation and some of the better tutorials in the Resources section. I'll limit myself here to a very brief overview as an introduction to the small WML examples that we'll be working on.

Example 1 - A WML User Input Form

<wml> <card id="searchString"> <do type="accept"> <go method="post" href="http://localhost/xsql/jobserve.xsql"> <postfield name="mySearch" value="$mySearch"/> </go> </do> Search String: <input name="mySearch"/> </p> </card> </wml>

At first glance, WML looks like HTML and other mark-up languages. Note the <wml> and </wml> tags that enclose the whole document.

The most important difference between WML and HTML is that a WML 'page' is organised as a deck of cards, where each card represents one small screen-full of information. The entire deck is downloaded to the user's device when the request is received and the user can then navigate between the various cards using the card id, without accessing the server (unless, of course, the user requests another deck). This reduces the number of trips between server and client and allows some processing to take place within the client device (particularly when combined with WML Script - an ECMA Script derivative). The deck in example 1 only contains one card, surrounded by the <card> and </card> tags, but we'll work with examples later that have multiple, linked cards in one deck.

The <do> tag assigns an action to the 'accept' button on the mobile device. When this button is pressed, the post method will be used to submit a request to the web server on my local machine for the jobserve.xsql page. The value for the postfield is appended to the request and is requested from the user, using the <input> tag below. Note that, because the input tag does not have a matching closing tag, </input>, then it must end with a /.

This highlights another key difference between WML and most versions of HTML. It is a valid XML language. In other words it was written using XML so WML is defined by an XML Document Type Definition (DTD). The first noticeable effect of this tends to be an increase in the number of errors generated when you first start writing WML pages, because it is very particular about ensuring that opening tags have matching closing tags and that tags and their attributes are also case-sensitive.

Example 1 will be used as the opening page of our prototype to allow the user to submit a user-defined query to our database. As we encounter other examples of WML, I'll explain how they work as a gentle introduction to the language itself. But, interestingly, a large part of our work will be performed using a familiar language, SQL, and a more recent development, XML.



Technical Papers Utilities and Scripts Book Reviews Links
My Resume Fun & Games Email Home