[Cover] [Previous Section] [Next Section] [Index]

Current chapter: Introduction to HDML Structure and Syntax
Section 9 out of 35 total sections , Section 3 out of 10 sections in this chapter


Cards and decks

The smallest unit of HDML an UP.Link service can send to a phone is a deck1. A deck contains one or more cards, each of which specifies a single interaction between the phone and the user. HDML currently supports the following types of cards:

When a phone receives a deck, it normally goes to the first card in the deck. It displays the information the card provides and allows the user to respond to it. Depending on the card type, the user can respond by entering text or choosing an option, and then pressing a function key.



Example

The following HDML statements are an example of an HDML deck containing two display cards. When a phone loads this deck, its display appears similar to the display at the top of Figure 1-2. If the user presses ACCEPT (the softkey below the OK label), the phone display appears similar to the display at the bottom of Figure 1-2. Following Figure 1-2 is a line-by-line description of the HDML.

1    <HDML VERSION="3.0">
2        <DISPLAY>
3            <ACTION TYPE=ACCEPT TASK="GO" DEST="#card2">
4            The Queen said: Off with her head!
5        </DISPLAY>
6        <DISPLAY NAME="card2">
7            Alice said: You're nothing but a deck of cards.
8        </DISPLAY>
9    </HDML>

FIGURE  1-2.     HDML deck with two cards


Line 1

This line defines the header of the HDML deck. All HDML decks must begin with an <HDML> tag and end with an </HDML> tag.

Most HDML tags, such as the <HDML> tag, allow you to specify options. Options take the form, OPTION=value, where OPTION is the option name and VALUE is an alphabetic or numeric value that you specify. Some options, such as the VERSION option in the HDML tag, are required. Option syntax is described in more detail in the following section.


Line 2

This line defines the header of the first display card. Like HDML decks, cards require begin and end tags (for example, <DISPLAY> and </DISPLAY>).


Line 3

This line defines an action, which specifies what the phone should do when the user presses a specified function key. The TYPE option identifies the key (ACCEPT), the TASK option identifies what the phone should do (go to another deck or card), and the DEST (destination) option identifies where to go (the card named card2).


Line 4

This line provides the text that is displayed on the phone.


Line 6

This line defines the header of the second display card. It uses the NAME option to specify the card's name. Although the NAME option is not required, it is necessary to specify a name so that other cards can reference the card as a destination.


[Cover] [Previous Section] [Next Section] [Index]

Current chapter: Introduction to HDML Structure and Syntax
Section 9 out of 35 total sections , Section 3 out of 10 sections in this chapter


1 The UP.Link and the UP.Phone support several content types besides HDML decks. A service can use one of these types, the UP.Link digest, to send multiple HDML decks to an UP.Phone in a single transmission. UP.Link digests and other content types are beyond the scope of this manual. For more information about them, see the UP.SDK Developer's Guide.
Copyright © 1999, Unwired Planet, Inc. All rights reserved.