Wireless markup language (WML)
The wireless markup language (WML) (WAP
Forum, 2000j) is based on the standard HTML known from the www and on HDML
(King, 1997). WML is specified as an XML (W3C, 1998a) document type. When
designing WML, several constraints of wireless handheld devices had to be taken
into account. First of all, the wireless link will always have only a very
limited capacity compared to a wire. Current handheld devices have small
displays, limited user input facilities, limited memory, and only low
performance computational resources. While the bandwidth argument will remain
for many years, it currently seems that the gap between mobile and fixed
devices regarding processing power is getting narrower.
Today‘s
CPUs in PDAs have performance figures close to desktop CPUs just a few years
ago. WML follows a deck and card metaphor. A WML document is made up of
multiple cards. Cards can be grouped
together into a deck. A WML deck is
similar to an HTML page, in that it
is identified by a URL and is the unit of content transmission. A user
navigates with the WML browser through a series of WML
cards,
reviews the contents, enters requested data, makes choices etc. The WML browser
fetches decks as required from origin servers. Either these decks can be static
files on the server or they can be dynamically generated.
It is
important to note that WML does not specify how the implementation of a WML
browser has to interact with a user. Instead, WML describes the intent of
interaction in an abstract manner. The user agent on a handheld device has to
decide how to best present all elements of a card. This presentation depends
much on the capabilities of the device.
WML
includes several basic features:
● Text and images: WML gives, as do other mark-up languages,
hints how text and images can be
presented to a user. However, the exact presentation of data to a user is up to
the user agent running on the handheld device. WML only provides a set of
mark-up elements, such as emphasis elements (bold, italic, etc.) for text, or
tab columns for tabbing alignment.
● User interaction: WML
supports different elements for user input.Examples are: text entry controls for text or password entry,
option selections or controls for task invocation. Again, the user agent is
free to choose how these inputs are implemented. They could be bound to, e.g.,
physical keys, soft keys, or voice input.
· Navigation: As with
HTML browsers, WML offers a history mechanism with navigation through the browsing history,
hyperlinks and other intercard navigation elements.
● Context management: WML allows for
saving the state between different decks without server interaction, i.e.,
variable state can last longer than a single deck, and so state can be shared
across different decks. Cards can have parameters defined by using this state
without access to the server
over the
narrow-band wireless channel.
The following
paragraph gives a simple example of WML; the reader is referred to the standard
or Singhal (2001) for a full reference and in-depth discussion of the language.
First, a
reference to XML is given where WML was derived from. Then, after the keyword
wml the first card is defined. This first card of the deck ―displays‖ a text
after loading (―displaying‖ could also mean voice output etc.). As soon as a
user activates the do element (a button or voice command), the user agent
displays the second card. On this second card, the user can select one out of
three pizza options. Depending on the choice of the user, PIZZA can have one of
the values Mar, Fun, or Vul. If the user proceeds to the third card without
choosing a pizza, the value Mar is used as default. Again, describing these
options with WML does not automatically mean that these options are displayed
as text. It could also be possible that the user agent reads the options
through a voice output and the user answers through a voice input. WML only describes
the intention of a choice. The third card finally outputs the value of PIZZA.
<?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="card_one" title="Simple example"> <do
type="accept">
<go
href="#card_two"/> </do>
<p>
This is a
simple first card! <br/>
On the
next one you can choose ...
</p>
</card>
<card
id="card_two" title="Pizza selection"> <do
type="accept" label="cont">
<go
href="#card_three"/> </do>
<p>
... your
favourite pizza!
<select
value="Mar" name="PIZZA"> <option
value="Mar">Margherita</option> <option
value="Fun">Funghi</option> <option
value="Vul">Vulcano</option> </select>
</p>
</card>
<card
id="card_three" title="Your Pizza!"> <p>
Your
personal pizza parameter is <b>$(PIZZA)</b>! </p>
</card>
</wml>
WML may
be encoded using a compact binary representation to save bandwidth on the
wireless link. This compact representation is based on the binary XML content
format as specified in WAP Forum (2000k). The binary coding of WML is only one
special version of this format; the compact representation is valid in general for XML
content. The compact format allows for transmission without loss of
functionality or of semantic information. For example, the URL prefix
href=_http://, which is very common in URLs, will be coded as 4B. The code for
the select keyword is 37 and option is 35. These single byte codes are much
more efficient than the plain ASCII text used in HTML and today‘s www.
Related Topics
Privacy Policy, Terms and Conditions, DMCA Policy and Compliant
Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.