Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Dickson K.W. Chiu PhD, SMIEEE Thanks to Prof. S.C. Cheung (HKUST) CSIT600b: XML Programming WML.

Similar presentations


Presentation on theme: "1 Dickson K.W. Chiu PhD, SMIEEE Thanks to Prof. S.C. Cheung (HKUST) CSIT600b: XML Programming WML."— Presentation transcript:

1 1 Dickson K.W. Chiu PhD, SMIEEE Thanks to Prof. S.C. Cheung (HKUST) CSIT600b: XML Programming WML

2 Dickson Chiu-2004CSIT600b 03-2 Wireless Application Protocol (WAP) Leading standard for information services on wireless terminals like digital mobile phones. Based on Internet standards (HTML, XML and TCP/IP). Consists of WML language specification a WMLScript specification a light JavaScript language not embedded in the WML pages WML pages only contains references to script URLs need to be compiled into byte code on a server a Wireless Telephony Application Interface (WTAI) specification Published by the WAP ForumWAP Forum founded in 1997 by Ericsson, Motorola, Nokia, and Unwired Planet Forum members now represent over 90% of the global handset market, as well as leading infrastructure providers, software developers and other organizations.

3 Dickson Chiu-2004CSIT600b 03-3 Wireless Markup Language (WML) WML based on XML and HTML. WML documents are divided into a set of cards, each representing one unit of interaction between the user and the user agent. Instructions embedded within cards may invoke services on origin servers. Several cards are grouped into a deck, the basic WML unit, that origin server can send to a user agent. See: http://www.w3schools.com/wap/default.asp http://www.w3schools.com/wap/default.asp Welcome to MTM515!! Emulator - http://ttemulator.com/

4 Dickson Chiu-2004CSIT600b 03-4 WML – One Card Text is specified inside p element.p A card can have none, one or several p elements.p Element br indicates start of a new line.br Welcome to MTMI515!!

5 Dickson Chiu-2004CSIT600b 03-5 WML – Font Style Text emphasis elements em, strong, b, i, u, big, small - meanings equivalent to HTML counterparts.emstrongbiubig small <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> This is bold This is Italic This is Underline This is Big text Small Text This Is STRONG

6 Dickson Chiu-2004CSIT600b 03-6 WML – Two Cards Attributes id in card elements serve as anchor for intercard links.card <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> Next tutorial. Continue Tutorial Welcome To part 2 Here the tutorial continues

7 Dickson Chiu-2004CSIT600b 03-7 WML – Three Cards <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> Tutorials Want to see a Joke. Are how about a <a href="#pic">Picture.

8 Dickson Chiu-2004CSIT600b 03-8 WML – Three Cards Joke's 1. What do you get if you cross an owl with a skunk? A. bird that smells but doesn't give a hoot !!!!!!!! 2.Why did the rooster cross the road? A. To prove he wasn't chicken !! Picture

9 Dickson Chiu-2004CSIT600b 03-9 WML - Table Cell 1 Cell 2 Cell 3

10 Dickson Chiu-2004CSIT600b 03-10 WML – Anchor Always has a task ("go", "prev", or "refresh") specified. The task defines what to do when the user selects the link. <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> Next page

11 Dickson Chiu-2004CSIT600b 03-11 WML - Input <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> A: B: C:

12 Dickson Chiu-2004CSIT600b 03-12 WML - Select <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> HTML Section XML Section WAP Section

13 Dickson Chiu-2004CSIT600b 03-13 WML - Refresh <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> Refresh This Page

14 Dickson Chiu-2004CSIT600b 03-14 WML - Timer <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> Some Message

15 Dickson Chiu-2004CSIT600b 03-15 WML - Variables Specify a variable with the Setvar command Specify a variable through an input element (like input, select, option, etc.) HTML Tutorial XML Tutorial To use the variable we created in the example above: You selected: $(opt)

16 Dickson Chiu-2004CSIT600b 03-16 WML - Posting to the Server http://www.topxml.com/wap/articles/wml_jsp/default.asp <!DOCTYPE wml PUBLIC "-//PHONE.COM//DTD WML 1.1//EN" "http://www.phone.com/dtd/wml11.dtd"> Weather Page Zip? Query? time & temp all fields all fields format

17 Dickson Chiu-2004CSIT600b 03-17 Generating WML with XSLT http://kwchiu.dyndns.org:7999/xslt3.xsl <xsl:for-each select="/hsiComponents/component"> CHEUNG KONG 64.00... CHEUNG KONG 64.00 …

18 Dickson Chiu-2004CSIT600b 03-18 WAP Emulator http://www.gelon.net/ Paste URL to WAP emulator: http://kwchiu.dyndns.org:7999/html2dom/result?s ourceURL=http%3A%2F%2Ffinance.yahoo.com% 2Fq%2Fcp%3Fs%3D%5EHSI&xslt1URL=http%3A %2F%2Fkwchiu.dyndns.org%3A7999%2Fxslt1.xsl &xslt2URL=http%3A%2F%2Fkwchiu.dyndns.org %3A7999%2Fxslt3.xsl&submit=convert http://kwchiu.dyndns.org:7999/html2dom/result?s ourceURL=http%3A%2F%2Ffinance.yahoo.com% 2Fq%2Fcp%3Fs%3D%5EHSI&xslt1URL=http%3A %2F%2Fkwchiu.dyndns.org%3A7999%2Fxslt1.xsl &xslt2URL=http%3A%2F%2Fkwchiu.dyndns.org %3A7999%2Fxslt3.xsl&submit=convert More sophisticated development: http://www.forum.nokia.com/main/0,6566,034- 521,00.html http://www.forum.nokia.com/main/0,6566,034- 521,00.html


Download ppt "1 Dickson K.W. Chiu PhD, SMIEEE Thanks to Prof. S.C. Cheung (HKUST) CSIT600b: XML Programming WML."

Similar presentations


Ads by Google