element allows you to specify columnar format. WML tables are similar to HTML tables but with fewer capabilities. When defining a table, you have to declare the number of columns, followed by some content. The content can include empty rows and columns.
Syntax ...row and data declarations
A t t ri bu t e s align
left | right | center
Specifies text alignment relative to the column. If you do not specify the align attribute, the text is automatically left-aligned. title
Specifies a label for the table.
columns
Required. Specifies the number of columns for the row set. Specifying a zero value for this attribute is not allowed.
I M P OR TA NT The UP.Browser does not support the align attribute. Tables are leftjustified regardless of the align attribute value specified.
54
WML Language Reference
UP.SDK Release 4.1
Elements and Attributes
2
Example 2-20. element Prague Today: Mostly sunny and cool. Tonight: Cold with chance of light rain.
< td > The element is used as a container to hold a single table cell data within a table row. Table data cells may be empty. The user agent should do a best effort to deal with multiple line data cells that may result from using images or line breaks.
Syntax | content |
where content represents text inside the table cell, or the or elements. content
You can specify either of the following elements in a element:
• •
UP.SDK Release 4.1
(see “” on page 26) (see “” on page 9)
WML Language Reference
55
2
Elements and Attributes |
< tr > The |
element is used as a container to hold a single table row. Table rows may be empty, in other words, all cells are empty.
Syntax content |
where content represents text inside the table cell, or the or elements.
< te mp la te > A WML deck may contain a element that defines deck-level event bindings, i.e. characteristics that apply to all cards in the deck. You can override these characteristics for a particular card by specifying the same event bindings within the definition (see “” on page 13).
Syntax content
where content represents the general action to take when particular events occur: content
You can specify either of the following elements in a template definition:
• •
(see “” on page 18) (see “” on page 37)
A t t ri bu t e s
56
onenter forward
Specifies the URL to open if the user navigates to a card through a task. This attribute represents an abbreviated form of the element (see “Binding a task to an event” on page 15).
onenter backward
Specifies the URL to open if the user navigates to a card through a task. This attribute represents an abbreviated form of the element (see “Binding a task to an event” on page 15).
ontimer
Specifies the URL to open if a specified element expires. This attribute represents an abbreviated form of the element (see “Binding a task to an event” on page 15).
WML Language Reference
UP.SDK Release 4.1
Elements and Attributes
2
< th row> The element declares a throw task, indicating that an exception should be raised. Values may be sent to the exception handler with elements included in the throw. Throwing an exception terminates the current context and causes the context to be destroyed, including any variable and history state contained in the context. If the parent context does not contain an exception handler (a element) that matches this exception, or a element, the parent context is terminated and the exception is re-thrown to that context’s parent. This operation repeats until an exception handler is found or all parent contexts have been terminated. In the case where all contexts are terminated, the UP.Browser performs a reset to a predictable state. Typically, this clears the history stack and displays the home deck. For example, the following throws an exception with the name "user input error". In addition, a parameter block is included specifying more information about the error.
Syntax
A t t ri bu t e s name
Required. Specifies the name of the exception. This name is used to find the correct handler for the exception. The name attribute value is case sensitive.
N OT E See “” on page 16 for example code.
UP.SDK Release 4.1
WML Language Reference
57
2
Elements and Attributes
< ti me r> The element provides a method for invoking a task automatically after some period of user inactivity. Any task or user action that activates the card starts the timer, and executing any task element stops it. You can only associate one task per timer, and you can only define one timer per card.
Syntax
A t t ri bu t e s name
The name of the variable in which the device stores the timer value. If the variable has no value when the timer is initialized, the device sets it to the value specified for the default attribute. The device sets this variable to either the current timer value when the user exits the card or 0 if the timer expires.
value
A string specifying the value for the variable specified by the key attribute. You must specify values in units of 1/10 seconds—so, for example, a value of 100 equals 10 seconds. Specifying a value of 0 disables the timer. If the name attribute already has a value when the timer is initialized, the device ignores the default attribute. If the name attribute does not already have a value, the device sets it to the value specified by the value attribute.
Example 2-21. element
The following example illustrates how a timer can initialize and reuse a counter. The device resets the timer to the value of the time variable each time the user navigates to the card. If time has no value, the device sets the timer to 5 seconds. When the timer expires, the device automatically displays the second card in the deck. Hello, Unwired World! ... ...
58
WML Language Reference
UP.SDK Release 4.1
Elements and Attributes
2
< u> The element specifies underlined text.
Syntax text
where text is the text to display in underlined font. I M P OR TA NT Support for this element is available when using version 4.0 or higher of the UP.Browser .
< wm l> The element specifies a WML deck.
Syntax content
where content represents the WML elements that define the actions of the deck.
A t t ri bu t e s xml:lang
Specifies the natural or formal language for the WML document. Specifying the xml:lang attribute overrides any other language specification for the document. See the formal XML specification “Extensible Markup Language (XML), W3C Proposed Recommendation,” at http://www.w3.org for more information about specifying a language value. The UP.Browser software does not currently support this attribute.
Example 2-22. element ... ...
UP.SDK Release 4.1
WML Language Reference
59
2
60
Elements and Attributes
WML Language Reference
UP.SDK Release 4.1
Chapter 3
3
WML Quick Reference
D e c k s a nd C a r ds Element
Syntax
content
content
content
content
<meta>
<meta name="name"| http-equiv="name" content="value" forua="true | false" />
Ti m e rs
UP.SDK Release 4.1
Element
Syntax
WML Language Reference
61
3
WML Quick Reference
Va ri a bl e s Element
Syntax
A n c ho re d Li n k s Element
Syntax
task text
task text
Events
62
Element
Syntax
task
task
WML Language Reference
UP.SDK Release 4.1
WML Quick Reference
3
Ta s k s Element
Syntax
(greater than)
'
’ (apostrophe)
"
" (quote)
&
& (ampersand)
$$
$ (dollar sign)
Non-breaking space
Soft hyphen
WML Language Reference
UP.SDK Release 4.1
Index
Symbols $$ (dollar sign) 6 & (ampersand) 6 ' (apostrophe) 6 > (greater than) 6 < (less than) 6 (non-breaking space) 6 " (quote) 6 (soft hyphen) 6, 66
A accept-charset attribute in spawn element 52 accept-charset attribute (go element) 23 access element 8, 24, 35 accesskey attribute in a element 7 in anchor element 9 in input element 29 a element 13 align attribute in img element 26 in p element 40 in table element 54 alt attribute (img element) 26
br element 12
C cache control 35 card element 13, 19, 36, 37, 56 card example 15 case in variable names 4 catch element 16 catch example 16 CGI variables escaping ampersands 6 character elements 6 character set, for WML 4 columns attribute in table element 54 content attribute (meta element) 35 D DOCTYPE, WML extensions 5 do element 13, 18, 23, 36, 44, 56 defining multiple do elements 20
dollar sign character ($), specifying in text 6 domain attribute (access element) 8
ampersand character (&), specifying in text 6 anchor element 9, 55
E
anchor example 10 apostrophe character (’), specifying in text 6 attributes, syntax for 5
em element 20 emptyok attribute (input element) 29
escaping, special characters 6
B b element 11 b example 11 big element 11 bold example 11 bookmarks, enabling and specifying URL 36
UP.SDK Release 4.1
WML Language Reference
67
Index
Examples 15 anchor element 10 b 11 binding a task to an event 15 binding a gotask to an event 15 bold element 11 card element 15 catch element 16 go element 23 head element 24 i element 25 img element 28 input element 31 link element 32 option element 40 prev element 42 prev element without content 42 refresh element 44 reset element 45 select element 47 send element 49 spawn element 52 table element 55 timer element 58 wml element 59 exit element 9, 18, 20, 37 extensions, Openwave 5 extensions to WML 16, 20, 31, 43, 45, 48, 51, 57
hspace attribute (img element) 26 http-equiv attribute (meta element) 35
I id attribute in card element 14 i element 25
i example 25 img element 13, 26, 55 embedded inside of do element 18 img example 28 iname attribute ( select element) 47 input element 12, 13, 21, 28 input example 31 intrinsic events ONCLICK 37 ONENTERBACKWARD 37 ONENTERFORWARD 37 ONTIMER 37 ivalue attribute (select element) 47 L label attribute ( do element) 19 less than character (), specifying in text 6
M maxlength attribute (input element) 30 meta element 8, 24, 35 method attribute in spawn element 52 method attribute (go element) 22 mode attribute (br element) 40 multiple attribute (select element) 46
H head element 8, 24, 35 head example 24 height attribute (img element) 26 href attribute in link element 32 in spawn element 52 href attribute (go element) 22
68
WML Language Reference
UP.SDK Release 4.1
Index
N name attribute in catch element 16 in do element 19 in input element 29 in meta element 35 in postfield element 41 in receive element 43 in select element 46 in setvar element 50 in throw element 57 in timer element 58 newcontext attribute (card element) 14
newline characters, in WML code 4 non-breaking space character, specifying in text 6 noop element 16, 18, 36, 37 notification 2 O onenterbackward attribute in card element 14 in template element 56 onenterforward attribute in card element 14 in template element 56 onevent element 13, 14, 15, 37, 39, 56 in catchelement 16 onexit attribute in spawn element 52 onpick attribute (option element) 39 onthrow attribute in catch element 16 ontimer attribute in card element 14, 58 in template element 56 Openwave extension, image element inside option 39 Openwave extension, image inside do element 18, 26
Openwave extensions 5, 16, 20, 31, 43, 45, 48, 51, 57 Openwave extensions DOCTYPE 5 optgroup element 38, 46 optional attribute (do element) 19 option element 37, 38, 39, 46, 47 option example 40 ordered attribute (card element) 14 P path attribute (access element) 8
UP.SDK Release 4.1
p element 13, 40 postfield element 41 prev element 9, 14, 16, 18, 37, 41, 50
prev example 42 prev without content example 42 property attribute (meta element) 35 Q quote character ("), specifying in text 6 R receive element 16 refresh element 9, 16, 18, 37, 44, 50
refresh example 44 rel attribute in link element 32 reset element 45 reset example 45 S scheme attribute (meta element) 35 select element 12, 13, 21, 39, 46
select example 47 send element 48 sendelement, embedding in exit element 20 send example 49 sendreferer attribute in link element 32 in spawn element 52 sendreferer attribute (go element) 22 setvar element 22, 41, 44, 50 size attribute (input element) 30 small element 50 soft (discretionary) hyphen, specifying in text 6, 66 source attribute (img element) 26 spaces, in WML code 4 spawn element 9, 16, 18, 37, 50, 51 spawn example 52 special characters specifying in text 6 specifying in URLs 6 strong element 54 T tabindex attribute (input element) 30, 47 table element 54
table example 55 tabs in WML code 4
WML Language Reference
69
Index
task elements 58 exit task 9, 18, 37 go task 9, 14, 16, 18, 22, 37 noop task 16, 18, 36, 37 prev task 9, 14, 16, 18, 37, 41 receive element 43 refresh task 9, 16, 18, 37, 44 spawnh task 9, 18, 37 spawn task 9, 18, 37 throw task 9, 18, 37 td element 55 template element 13, 19, 37, 56 text, using special characters 6 throw element 9, 18, 37, 57 timer element 13, 14, 37, 58 timer example 58 time to live (TTL), setting 35 title attribute in a element 7 in anchor element 9 in card element 14, 36 in fieldset element 21 in input element 29 in optgroup element 38 in option element 39 in select element 46 in table element 54 tr element 56 type attribute in do element 19, 37 in input element 29
vspace attribute (img element) 26
W white space, in WML code 4 width attribute ( img element) 26
WML character set 4 wml element 13, 59 wml example 59 WML language 1 WML services 2 X xml:lang attribute (wml element) 59
U u element 59 UP.Link platform overview 1 UP.Phone vii, 1
V value attribute in input element 29 in option element 39, 46 in select element 47 in send element 48 in setvar element 50 in timer element 58 value attribute (postfield element) 41
variables naming 4 referencing 6
70
WML Language Reference
UP.SDK Release 4.1
des documents recommandant
|