Laynetworks  
Web laynetworks.com Google
Home | Site Map | Tell a friends
Management Tutorials
Download
Tutorials
History
Computer Science
Networking
OS - Linux and Unix
Source Code
Script & Languages
Protocols
Glossary
IGNOU
Quiz
About Us
Contact Us
Feedback
 
Sign up for our Email Newsletter
 
Get Paid for Your Tech Turorials / Tips

 

 

Home > Script & Languages > WML Elements
 
WML Elements
<< Back to Tutorial
This section lists all of the WML elements in alphabetical order, along with all their attributes (where relevant), a description of the function of each, and details of support for each element on four types of browser- Microsoft’s Mobile Explorer, Phone.com (UP.Browser), Nokia and Ericsson. The support of each element/attribute for each browser type will be represented by a 4-letter code in brackets after it’s description:

The first letter denotes support by Microsoft Mobile Explorer, and will be ‘M’ if it is properly supported, and ‘M’ if it is not.

The second letter denotes support by Up.Simulator, and will be ‘U’ if it is properly supported, and ‘u’ if not.

The third letter denotes support by Nokia (6110,6150and 7110), and will be ‘N’ if properly supported, ‘n’ if not.

The fourth letter denotes supported by Ericsson (our testing performed on the R380 simulator), and will be ‘E’ if properly supported, ‘e’ if not.

So, for example, an attribute supported by Up.Simulator and Ericssion, but not by Nokia or Microsoft would have (mUnE) after its description.

The last section of this appendix details with some specialized elements that are specific to the Up. Browser, and so consequently won’t be recognized by other microbrowsers. It is strongly recommended that you bear this in mind when considering the interoperability issues of your WML decks!

Universal Attributs

Ine more thing before we plung into the list-there are three attributes that can be applied to nearly every single element in this list, we will details them here:

Xml:lang Specifies the natural language for the elements and its contents.(MUNE)

Id Specifies the name of the element. (MUNE)

class Specifies the class name for the elment. (muNe)

So, unless specified otherwise in the individual element descriptions, these attributes can be applied to any element.

<a> Specifies a link to another card. (MUNE)

Attributes

href Specifies the destination URI- the name of the card to display.(MUNE)

title Specifies a brief text string identifying the link. (mUNE)

<access>

TOP

Allows the writer of the card to limit access to the document to only certain other cards, by location-domain and path. It is contained within <head> tags. (MUNE)

Attributes

Domain sets a domain that can access the card.(MUNE)

Path sets a path that can access the card.(MUNE)

<anchor>

Specifies an anchor.(MUNE)

Attributes

Title Specifies a brief text string identifying the link.(MUNE)

<b>

Specifies bold text.(MUNE)

Note

The Ericsson seems to display all text formatting (all of the tags listed in this appendix) as bold, except big. Text formatting doesn’t appear to work inside a link.

<big>

specifies large font text. (MUNE)

<br/>

tells the browser to add a line break to the text at the point the element is written. (MUNE)

<card>

specifies a single interaction between the user and the device.(mUNE)

attributes

title Specifies a label for the card.(MuNE)

newcontext Default is false, but if set to true, the current browser context is

re-initialized upon entry to this card and clears the navigational

history state, and tesets the implementation-specific state to a

default value (which may vary with browser). New context is only

performed as part of the go task.(MUNE)

ordered this attribute gives an indication to the user agent about how the card

content is organized. This indication can be used to organize the content

presentation or to otherwise influence the layout of the card.

If ordered = “true”, the card is naturally organized as a linear sequence

of field elements, for example, a set or questions or fields, which are

naturally handled by the user, in the order in which they are specified in

the group.

<do>

specifies a general mechanism for the user to act upon the current card. The action to do, when activating a do element can be specified by the elements go, prev, noop or refresh. See relevant sections.(MUNE)

Attributes

Type Specifies a hint to the microbrowser about the author’s intended use of the element. The table below shows the predefined do-types. (MUNE)

