1 Dickson K.W. Chiu PhD, SMIEEE Thanks to Prof. S.C. Cheung (HKUST) CSIT600b: XML Programming WML
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.
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: Welcome to MTM515!! Emulator -
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!!
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" " This is bold This is Italic This is Underline This is Big text Small Text This Is STRONG
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" " Next tutorial. Continue Tutorial Welcome To part 2 Here the tutorial continues
Dickson Chiu-2004CSIT600b 03-7 WML – Three Cards <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" " Tutorials Want to see a Joke. Are how about a <a href="#pic">Picture.
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
Dickson Chiu-2004CSIT600b 03-9 WML - Table Cell 1 Cell 2 Cell 3
Dickson Chiu-2004CSIT600b 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" " Next page
Dickson Chiu-2004CSIT600b WML - Input <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" " A: B: C:
Dickson Chiu-2004CSIT600b WML - Select <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" " HTML Section XML Section WAP Section
Dickson Chiu-2004CSIT600b WML - Refresh <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" " Refresh This Page
Dickson Chiu-2004CSIT600b WML - Timer <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" " Some Message
Dickson Chiu-2004CSIT600b 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)
Dickson Chiu-2004CSIT600b WML - Posting to the Server <!DOCTYPE wml PUBLIC "-//PHONE.COM//DTD WML 1.1//EN" " Weather Page Zip? Query? time & temp all fields all fields format
Dickson Chiu-2004CSIT600b Generating WML with XSLT <xsl:for-each select="/hsiComponents/component"> CHEUNG KONG CHEUNG KONG …
Dickson Chiu-2004CSIT600b WAP Emulator Paste URL to WAP emulator: 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 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: 521,00.html 521,00.html