Views

Difference between revisions of "optiPoint application module Programming WML applications"

The Wiki of Unify contains information on clients and devices, communications systems and unified communications. - Unify GmbH & Co. KG is a Trademark Licensee of Siemens AG.

Jump to: navigation, search
(WML Basic Structure: Deck, Card)
(WML Basic Structure: Deck, Card)
Line 164: Line 164:
  
 
*    <pre>
 
*    <pre>
 
 
:This element specifies that line breaks are only determined by the control characters of the character set used. If the WML code contains several consecutive blanks within <tt><pre></tt> tags, these will be displayed.
 
:This element specifies that line breaks are only determined by the control characters of the character set used. If the WML code contains several consecutive blanks within <tt><pre></tt> tags, these will be displayed.
 
The browser responds to the line breaks in the WML document and also displays several consecutive blanks. Tabs are displayed as horizontal spaces only slightly wider than blanks. In addition, please note that the basic function of the tab - justification - is ignored. If a tab is inserted between two characters or strings of characters, the horizontal positioning of the haracters after the tab does not only depend on the length of the tab but also on the starting position of the tab.
 
The browser responds to the line breaks in the WML document and also displays several consecutive blanks. Tabs are displayed as horizontal spaces only slightly wider than blanks. In addition, please note that the basic function of the tab - justification - is ignored. If a tab is inserted between two characters or strings of characters, the horizontal positioning of the haracters after the tab does not only depend on the length of the tab but also on the starting position of the tab.
 
  
 
Lines are wrapped automatically if they are longer than the width of the browser window. The display area is not extended by using a horizontal scroll bar. Please also note the behaviour of the browser in case a <tt><pre></tt> element follows a <tt><p></tt> element: The content of the <tt><pre></tt> element is separated from the content of a previous <tt><p></tt> element with a horizontal offset that is bigger than a normal line break.
 
Lines are wrapped automatically if they are longer than the width of the browser window. The display area is not extended by using a horizontal scroll bar. Please also note the behaviour of the browser in case a <tt><pre></tt> element follows a <tt><p></tt> element: The content of the <tt><pre></tt> element is separated from the content of a previous <tt><p></tt> element with a horizontal offset that is bigger than a normal line break.

Revision as of 09:39, 21 August 2006

WML Basic Structure: Deck, Card

The organization of WML documents is fundamentally different from the way HTML documents are organized. In case of HTML documents, one page is loaded and displayed completely in the browser at a time. Using labeled anchors (<a name="NAME">), it can be separated into fragments that the user can select via hyperlinks. In this case the browser scrolls down/up to the correct position. An HTML page is equivalent to a file. In WML, however, the deck is the superior unit, containing one or more card elements. A WML card conforms to an HTML page insofar as it is displayed completely in the browser. The syntax for navigating between the individual cards of a deck is similar to the syntax used for navigating between HTML fragments. The technical background for this is that in case of mobile terminal devices (the main consumers of WAP pages) the latency for requesting new data from the server is relatively high.

  • <wml>
This is the root element of a WML deck. It can contain any number of <card> elements.
  • <head>
This element is a container for the specifications in the <meta> and <access> tags.
  • <meta>
This element provides various meta statements about the WML document currently :loaded
in the browser. Please note that certain attributes only make sense when used :in combination
with others, e.g. <meta http-equiv="Cache-Control" :content="nocache"/>.
This results in special formats for the following statements:
http-equiv:
Value Value of content Function
Cache Control no-cache

max-age=time in seconds

This combination of attributes has no impact on the browser behaviour. (However, a deck is re-loaded anyway every time it is accessed.)
Value of name Value of content Function Comments
author keywords ... CDATA Using this combination, some

general attributes that shall not be displayed in the browser can be included with the document. Example: name="author" content=" John Doe".

The user can select any value for name and thus is free to define his own description categories.
forua:
Value Function
true false Using the boolean values “true“ or “false“ you can determine whether the meta statements shall be sent to the browser or not.
  • <access>
This element defines the access rights for the WML element using the attributes domain and path. The element is supported with its specific attributes domain and path.
Attribute Value Function Comments
domain Url The value of this attribute determines from which domain the current deck may be accessed. Example: "http://www.siemens.com" If the access is denied, the browser issues the error code 801.
path Pfad Using this attribute, the URL from which the deck can be accessed can be specified in more detail. The path statement is relative to the Document Root directory of the specific domain. Example: /wap
  • <card>
This element provides a container for the actual content. A WML document or deck can contain several <card> elements. A WML card is equivalent to an HTML page insofar as a WAP browser will always display only one card from a deck. Using the id attribute, you :can directly jump to the individual.
Attribute Value Function Comments
newcontext true false The presetting is “false“. If the value is set to “true“, the user entries are deleted.
ordered true false The presetting is “true“. This value determines that the content will be displayed in a pre-defined order. The browser will always display the content in the predefined order, no matter whether this attribute is available and what value it is set to.
title CDATA The title is displayed in the system bar.
onenterbackward Url This URL is accessed if the user accessed the current <card> via a <prev> task.
onenterforward Url This URL is accessed if the user accessed the current <card> via a <go> task or via a standard hyperlink (<a href>.
ontimer Url The URL specified in this attribute is accessed if the time set in the corresponding <timer /> element has expired.
id ID The id attribute is necessary to make a card a target for a reference/jump. To generate a hyperlink to a specific card, the URL statement has to contain the id together with the prefix #, e.g.: <a href="#card1"></a>
  • <template>
The <template> element serves as a container for <do> and <onevent> elements and is positioned above the <card> level. The statements included apply to all cards of the WML document. Using the specific attributes onenterforward and onenterbackward you can determine the behaviour of the individual cards.
Attribute Value Function Comments
align left The content is displayed right-aligned.
right The content is displayed right-aligned. The distance to the right border of the display area is bigger than the minimum distance of a line end to the right border.
center The content is displayed centered.
mode wrap Default setting: If the end of the display area is reached, a line break is produced.
nowrap No line break is produced. The display area is extended as required.
This element specifies that line breaks are only determined by the control characters of the character set used. If the WML code contains several consecutive blanks within <pre> tags, these will be displayed.

The browser responds to the line breaks in the WML document and also displays several consecutive blanks. Tabs are displayed as horizontal spaces only slightly wider than blanks. In addition, please note that the basic function of the tab - justification - is ignored. If a tab is inserted between two characters or strings of characters, the horizontal positioning of the haracters after the tab does not only depend on the length of the tab but also on the starting position of the tab.

Lines are wrapped automatically if they are longer than the width of the browser window. The display area is not extended by using a horizontal scroll bar. Please also note the behaviour of the browser in case a <pre> element follows a

</tt> element: The content of the <tt><pre></tt> element is separated from the content of a previous <tt><p></tt> element with a horizontal offset that is bigger than a normal line break.