Just what is Wireless Markup Language?

This tip is excerpted from an article on the InformIT Web site. The article discusses the Wireless Application Protocol, one part of which is Wireless Markup Language. Anyone who wants to use wireless hand-held devices should have at least an understanding of WAP and WML.

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
  • Navigation
  • Input

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 than 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 www.oasis-open.org. In addition, Robin Cover's XML pages are an excellent resource for XML tutorials and tools.

WML uses a deck and card model for content display and navigation. Wireless users receive a WML deck consisting of one or more cards. Each deck is a self-contained unit, allowing a user to work offline between deck requests. A card is intended to represent a single physical display screen. To define a deck, a pair of a <wml></wml> tag set is used that contains one or more cards delimited by <card></card>.

A Simple WML deck
Note the first two lines that precede the tag. These lines are found in all WML decks and must be the first text in the deck. The first line is required because WML is an XML language. The second line references the WML document type definition (DTD) that is available at the WAP Forum Web site. This DTD defines all the allowable elements and attributes in WML. In subsequent examples, we'll omit these initial lines for brevity, but keep in mind that they are required in order for your WML to be valid.

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "//WAPFORUM//DTD WML1.1//EN"      
"">http://www.wapforum.org/DTD/wml13.dtd">
<wml>
  <card>
     <p>Health Inspection</p>
  </card>
</wml>

To read more of this tip, click here .


This was first published in November 2000

Dig deeper on Wireless LAN Implementation

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchSDN

SearchEnterpriseWAN

SearchUnifiedCommunications

SearchMobileComputing

SearchDataCenter

SearchITChannel

Close