OUI

1.7 What is a WML deck of cards ?

WML "pages" or WML documents are referred to as decks. Each deck consists of one or more cards. Each deck begins and ends with the <wml> tag, and each card begins and ends with the <card> tag.

When the WML micro browser accesses a WML document (or deck), it reads the whole deck, and navigation between the cards in this deck is done without the need to load any more data. This is important to know, because once you've loaded a deck, all cards within it stays (statically) in the WML micro browser memory until the browser is instructed to reload the whole deck.

If you are familiar with the <a name> tag of HTML, <card> tags of WML is very similar.

<wml>
  <card id="start_menu">
    ...some code...
  </card>
  <card id="purchase">
    ...some more code...
  </card>
</wml>

Decks and cards are accessed this way: [deckname][#cardname]. If the deckname is omitted, the browser will look for a card named cardname within the deck currently in memory. If the #cardname is omitted, the browser will load the deck called deckname and jump to the first card in the deck. If you include both deckname and #cardname, the browser will load the deck called deckname and jump to the card called #cardname. In other words pretty much the same way the HTML <A NAME> tag works.

Related information

Chapter 1 in "Professional WAP" from Wrox

[ Main ]   [ 01 - General ]