Embedded Systems October 2000 Vol13_11

Issue link:

Contents of this Issue


Page 51 of 181

Every language has a syntax and syntax elements. WML specifies several syntactic units. specified witllin a tag. The general form of an attribute within a tag is . The FIGURE 1 WAP transaction sequence WAP Client WAP Proxy Request via binary WML (byte codes) Uncompressed HTIP request --~ , accessed via " CGI scripts, , etc. WML Binary content (byte codes) If content delivered in HTML, then converted to WML by HTML filter. Web Server important things to watch for is tlle lack of white space between the attr keyword and the equal sign. The value associated witll attr must be enclosed in double quotes. Comme nts are identified by pars- ing an exclamation point and two minus signs as tile first characters after a . left angle bracket. Comments are ended by two minus signs and a right angle bracket. The form is . WML also allows variables in cards and decks. Variables are identified by a single dollar sign, $, fo llowed by the variable name. Variables can be of the form $identi- fier, $(identifier), or $(identifi- er:conversion). A simple WML deck One of the simplest forms for a WML deck is a single card with a text prompt: within a deck and to conu"ol execution ofWML scripts. WML structure and transactions WML u"ansmissio ns usually on glllate at the WAP client, or user agent. The user agen t makes a request via binary WML byte codes. The request is typi- cally a URL. A WAP prm. 'Y takes the binary byte codes and uncompresses them. The uncompressed WML request is then translated to an HTTP request. The proxy issues th e request to a Web server via uncompressed HTTP. Content is accessed at the se rv- er, returning HTML or other data accessed on the Web server via CGl scripts. The content delivered from the server is HTML or WML, if the Web server is WML-savvy. At the WAP p roxy, the incoming HTML is converted to WML by an HTML fil ter, then compressed into binary byte codes. If the incoming content from the Web server is already in WML, only compression takes place. The content is delivered to the WAP client and the use r agent displays the new conten t, which is usually a new card . The e ntire transaction sequence is shown in Figure 1. With all this activi ty and the inhe re ntly slow data rate of wi re less devices, one comes to apprecia te the min i ma l nature and design of WML. WML syntax elements Every language has a syntax and syn tax elements. WML specifies several syn- tactic units. These are entities, elements, attributes, comments, and variables. An entity is defin ed as a self contained uni t. WML contains two types of enti- ties: numbers and characte rs. Elements defin e all deck information , and are delimited by tags. Tags are similar to tags in HTML. The structure is information_content . If thel"e is no content, then the tag form is . Attributes are valu es associa ted with tags. WML tags have defaul t val- ues. If additional o r specific informa- tion must be associated with a tag, tllen an attribute value needs to be 50 OcrOBER 2000 Embedded Systems Programming

Working with WAP

A \VML deck is enclosed by th e tags and . This de notes the beginning and ending of a deck, while and denote the begin- ning and ending of a card. The


denote a paragraph, and the enclosed text, "Wo rking witll WAP," is displayed. This is an entirely static example deck, witll no provision for user input, and no soft keys specified . The most common construct for assigning soft keys and taking action is the ele- ment. A typical statement could be . This tag, like tlle others, must be ter- minated, in tllis case, with a . The type="ACCEPT" part of tile state- ment indicates an actio n type. The

Articles in this issue

Archives of this issue

view archives of EETimes - Embedded Systems October 2000 Vol13_11