Do-type Description

Accept Positive Acknowledgement.

Prev Backward history navigation.

Help Request for help.

Reset Clearing or resetting state.

Options Request for options or additional operations.

Delete Delete item or choice.

TOP

Unknown Generic type.

“”(empty string) Equivalent to unknown.

x-*,X-* Experimental type.

Vnd.*, VND.* Vendor or user agent specific type of the kind vnd.co

-type where co is a company name and type is the do-

-type.

Label Specifies a text string suitable for dynamically labeling a

user interface component. (MUNE)

optional If this attribute value is true , the microbrowser can

ignore the element, otherwise it is set to “false” (the

default), and it is not allowed to.(MUNE)

name Specifies a name for the element. If a card level and a

deck level element will override the deck level

element.(MUNE)

<em>

Specifies emphasized text, in a very similar fashion to the effect of the <b> tag.(MuNE)

<fieldset>

When <fieldset> brackets are put around sections of paragraph content, it is supposed to tell the browser to separate them out into “subpanes”, to give the card a better look, and lay the information out in a more logical way. At the moment, browsers do not support it very well. They either completely ignore the element, or don’t display the text inside the tags. (mune)

<go>

( Specifies a task that navigates to a URI. Xml:lang is not an associated attributed. (MUNE)

Attributes

Href specifies the destination URI – the name of the card to display. (MUNE)

Sendreferer Defaults to false. If set to true, the user agent needs to specify the URI of the deck containing this task in the server-bound request. (mUNE)

Method specifies the HTTP request method, either get or post (MUNE)

Accept-charset must be followed by a list of character encodings for data thet the origin server must accept when processing input. (mUNE)

<head>

This element specifes an optional header for the wml document. It is used to contain<Access> and <meta> information that relates to whole document. (MUNE)

<i>

Specifies italicized text. (MuNE)

<img/> Specifies a picture to be inserted. (MUNE)

TOP

Attributes

Some of you may find that the behaviour of some of these attributes (paying particular attention to height and width) may differ on the emulators as compared to the real phones. For example, it was ound that the height and width attributes crashed on the nokia 7110 toolkit, but worked on the actual phone.

Src Specifies the URI for the image to display. If the localsrc attribute (see

below) specifies a valid icon, this attribute is ignored. (MUNE)

Alt Specifies the alternative text to display if the device does not support

images or neither the localsrc attribute or src attribute name a valid image.

(MUNE)

localsrc Specifies a predefined icon. If this attribute specifies a valid icon, the src

attribute and one of three values, “top” “middle” or “bottom”. (mUnE)

align Specifies how the image is aligned relative to the below the image.

(muNE)

vspace Specifies the white space to allocate above and below the image. (muNE)

hspace Specifies the white space to allocate to the left and right of the image. The

Up.Browser will only allow the amount specified in pixels. (mUNE)

height Specifies the suggested height for the image. (MuNE)

width Specifies the suggested width for the image,(MuNE)

<input/>

specifies a point that the user is prompted to enter text.(MUNE)

attributes

name The user will be prompted a name, which is then stored as a variable

specified in the attribute. E.g. name=”var1” will cause entered text to be

stored as variable var1. (MUNE)

value Allows you to set a default value for the entry, which the user can then

simply ok if they do not wish to change it. (MUNE)

type Sets the type of text entry. The default is text, which will allow normal

text entry. The other option is password. When this is chosen, text

entered will be replaced by asterisks out – a simple security option.

(MUNE)

title Suggests a title for the text entry screen, displayed when entering

text.(mUNE)

maxlength Sets a maximum length for entered strings. (MUNE)

format Sets a format that the entered text is forced to stick to,

e.g. format=“AA\-NNNN” states that the entered text has got to be “two

uppercase letters, followed by a dash, followed by four numbers”. See

chapter XXX for more details on the code system. (MUNE)

emptyok Simply states that it is ok for the user to not enter anything. (MUNE)

tabindex Allows you to set the mode of movement between input boxes, so that

the user could ‘tab’ between them, using specialized control keys.

(MUNE).

Size Specifies the width, in characters, of the input area. (MUNE)

<meta/>

General, normally browser specific meta data of any, data that describes the content of the document, and is both user and machine readable. It is contained within <head> tags. If the browser doesn’t understand this data, it simply ignores it. (mune)

Attribute

Content Sets the content type value. (mune)

Name gives the meta data a name. The user agent will ignore named meta

Data, and Network servers will not emit WML content named with

this attribute. (mune)

http-equiv Can be used in place of name, indicates that the data should be

interpretered as an HTTP header. Meta data named with this attribute

is converted to a WSP or HTTP response header if the content is

tokenized before arrival at the user agent. (mune)

forua Controls whether the meta data was intended to reach the user agent.

If true, it must do. If false, then it must be removed at an intermediate

stage. (mune)

scheme Specifies a form or structure that may be used to interpreted the data

value. (mune)

<noop>

TOP

Specifies that nothing should be done. (mune)

<onevent>

Declares that, when the event detailed by the attribute occurs, the action(s) contained within the tags will be taken. (MUNE)

Attribute
type Sets which type of event the code is waiting for to occur. The types are:-

“onenterbackward” – This waits for the user to go to the card backwards

(e.g. navigating backwards through the history stack), then executes the

action. (MUNE) “onenterbackward” – This wait for th euser to navigate

to the card forwards (in anyway except through the history stack), then

executes the action.(MUNE)

<OPTION>

A set of <option> tags is needed to specify each individual item in a list (see <select>). (MUNE)

Attribute
value Gives the option a shorthand value, e.g. an intial for a name. This value

can be given to a variable, or be used to set it’s option as the default

choice, using the <select> attributes name and value respectively. (MuNE)

index Gives the option an index number for it to be reffered to. The number can

be used to specify it’s option as the default choice in the list using the

<select> attribute ivalue, or it’s value can be given to a variable specified

by <select> attribute iname. (MuNE)

title a name can be given to each option in the list for the browser to display.

However, it dosen’t seem to work on most browsers and is rather

pointless anyway. (mUNE)

onpick Related to some of the <onevent> attributes, this attribut allows you

specify the id of a card to navigate to when you pick an option in a list.

(MUNE)

<optgoup>

Sets of <optgroup> brackets can be put around <options> in a <select> list. The effect

of this is breaking the list up into options in submenus. (mUNE)

Attribute
title Gives a title to each submenu, which is also the option that will represent

that submenu in the main menu. (mUNE)

<P>

Specifies a paragraph of text with alignment and line wrapping properties. The

up.browser never resets the alignment. (MUNE)

Attribute
align The three available values, “left”, “center”, and “right” specify line

alignment. If you do not specify the align attribute, the line is reset to

“left” alignment. (MUNE)

mode Has two possible values, “wrap” and “nowrap”, used to specify the line-

wraping mode. If you do not specify the mode value, the device uses the

last specified mode value. (MUNe)

<postfield>

Allows variables to other pages and scripts. (MUNE)

Attribute
name Give the value a name. (MUNE)

value Specifies which variable is to be posted by this particular element.

(MUNE)

<prew/>

Specifies navigation to the previous URI in the history. Xml:lang is not an associated

attribute. (MUNE)

<refresh/>

Specifies a refresh task, stating a need for an update of the user agent context as

specified by the contained <setvar> elements (see relevant section). User-visible side

effects of the update can occur during the processing of the <refresh>.(MUNE)

<select>

Allows the definition of a list, embedded in a card, to allow the user to choose inputs

from a list rather than having to type something in. (MUNE)

Attribute
name Sets variable name that will be assigned a value equal to the specified

value of the <option> that gets selected (see <option>). (MUNE)

iname Sets an index variable name that will be assigned the index value of the

<option> that gets selected.(MUNE)

value Allows a default selection to be specified by using the option’s

value.(MUNE)

ivalue Allows a default selection to be specified by using the option’s

index number.(MUNE)

title Allows you to give the list a title for the browser to display.

(mUNE)

TOP

multiple Has two values, true and false. The default is false, but if false

but if you specify true, the user will be able to select multiple

entries from the list.(MUNE)

tabindex Allows you to set the mode of movement between selection

boxes, so that user can ‘tab’ between them, using specialized

control keys. (MUNE)

<setvar>

Sets a variable. Can only be included inside <refresh> and <go> tags. (MUNE)

Attribute
name The value used will be the name given to the variable set. (MUNE)

value The value used will be the value given to the variable set. (MUNE)

<small>

Specifies text using a small font.(MuNE)

<strong>

Specifies strongly emphasized text. (MuNE)

<table>

Specifies a table.(MUNE)

Attributes

title Specifies a brief text string that may be used in the presentation of the

table.(muNE)

align Specifies the layout of text and images within the columns of the

table. The available settings are “left”, “center” and “right”. (“L”, “C”

and “R” will also work.) The default is “left”, or “l”. In the Nokia

Toolkit, excluding the 7110, this attribute seems to be obeyed, except

that it takes L, C and R as values only.(MUNE)

columns Specifies the exact number of columns in the table.(MUNE)

<td>

Used to define individual cell contents in each row of a defined table.(MUNE)

<timer/>

sets a timer that starts counting. Not much use on its own, but combine it with

<onevent type=”ontimer”>, to immediately see a useful application. (MUNE)

Attributes

value Sets the length of time to count, in tenths of seconds. (MUNE)

<tr>

Defines each row in an already defined table. (MUNE)

<u>

Specifies underlined text. (MUNE)

<wml>

Specifies a WML deck. (MUNE)

Up.Browser specific elements
If you want to use these elements, you must change the DOCTYPE header to the

following line:

<!DOCTYPE wm1 PUBLIC “-//PHONE.COM//DTD WML 1.1//EN”

“http://www.phone.com/dtd/wm111.dtd”>

<catch>

Specifies an exception handler.

Attribute
name Specifies which exception is to be handled in this particular instance. If

no name is specified, then any exception will be handled by this

<catch>.

Onthrow Tells the engine what to do if and when the exception occurs.

<exit>

Declares an exit task-the current context is then stopped.

<link/>

Carries out a very similar task to that of <a>; it declares a link to appear on the display

Attribute
href Specifes the URI for the link to navigate to.

sendreferer Defaults to false. If set to true, the user agent needs to specify the

URI of the deck containing this task in the server-bound request.

Rel Specifies what relationships exist between the deck containing the

link, and the card to be navigated to.

<receive/>

Receives data sent from another context.

Attribute
name Specifies the name of the variable to be received.

<reset/>

Clears all of the variables declared in the current context.

<send/>

Specifies a single variable to be sent to the relevant parameter block position.

Attribute
value Specifies which value to send.

<spawn>

Declares a spawn task-creates a child context, and spawns a URI.

Attribute
href Specifies the URI to be navigated to.

sendreferer Defaults to false. If set to true, user agent needs to specify to URI of

the deck containing this task in the server-bound request.

accept-charset Must be followed by a list of character codes for data that the

origin server must accept when processing input.

method Specifies the HTTP request method, either get or post.

onexit Specifies the URI to navigate to, upon completion of the child

context, through the performing of an exit action.

onthrow Specifies to URI the navigate to, upon termination of the child

context, through the performing of a <throw> action.

<throw>

Declares a throw task-that an exception should be raised at the current context.

Attribute
name Specifies the name of the correct exception to be raised.

 

TOP

 
Donation | Useful links | Link to Laynetworks.com | Legal | SharePoint Development
Copyright © 2000-2010 Lay Networks All rights reserved.