Although the syntax of HDML is similar to that of Hypertext Markup Language (HTML), HDML is not a true markup language. It is a set of commands or statements that specify how a handheld device, such as a wireless phone, interacts with a user.
HDML statements display information on a phone and specify how the phone responds to user input. For example, an HDML statement can instruct a phone to display text and, based on the user's input, either display additional text or send a request to the UP.Link server.
Because HDML can be used on a variety of handheld devices, with significantly different capabilities, it is defined with respect to a reference, or abstract, phone. The abstract phone has the following minimum feature set:
The phone can also support optional features such as variable-width characters, ISO Latin-1, and Unicode character sets; bold and italic characters; and bitmap graphic display.
Many examples in this manual and other UP.SDK documentation include phone displays similar to the one in Figure 1-1. In these displays, the ACCEPT key label always appears in the lower left-hand corner and the first soft key (SOFT1) label appears at the bottom-center of the display. On some phone models, these keys might be reversed, or they might be both be implement with an entirely different input device, such as a thumbwheel.
The PREV key and non-programmable keys (such as the arrow keys and the numeric keys) are not shown in the examples, because their labels are not programmable; they appear on the keys themselves and not the phone display.
FIGURE 1-1. The ACCEPT and SOFT1 softkey labels
The HDML character set includes all printable 8-bit characters and white space.
In HDML, white space is defined as the following characters.
Except where specifically noted, the HDML compiler ignores white space beyond a single character. For example, the following HDML code:
3.0>< DISPLAY> <WRAP>Some text 3.0> The HDML compiler and the UP.Phone ignore case in HDML keywords. By convention, UP.SDK manuals and sample code capitalize HDML keywords, such as tags and options, so you can distinguish them from variable names and other text that you provide. However, this is only a style convention, which you can ignore when you write your own HDML.
mycard and Mycard are different.
HDML 3.0 and the 3.0 UP.Link platform support multiple character sets. To ensure that it correctly transmits and receives data in a character set that it understands, an HDML application must do the following:
charset parameter in the HTTP header of each entity that contains text that will be displayed by the UP.Phone--that is, for each HDML deck and each alert
METHOD=POST and POSTDATA options in all tasks that return data.
ACCEPT-CHARSET task option in tasks that return data.
For more information and a complete discussion of character set and internationalization issues, see the UP.SDK Developer's Guide.
The following are valid values for the HTTP charset parameter and the ACCEPT-CHARSET task:
Some devices display only a limited set of characters in softkey labels. For example, the Qualcomm "Q" phone displays only the following: