Page 67 - DCAP512_WAP_AND_WML
P. 67
Unit 5: Understanding WAP in WML
The <prev> task represents the action of going back to the previous card. Notes
<?xml version=”1.0"?>
<!DOCTYPE wml PUBLIC “-//WAPFORUM//DTD WML 1.1//EN”
“http://www.wapforum.org/DTD/wml_1.1.xml”>
<wml>
<card>
<p>
<anchor>
Previous Page
<prev/>
</anchor>
</p>
</card>
</wml>
Did u know? What is the Markup Basics?
Markup rules closely follow the same rules of any markup language.
Should use start and end tags.
Utilize attributes within tags to control their effect.
Additional white space is ignored.
There are some variations.
WML tags and attributes are case-sensitive and MUST be lowercase.
Syntax must be followed.
Refresh Task
The <refresh> task refreshes some specified card variables. If any of the variables are shown on
the screen, this task also refreshes the screen.
Example: The example below uses an <anchor> tag to add a "Refresh this page" link to
the card. When the user clicks on the link, he or she refreshes the page and the value of the
variable x will be set to 30:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card>
<p>
<anchor>
LOVELY PROFESSIONAL UNIVERSITY 61