First WML course


© Wai Seto

If you have visited the WAP forum, you have probably seen there are many working groups. Each of these groups is working hard to add features and functionality to the WAP standard. One of these workgroups, Wireless Application Environment (WAE), defines the Wireless Markup Language (WML). This markup language is similar to HTML, which we are all familiar with. In this article, I will introduce some of the basic steps to creating a WML page. At the end of these articles, you will know how to write a WML page.

Why WML? We all understand how useful HTML is to us. Not only that we have a standard way to share information, but also a way to use a common interface (browser) to update data. Companies use Intranets to save tremendous amounts of money by having a single (free) application environment, and get information to employees in a uniform way. Now we can extend that idea to a wireless environment. WML provides exactly this capability. With WML, wireless applications can be created within an organisation, and bring information to a workforce anywhere, anytime. And don't forget the ability to update information real time wirelessly. That's the power of WML.

Simple WML Without delaying further, let's get started with WML. The first major concept of WML is Decks and Cards. A Deck can be thought as a WML page, it is a collection of cards. It can also be looked at as a transport unit. Each WML transaction, usually, deliver one deck. There are exceptions, such as multi-part documents. A card can be thought as a display unit. One card is displayed at a time on a device's screen. Each time, a device receives a deck which can contain multiple cards; then the device displays one card after another according to user interaction. Take a look at the following WML sample:

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="Title1">
<p>
<!-- Write your card implementation here. -->
Hello World!!!<br/>
<a href="#card2">
Goto card 2</a>
</p>
</card>
<card id="card2" title="Title2">
<p>
<!-- Write your card implementation here. -->
Hello World Again!!!<br/>
<a href="#card1">
Goto card 1</a>
</p>
</card>
</wml>

Line 1,2,3: WML is a child of XML, and XML pages require DTD file which describes elements in the markup language. Please refer to XML definition for details.
Line 4: As in HTML, this line tell WML browser that this is the beginning of a Deck. Note that there has to be a matching end tag at the end.
Line 5: Starting here are the interesting part, where the contents are actually presented. If you zoom out and look at the entire page now, you can see there is two Cards in this deck. Each card has an ID which is the attribute which we can reference to in the same or different deck (WML Page). We can use the term Decks and WML Pages interchangeably for now until we get familiar with WML. =)

Go To Page: 1 2


The copyright of the article First WML course in Wireless Internet is owned by . Permission to republish First WML course in print or online must be granted by the author in writing.

Post this Article to facebook Add this Article to del.icio.us! Digg this Article furl this Article Add this Article to Reddit Add this Article to Technorati Add this Article to Newsvine Add this Article to Windows Live Add this Article to Yahoo Add this Article to StumbleUpon Add this Article to BlinkLists Add this Article to Spurl Add this Article to Google Add this Article to Ask Add this Article to Squidoo


Here's the follow-up discussion on this article: View all related messages

1.   Aug 19, 2000 1:16 PM
I have read through several of your articles and they are well-written and full of good information. I plan on coming back and reading the rest of them soon! ...

-- posted by jlewin





For a complete listing of article comments, questions, and other discussions related to Wai Seto's Wireless Internet topic, please visit the Discussions page.