Building Decks of Cards
Thus far, each WML file we have created has contained a single card. As I mentioned earlier (and as was explained in Chapter 2), WML files can contain multiple cards—these files are known as decks (as in a deck of cards).
Each card in a deck must be uniquely named (unique within that deck). Cards are named using the <card> tag's id attribute, and id values may contain text and numbers (but no special characters).
When a deck is loaded the browser processes and stores all the contained cards and then determines which card to display:
If a specific card id was requested and that id is present, that card is displayed.
If no card id is specified, or the requested id does not exist, the first card in the deck is displayed. ...
Get WAP Development with WML and WMLScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.