Title: WAP
1WAPs WMLby David Boncarosky
- WML Inherits From XML
- WML Extends Interactivity to Cell Phones, Pagers,
PDAs - Display Varies Widely From Device to Device
- WML tags lack consistency across different
manufacturers
2WML Coding
- WML Based on a Deck of Cards -- the device only
shows 1 card at a time - Cards in a Deck can Interact with other Cards in
Deck and Cards in External Decks
3WML Coding
- All WML documents MUST have a specific header
- The Deck is delimited by the ltwmlgt . . . lt/wmlgt
tag
lt?xml version"1.0"?gt lt!DOCTYPE wml PUBLIC
"-//WAPFORUM//DTD WML 1.1//EN" "http//www.wapforu
m.org/DTD/wml_1.1.xml"gt ltwmlgt ltcard id"main"
title"First Example"gt ltpgtHello
World!lt/pgtlt/cardgt lt/wmlgt
4Entering Text
- Cards are delimited by the ltcardgt . . . lt/cardgt
tags - All Text within a card must be placed in ltpgt . .
. lt/pgt tags
ltwmlgt ltcard id"main" title"Hello
World"gt ltpgt My First WML Card! (a.k.a. Hello
World!) lt/pgt lt/cardgt lt/wmlgt
5WML Anchors (links)
- Similar to HTML links
- lta hrefaddressgt text lt/agt
- Use to reference a card (e.g. href
myCard). Otherwise, will go to the first card
in a deck
ltwmlgt ltcard id"main" titleLink
Example"gt ltpgt lta href"anotherCard"gt My
First link lt/agt lt/pgt lt/cardgt lt/wmlgt
6WML sample Site
- lt?xml version"1.0"?gt
- lt!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML
1.1//EN" - "http//www.wapforum.org/DTD/wml_1.1.xml"gt
- ltwmlgt
- lttemplategt
- ltdo type"accept" label"Find a Person"gt
- ltgo href"search" /gt
- lt/dogt
- ltdo type"accept" label"School Info"gt
- ltgo href"schools" /gt
- lt/dogt
- ltdo type"accept" label"My CMU email"gt
- ltgo href"login" /gt
- lt/dogt
- lt/templategt
7WML sample site (cont.)
- ltcard id"main" title"Welcome to CMU"gt
- ltpgt
- Welcome to CMU ltbr/gt
- lta href"search"gtFind a Personlt/agt ltbr/gt
- lta href"schools"gtSchool Infolt/agt ltbr/gt
- lta href"login"gtMy CMU emaillt/agt
- lt/pgt
- lt/cardgt
8WML Sample Site (cont.)
- ltcard id"search" title"Find Someone at CMU"gt
- ltpgt
- Find Someone at CMU ltbr/gt
- First Name ltinput name"f_name" /gt ltbr/gt
- Last Name ltinput name"l_name" /gt
- lt/pgt
- ltpgt
- ltanchorgt
- Submit
- ltgo method"post" href"http//www.cmu.edu/sea
rch.jsp"gt - ltpostfield name"f_name" value"(f_name)" /gt
- ltpostfield name"l_name" value"(l_name)" /gt
- lt/gogt
- lt/anchorgt
- lt/pgt
- lt/cardgt
9WML Sample Site (cont.)
- ltcard id"schools" title"Info on the Schools"gt
- ltpgt
- Select the School
- ltselect title"school"gt
- ltoptiongtCFAlt/optiongt
- ltoptiongtGSIAlt/optiongt
- ltoptiongtHeinzlt/optiongt
- ltoptiongtHSSlt/optiongt
- ltoptiongtMISMlt/optiongt
- lt/selectgt
- ltanchorgt
- Get Info
- ltgo method"post" href"http//www.cmu.edu/sch
ool.jsp"gt - ltpostfield name"school" value"(school)" /gt
- lt/gogt
- lt/anchorgt
- lt/pgt
10WML Sample Site (cont.)
- ltcard id"login" title"Login to Check Mail"gt
- ltpgt
- Login to Check eMail ltbr/gt
- User ID ltinput name"user_id" /gt ltbr/gt
- Pass ltinput name"passw" /gt ltbr/gt
- ltanchorgt
- Login
- ltgo method"post" href"http//www.cmu.edu/log
in.jsp"gt - ltpostfield name"user_id" value"(user_id)" /gt
- ltpostfield name"passw" value"(passw)" /gt
- lt/gogt
- lt/anchorgt
- lt/pgt
- lt/cardgt
- lt/wmlgt