WAP’s WML by David Boncarosky
-
Upload
xander-freeman -
Category
Documents
-
view
55 -
download
4
description
Transcript of WAP’s WML by David Boncarosky
WAP’s WMLWAP’s WMLby by David BoncaroskyDavid Boncarosky
WML Inherits From XMLWML Inherits From XML WML Extends Interactivity WML Extends Interactivity
to Cell Phones, Pagers, to Cell Phones, Pagers, PDAsPDAs
Display Varies Widely Display Varies Widely From Device to DeviceFrom Device to Device
WML tags lack consistency WML tags lack consistency across different across different manufacturersmanufacturers
WML CodingWML Coding
WML Based on a WML Based on a Deck of Cards -- the Deck of Cards -- the device only shows 1 device only shows 1 card at a timecard at a time
Cards in a Deck can Cards in a Deck can Interact with other Interact with other Cards in Deck and Cards in Deck and Cards in External Cards in External DecksDecks
WML CodingWML Coding
All WML documents MUST have a specific headerAll WML documents MUST have a specific header The Deck is delimited by the <wml> . . . </wml> tagThe Deck is delimited by the <wml> . . . </wml> tag
<?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="main" title="First Example">
<p>Hello World!</p></card>
</wml>
Entering TextEntering Text
Cards are delimited by the <card> . . . </card> tagsCards are delimited by the <card> . . . </card> tags All Text within a card must be placed in <p> . . . All Text within a card must be placed in <p> . . .
</p> tags</p> tags<wml>
<card id="main" title="Hello World">
<p>
My First WML Card! (a.k.a. Hello World!)
</p>
</card>
</wml>
WML Anchors (links)WML Anchors (links)
Similar to HTML linksSimilar to HTML links <a href=“address”> text </a><a href=“address”> text </a> Use # to reference a card (e.g. href = “#myCard”). Use # to reference a card (e.g. href = “#myCard”).
Otherwise, will go to the first card in a deckOtherwise, will go to the first card in a deck<wml>
<card id="main" title=“Link Example">
<p>
<a href="#anotherCard">
My First link
</a>
</p>
</card>
</wml>
WML sample SiteWML sample Site
<?xml version="1.0"?><?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN""http://www.wapforum.org/DTD/wml_1.1.xml">"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml><wml> <template><template>
<do type="accept" label="Find a Person"><do type="accept" label="Find a Person"> <go href="#search" /><go href="#search" /></do></do>
<do type="accept" label="School Info"><do type="accept" label="School Info"> <go href="#schools" /><go href="#schools" /></do></do>
<do type="accept" label="My CMU email"><do type="accept" label="My CMU email"> <go href="#login" /><go href="#login" /></do></do>
</template></template>
WML sample site (cont.)WML sample site (cont.)
<card id="main" title="Welcome to CMU"><card id="main" title="Welcome to CMU">
<p><p>
Welcome to CMU <br/>Welcome to CMU <br/>
<a href="#search">Find a Person</a> <a href="#search">Find a Person</a> <br/><br/>
<a href="#schools">School Info</a> <br/><a href="#schools">School Info</a> <br/>
<a href="#login">My CMU email</a><a href="#login">My CMU email</a>
</p></p>
</card></card>
WML Sample Site (cont.)WML Sample Site (cont.)
<card id="search" title="Find Someone at CMU"><card id="search" title="Find Someone at CMU">
<p><p> Find Someone at CMU <br/>Find Someone at CMU <br/> First Name: <input name="f_name" /> <br/>First Name: <input name="f_name" /> <br/> Last Name: <input name="l_name" />Last Name: <input name="l_name" /></p></p>
<p><p> <anchor><anchor> SubmitSubmit <go method="post" href="http://www.cmu.edu/search.jsp"><go method="post" href="http://www.cmu.edu/search.jsp">
<postfield name="f_name" value="$(f_name)" /><postfield name="f_name" value="$(f_name)" /><postfield name="l_name" value="$(l_name)" /><postfield name="l_name" value="$(l_name)" />
</go></go> </anchor></anchor></p></p>
</card></card>
WML Sample Site (cont.)WML Sample Site (cont.)
<card id="schools" title="Info on the Schools"><card id="schools" title="Info on the Schools"><p><p>Select the School:Select the School:<select title="school"><select title="school"> <option>CFA</option><option>CFA</option> <option>GSIA</option><option>GSIA</option> <option>Heinz</option><option>Heinz</option> <option>HSS</option><option>HSS</option> <option>MISM</option><option>MISM</option></select></select>
<anchor><anchor> Get InfoGet Info <go method="post" href="http://www.cmu.edu/school.jsp"><go method="post" href="http://www.cmu.edu/school.jsp">
<postfield name="school" value="$(school)" /><postfield name="school" value="$(school)" /> </go></go> </anchor></anchor>
</p></p> </card></card>
WML Sample Site (cont.)WML Sample Site (cont.)
<card id="login" title="Login to Check Mail"><card id="login" title="Login to Check Mail"><p> <p> Login to Check eMail <br/>Login to Check eMail <br/>
User ID: <input name="user_id" /> <br/>User ID: <input name="user_id" /> <br/>Pass: <input name="passw" /> <br/>Pass: <input name="passw" /> <br/>
<anchor><anchor> LoginLogin <go method="post" href="http://www.cmu.edu/login.jsp"><go method="post" href="http://www.cmu.edu/login.jsp">
<postfield name="user_id" value="$(user_id)" /><postfield name="user_id" value="$(user_id)" /><postfield name="passw" value="$(passw)" /><postfield name="passw" value="$(passw)" />
</go></go></anchor></anchor></p></p>
</card></card>
</wml></wml>