You are on page 1of 28

Technical Seminar on Wireless Markup Language

Sir Padampat Singnania University

Guided By: Mr. Ajay Prasad Assistant Professor , CSE Dept.

Presented By: Dixit Wadhwani B.TECH 3rd YEAR, CSE 07CS000031

WML. Why use WML ? WAP. WML basics Conclusion Q &A

What is WML?
WML stands for Wireless Mark-up Language and was created in 1998. Before that, there was no standard used specifically for mobile devices. The language used for WAP Similar to HTML Subset of a XML describes only intent of interaction in an abstract manner presentation depends upon device capabilities Current version is WML 2.0

Why use WML when you can use HTML?

When we have one that works for the Web already (HTML) Why we need WML ? Internet as it is now, is not well suited to mobile phone.
1)Is complex. 2)Takes up too much bandwidth. mobile telephones has a very limited bandwidth

WML has many optimizations for mobile browsers aimed at better usability, low memory consumption, little CPU requirements for the rendering engine. All these elements make it the optimal solution for a mobile device, from a very technical point of view.

What is W@P?
Wireless Application Protocol WAP Micro Browsers Requires minimal RAM, ROM, Display Equivalent to Existing Web Browsers Allows Text Images Hyperlinks Text Entry

W@P Services & Features

Banking Finance Shopping Ticketing Entertainment Weather

Browsers Markup language Script language Gateway Server Protocol Layers

How Does W@P work?

HTTP request URL request request

Communication Tower WAP response

WAP Gateway
HTTP response(WML)

Mobile phone Web Server

WAP Architecture
Client (WAP device) WAP user agent WAP Gateway
Encoder And Decoder

Web Server
CGI Scripts Etc. HTTP



Protocol Adapter

The WAP Gateway acts as the bridge between the mobile network, containing mobile clients, and the computer network containing application servers . Decoder: It translates requests from the WAP request to the HTTP request. Encoder: converts WML to binarized WML Adaptor: provides additional information through HTTP header Translate requests HTTP and WSP. Convert between SSL and WTLS Convert transport protocols (TCP and WDP)

Why is HTML not enough?

Big pipe - small pipe syndrome Internet
<HTML> <HEAD> <TITLE>NNN Interactive</TITLE> <META HTTP-EQUIV="Refresh" CONTENT="1800, URL=/index.html"> </HEAD> <BODY BGCOLOR="#FFFFFF" BACKGROUND="/images/9607/bgbar5.gif" LINK="#0A3990" ALINK="#FF0000" VLINK="#FF0000" TEXT="000000" ONLOAD="if(parent.frames.length!=0)top.location='http://nnn. com';"> <A NAME="#top"></A> <TABLE WIDTH=599 BORDER="0"> <TR ALIGN=LEFT> <TD WIDTH=117 VALIGN=TOP ALIGN=LEFT>


<WML> <CARD> <DO TYPE="ACCEPT"> <GO URL="/submit?Name=$N"/> </DO> Enter name: <INPUT TYPE="TEXT" KEY="N"/> </CARD> </WML>


Content encoding
<HTML> <HEAD> <TITLE >NNN Intera ctive< /TITLE > <META HTTPEQUIV= "Refre sh" CONTEN T="180 0, URL=/i ndex.h tml"> 010011 010011 110110 010011 011011 011101 010010 011010

WML as compared with HTML

WML Markup language for wireless communication Makes use of variables WML Script stored in a separate file Image stored as WBMP WBMP is a 2 bit image Case sensitive WML has fewer tags than HTML A set of WML Cards make a DECK HTML Markup language for wired communication Does not use variables JavaScript is embedded in the same HTML file Images are stored as GIF, JPEG or PNG Size of the images are much larger in HTML Not case sensitive HTML has more tags than WML A set of HTML pages make a SITE


<html> <title> About us </title> <body> <br> Hello world </body> </html>

WML Code
<wml> <card title="AboutUs"> <p align="center" > Hello world<br/> </p> <p align="center" > </p> </card> </wml>

Decks and Cards

The basic unit is a card. Cards are grouped together into Decks Document All decks must contain Document prologue XML & document type declaration <WML> element Must contain one or more cards
<card id=card1 title=DIXIT"> <card .. id=card2 title=DIXIT"> <p>hello world </p> .. .. <card id=card3 <p>hello world .. title=DIXIT"> </p> </card> .. ..
.. <p>hello world </card> </p>
.. .. </card>

Basic WML deck structure

<?xml version= 1.0 ?> <!DOCTYPE wml PUBLIC //WAPFORUM//DTD WML 1.1//EN xml > <wml> <card id= card1 > . </card> <card id= card2 > . </card> </wml> Document Prolog

Start <wml> tag


Another card

End <wml> tag

Introduction to Tags
Each element or tag has start tag and end tag <tag>content</tag> Some tags do not have start and end tag <tag /> Some tags have attributes <tag attribute= value > Spaces, tabs, line breaks between tags are ignored

<wml> tag is required for all files. All cards are located between the <wml> tags.

<wml> deck has at least one card Content is placed <card> ..</card> tag. Syntax: <card id= card1 >content</card> Id: id is used when you link this card to another card Content will contains the text, markups, etc.

Basic features of WML

Text and images User interaction Navigation Context management

Text Formatting
<p></p> <em> <strong> <i> <b> <u> <big> <small> Content of cards Render with emphasis. Render with strong emphasis. Render with an italic font. Render with a bold font. Render with underline. Render with a large font. Render with a small font.

Graphics and WML

Most micro browsers support only .wbmp graphic files. .wbmp Wireless bitmaps Black & white There are tools to convert various graphic format to .wbmp



User interaction
WML supports different elements for user input. Examples are: Text entry control
Input tag

syntax: <input />

Option selection
<option></option> </select>

Links a text or image to another card or another deck. <anchor>link</anchor> <a>link</a>

Syntax: <anchor title="label">task text</anchor> <a href="url" title="label"> ...any valid combination of <text>, <br/> and <img> elements </a>

Something that happens at a given place and time. WML supports events and it provides a tag pair, <onevent></onevent>, for handling events. You can specify an action to be taken whenever an event occurs. Two events are supported in WML. ontimer -- This event occurs when a timer expires. onpick -- This event occurs when an item of a selection list is selected or deselected. <onevent type="event_type"> A single task to be done whenever the event occurs </onevent>

A task specifies what action to perform when an event occurs. There are 4 types of tasks in WML. Go task Prev task Noop task Refresh task
Syntax: <onevent type="event_type"> A single task to be done whenever the event occurs </onevent>

Context management
WML allows for saving the state between different decks without server interaction. Switch from one card to another card. Set a variable value using setvar command. <setvar name= x value=100> Variable through an input element. Example of WML

Conclusion & Future Of WML

The primary focus of WAP technology is to create a global wireless Internet by bringing services offered by Internet to mobile phone users. It is certain that one of the most common application of the WML will be m-commerce. As mobile devices become more powerful, and can process more data. Much greater support for XHTML on mobile devices. There are security protocols, such as WTLS, that can facilitate secure transactions.

References and Resources

Books Learning wml , wmlscript- O-reilly Publisher WML References Openwave System Inco. Official Website (specifications) ml_tutorial.asp?

Questions ?