Presentation is loading. Please wait.

Presentation is loading. Please wait.

WML Programming. What is WML WML Programming Wireless mark up language based on XML. Purpose:  to specify user interface behavior and  display contents.

Similar presentations


Presentation on theme: "WML Programming. What is WML WML Programming Wireless mark up language based on XML. Purpose:  to specify user interface behavior and  display contents."— Presentation transcript:

1 WML Programming

2 What is WML WML Programming Wireless mark up language based on XML. Purpose:  to specify user interface behavior and  display contents on wireless devices such as (phones), pagers, (PDAs)  WAP, WML --------------------------> WWW, HTML Purpose:  to specify user interface behavior and  display contents on wireless devices such as (phones), pagers, (PDAs)  WAP, WML --------------------------> WWW, HTML

3 What is WML WML Programming WML designed to support range of devices which have following characterstics  Small display size (relative to conventional personal computers)  Limited memory and CPU size  Low bandwidth WML designed to support range of devices which have following characterstics  Small display size (relative to conventional personal computers)  Limited memory and CPU size  Low bandwidth  WAP is an application communication protocol  WAP is used to access services and information  WAP is an application communication protocol  WAP is used to access services and information

4 WML Coding WML Programming 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 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 Deck card 1

5 WML Coding WML Programming  All WML pages must have a specific header.  The Deck is delimited by the... tag  All WML pages must have a specific header.  The Deck is delimited by the... tag <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">

6 WML Coding- Showing Text on Screen WML Programming  Cards are delimited by tag  Cards are delimited by 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=“one”> Hello World ! </card> </wml>

7 WML Programming <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> Hello World! Welcome to WAP School! Hello World ! Only one card is displayed at a time Result WML Coding- Showing Text on Screen

8 WML Programming WML Coding- Comments Comments not displayed in browser.

9 WML Programming WML Coding- Text Formatting emphasized strong bold italic underline big small normal emphasized strong bold italic underline big small

10 WML Programming WML Coding- Anchors Anchor tag used to redirect to another card. Syntax: link-name Syntax: link-name If target is another card then use # with card name. If target is another wml page then specify that file without #. Syntax: Syntax:

11 WML Programming WML Coding- Anchors Anchor tag used to redirect to another card. Syntax: link-name Syntax: link-name My First link

12 WML Programming Anchor execution Some links: News Sports Execution

13 WML Programming WML Input

14 WML Programming WML Input Input Fields Select & Option FieldSet

15 WML Programming Input Fields Name: Age: Sex: ----- Input ---------- Name: Age : Sex : Syntax: text Only Numbers can be entered. * represent unlimited digit.

16 WML Programming A: Any symbolic or uppercase alphabetic character (no numbers) a: Any symbolic or lowercase alphabetic character (no numbers) N: Any numeric character (no symbols or alphabetic characters) X: Any symbolic, numeric, or uppercase alphabetic character (not changeable to lowercase) x: Any symbolic, numeric, or lowercase alphabetic character (not changeable to uppercase) M: Any symbolic, numeric, or uppercase alphabetic character (changeable to lowercase)--for multiple character input, defaults to uppercase first character m: Any symbolic, numeric, or lowercase alphabetic character (changeable to uppercase)--for multiple character input, defaults to lowercase first character To limit the number of characters users can enter, you can specify a single digit number before the character tag--for example, format="3X" lets user enter a maximum of three symbolic, numeric, or uppercase alphabetic characters. To let users enter an unlimited number of characters, specify an asterisk (*) before the character tag--for example, format="*a" lets the user enter any number of symbolic or lowercase alphabetic characters. Input Fields

17 WML Programming Select & Option HTML School XML School WAP School --- Selectable List 1--- HTML School XML School WAP School

18 WML Programming Select Syntax: <select title="label" multiple="boolean” name="variable” default="default" iname="index_var” ivalue="default” tabindex="n"> Syntax: <select title="label" multiple="boolean” name="variable” default="default" iname="index_var” ivalue="default” tabindex="n">

19 WML Programming content Option Syntax

20 WML Programming

21 FieldSet Title: Prize: ------- Fieldset-------- CD Info Title: Prize:

22 WML Programming WML Tasks

23 WML Programming WML tasks Go task Pre task Refresh task noop task

24 WML Programming go task  The element is a task element that instructs the device to open a specified URL.  If the URL specifies a particular card, the device displays that card.  If the URL specifies a deck, the device displays the first card in that deck.  The element is a task element that instructs the device to open a specified URL.  If the URL specifies a particular card, the device displays that card.  If the URL specifies a deck, the device displays the first card in that deck.

25 WML Programming Prev task  The element is a task element that instructs the device to remove the current URL from the history stack and open the previous URL.  If no previous URL exists on the history stack, specifying has no effect.  The element is a task element that instructs the device to remove the current URL from the history stack and open the previous URL.  If no previous URL exists on the history stack, specifying has no effect. Syntax: content where content represents the variables to set when opening the previous URL: content You can optionally specify one or more variables in a statement:

26 WML Programming tag Prev tag used to return to previously visited card. Return:

27 WML Programming Noop task  The element is a task element that instructs the device to do nothing, i.e. "no operation."  This element is useful for overriding deck-level elements, called shadowing  The element is a task element that instructs the device to do nothing, i.e. "no operation."  This element is useful for overriding deck-level elements, called shadowing The tag can be used to activate a task when the user clicks on a word/phrase on the screen. When the user clicks on the "Back" link, he or she should be taken back to the previous card. But the tag prevents this operation; when the user clicks on the "Back" link nothing will happen

28 WML Programming Refresh task The element is a task element that instructs the device to refresh the specified card variables. The device also refreshes the display if any of those variables are currently shown. The element is a task element that instructs the device to refresh the specified card variables. The device also refreshes the display if any of those variables are currently shown. Syntax content where content represents the variables to refresh: content You must specify at least one variable in a statement:

29 WML Programming Refresh task

30 WML Programming WML Variable

31 WML Programming Variables  Variables consist of a letter or underscore character, followed by zero or more letters, numbers or underscore.  WML variables are case sensitive.  A WML variable can be specified in various ways:  with a setvar command  through an input element  with a postfield command  The major use of variables is for forms  Variables consist of a letter or underscore character, followed by zero or more letters, numbers or underscore.  WML variables are case sensitive.  A WML variable can be specified in various ways:  with a setvar command  through an input element  with a postfield command  The major use of variables is for forms

32 WML Programming Variables-setvar tag Syntax: When someone executes a task (like go, prev, and refresh), the setvar element can be used to set a variable with a specified value.

33 WML Programming Variables-Using input field Variables can also be set through an input element (like input, select, option, etc.). The following example will create a variable named schoolname: HTML School XML School To use the variable we created in the example above: You selected: $(schoolname)

34 WML Programming Form Example Search for:

35 WML Programming


Download ppt "WML Programming. What is WML WML Programming Wireless mark up language based on XML. Purpose:  to specify user interface behavior and  display contents."

Similar presentations


Ads by Google