TML Application Development Guidelines: Service Business Unit Tuesday, 4 August 2009
TML Application Development Guidelines: Service Business Unit Tuesday, 4 August 2009
TML Application Development Guidelines: Service Business Unit Tuesday, 4 August 2009
TML Application Development
Guidelines
V3.0
Service Business Unit
Tuesday, 4 August 2009
Ingenico ‐ 190‐192 avenue Charles de Gaulle ‐ 92200 Neuilly‐sur‐Seine
Tél. 33(0)1 46 25 82 00 ‐ Fax 33 (0)1 47 72 56 95
Contents
Chapter 1: About this document ..............................................................................................................6
Target audience.........................................................................................................................6
Typographical conventions.....................................................................................................6
Related documents ...................................................................................................................6
Chapter 2: Overview of TML ....................................................................................................................7
TML and markup languages...................................................................................................7
TML and payment cards..........................................................................................................7
TML and CSS.............................................................................................................................7
Chapter 3: Design guidelines ...................................................................................................................8
Before designing an application .............................................................................................8
Defining TML screens ..............................................................................................................8
Organizing TML code ..............................................................................................................9
Split the code into several TML pages ..................................................................9
Comment your TML code. .....................................................................................9
Keep business logic separate from the presentation layer .................................9
Use volatile variables ............................................................................................10
User interface design..............................................................................................................10
Follow the navigation model ...............................................................................10
Design the navigation hierarchy..........................................................................11
Provide informative feedback for user actions ..................................................11
Perform a usability test .........................................................................................11
Presentation layer design ......................................................................................................11
Design for small‐sized terminal screens .............................................................11
Use tables carefully................................................................................................12
Optimizing connection with the host ..................................................................................12
Reduce the terminal‐host communication .........................................................12
Manage modem connection manually................................................................13
Chapter 4: Authoring in TML.................................................................................................................14
TML pages and screens..........................................................................................................14
Static and dynamic pages .....................................................................................14
URIs and TML ........................................................................................................14
URIs and data scopes ............................................................................................15
Special URI values .................................................................................................16
Application header ................................................................................................16
Screens and navigation .........................................................................................17
Displaying text .......................................................................................................20
Tables.......................................................................................................................20
Images .....................................................................................................................21
Variables and constants .........................................................................................................21
Types of variables ..................................................................................................21
Predefined variables..............................................................................................22
User‐defined variables ..........................................................................................22
Scopes of variables.................................................................................................22
Volatile and non‐volatile variables......................................................................23
Assigning values to variables...............................................................................24
Using variables.......................................................................................................24
Formatting and de‐formatting .............................................................................24
Casting TML variables ..........................................................................................25
Comparison of variables .......................................................................................27
Branching of the TML code ...................................................................................................27
Logs ..........................................................................................................................................28
TML Application Development Guidelines 2
Release 3.0.0.0
System log...............................................................................................................29
Accepting user input..............................................................................................................29
Pin entry..................................................................................................................29
Manual input..........................................................................................................29
Form processing.....................................................................................................30
Handling incorrect user input..............................................................................30
Error handling.........................................................................................................................31
Managing time information: standard local time, daylight saving time and GMT ......31
Processing GMA events.........................................................................................................33
Image libraries: increasing you application’s performance ..............................................36
Creating an image library.....................................................................................36
Deploying an image library on a web server.....................................................37
Registering the file name extension on a web server........................................38
Modifying references to image files ....................................................................38
Controlling multilingual input support ..............................................................................38
Embedded terminal software................................................................................................39
Chapter 5: TML and payment cards ......................................................................................................41
Payment cards.........................................................................................................................41
Accessing card data................................................................................................................41
Transaction flow for magnetic stripe cards........................................................41
Transaction flow for ICC EMV ............................................................................42
Interacting with card parsers ................................................................................................43
Chapter 6: TML reference........................................................................................................................45
Data types inherited from XHTML ......................................................................................45
Charset ....................................................................................................................45
ContentType ...........................................................................................................45
Length......................................................................................................................45
LinkTypes ...............................................................................................................45
MultiLength............................................................................................................46
Number ...................................................................................................................46
Pixels........................................................................................................................46
Text ..........................................................................................................................46
URI...........................................................................................................................46
TML‐specific data types.........................................................................................................47
Formatter.................................................................................................................47
Inline, Block, NoForm and Flow..........................................................................50
InputType ...............................................................................................................50
NextScreen..............................................................................................................51
Permissions.............................................................................................................51
TRules......................................................................................................................52
Valref .......................................................................................................................52
TML elements reference ........................................................................................................52
<a> ............................................................................................................................52
<baddata>................................................................................................................53
<base> ......................................................................................................................54
<br> ..........................................................................................................................54
<call_func> ..............................................................................................................54
<card> ......................................................................................................................56
<col> .........................................................................................................................61
<colgroup> ..............................................................................................................62
<dd> .........................................................................................................................62
<defaults>................................................................................................................63
<display> .................................................................................................................63
<div> ........................................................................................................................64
<dl> ..........................................................................................................................64
<dt> ..........................................................................................................................65
TML Application Development Guidelines 3
Release 3.0.0.0
<econn>....................................................................................................................65
<error> .....................................................................................................................66
<form> .....................................................................................................................66
<getvar>...................................................................................................................67
<h1>, <h2>, <h3>, <h4>, <h5>, <h6> ......................................................................67
<head> .....................................................................................................................68
<hr> ..........................................................................................................................68
<img> .......................................................................................................................69
<input> ....................................................................................................................69
<input type=ʺlistʺ> .................................................................................................73
<layout>...................................................................................................................77
<li>............................................................................................................................77
<link> .......................................................................................................................78
<log> ........................................................................................................................78
<logdcl> ...................................................................................................................79
<logrec> ...................................................................................................................81
<next> ......................................................................................................................81
<ol>...........................................................................................................................82
<p>............................................................................................................................82
<pinentry>...............................................................................................................82
<postvar>.................................................................................................................84
<pre> ........................................................................................................................84
<print> .....................................................................................................................84
<prompt>.................................................................................................................85
<screen>...................................................................................................................85
<setvar> ...................................................................................................................87
<span>......................................................................................................................96
<strtemplate> ..........................................................................................................97
<submit>..................................................................................................................98
<submit_log> ..........................................................................................................99
<table> ...................................................................................................................100
<tbody>..................................................................................................................101
<td> ........................................................................................................................101
<textarea> ..............................................................................................................102
<tfoot>....................................................................................................................103
<tform> ..................................................................................................................104
<th> ........................................................................................................................104
<thead> ..................................................................................................................105
<tml> ......................................................................................................................106
<tmlpost>...............................................................................................................106
<tr> .........................................................................................................................108
<ul> ........................................................................................................................108
<vardcl>.................................................................................................................109
<variant> ...............................................................................................................111
Core TML attributes .............................................................................................................115
class attribute........................................................................................................115
id attribute ............................................................................................................115
Chapter 7: Pre‐defined TML Variables...............................................................................................117
Audio variables.....................................................................................................................117
Variables used by card parsers ...........................................................................................120
Card‐related variables.........................................................................................120
Variables used by “icc_emv” parser .................................................................120
Smart‐card PIN‐related variables ......................................................................121
Variables used by “mag” parser ........................................................................121
Card parsers‐related variables ...........................................................................121
Variables for managing card parsers configuration updates .........................................121
TML Application Development Guidelines 4
Release 3.0.0.0
Variables related to the COM connection .........................................................................122
Error handling variables......................................................................................................123
GPRS‐related variables ........................................................................................................123
IP‐related variables...............................................................................................................124
Incendo Online MicroBrowser‐related variables .............................................................125
Variables related to working with TML logs ...................................................132
Variables related to working with GMA events..............................................133
Variables related to data exchange with third‐party applications................134
Incendo Online Gateway variables ....................................................................................134
Variables related to payment processing ..........................................................................135
Point‐to‐Point Protocol (PPP) connection variables.........................................................136
Terminal variables ................................................................................................................136
Bar code scanner (imager)‐related variables.....................................................................138
Auxiliary variables ...............................................................................................................138
Chapter 8: TML CSS...............................................................................................................................139
TML CSS limitations ............................................................................................................139
Syntax and general rules.....................................................................................139
Cascading order ...................................................................................................139
Style directive .......................................................................................................139
TML CSS Properties ............................................................................................139
What can be controlled with styles ....................................................................................141
Applying styles .....................................................................................................................141
Using the class attribute......................................................................................141
Using <div> and <span> elements .....................................................................141
Appendix A: Incendo Online MicroBrowser Error Codes ................................................................142
(‐321XX) CFGM errors .........................................................................................................143
(‐322XX) FPM errors.............................................................................................................143
(‐323XX) TML errors.............................................................................................................144
(‐324XX) HTTP_CLIENT errors ..........................................................................................145
(‐325XX) INITM errors .........................................................................................................146
(‐326XX) MAIN_APP errors................................................................................................147
(‐327XX) CARD_PARSER errors ........................................................................................148
(‐328XX) ICC_EMV_PARSER errors ..................................................................................149
(‐329XX) RNM errors............................................................................................................151
(‐330XX) COMMON errors .................................................................................................152
(‐331XX) VARLIB errors ......................................................................................................152
(‐332XX) ISTP errors .............................................................................................................153
(‐333XX) SSL_TRANSPORT errors.....................................................................................154
(‐334XX) NET_MEDIA errors .............................................................................................154
(‐335XX) PERIPHERAL errors ............................................................................................154
(‐336XX) IMAGER errors .....................................................................................................155
(‐337XX) PAM errors ............................................................................................................155
(‐338XX) VKBRD errors .......................................................................................................155
(‐339XX) IND errors..............................................................................................................156
(‐340XX) LOG errors.............................................................................................................156
(‐341XX) HCL errors.............................................................................................................157
(‐342XX) OEMSG errors.......................................................................................................157
(‐343XX) GCL_PGCOMM errors ........................................................................................157
TML Application Development Guidelines 5
Release 3.0.0.0
1
About this document
This document is designed to serve as a comprehensive source of
information on the Terminal Markup Language (TML) and its use for
developing content for Ingenico payment devices operating in the Incendo
Online environment.
Target audience
The document is addressed to software application developers using or intending to
use TML. It is assumed that the reader is familiar with and has experience in using
a
XML, HTML/XHTML, and/or WML .
Typographical conventions
The following conventions are used in this document:
Notation Description
Courier Text that appears on the terminal screen, programme code, file
and directory names, TML tags and attributes, Uniform Resource
Locators (URLs), names of variables and their values, and so on.
? The specified element can be included zero or one time inside the
described parent element, for example, <base> ?.
This and the following conventions are used in the “Related
elements” section of a TML element’s description.
+ The specified element must be included at least once inside the
described parent element, for example, <dt> +.
* The specified element can be included any number of times
inside the described parent element, for example, <link> *.
| Separates alternative items, for example, <call_func> |
<display> | <print> | <submit> | <tform>.
The element descriptions have the following standard content:
• Description
Provides a short description of the element.
• Related elements
Lists the child and parent elements of the current element.
• Attributes
Explains the attributes of the element.
• Example
Provides a simple example illustrating the element usage.
Related documents
This guide is intended to serve as a comprehensive reference manual relating to the
technologies presented.
a
XML – Extensible Markup Language XHTML – Extensible Hypertext Markup Language HTML –
Hypertext Markup Language WML – Wireless Markup Language
TML Application Development Guidelines 6
Release 3.0.0.0
2
Overview of TML
This chapter provides a brief introduction to Terminal Markup Language.
TML Application Development Guidelines 7
Release 3.0.0.0
3
Design guidelines
Before designing an application
When designing an application for Ingenico terminals sketch the
application logic defining the screens as well as the supposed transaction flow model
which will satisfy your service needs.
Consider the guidelines provided in the following sections for a hassle‐free and
straight‐forward application design.
TML Application Development Guidelines 8
Release 3.0.0.0
Design guidelines
TML Application Development Guidelines 9
Release 3.0.0.0
Design guidelines
Figure 3 ‐ 3: Example of sharing a presentation screen
<screen id="process" next="#display_msg" >
<setvar name="message_text" lo="Processing Transaction"/>
<setvar name="next_screen" lo="#success"/>
</screen>
TML Application Development Guidelines 10
Release 3.0.0.0
Design guidelines
time consuming with a terminal, so construct your TML application with a minimum
need for user input. Consider whether it is possible to ask the user to choose from
form screens rather than typing in a selection.
TML Application Development Guidelines 11
Release 3.0.0.0
Design guidelines
• Since horizontal scrolling is not allowed for terminals, always design the
screens that are not wider or longer than the display of the targeted device.
• Use alignment properties (left, right, and center) with elements to increase
readability, but do not use more than two or three on a single page as this
affects the userʹs ability to grasp the application structure.
• Avoid overusing text decoration properties such as bold, as it affects
readability on small displays.
• Avoid using long, complex words when shorter, more precise alternatives are
available.
TML Application Development Guidelines 12
Release 3.0.0.0
Design guidelines
Reduce the amount of data you send to the host and receive from it
To minimize the connection time between the host and the terminal, only transfer the
minimal amount of data necessary. Ideally, within the dynamic pages you receive
from the host, you should only set some variables and then transfer control to the
static TML pages.
The terminal will spend less time parsing the TML and transferring data.
Additionally, memory management is better when we operate mostly with static
(cached) resources.
This is particularly relevant if you use a slow connection, such as modem or GPRS.
Use image libraries
Images that are not likely to be frequently changed should be grouped into image
libraries. The advantage is that an image library is that it is loaded and cached as a
group. This means that the load time is quicker and memory is managed better than if
the images were loaded individually.
However, if you want to modify one of the images within an image library, the whole
image library must be recreated and reloaded. Therefore, images that will be often
changed should be outside of image libraries.
See “Image libraries: increasing you application’s performance” on page 36 for more
information.
TML Application Development Guidelines 13
Release 3.0.0.0
4
Authoring in TML
This chapter provides an overview of the TML language and its most
important elements, illustrated with code examples. See “TML elements
reference” on page 52 for the detailed syntax description of a particular
element or attribute.
TML Application Development Guidelines 14
Release 3.0.0.0
Authoring in TML
You can use absolute and relative addresses in TML. Absolute addresses include the
protocol, domain name and the full path to the target file located on the Application
Server, for example:
http://localhost:8080/tml/examples/btmlpa/tmlapp.tml#man_entry
You can shorten the URLs by using relative addresses:
• If the target is located on the different page you can use the path relative to
the root TML page starting with / (slash) symbol, e.g.
<next uri="/btmlpa/tmlapp_icc.tml#icc_get_cvm">.
See also “Specifying the root URI for a TML page” on page 17.
• If the target is a screen located on the same page you can reference it by the
screen id starting with # (hash) symbol, e.g.
<next uri="#read_amount">
If the particular screen id is not specified in the URL, the MicroBrowser displays the
first screen on the TML page.
If the target TML page has not been specified explicitly, it is assumed that the
requested file is index.tml.
Important: The length of TML file names including the file name extension (.tml)
must not exceed 13 characters. The same refers to the names of image and CSS files.
File names are case‐sensitive.
TML Application Development Guidelines 15
Release 3.0.0.0
Authoring in TML
and logs declared within this application have global scope and the application can
work with the offline posts created by all other applications.
Application header
The header includes the following:
• XML declaration
• <tml> root element
• <head> element
XML declaration
You can use XML declaration at the beginning of each TML page, for example, to
explicitly specify encoding as a value of an optional encoding attribute:
<?xml version="1.0" encoding="iso-8859-1"?>
If you omit the encoding attribute in XML declaration, the ISO‐8859‐1 encoding will
be assumed by default.
The use of XML declaration is not mandatory and can be omitted.
<tml> root element
Since TML is a schema‐based XML subset, DOCTYPE element is omitted. Following
the XML declaration (if present), is the root <tml>, which must specify the xmlns
namespace attribute. The value of this attribute is a unique URI pointing to a TML
page that defines the namespace for all elements and attributes valid within your
page. Specifying a wrong xmlns attribute results in a document that can be well
formed but not strictly schema conforming.
<tml xmlns="http://www.ingenico.co.uk/tml">
<head> element
The <head> element defines the document header with preliminary information
about your page, including:
• List of the documents referenced on the page (e.g. an external style sheet or
other TML documents). Use <link> to specify URLs of the referenced
documents.
• Optionally, two screens to handle presses of the Menu and Cancel keys. If the
user presses either of those keys, the application will switch to the
appropriate screen. Use <defaults> to define URLs of these screens.
<head>
<link href="style.css" rev="stylesheet"/>
<defaults menu="/index.tml" cancel="#init_prompt"/>
</head>
Specifying external style sheets and images
TML Application Development Guidelines 16
Release 3.0.0.0
Authoring in TML
TML allows specifying optional external style sheets by defining one or more <link>
elements.
CSS is the only way to provide styles to the documents; XHTML <style> elements
are not allowed in TML.
Note: It is strictly recommended to reference all the images within the <head>
element.
It is important since the referenced images will be loaded and cached in the terminal
before they are actually used.
Specifying the root URI for a TML page
The <base> includes the href attribute which defines the root for all relative links on
your page. If the element is omitted, it is considered that the root is an URI of the
current page.
Specifying Menu and Cancel screens
a
Ingenico terminals are equipped with the Menu and Cancel keys . To handle presses
of these keys in your application, you can define which screen the application should
go to when either of the keys is pressed.
Using <defaults>, you can specify the URIs of the screens to switch to at the whole
page scope. To redefine the Menu and/or Cancel screens at a particular screen’s level,
you can use the menu and/or cancel attributes of the <screen> element.
a
For more information on terminal keypad keys, their labels, colours, and so on, refer to Basics of Working
with Incendo Online‐enabled Terminals.
TML Application Development Guidelines 17
Release 3.0.0.0
Authoring in TML
TML Forms
TML forms are used to handle the card data collected by TML‐specific <card> and
<pinentry> elements.
TML forms control the overall transaction flow for supported card types. Every
transaction step is wrapped into <tform>. See “TML and payment cards” on page 41
for more details.
The data gathered on the screen (usually a list of TML variables) is always submitted
using a special submit screen which might not necessarily follow the screen
containing <tform>.
Note, that XHTML <form> is used within display screens in the same way as in
XHTML.
Submit screen
The data entered by a user from keyboard or terminal PIN pad using <input>,
<textarea> or <pinentry>, or read from a card using <card>, as well as any other
data can be submitted to the Application Server for processing and possible reply. For
most transactions you will need to support this functionality in your application. The
data is submitted as a list of variable/value pairs. This list of variables is wrapped into
<submit>.
Aside from the variables, you should provide some auxiliary data required to
complete the submission, such as the destination server URI and type of submission
using the element attributes.
The data can be submitted either online or offline. Data submitted offline are stored as
offline posts. The type of submission is defined by the predefined variable
oebr.submit_mode. If offline transactions are impossible (e.g. when the number of
postponed requests is exceeded), the data is posted online.
Online submissions are posted to the Application Server immediately. Then, by
default, MicroBrowser switches to the screen specified by the URI in the <next>
element or the next attribute of the <screen> element. The host part of TML
application can, however, override this behaviour and specify a different screen to
switch to in a dynamic TML page sent to the terminal in reply.
<econn> (or econn attribute) can be used to specify the screen to switch to, if a
connection error occurs during submission of data to the Application Server.
Functional screen
Use functional screens for calling terminal operating system C functions.
A function call is defined using the <call_func> element.
Functions cannot accept parameters, so you need to specify only the name of the
called function (using the name attribute).
You should also provide the URI of the screen to switch to, if the call was successful
(using <next>) and another URI if it was not (using <error>).
See “<call_func>” on page 54 for the list of available functions.
Switching between the screens
MicroBrowser switches to the next screen when one of the following events takes
place:
Figure 4 ‐ 2: Switching between TML screens
Event Destination URI
User activated a hyperlink on the display URI specified by the href attribute of the
screen. corresponding <a> element
TML Application Development Guidelines 18
Release 3.0.0.0
Authoring in TML
Event Destination URI
• The terminal has completed printing • If there is no <next> element:
the content of the print screen. URI specified by the screen’s next
• The time specified by the timeout attribute
attribute has elapsed (and there are no • If the <next> element contains no
hyperlinks within the screen). <variant> elements or none of such
• The C function called by the function elements contains a true logical
screen has been successfully processed. statement:
URI specified by the uri attribute of the
• The data specified in the submit
<next> element
screen have been successfully sent to the
Application Server and the Server • If there is a <variant> element
‘accepted’ the data. containing true logical statement:
URI specified by the uri attribute of the
• When a display screen containing no
first of such <variant> elements
hyperlinks is active, a user presses a key,
and there is no particular URL assigned
to that key (by means of the menu, cancel,
or key attribute(s)).
• User selected the Submit or Reset
button in the form.
The C function called by the function URI specified by the uri attribute of the
screen has returned an error. <error> element or the uri attribute of
the first of its child <variant> elements
containing true logical statement – if
there is such element
The data specified in the submit screen URI specified in the server’s response
have been sent to the Application Server
but the Server did not ‘accept’ the data.
Connection with the Application Server URI specified in <econn> or one of its
during data submission was lost. child <variant> elements.
A logical expression specified in a URI specified by the uri attribute of the
<variant> element is found to be true. corresponding <variant> element. The
uri attribute of the <variant>ʹs parent
element (<next>, <error>, or
<econn>) in this case is ignored
e
User pressed the Menu key and the URI specified by the menu attribute
menu attribute is defined for the screen or
page.
User pressed the Cancel key and the URI specified by the cancel attribute
cancel attribute is defined for the screen
or page.
User pressed a key and the active screen URI specified by the uri attribute of the
contains a <variant> element assigning corresponding <variant> element
a URI to this particular key.
User has reached the maximum allowed URI specified by the next attribute of
number of tries for entering the data. <baddata>
e
On Ingenico 8550 terminals, this is the F2 key.
TML Application Development Guidelines 19
Release 3.0.0.0
Authoring in TML
A destination URI can be represented either by a variable or constant or can be chosen
as a result of evaluating a series of logical expressions. This is defined by the data type
of the attribute which specifies the URI.
For example, a URI specified in href attribute can only be a constant; however,
within menu, cancel and next attributes the URI can also be a reference to a
variable.
For <next>, <error> and <econn> elements you can define a number of
conditional statements using child <variant> elements. As an alternative to defining
logical conditions, you can use the <variant> elements for assigning terminal
keypad keys to screens, or, to be more exact, their URIs. In this case, if a user presses a
key specified in the <variant> element, Incendo Online MicroBrowser jumps onto a
screen assigned to that key. For more information, see “<next>”, “<error>”, “<econn>”,
and “<variant>” on pages 81, 66, 65, and 111 respectively.
Displaying text
When defining text content for small‐sized terminal displays, consider the following
guidelines:
• Use simple, short and precise words.
• Avoid inserting empty lines between text sections on a TML screen which
might cause the vertical page scrolling. A user can be misled assuming that he
or she watches the whole screen.
• Avoid using different text styles and font sizes on the same TML screen. Two
or three styles and sizes are usually more than enough.
• Select the fonts carefully. You cannot be aware that a terminal has a specific
font style or font size. Terminals, with a limited available memory, have a
limited collection of fonts installed (often just a single font).
• Avoid using uppercase characters excessively. It might decrease the text
readability.
Tables
You can design virtually any layout using only TML <p>, <div>, and <span>
elements. However, using tables you can design a screen layout in a tabular manner,
which can look more efficient.
Aligning the text is easier when the screen content is placed within a table, especially
when you need to design a print screen, e.g. for printing a receipt.
Tables are made up of columns and rows and can be as simple as one containing a
single row and a column and as complex as one that utilises headers and footers.
Tables in TML are similar to those in XHTML. You can use the following TML
elements for defining the structure elements of a table:
Element Description
<table> The element makes up the entire table structure.
<colgroup> The element assigns columns in the table to column groups.
<col> The element assigns attribute values to the individual columns within
<colgroup> element.
<thead> The element defines the header section of the table.
<tfoot> The element defines the footer section of the table.
<tbody> The element defines the table body section.
<tr> The element makes up the row structure of the table.
<th> The table header element makes up the cells of the table. Always used along
with <tr> element.
<td> The table details element makes up the cells of the table. Always used along
with <tr> element.
TML Application Development Guidelines 20
Release 3.0.0.0
Authoring in TML
When designing the tables consider the following guidelines:
• Do not use deeply nested tables.
• Do not define tables wider than the target device display.
• Do not define table cells higher than the target device display.
Images
Images are valuable for TML application design. When inserting images consider the
following guidelines:
• Use .bmp format for the images you plan to use in your TML application.
This format is supported by TML MicroBrowser.
• Do not use the images exceeding the size of the terminal display to avoid
scrolling. Remember, also, that the size of the images that can be printed with
f
the terminal printer is limited .
• Explicitly specify the height and width for the images using height and
width attributes to allow the browser to reserve necessary memory space.
• Use the alt attribute to specify alternative text, which is displayed if the
image could not be loaded.
Note, that in TML the <img> element does not support the align, border, hspace,
vspace, and usemap XHTML attributes.
Important: The length of image file names including file name extensions must not
exceed 13 characters. File names are case‐sensitive.
Types of variables
The type of variable is set when the variable is declared (see “<vardcl>” on page 109).
TML supports variables of the following types: date, string, integer and opaque.
Additionally, there is a derived string list type. It is a string variable that contains a list
of items, separated by the ; character.
String
String variables contain a sequence of characters. The default value of a string is “”.
Integer
Integer variables contain numeric values. They can be either signed or unsigned. The
integers are signed by the default.
The minimum value of a signed integer is -2147483648. The maximum value of a
signed integer is 2147483647.
The minimum value of an unsigned integer is 0. The maximum value of a signed
integer is 4294967295.
The default value of an integer is 0.
Note: we recommend using only signed integers for consistent formatting
Date
Date variables contain date‐time information. The default value of a date is
1970/01/01 00:00:00 (with YYYY/MM/DD hh:mm:ss format)
f
The width of the image that you want to be printed must not exceed 384 pixels, while its maximum height
is limited to 128 pixels.
TML Application Development Guidelines 21
Release 3.0.0.0
Authoring in TML
Note: there is a special value of 0000/00/00 00:00:00 for date variables. If all
fields of a variable are explicitly set to zero, this variable acts as an empty string for
<getvar> and <input> elements.
Opaque
Opaque variables contain binary data. They can be used for storing binary
cryptographic data exchanged by the terminal and the payment card, for storing
images etc. The default value of an opaque variable is “”.
Predefined variables
Pre‐defined variables are declared by the embedded TML pages of the MicroBrowser.
Therefore, these variables can be used by the other TML pages without declaring them
first.
Predefined variables are used to store:
• terminal network connection settings
• terminal and Incendo Online Gateway authentication data
• payment card and transaction data
• information about the terminal and that related to system log
• bar code scanner‐related data
as well as other data defining:
• how the terminal should interact with Incendo Online Gateway requesting
updates of cached TML resources and configuration data for card parsers (see
“TML and payment cards” on page 41)
• what information needs to be sent to other (third‐party) applications running
in the terminal
• what sounds and in which cases the terminal should produce, and
• other aspects of terminal behaviour.
Some of the predefined variables are read‐only. Values of the others, if appropriate,
can be modified in your applications (see also “Scopes of variables” below and
“Permissions” on page 51).
For the complete list of predefined variables and their description, refer to “Pre‐
defined TML Variables” on page 117.
Predefined variables are declared in a TML application called Embedded Terminal
Application which, along with the default CSS and default logo image, permanently
resides in the terminal memory; see “Embedded terminal software” on page 39.
User-defined variables
You can create your own variables. Each variable is declared using the <vardcl>
element. The <vardcl> elements are placed after the <head> element but before the
<logdcl> elements (if any) and the first <screen> element of your TML page. If
your application contains more than one page, the page where the variable is declared
defines the variable scope or “visibility”, see “Scopes of variables” below.
Note: The pages containing non‐declared variables are rejected during TML parsing.
Scopes of variables
The scope of a variable is a page or a collection of pages where a variable exists and its
g
value can be referenced . The variable cannot be referenced outside of that scope.
You define the scope implicitly by declaring the variable in the <vardcl> element.
The part of URI preceding the file name of the page where the variable is declared
(that is, http://domain_name/path/) defines the variable’s scope. In other words,
g
All that is said in this section about the scopes, access permissions and redefinition of variables also fully
applies to TML logs, see “Logs” on page 28.
TML Application Development Guidelines 22
Release 3.0.0.0
Authoring in TML
the scope of a variable is a directory containing the page on which the variable is
declared along with all subdirectories of that directory. So, for example, a variable
declared on the page http://localhost:8080/tml/page_1.tml can be
referenced from all pages whose URIs start with http://localhost:8080/tml/,
that is:
• http://localhost:8080/tml/page_2.tml
• http://localhost:8080/tml/custom-apps/page_1.tml
and so on. On the other hand, a variable declared on the page
http://localhost:8080/tml/custom-apps/page_1.tml will not be visible
from http://localhost:8080/tml/page_1.tml since it will have a narrower
scope limited to http://localhost:8080/tml/custom-apps/ and more specific
URIs.
Predefined variables have a “global” scope since they are declared on the embedded
TML page referenced as emb://embedded.tml; the emb:// is considered as a root
for all custom TML pages.
Controlling the scope of and access to a variable
You can limit the scope of a variable and restrict access to it from pages other than the
one on which the variable is declared. For this purposes the perms attribute of the
<vardcl> element is used. By means of this attribute you can, for example,
• limit the variable’s scope just to the page on which this variable is declared
• specify that the variable can be accessed only from pages located in the same
directory as the one on which the variable is declared
• specify that on some or all pages other than the one on which it is declared the
variable’s value can not be modified.
In addition to that, the perms attribute can be used to specify whether or not the
variable can be redefined within a narrower scope.
By default – if the perms attribute is not present in the in the <vardcl> element – a
variable can be referenced and its value can be modified on any page within the
variable’s scope. The variable can also be redefined in any of the narrower scopes. For
information on how to use the perms attribute, see “Permissions” on page 51.
Redefining a variable in a narrower scope
If the perms attribute allows doing so, a variable can be redefined in a narrower
scope.
The variable is redefined exactly in the same way as it is declared – by means of the
<vardcl> element. After the variable is redefined in a narrower scope, it becomes
totally independent (within this narrower scope) of the variable with the same name
declared in a broader scope.
To illustrate how redefinition works, let us assume that the variable my-var is
declared on the pages http://localhost:8080/tml/page_1.tml and
http://localhost:8080/tml/custom-apps/page_1.tml. This situation is
treated as if two different variables were declared. Though both variables in this case
can be referenced by the same name (that is, my-var), one of them exists in
http://localhost:8080/tml/custom-apps/ (and all its subdirectories), while
the other – in http://localhost:8080/tml/ (and all its subdirectories) with the
exception of http://localhost:8080/tml/custom-apps/ (and all its
subdirectories).
Using variables
Insert variable references whenever you need to:
• render the variable value on the terminal display or print it using the terminal
printer
• post the variable value to the Application Server
• use the variable value as an operand in <setvar> expressions that might
change the value of another variable
• use the variable value in logical expressions that might switch the TML
application flow control, e.g. in <variant>.
Use the <getvar> element for inserting values of variables into display, print and
submit screens.
For logical expressions, the constants and variables can be specified as expression
operands using lo and ro attributes. Always use prefix tmlvar: to specify that the
attribute value is a reference to a variable, e.g.:
<setvar name="oebr.transid" lo="tmlvar:oebr.unique_id"/>
If you omit the prefix, MicroBrowser will interpret the specified value as a constant.
TML Application Development Guidelines 24
Release 3.0.0.0
Authoring in TML
GBP: 0*.00. This pattern would specify that the text GBP: followed by a blank
space should be added before the value and the dot (.) should be inserted in front of
the last two digits.
It should be noted that formatting does not include changing fonts, colours and so on.
That is, formatting does not change just the appearance of data, though, in a sense, it
does. It rather changes the data presentation somehow.
De‐formatting is a reverse transformation with regard to formatting. It is used when
certain text information needs to be converted to a value of the integer or the date
type.
De‐formatting as well as formatting also implies the use of a formatting pattern. In the
case of de‐formatting, however, the pattern is used in the ʹreverse directionʹ: it tells
how to extract the value of interest from a string of characters.
Going back to the example given earlier, the string of text GBP: 12.99 de‐formatted
with the pattern GBP: 0*.00 would give 1299. (In this case the text GBP: and the
dot in front of the last two digits would be removed.)
For more information on formatting patterns and their usage, see “Formatter” on page
47.
TML Application Development Guidelines 25
Release 3.0.0.0
Authoring in TML
TML Application Development Guidelines 26
Release 3.0.0.0
Authoring in TML
Comparison of variables
Variables values are compared when evaluating logical expressions. In TML only two
values of the same type can be compared. One of the values should be a variable; the
other can be either a variable or a constant.
Before the comparison proceeds, the value of the right operand of the expression is
cast to the type of the left operand. If one of the operands is a constant, its value is cast
to the type of the operand defined by a variable.
When comparing integers and dates, the biggest and the most recent values win.
Note: The result of comparison of two dates may depend on the formatters specified
for corresponding variables. See “Remarks” and “Example” in “<variant>” on page
111. Also note that all data related to the time zone (if any) is ignored.
The strings are compared in the following way:
1. First, the lengths are compared; the string which is longer, that is, contains
more characters is considered “bigger”.
2. If the lengths are the same, the strings are compared character by character
from left to right: first, the leftmost characters are compared. If they are the
same, the second characters are compared, and so on until different characters
in the same position are found. Then the rule for separate characters
evaluation is applied: the character with a higher ASCII code is considered
“bigger.” ASCII codes increase in the following row: digits, uppercase letters,
lowercase letters, so that
"0" < "1" < ... < "A" < "B" < ... < "a" < "b" < ... < "z".
For example, the following statements about string values are true:
• "huge" < "small" (the second of the strings is longer)
• "Smith" < "smith" (the strings have the same length but the ASCII code
of the first character in the second string is higher)
• "smile" < "smith" (the strings have the same number of characters; the
first three characters in both strings are the same, but the ASCII code of the
fourth character in the second string is higher)
Opaque values are compared in the way similar to how strings are compared. The
longer the value, that is, the more bytes its binary representation has, the bigger it is.
Values with the same length are compared byte by byte starting from the left until the
first different byte in the same position is found. The opaque value is considered
bigger if the value of such byte is higher.
TML Application Development Guidelines 27
Release 3.0.0.0
Authoring in TML
<next uri="#third_page">
<variant uri="#first_page" lo="first" ro="tmlvar:var1"
op="equal" />
<variant uri="#second_page" lo="second" ro="tmlvar:var1"
op="equal"/>
</next>
It is much better to use the following TML code within your page:
Figure 4 ‐ 4: correct branching by enum values
<next uri="#error_page">
<variant uri="#first_page" lo="first" ro="tmlvar:var1"
op="equal" />
<variant uri="#second_page" lo="second" ro="tmlvar:var1"
op="equal"/>
<variant uri="#third_page" lo="third" ro="tmlvar:var1"
op="equal" />
</next>
This way an error page will catch assertion errors in your TML code. This error page
could look something like Figure 4 ‐ 5 below.
Figure 4 ‐ 5: sample error page
<!-- When the screen is reached it is most likely a programming
error -->
<screen id="error_page" timeout="3" next="index.tml">
<display>
Assertion Error<br/>
on screen "<getvar name="oebr.prev_screen"/>"
</display>
</screen>
This will make tracking errors in your code a lot easier. All possible values of var1
are listed explicitly. If a value that we have not considered is assigned to var1 (or we
just incorrectly write one of values in our TML code) then #error_page will be
displayed and we can solve the error.
If we use ʺincorrect branchingʺ (as in Figure 4 ‐ 3 on page 27) we just go the
#third_page and it will be hard to find this error.
This convention could also be used for branching by several variables or by non‐enum
variables, if we describe all possible ways of branching.
Logs
Logs in TML are used to monitor values of different sets of TML variables.
To create a log, you declare it by means of the <logdcl> element (on page 79).
When declaring a log, you can:
• Specify the set of TML variables whose values you want to monitor
• Define the log access permissions
• Link the log with the external CSS file that defines the appearance of the log
when it is displayed or printed
• Specify various layouts – rendering patterns – for log records each defining
what log information is to be displayed or printed and how this information
should look when it is displayed or printed
You can do the following with a log:
• Add records, see “<logrec>” on page 81
• Show the log on the terminal display or print it, see “<log>” on page 78
• Submit the log to the Application Server, see “<submit_log>” on page 99
• Clear the log, see description of the clear_log function in “<call_func>” on
page 54
TML Application Development Guidelines 28
Release 3.0.0.0
Authoring in TML
System log
One of the examples of a TML log is the system log, which is implemented in
Embedded TML Application (see “Embedded terminal software” on page 39). This
log is used to monitor exceptional situations (system errors) detected by Incendo
Online MicroBrowser.
The system log can be accessed from the Embedded Application only.
The predefined TML variables related to the system log are listed and described in
“Variables related to working with TML logs” on page 132.
Pin entry
Input of the secure pin should always be done by using the <pinentry> element.
This element is used within the terminal form screens (see <tform> on page 104). The
application switches to the secure mode and uses the security features of the terminal
to accept user input and encrypt it according to the specified encryption algorithm.
This ensures that the pin is never stored in an unencrypted form, and therefore can
not be compromised. See <pinentry> on page 82 for more details.
Manual input
The elements <input> and <textarea> are the main building blocks of a TML form
(<form>). Using these elements, you can define controls for data input. The controls
are the data fields and/or options that allow the user to enter information into the
form. For each control, the entered data is assigned to the specified variable.
You can also specify some restrictions and/or additional checks for the entered data,
for example, for matching maximum/minimum value, verifying the PIN associated
with a card, and so on.
TML supports the following controls:
• Fields and areas for entering text
(<input type="text" .../> and <textarea .../>).
• Fields for entering text where the text is masked
(<input type="password" .../>).
• Fields for entering (non‐negative) integer numbers
(<input type="number" .../>).
• Fields for entering the dates (<input type="date" .../>).
• Check boxes (<input type="checkbox" .../>), switching elements that
represent the options which can be either selected or not selected.
• Radio buttons (<input type="radio" .../>), elements that represent
one of the possible options. Radio buttons are usually grouped so that only
one radio button within the group can be selected.
• List boxes (<input type="list" .../>), elements representing lists of
options a user can choose from.
• Buttons for submitting and resetting the form
(<input type="submit" .../> and <input type="reset" .../>).
TML Application Development Guidelines 29
Release 3.0.0.0
Authoring in TML
Form processing
When a form defined by the <form> element is displayed on the terminal screen,
MicroBrowser switches into the form processing mode that defines specific navigation
rules within the form.
When you design navigation in a form that contains <input> and/or <textarea>
elements consider the following:
• A user navigates within the form until he or she presses the OK, Menu or
Cancel keypad key. Pressing Menu or Cancel makes MicroBrowser jump
onto a screen defined by the menu or cancel attribute. If the OK key is
pressed, the next screen in most cases is defined by the next element or
attribute.
• Pressing Up and Down keys will move the focus onto the previous or next
<input> or <textarea> element. An element in focus is marked visually
somehow: in most cases such element has a thickened border.
• Depending on the element type, pressing OK will:
o submit the form and make the application go onto the next screen, if the
h
<input> element of the type submit is in focus .
o reset the form variables and make the application switch onto the next
screen, if the <input> element of the type reset is in focus.
o lead the user onto the next screen, if the <textarea> element or the
<input> element of the date, number, password, or text type is in
focus and there are no hyperlinks on the current screen. If there is at least
one hyperlink on the screen, pressing OK is ignored and no action is
performed.
Note: The Reset button (defined as <input type="reset" .../>) is guaranteed
to demonstrate its normal behaviour, that is, to reset the form variables only in the
case when all variables are non‐volatile. If there are variables of both types – volatile
and non‐volatile – within the form, the Reset button may in some cases work as the
Submit button. So, avoid using <input type="reset" .../> in such cases.
h
In relation to a form and the corresponding input element, the term submit is, to a great extent, used
metaphorically. In fact, selection of the Submit button does not lead to sending the form to a server – as, for
example, in HTML. The purpose of the button in TML is just to save new values of variables associated with
<input> and <textarea> elements present within the form. To actually submit something to the server
the <submit> element is used.
Also note that since new values of variables are automatically saved each time MicroBrowser switches from
one screen onto another, the presence of the Submit button within a form is not necessary at all.
TML Application Development Guidelines 30
Release 3.0.0.0
Authoring in TML
Error handling
In addition to the err.baddata_reason (see “Handling incorrect user input” on
page 30), the following predefined TML variables are intended for implementing
various error handling mechanisms in your applications:
• err.code.high
• err.code.low
• err.description
The first two variables are used to store numeric error codes: the err.code.high
contains the code of the last error; in the err.code.low the code of the previous (the
next to last) error is stored. Error codes are listed and described in Appendix A on
page 142.
The err.description contains a brief textual description of the last error.
The following provides the information on where the values of these variables come
from.
Incendo Online MicroBrowser has a multilevel hierarchical modular structure with
the main module at the top and the modules performing more specific functions
closer to the bottom.
Some of the functions requested by a user from the MicroBrowser (via a TML
application) are performed by the main module itself. Others are passed by the main
module to a lower level module for processing.
The lower level module in its turn either generates a result or passes the request to a
module of the underlying level and so on.
Thus, the request may travel from level to level starting from the main module (the
top of the hierarchy) until it reaches the module responsible for delivering the
required functionality. When at last the result is generated, it is returned to the main
module up along the processing chain.
Now, if at a certain level an error occurs this is what happens:
1. The module in which an error occurred informs the higher‐level module (one
that has called the lower level module) about the error and writes the textual
error description into the variable err.description.
2. The higher‐level module, in turn, returns the error code to the model which is
one level up in the hierarchy (the caller) and so on.
3. When the error is returned to the main module of Incendo Online
MicroBrowser, it places the code stored in the err.code.high into the
err.code.low and then stores the code of the error that just occurred in the
err.code.high.
This process generates several error messages with the same time stamp for each
error, one for each module layer. These messages are stored in the System Log of the
terminal. Together, these error messages are known as the error stack.
Note: see Configuration and Initialization of Incendo Online‐enabled Terminals for
information on how to access System Log of the terminal.
Appendix A on page 142 contains the complete listing of the error code numbers,
generated by the Incendo Online MicroBrowser.
TML Application Development Guidelines 31
Release 3.0.0.0
Authoring in TML
• Terminal local time, that is, the time at the location where the terminal is
i
installed and its possible change during daylight saving time period .
Payment transactions data in most cases should be accompanied with a
certain, reasonable, timestamp: a card holder, definitely, expects to see the
local time printed on a receipt.
• Time synchronisation between the terminals, Incendo Online Gateway and
the application server(s) that may be installed at the locations where the local
time is different.
Some objects/data in the system have limited period of validity (e.g. terminal
initialisation credentials, authentication certificates, etc.) and the terminals,
Incendo Online Gateway and the application servers should be able to ‘speak
the common language’ when dealing with various kinds of expirations.
The base for this common language could be the Greenwich Mean Time
j
(GMT) or Coordinated Universal Time (UTC) .
By default, the date variables are assumed to be in local time. However, you can use
the GMT formatter with setvar or getvar elements, to set or display the date
variables in the GMT time:
<setvar name="date1" lo="2009/01/01 00:00:00 GMT"
format="YYYY/MM/DD 00:00:00 GMT" />
There are two predefined TML variables intended for working with time information:
terminal.datetime and oebr.time_zone.
The first of these variables (terminal.datetime) stores the current local terminal
date and time. This variable should only be set once, when the terminal is installed at
the point of sale where it’s going to be used.
The variable oebr.time_zone is intended for storing the offset in hours of the
k
standard local time from GMT (this is what is called a time zone). Though the time
zone itself, in fact, does not change during the year, the variable can be used to adjust
the difference between GMT (which also never changes) and the local time during the
daylight saving time period.
In the current implementation of Embedded Terminal Application (see “Embedded
terminal software” on page 39) there is a screen where the terminal user can set the
value of this variable. If properly set, you can use the value of this variable to calculate
GMT.
If the terminal is installed at the location where the daylight saving (summer) time is
not used, values of the two variables can be set once and forever. In this case the value
of the terminal.datetime variable will always correspond to the local time and
the following relationship will always hold for GMT:
GMT = terminal.datetime – oebr.time_zone.
At the locations where the daylight saving (summer) time is used the following
situations are possible (during the summer time period) depending on whether
neither, one of or both variables are reset:
• Neither of the variables is reset:
local time is to be calculated as terminal.datatime + 1 hour, GMT is to
be calculated as terminal.datetime – oebr.time_zone
i
In most countries there is a convention to adjust the clocks one hour forward sometime near the start of
spring and adjust the clocks backward in autumn. Thus, it is necessary to distinguish between the standard
local time and daylight saving time (or summer time).
On the other hand, there are countries where the daylight saving time is not used, for example, Hong Cong,
China, most countries in Africa, and so on.
j
Here GMT and UTC are used as synonyms though, strictly speaking, there is a slight difference between
GMT and UTC.
k
This may be an integer number in the range from –12 to +13.
TML Application Development Guidelines 32
Release 3.0.0.0
Authoring in TML
• The variable terminal.datetime is properly adjusted to the summer time,
while the value of the oebr.time_zone is not changed:
the value read from the terminal.datetime corresponds to the local time;
GMT is to be calculated as terminal.datetime – oebr.time_zone –
1 hour
• The value of the terminal.datetime is not changed, the value of the
oebr.time_zone is incremented by one:
the local time is to be calculated as terminal.datetime + 1 hour, GMT
is to be calculated as terminal.datetime – oebr.time_zone + 1
hour
• The variable terminal.datetime is properly adjusted to the summer time,
the value of the oebr.time_zone is incremented by one:
the value read from the terminal.datetime corresponds to the local time;
GMT is to be calculated as terminal.datetime – oebr.time_zone
l
You should somehow handle all those and similar situations in your application –
either requiring a terminal user to perform appropriate actions or not.
l
Say, when the transition back to the standard local time is performed.
m
GMA – Global Master Application – is an Idle Terminal Application acting as terminal applications
dispatcher.
GMA listens for the terminal events (e.g. keypad key presses, etc.) and once an event occurs passes the
information about the event to other terminal applications, for example, Incendo Online MicroBrowser.
GMA normally starts when the terminal is powered up or rebooted.
TML Application Development Guidelines 33
Release 3.0.0.0
Authoring in TML
In that case as usual, the MicroBrowser – right after its start – will switch to the first of
the screens within the TML page whose URL is defined by the current setting for the
variable oebr.start_page. (For more information on this variable, see its
description in “Incendo Online MicroBrowser‐related variables” on page 125.)
gma.event.subscribed="" corresponds to the case when you don’t want Incendo
Online MicroBrowser to be informed of any GMA events and, consequently, you are
not going to use the information about the ‘GMA events’ in your application.
gma.event.occured
This variable stores the name of the event that took place. It can have one of the
following values: "menu", "anykey", "mag", or "icc" where the "menu"
corresponds to the menu key press and the rest of the names have the same meaning
as in the case of the variable gma.event.subscribed.
As a by the way note, the set of possible values for this variable is, effectively, limited
by the list of event names currently stored in the variable gma.event.subscribed.
This, of course, doesn’t refer to the event with the name "menu".
gma.event.key.pressed
The value of this variable tells which of the keypad keys was pressed (if Incendo
Online MicroBrowser is subscribed to key presses and one of the corresponding keys
in fact was just pressed).
The variable can take one of the values from the following set: "enter", "stop",
"00", "cancel", "sys", "lfeed", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
"f8", and "f9". All these values correspond to the keypad key names adopted in
TML.
Declaring GMA event variables
The variables related to processing of the GMA events are declared in the Embedded
Terminal Application (see “Embedded terminal software” on page 39) in the
following way:
<vardcl name="gma.event.subscribed" value="" perms="rwxrw"
volatile= "no"/>
<vardcl name="gma.event.occured" value="menu" perms="rwxr-"/>
<vardcl name="gma.event.key.pressed" value="" perms="rwxr-"/>
As you can see, the variable gma.event.occured is initially set to "menu"; an
empty string is assigned to two other variables.
Example of GMA events being processed in a TML application
To illustrate how GMA events can be processed in a TML application, let us consider
one of the possible implementations of the starting TML page:
Figure 4 ‐ 6: GMA event processing using TML
<?xml version="1.0" encoding="ISO-8859-1"?>
<tml xmlns="http://www.ingenico.co.uk/tml">
<head>
<defaults menu="#initialscr" cancel="#initialscr"/>
<link href="/btmlpa/tmlapp.tml" rev="text/tml"/>
<link href="/magcard/magcard.tml" rev="text/tml"/>
<link href="/iccemv/iccemv.tml" rev="text/tml"/>
</head>
<screen id="initialscr">
<next uri="#initialscr1">
<variant uri="/magcard/magcard.tml"
lo="tmlvar:gma.event.occured" ro="mag" op="equal"/>
<variant uri="/iccemv/iccemv.tml"
lo="tmlvar:gma.event.occured" ro="icc" op="equal"/>
</next>
</screen>
TML Application Development Guidelines 34
Release 3.0.0.0
Authoring in TML
TML Application Development Guidelines 35
Release 3.0.0.0
Authoring in TML
4. Since the logical condition in the first of the <variant> elements now
evaluates as true, Incendo Online MicroBrowser goes to the page whose URL
is specified within this <variant> element (/magcard/magcard.tml).
n
Downloading one image library file is much faster than downloading numerous image files.
o
Linux users should use the file imagelib.sh located in the same directory as the file imagelib.cmd
directory.
TML Application Development Guidelines 36
Release 3.0.0.0
Authoring in TML
The [source] is an optional parameter. If you omit it, all image files (that is, ones
having the following extensions: .bmp, .gif, .jpeg, .jpg, .tiff, .tif) located in
the current directory will be added to the image library.
In place of the [source] you can use:
• An absolute or a relative path to a directory where the image files are located,
for example, C:\images, images, and so on.
In this case all the image files located in the specified directory will be placed
into the image library.
• A blank‐space‐separated list of paths to the image files, for example:
ok.gif yes.gif cancel.gif images\logo.bmp
in this case the listed files will be placed into the library.
• File selection pattern containing wild cards such as ? and *, for example,
images\???.gif.
In this case all the files whose paths satisfy the specified selection condition
will be placed into the library. (If the pattern images\???.gif were used, all
.gif files with the names containing three characters and located in the
subdirectory images of the current directory would be added to the image
library.)
This is an example of how to create an image library in the easiest way:
1. Copy all the image files referenced in your TML application to the folder
where the imagelib.cmd utility is located (that is, the bin subfolder of the
Incendo Online Gateway folder).
2. Start Windows command interpreter cmd.exe:
2.1 Click Start at the bottom left corner of the screen, and then click Run.
The Run window is displayed.
2.2 In the field next to Open, type cmd, and then click OK.
The cmd.exe window is displayed.
3. If the current drive (shown at the beginning of the last line as [drive
letter]: e.g. C:) is not the one on which the file imagelib.cmd is located,
switch to the required drive:
Type [drive letter]: (for example, D:), and then press Enter.
The drive you have just specified is shown at the beginning of the current
line.
4. To make the directory where the file imagelib.cmd is located the current
directory, type cd [path to Incendo Online Gateway]\bin (for
example, cd C:\oegw\bin), and then press Enter.
The path to the directory you have just specifies is shown on the current line.
5.To create an image library file in the current directory, type
imagelib.cmd [output_file_name].[extension]
for example, imagelib.cmd my_lib.iml
The imagelib.cmd utility starts creating the image library. If all is well, the
last two messages output by the utility into the cmd.exe window will look
something like this:
20/08/07 16:28:57 INFO [main] [ImgLib Generator] 25 file(s)
processed.
20/08/07 16:28:57 INFO [main] [ImgLib Generator] done.
Note: You are advised that you run the imagelib.cmd from its ‘native’ folder, that
is, the subfolder bin of the Incendo Online Gateway folder. You may experience
problems if you copy the imagelib.cmd to a different directory and run it from
there.
Note: It is assumed here that the file name extension you are using for your image
library files is the .iml. If this is not the case, you should specify the actual file name
extension in place of the iml in the piece of code given above.
4. Save and close the file.
5. Restart Apache Tomcat.
TML Application Development Guidelines 38
Release 3.0.0.0
Authoring in TML
The order of the items defines that in which the supported languages are switched on
the virtual (touch screen) keyboard. The set of the items defines the set of supported
languages (alphabets) on the virtual keyboard.
The default variable’s value (one specified in the variable declaration) is
"english;french;spanish".
For more information on supported languages (alphabets) and the virtual keyboard
layouts, see Basics of Working with Incendo Online‐enabled Terminals.
TML Application Development Guidelines 39
Release 3.0.0.0
TML Application Development Guidelines 40
Release 3.0.0.0
5
TML and payment cards
This chapter introduces TML concepts related to card payment and
working with terminal peripherals. It includes overview of transaction
flows for the card types supported by Incendo Online and instructs the
TML application developers on how to add card payment possibilities to their
services.
Payment cards
Incendo Online currently supports two basic types of payment cards: the magnetic
stripe cards and ICC EMV (Integrated Circuit Cards).
Magnetic stripe cards provide rather limited capabilities for payment. They are able to
store only simple data about the cardholder and card itself, required for card
identification, and support a limited number of payment operations. ICC EMVs
represent a new generation of payment cards, where the card is indeed a small
embedded computer with multiple service applications on board. ICC EMVs offer
enhanced payment possibilities and diversity of services being significantly more
secure.
TML Application Development Guidelines 41
Release 3.0.0.0
TML and payment cards
Figure 5 ‐ 1: Magnetic Card Transation Flow
Swipe card <card>
Read data
Enter amount <input>
Risk Management <card>
Risk management
Submit transaction <submit>
data
TML Application Development Guidelines 42
Release 3.0.0.0
TML and payment cards
verdict. If the transaction approved, MicroBrowser closes the card, see “auth”
on page 60. The server can reject the transaction and generate a dynamic
screen with an error message. If the connection to the server is broken,
MicroBrowser will request risk management again to ask whether the
transaction can be completed offline.
Figure 5 ‐ 2: Smart Card (ICC) Transaction Flow
Insert card
<card>
Read data
Select application
Enter amount <input>
Card Holder Verification <card>
get cvm
Risk Management <card>
Risk management
Post transaction <tmlpost>
data
Verify
signature
TML Application Development Guidelines 43
Release 3.0.0.0
TML and payment cards
To determine which exactly card is processed, check the value of the variable
card.parser.type .
Every transaction step corresponds to a specific operation with the card conforming to
the transaction flow defined for a specific card type, e.g. reading card data, specifying
the amount of money to be paid, completing risk management checks and so on, see
“Accessing card data” on page 41.
A parser assigns the data read from the card to the predefined parser‐specific
variables listed in the section “Variables used by card parsers” on page 120. It can also
change values of some other auxiliary variables related to the processed transaction.
When required, the assigned variables values are sent to the Application Server for
processing.
TML Application Development Guidelines 44
Release 3.0.0.0
6
TML reference
This chapter provides a reference to all the elements used by the TML.
Charset
The attribute value specifies the character encoding of a linked resource. TML
currently supports ISO‐8859‐1 (default) and UTF‐8 encodings.
Name XML Type Usage
Charset string The type is used for values of the charset attribute
of the <link> element.
Example:
<link href="tmlapp_icc.tml" charset="ISO-8859-1"/>
ContentType
The attribute value declares a content type (also known as media type or MIME type)
of a linked or embedded resource. For TML resources, you should use "text/tml"
MIME extension (default).
Name XML Type Usage
ContentType String The type is used for values of the rev attribute of the
<link> element.
Example:
<link href="/magcard/magcard.tml" rev="text/tml"/>
Length
The attribute value defines a number of pixels or a percentage of the horizontal or
vertical space. The value of 50% means half the available space while 50 means 50
pixels.
Name XML Type Usage
Length String The type is used for values of the height, width,
cellpadding and cellspacing attributes of table
elements.
Example:
<table width="100%">...<table />
LinkTypes
The attribute value defines a space‐separated list of link types. See the table below for
the list of link types allowed in TML:
Name XML Type Usage
LinkTypes NMTOKENS The type is used for values of the rel and rev
attributes of the <link> element. The following link
types are supported: stylesheet – specifies an
external stylesheet for the document.
Example:
<link href="style.css" rev="stylesheet"/>
TML Application Development Guidelines 45
Release 3.0.0.0
TML Reference
MultiLength
The attribute value defines a number of pixels or a percentage of the horisontal or
vertical space or a relative length expressed as i* where i is an integer. When
allocating space for elements, MicroBrowser first processes pixel and percentage
lengths, then divides the remaining space among all elements with a relative length.
An element with a length of 3* will be allocated with space three times bigger than an
element with length 1*. The value * is equivalent to 1* and instructs MicroBrowser to
“fill the remaining space.”
Name XML Type Usage
MultiLength string The type is used for values of the width attribute of
<col> and <colgroup> elements.
Example:
<colgroup width="0*" />
Number
The attribute value defines a number which contains at least one digit in the range of 0
to 9.
Name XML Type Usage
Number nonNegative Attribute values of numerous elements which
Integer represent integer numbers greater than or equal to
zero.
Example:
<input alt="Amount:" type="number" name="payment.amount"
size="10" format="^*0.00"/>
Pixels
The attribute value defines a number of pixels.
Name XML Type Usage
Pixels nonNegative The type is used for values of the border attribute of
Integer the <table> element.
Example:
<table border="3">...<table/>
Text
The attribute value defines a human‐readable string.
Name XML Type Usage
Text string The type is used for values of the alt attribute of
<img>, <input> and <textarea> elements.
Example:
<input alt="Expiry Date:" type="date" name="card.expiry_date"/>
URI
The attribute value defines a Uniform Resource Identifier (URI).
Name XML Type Usage
URI anyURI The type is used for values of the href attribute of
<a>, <base> and <link> elements and src attribute
of the <img> element.
Example:
<a href="/magcard/magcard.tml">MAGCARD</a>
TML Application Development Guidelines 46
Release 3.0.0.0
TML Reference
Formatter
Formatter is a data type defining patterns for formatting and de‐formatting of various
values. For general information, see “Formatting and de‐formatting” on page 24.
Name XML Type Usage
Formatter string The type is used for values of the format attribute of
the <vardcl>, <setvar>, <getvar>, <input>,
<textarea>, <strtemplate>, and <variant>
elements.
It is also used as a value of the ro attribute in
<setvar> element if the element’s op attribute is set
to "format" (op="format").
Example:
<getvar name="terminal.datetime" format="DD/MM/YYYY hh:mm:ss"/>
Formatter patterns for each variable type are described further in the section.
The patterns are case‐sensitive; for example, "M" is different from "m". If the custom
pattern contains white‐space characters or characters enclosed in single quotation
marks, the output string will also contain those characters. Characters that are not part
of a format pattern or not format characters are reproduced “as is”.
The backslash (\) is used as an escape character in the patterns. It suppresses (escapes)
the special meaning of the immediately following character. For example, to “escape”
the asterisk (*) in cases when it can have special meaning, you can use the sequence
\*.
Numbers
Formatter patterns for numbers can contain any characters. The following characters
when used in the pattern have special meanings:
Symbol Description
^ If appears as the first symbol in the pattern, specifies that the pattern
should be filled from right to left – when the terminal user inputs the
data.
In any other position within the pattern – to be displayed literally –
this character should be escaped with the backslash: \^.
0 A decimal digit.
If the value is such that the corresponding position in the output “is
empty,” this position is filled with zero.
* An arbitrary number of digits.
This character is not allowed in the first position.
Also, it can not be used more than once within a pattern as a character
with a special meaning. For example, the pattern 0** is illegal, while
the pattern 0*\* is a valid one.
– In the first position or in the second position when immediately
following the ^ means that the number can be negative. Displayed
literally in front of the value if the number is negative and is omitted
for positive numbers.
To be displayed literally in positions other than the first one, this
character should be escaped with the backslash: \–.
The pattern used for numbers by default (in the absence of the format attribute) is:
-0*
The table below shows some number formatting examples.
TML Application Development Guidelines 47
Release 3.0.0.0
TML Reference
Strings
Formatter patterns for strings can contain any characters. The following characters
when used in the pattern have special meanings:
Symbol Description
c Any character that should be reproduced “as is”.
n Any digit. The entered digit is displayed “as is”.
c# Hidden character – one that should be reproduced as an asterisk (*).
n# Hidden digit – one that should be reproduced as an asterisk (*).
number If appears after c, n, c#, or n#, indicates the number of characters or
digits, for example, c4 is the same as cccc.
* If appears after c, n, c#, or n# indicates the arbitrary number of
characters or digits.
This character is not allowed in the first position.
Also, it can not be used more than once within the pattern as a
character with a special meaning. For example, the pattern c** is
illegal, while the pattern c*\* is a valid one.
The pattern used for strings by default (in the absence of the format attribute) is c*.
For patterns containing c, n, c#, or n# followed by a number, the “empty” positions
in the output are displayed as dashes (-).
The table below shows some formatting examples for strings:
Formatter Value Transforms to
c* ABCD ABCD
c#* ABCD ****
c8 ABCD ABCD----
c2c#2c4c* ABCD AB**----
^*0.00c*\* ABCD ^*0.00ABCD*
Dates
Formatter patterns for dates can contain any characters. The following sequences of
characters when used in the pattern have special meanings:
Sequence Description
YYYY or The four‐digit representation of the year, for example, 1995, 2005, and
yyyy so on.
TML Application Development Guidelines 48
Release 3.0.0.0
TML Reference
Sequence Description
YY or yy The abbreviated, two‐digit representation of the year in which two
first digits are omitted.
In this representation, the years from 00 to 69 are treated as belonging
to the 21th century, while the ones from 70 to 99 – as belonging to the
20th century. For example, 55 and 72 would mean 2055 and 1972
respectively.
If the year in this representation is less than 10 it is displayed with a
leading zero.
MM The two‐digit representation of the month number: 01 for January, 02
for February, and so on.
Months whose numbers are less than 10, have a leading zero in this
representation.
DD or dd The two‐digit representation of the number of the day within a
month.
Numbers less than 10 are displayed with a leading zero.
hh In the absence of am/pm, the hour in 24‐hour clock.
Single‐digit hours are displayed with a leading zero.
mm The minute.
Single‐digit minutes are displayed with a leading zero.
ss The second.
Single‐digit seconds are displayed with a leading zero.
am/pm Specifies that 12‐hour clock should be used. This sequence can not
precede the hh and can not be used in the absence of hh.
Depending on an hour, either the am or pm will be shown in place of
am/pm.
GMT Indicates that the date belongs to the GMT timezone. If this sequence
is not present, it is assumed that the variable is set to the local
(terminal) timezone.
Note: In date patterns each of sequences listed above can be used only once. The
following characters must be escaped by means of the backslash (\) for “as‐is”
reproduction: y, Y, m, M, d, D, h, H, s, S.
The pattern used for dates by default (in the absence of the format attribute) is
YYYY/MM/DD.
To fill the ‘empty’ positions in the pattern the data from the ‘default’ date and time
1970/01/01 00:00:00 are used.
When GMT formatter is used to set a date variable, the letters GMT must also be
present in the appropriate place in the lo attribute value of the setvar:
<setvar name=”date1” lo=”01/01/2009 00:00:00 GMT”
format=”DD/MM/YYYY hh:mm:ss GMT” />
The table below shows some formatting examples for dates:
Formatter Value Transforms to
DD-MM-YY 2005/12/31 31-12-2005
DD-MM-YY hh:mm:ss 2005/12/31 31-12-2005 00:00:00
DD-MM-YYYY 2005/12/31 23:59:59 31-12-2005
hh:mm:ss 2005/12/31 23:59:59 23:59:59
hh:mm am/pm 2005/12/31 23:59:59 11:59 pm
To\da\y i\s DD/MM 2005/12/31 23:59:59 Today is 31/12
TML Application Development Guidelines 49
Release 3.0.0.0
TML Reference
Opaque
While internally opaque variables contain binary values, to set or display opaque
variables you have to use one of two possible formats: hex or base64.
Formatter Description
base64 This is the default format. Base 64 format uses 64 characters to encode
data, consisting of upper and lower‐case Roman aphabet (A‐Z, a‐z),
the numerals (0‐9), and the symbols + and /. Symbol = is used as a
special suffix.
hex The variable is presented as a sequence of hexadecimal characters (0‐
9, A‐F). Each two characters represent a byte and are separated by a
space. For example: A0 FF 11 EC DA 13 etc.
The pattern used for opaque variables by default is base64.
InputType
The attribute value defines a type of the input expected from the user.
Name XML Type Usage
InputType token The type is used for values of the attribute type
(<input> element). The values define the type of the
input expected from the user. The following tokens
are allowed: "number" – a number is expected,
"date" – a date, "text" – any text, "password" – a
password (input is masked), "checkbox" – a user
should fill a checkbox, "radio" – a radio button,
"submit" – Submit button, "reset" – Reset button.
By default, a text input is expected.
Example:
<input alt="APN:" name="gprs.apn" value="tmlvar:gprs.apn"/>
TML Application Development Guidelines 50
Release 3.0.0.0
TML Reference
NextScreen
Defines the elements which are used to identify which screen should be processed
next.
Name XML Type Usage
NextScreen <econn>, Defines the URI of the next screen. The URI can be
<error>, specified either explicitly as a constant reference, or as
<next> a variable reference, or as a selection of one or more
conditional choices specified using child <variant>
elements. The variant conditions are processed in the
order they are listed. If none of the conditions
matches, the URI specified in the required uri
attribute of the element is used.
Example:
<next uri="#mag_submit">
<variant lo="tmlvar:card.parser.verdict" op="equal"
ro="reject" uri="#reject_trans"/>
</next>
Permissions
The attribute value defines a pattern for applying read and write access permissions to
a TML variable or a TML log. The pattern controls the use of the variable or the log
throughout its entire scope, see “Scopes of variables” on page 22 for more details.
Name XML Type Usage
Permissions string The type is used for values of the perms attribute of
the <vardcl> and <logdcl> elements. The value is
a five‐character string in the rwxrw format, where
each character specifies a certain access right option.
Any symbols, except "-" identify that the option is
set.
First two options define the access rights to the
variable or the log from pages located in the same
directory (the root‐of‐the‐scope directory) as the one
on which the variable or the log is declared. The first
option grants read access permission, the second –
write access permission. The third option (if set) does
not allow to redefine the variable or the log in the
narrower scope. The last two options define access
rights to the variable or the log from pages located in
subdirectories of the root‐of‐the‐scope directory. The
fourth option grants read access permission, the fifth –
write access permission.
Default pattern is "rw-rw" which grants “full access”
to the variable or the log.
Example:
<vardcl name="payment.amount" type="integer" perms="rwxrw"/>
TML Application Development Guidelines 51
Release 3.0.0.0
TML Reference
TRules
The attribute value defines a type of ruling applied to the table.
Name XML Type Usage
TRules token The type is used for values of the attribute rules
(<table> element). The values define the table
column and body row ruling. The following tokens
are allowed: "none" – no rules appear between table
cells, "rows" – the rules appear between rows,
"cols" – between columns, "all" – between
columns and rows. By default, if the border attribute
is not specified or equal to zero, "none" is assumed,
otherwise – "all".
Example:
<table border="2" rules="rows">
...
<table />
Valref
The attribute value represents a string that may contain variable references.
Name XML Type Usage
Valref string The type is used for values of attributes which can
contain variable or constant references. To reference a
variable value the prefix "tmlvar:" should be
specified before the variable name, see the example
below.
Example:
<setvar name="oebr.submit_mode"
lo="tmlvar:card.parser.verdict"/>
<a>
Description
This element defines a source anchor for a hypertext link which points to a TML
screen or page. The target is specified in href attribute. The value of this attribute can
be represented by a constant or a variable reference, for example, href="#connect",
href="tmlvar:oebr.start_page".
The anchors cannot be nested.
An anchor can contain an <img> element.
Attributes
Name Type Description
href URI Specifies a destination URI for the link.
The value of the attribute can be represented by a
constant or a variable reference.
It can also be one of special URIs ‐ back, menu or
cancel (see on page 16).
id ID See “id attribute” on page 115.
class NMTOKENS See “class attribute” on page 115.
TML Application Development Guidelines 52
Release 3.0.0.0
TML Reference
Related elements
Parent elements Child element
<p> <dt> <span> <pre> <h1>, <h2>, <h3>, <img>
<h4>, <h5>, <h6>, <prompt>, <baddata>,
<form>, <print>, <display>, <td>, <th>,
<dd>, <li>, <div>
Remarks
Note that the URI cannot reference graphic files. See “URIs and TML” on page 14 for
general information about URI formats supported by TML.
For href attribute, instead of URI, you can also specify predefined string values, such
as back and exit. The first switches to the previously processed screen or to the root
screen if the previous screen cannot be defined. The second – commands the terminal
to exit MicroBrowser. See “Special URI values” on page 16 for more information
Example
<screen id="initialscr" cancel="#initialscr">
<display>
<h1>OE Examples:</h1>
<a href="/btmlpa/tmlapp.tml">BTMLPA</a>
<br/>
<a href="/magcard/magcard.tml">MAGCARD</a>
<br/>
<a href="/iccemv/iccemv.tml">ICCEMV</a>
<br/>
<a href="emb://embedded.tml">Terminal Config</a>
</display>
</screen>
<baddata>
Description
Using <baddata> element, you can design a message that will be displayed if a user
enters incorrect data in the form field.
The message appears for the specified time or until the user presses a button, then the
terminal switches back to the form.
Attributes
Name Type Description
timeout Number Specifies the amount of time the message is displayed
on the screen. If timeout is 0, the user should press a
key to return to the parent screen. Default value is 2.
max Number Specifies the maximum amount of attempts the user is
allowed for entering the data. If the user has
exhausted the maximum amount of attempts but still
failed to provide the correct data, MicroBrowser
switches to the screen specified in the next attribute.
Default value is 0.
next ValRef Specifies an URI of the screen to which MicroBrowser
switches if the user failed to enter the valid data.
Default value is tmlvar:oebr.prev_screen.
It can also be one of special URIs ‐ back, menu or
cancel (see on page 16).
id ID See “id attribute” on page 115.
class NMTOKENS See “class attribute” on page 115.
TML Application Development Guidelines 53
Release 3.0.0.0
TML Reference
Related elements
Parent elements Child element
<input> <textarea> <tform> <a> <br> <div> <dl> <h1>, <h2>, <h3>,
<h4>, <h5>, <h6>, <hr>, <img>, <getvar>,
<ol>, <p>, <pre>, <span>, <table>, <ul>
Example
See the example for <tform> element on page 104.
<base>
Description
This element defines the base URI for all relative links on your page. The element
must be placed between the opening and closing tags of the <head> element.
Attributes
Name Type Description
href URI Specifies a base URI for the page.
Related elements
Parent elements Child element
<head> none
Remarks
If <base> is omitted, it is considered that the base URI is the URI of the current page.
The <link> element(s) following the <base> tag are relative to the defined base URI.
The base can be defined as an absolute or as a relative URL, see “URIs and TML” on
page 14.
<br>
Description
This tag is used to create a line break.
Attributes
Name Type Description
id ID See “id attribute” on page 115.
class NMTOKENS See “class attribute” on page 115.
Related elements
Parent elements Child element
<a>, <baddata>, <display>, <div>, <dd>, none
<dt>, <form>, <h1>, <h2>, <h3>, <h4>,
<h5>, <h6>, <li>, <p>, <pre>, <print>,
<prompt>, <span>, <td>, <th>
<call_func>
Description
This element calls the specified terminal operating system C function. This is required,
for example, for printing or cancelling offline posts, performing the terminal
initialisation procedure, clearing a log, etc.
When calling a C function, you should specify two URIs: one for the screen to switch
to if the function call was a success and the other – for the screen to go to if the
function call failed.
TML Application Development Guidelines 54
Release 3.0.0.0
TML Reference
The first of the URIs is specified by means of the next attribute (see “<screen>” on
page 85) or the <next> element (see “<next>” on page 81), while the second – by
means of the <error> element (see “<error>” on page 66).
If the function call fails, a brief description of the error that occurred is ‘placed’ into
the predefined TML variable err.description (see “Error handling” on page 31
and “Error handling variables” on page 123).
Attributes
Name Type Description
name string Required attribute specifying the name of the
function. See “Remarks” below for the list of the
predefined function names.
Related elements
Parent elements Child element
<screen> none
Remarks
Some of the functions use predefined TML variables as input parameters though these
variables are not explicitly referenced within the <call_func> element. Values of such
variables should be properly set prior to calling the corresponding function (see the
following table).
Please also note that the functions working with offline posts, cached TML pages and
logs are applied only to the resources/data with the appropriate scopes; see “URIs and
data scopes” on page 15. Scopes of cached TML pages are defined similarly to those of
the offline posts.
Function name Description
cancel_offline_post Cancels an offline post. The ID of the post to be cancelled
is defined by the value of the predefined variable
oebr.post_id. Its value should be properly set prior
tocalling this function.
clear_http_cache Deletes cached TML pages from the terminal cache. The
function does not affect cached offline transactions.
clear_log Clears a log, that is, deletes all log records. The name of
the log to be cleared is defined by the value of the
predefined variable oebr.log_id. The value of this
variable should be properly set prior to performing the
function call.
connect_to_server Forces the terminal to connect to Incendo Online Gateway
and, depending on the current values of the
corresponding TML variables:
• submit to the Application Server all offline posts – if
oebr.connect.pool_off="yes"
• request the updated versions of all TML resources
cached in the terminal memory (TML pages, images, etc.)
– if oebr.connect.sync_cache="yes"
• request the updates of configuration data for ICC
EMV and magnetic card parsers – if
oebr.connect.sync_config="yes"
For more information, see descriptions of these variables
in “Incendo Online MicroBrowser‐related variables” on
page 125.
net_initialisation Activates terminal initialisation, which assumes
requesting the binary terminal password from the
Incendo Online Gateway.
TML Application Development Guidelines 55
Release 3.0.0.0
TML Reference
Function name Description
print_offline_posts Prints information about all postponed HTTP POST
requests using the embedded printer. When printed, each
request is accompanied with a local unique identifier
which is assigned by the terminal.
release_transport Instructs the terminal to disconnect from the server.
Example
...
<logdcl name="my-log" ..
...
<screen id="clear-my-log" next="#call_ok">
<setvar name="oebr.log_id" lo="my-log"/>
<error uri="#call_error"/>
<call_func name="clear_log"/>
</screen>
<card>
Description
The element allows TML application to interact and control terminal card parsers. The
detailed information on card parsers is provided in “Payment cards” on page 41.
You should specify (using the parser attribute) which card parser the terminal
should use in order to accept the user card data.
You define the type of a card operation using the parser_params attribute. It
instructs the parser to perform a particular action or sequence of actions with the card.
The card parser assigns the read data to the card‐related predefined variables, see
“Variables used by card parsers” on page 120. The assigned values can be submitted
to the Application Server for processing. You can also specify parser‐specific
commands using the parser_params attribute.
Attributes
Name Type Description
parser string Specifies the card parser. Possible values are "mag"
and "icc_emv"; see “Accessing card data” on page
41 for more information about the parsers.
parser_params string Specifies the command passed to the card parser.
The available commands are parser‐specific:
"mag": read_data, risk_mgmt
"icc_emv": init_app, get_cvm, verify,
risk_mgmt, auth, wait_remove_card
These commands are discussed in “Remarks”
below.
Related elements
Parent elements Child element
<tform> none
Remarks
Below is the description of available parser commands.
read_data
This function reads data from a magnetic stripe card. This is the initial step of a
magnetic stripe card transaction. You can use this command on the initial screen of
your application, which prompts the user to swipe a card.
TML Application Development Guidelines 56
Release 3.0.0.0
TML Reference
...
<tform>
<baddata class="c_center">
<getvar name="err.baddata_reason"/>
</baddata>
TML Application Development Guidelines 57
Release 3.0.0.0
TML Reference
Note: for online transactions, if connection to Incendo Online Gateway is lost, risk
management should be repeated again. The parser should analyse the value of
err.baddata_reason variable and, depending on the current risk management
policy, can either recommend to use the offline mode of transaction processing, or
reject the transaction.
init_app
Initiates communication with an ICC card. This is an initial step of the ICC EMV
transaction processing:
...
<tform>
<baddata>
<getvar name="err.baddata_reason"/>
</baddata>
TML Application Development Guidelines 58
Release 3.0.0.0
TML Reference
The get_cvm command allows to retrieve the available CVMs one by one.
When the command is executed for the first time, the parser sets the value of the
card.parser.cvm variable to the first item retrieved from the list of CVMs. Each
next execution of the command sets the value of this variable to the next CVM
available in list. As a result, the variable card.parser.cvm can have one of the
following values:
Value Description
"pin_online" PIN should be verified online.
"pin" PIN should be verified offline.
"no_cv" No card holder verification required.
"" (empty string) No more CVMs are available on the card.
If the card suggests the offline PIN verification method, your TML application should
ask the user to enter the PIN.
To capture the PIN, use the <pinentry> element. You can specify that the PIN
should be verified by ICC EMV using the icc attribute of <pinentry> element.
Then, to verify the entered PIN, use the verify parser command (see the next section).
There may be cases when a PIN pad is not present or the user refuses to enter the PIN.
In such cases your TML application should set the value of the card.parser.cvr
variable (CVR – Cardholder Verification Result) to "no_pinpad" or "no_pin"
respectively.
If the CVM being used implies verification of the cardholder’s signature,
MicroBrowser will assign the non‐zero value to the variable card.emv.signature,
and after the receipt is printed and signed by the customer, you TML application
should ask the user (the merchant) to verify the signature.
verify
This function verifies the entered PIN offline.
...
<tform>
<card parser="icc_emv" parser_params="verify"/>
</tform>
...
The current number of PIN entry attempts is stored in card.emv.last_attempt
variable.
As a result of the command execution, the parser assigns one of the following values
to the predefined variable card.parser.cvr (CVR – Cardholder Verification
Result):
Value Description
"ok" PIN is valid, card holder verification was successful.
"pin_tries" The user has exceeded the maximum number of attempts
allowed to enter the PIN. The application should try
another CVM.
"failed" The entered PIN is not valid. The user should try to enter
the PIN one more time.
risk_mgmt
This function requests the parser to perform risk management and action analysis for
the current ICC transaction.
...
<tform>
<card parser="icc_emv" parser_params="risk_mgmt"/>
</tform>
...
The parser interacts with the card analysing the current terminal risk management
policy, amount of money, card history and terminal and card action analysis results.
TML Application Development Guidelines 59
Release 3.0.0.0
TML Reference
As a result, the parser suggests a verdict for the transaction which defines the mode of
transaction authorisation (online or offline). The verdict is stored in the predefined
variable card.parser.verdict; the possible values are "online", "offline", or
"reject".
Prior to performing the requested operations, the parser checks the value of the
predefined variable oebr.econn. It is done for troubleshooting possible connection
failures which might occur while performing the authorisation online. If the previous
attempt to post the data to the Application Server has failed due to the connection
error, the parser can either approve the offline risk management or reject the
transaction (depending on the policy currently set for the terminal).
Typically, the output variable values are posted to the Application Server for analysis.
The host part of the application processes the posted values and decides which of
them should be sent to the acquirer and which not.
If online authorisation is required, the host part replies with a dynamically generated
TML page which contains another parser command auth. Otherwise, the transaction
is considered completed at this step.
auth
This function requests the parser to perform the transaction authorisation online –
according to the results of preceding risk_mgmt command. The auth command
usually appears on a dynamic TML screen generated by the host part of your
application.
<tml xmlns="http://www.ingenico.co.uk/tml" cache="deny">
<!-- Example of a dynamic TML page -->
<screen id="auth_ok" next="/iccemv/iccemv.tml#subm_tc_aac">
<!-- authorisation approved -->
<setvar name="payment.txn_result" lo="1"/>
<tform>
<card parser="icc_emv" parser_params="auth"/>
</tform>
</screen>
</tml>
<!-- Screen within the static page that follows the dynamic
page -->
<screen id="subm_tc_aac">
<setvar name="oebr.submit_mode" lo="offline"/>
<next uri="#end_trans"/>
<submit tgt="/iccemv/subm_tc_aac" econn="#end_trans">
<getvar name="oebr.submit_mode"/>
<getvar name="card.emv.aac"/>
<getvar name="card.emv.tc"/>
<getvar name="oebr.transid"/>
</submit>
</screen>
Online authorisation follows the algorithm described below:
1. In response to the submitted ICC variables (after risk_mgmt command) the
host part of the application detects that the transaction goes online and
responds with a dynamic TML page. Usually, the page (see the example
above) represents a TML form, which calls the parser with the auth
command and assigns values to the following variables:
payment.auth_code, payment.emv.issuer_auth,
payment.emv.issuer_script1, payment.emv.issuer_script2.
2. The MicroBrowser executes the page. The received data is written to the card,
the card executes issuer’s scripts and the parser requests the card to calculate
Application Authentication Cryptogram (AAC) and Transaction Certificate
(TC) for the updated card data.
TML Application Development Guidelines 60
Release 3.0.0.0
TML Reference
3. The parser assigns results of the operation to either card.emv.arqc (online),
card.emv.aac (rejected) or card.emv.tc (offline) variables. The status of
the issuer’s scripts execution is put into the variable
payment.emv.issuer_script_results. It is recommended to submit all
these variables to the server for processing.
4. The parser closes the card. Note, that for offline transactions the card is closed
by risk_mgmt command.
wait_remove_card
This function instructs your application to wait until the user removes the card from
the card reader. This command is usually accompanied with a short prompt for the
user:
<tform>
<card parser="icc_emv" parser_params="wait_remove_card"/>
<prompt>
Please, Remove Card
</prompt>
</tform>
<col>
Description
Assigns attribute values to the individual columns within <colgroup>. You should
not use this element if you have already specified span attribute for <colgroup>
element.
Attributes
Name Type Description
id ID See “id attribute” on page 115.
class NMTOKENS See “class attribute” on page 115.
span Length Defines how many columns are affected by the <col>
element.
If omitted, the element spans a single column.
width Length Specifies the width for each spanned column.
align token Sets the horisontal alignment of the cell contents. The
possible values are left, center and right.
valign token Set the vertical alignment of the cell contents. The
possible values are bottom, middle and top.
Related elements
Parent elements Child element
<colgroup>, <table> none
Example
<table width="90%" border="1" cellspacing="5">
<colgroup>
<col width="30%" />
<col width="40%" />
</colgroup>
<col width="60%" />
<tr>
<th>First Column Header</th>
<th>Second Column Header</th>
<th>Third Column Header</th>
</tr>
<tr>
<td>First Column First Row</td>
<td>Second Column First Row</td>
<td>Third Column First Row</td>
</tr>
TML Application Development Guidelines 61
Release 3.0.0.0
TML Reference
<tr>
<td>First Column Second Row</td>
<td>Second Column Second Row</td>
<td>Third Column Second Row</td>
</tr>
</table>
<colgroup>
Description
This element allows you to create a column‐centric table as compared to the standard
row‐centric XHTML table. You can organise semantically related columns in one or
more columns groups.
If the span attribute is not specified for a group, you can assign attributes to the
individual columns using the <col> element.
Attributes
Name Type Description
id ID See “id attribute” on page 115.
class NMTOKENS See “class attribute” on page 115.
span Length Sets the number of columns that are associated with
each column group. If the columns are unequal, it is
recommended to use the <col> element to create
each column instead. If omitted, the element spans a
single column.
width Length Specifies the width for each spanned column.
align token Sets the horisontal alignment of the cell contents. The
possible values are left, center and right.
valign token Set the vertical alignment of the cell contents. The
possible values are bottom, middle and top.
Related elements
Parent elements Child element
<colgroup>, <table> <col>
Example
See “Example” for the <col> element on page 61.
<dd>
Description
This element represents the definition in definition lists. You can type the text directly
between the opening and closing tags.
Attributes
Name Type Description
id ID See “id attribute” on page 115.
class NMTOKENS See “class attribute” on page 115.
Related elements
Parent elements Child element
<dl> <a>, <br>, <span>, <getvar>, <input>,
<textarea>, <div>, <dl>, <h1>, <h2>, <h3>,
<h4>, <h5>, <h6>, <hr>, <img>, <ol>, <p>,
<pre>, <table>, <ul>, <form>
Example
See the example for the <dl> element on page 64.
TML Application Development Guidelines 62
Release 3.0.0.0
TML Reference
<defaults>
Description
Defines default values for menu and cancel attributes of <screen> elements within
the page. The attributes are used for setting URIs of the screens to switch when the
user presses the Menu or Stop button on the terminal.
Attributes
Name Type Description
menu Valref Specifies the URI to switch to if a user presses the
Menu button on the terminal. The value should be a
constant or variable reference.
cancel Valref Specifies the URI to switch to if a user presses the
Cancel button on the terminal. The value should be a
constant or variable reference.
Related elements
Parent elements Child element
<head> none
Remarks
You can always override these settings for a particular screen by defining menu and
cancel attributes of the corresponding <screen> element.
If you omit the element or specify empty values for the element attributes, pressing
Menu and Cancel buttons on the terminal will have no effect.
Example
See the example for <head> element on page 68.
<display>
Description
This element defines the limits of the display screen. You can type the text you want
to appear on the screen directly between the opening and closing tags. The content
placed between the element tags is rendered on the terminal display.
If the displayed content does not include links, it will appear on the screen until the
user presses a button or the system timeout occurs.
Attributes
The element has no attributes.
Related elements
The element is flow‐based.
Parent elements Child element
<screen> <a>, <br>, <div>, <dl>, <form>, <getvar>,
<h1>, <h2>, <h3>, <h4>, <h5>, <h6>, <hr>,
<img>, <input>, <log>, <ol>, <p>, <pre>,
<span>, <table>, <textarea>, <ul>
TML Application Development Guidelines 63
Release 3.0.0.0
TML Reference
Example
<screen id="initialscr" cancel="#initialscr">
<display>
<h1>OE Examples:</h1>
<a href="/btmlpa/tmlapp.tml">BTMLPA</a>
<br/>
<a href="/magcard/magcard.tml">MAGCARD</a>
<br/>
<a href="/iccemv/iccemv.tml">ICCEMV</a>
<br/>
<a href="emb://embedded.tml">Terminal Config</a>
</display>
</screen>
<div>
Description
This element defines a section or division of a document that requires a special
formatting style. The block of text is delimited by line breaks (analogous to <br>).
You can type the text directly between the opening and closing tags.
Attributes
Name Type Description
id ID See “id attribute” on page 115.
class NMTOKENS See “class attribute” on page 115.
Related elements
The element is flow‐based.
Parent elements Child element
<dd>, <display>, <li>, <print>, <td>, <th> <a>, <br>, <div>, <dl>, <form>, <getvar>,
<h1>, <h2>, <h3>, <h4>, <h5>, <h6>, <hr>,
<img>, <input>, <ol>, <p>, <pre>, <span>,
<table>, <textarea>, <ul>
Remarks
You can apply core attributes to the element contents. For example, you can use the
class core attribute to apply the effects of CSS to the text block or you could assign
an id to each block of code to reference it with a hyperlink.
If you want to apply attributes to an inline portion of a page, use <span> instead.
Example
<div class="c_left">
<p><a href="#main">configure</a></p>
<p><a href="/">ignore</a></p>
<p><a href="exit">exit browser</a></p>
</div>
<dl>
Description
This element denotes a definition list. In a definition list, an introduced term or phrase
is followed by a definition or explanation. The element is only used with the <dt>
element, which defines the term, and the <dd> element, which describes the
definition.
Attributes
Name Type Description
id ID See “id attribute” on page 115.
class NMTOKENS See “class attribute” on page 115.
TML Application Development Guidelines 64
Release 3.0.0.0
TML Reference
Related elements
Parent elements Child element
<baddata>, <form>, <prompt>, <dd>, <dt> +
<display>, <li>, <print>, <td>, <th> <dd> +
Remarks
You can also use the <ol> element to create an ordered list and the <ul> element to
create an unordered list.
Example
<dl>
<dt>Term</dt>
<dd>Definition</dd>
<dt>Another term</dt>
<dd>Another definition.</dd>
</dl>
<dt>
Description
This element represents the term in definition lists. You can type the text directly
between the opening and closing tags.
Attributes
Name Type Description
id ID See “id attribute” on page 115.
class NMTOKENS See “class attribute” on page 115.
Related elements
Parent elements Child element
<dl> <a>, <br>, <div>, <dl>, <form>, <getvar>,
<h1>, <h2>, <h3>, <h4>, <h5>, <h6>, <hr>,
<img>, <input>, <ol>, <p>, <pre>, <span>,
<table>, <textarea>, <ul>
Example
See the example for the <dl> element above.
<econn>
Description
This element is a child of the <submit> element. Specifies the URI of the screen to
switch to if the connection to the Application Server is lost. The element is of type
InputType, so the URI can be specified as a constant or variable reference or can be
selected from a number of choices using child <variant> elements.
Attributes
Name Type Description
uri string The mandatory attribute which specifies the URI of
the error screen. It can be a constant or a variable
reference.
It can also be one of special URIs ‐ back, menu or
cancel (see on page 16).
Related elements
Parent elements Child element
<submit> <variant> *
TML Application Development Guidelines 65
Release 3.0.0.0
TML Reference
Example
See the example for the <submit> element on page 98.
<error>
Description
A child element of the <head> (see “<head>” on page 68) and the <screen> (see
“<screen>” on page 85) elements which specifies the URI of the screen to switch to if
an error occurs.
When used within the <head>, the <error> element defines the URI of the ‘default
error screen’ for a page: it is activated if an error occurs when processing a screen
containing no <error> element.
The URI is defined by the element’s uri attribute whose value may be represented by
either a constant or a variable reference. URI may also be selected from a number of
choices defined by the child <variant> elements (see “<variant>” on page 111).
Attributes
Name Type Description
uri string Required attribute specifying the URI of an ‘error
screen’.
Related elements
Parent elements Child element
<head>, <screen> <variant> *
Example
See the example for the <call_func> element on page 56.
<form>
Description
This element defines a layout of the TML form. You can type the text you want to
appear on the screen directly between the opening and closing tags.
Note: The contents of the <form> element cannot be printed using <print> element.
Attributes
The element has no attributes.
Parent elements Child element
<display>, <print>, <form>, <td>, <th>, <div>, <dl>, <h1>, <h2>, <h3>, <h4>, <h5>,
<dd>, <li>, <div> <h6>, <hr>, <img>, <ol>, <p>, <pre>,
<table>, <ul>, <input>, <textarea>
Example
<display>
<form>
<table height="100%" width="100%">
<tr>
<td align="center" valign="middle">
Amount:<br/>
<input alt="Amount:" type="number"
name="payment.amount" size="10" format="^*0.00"/>
</td>
</tr>
</table>
</form>
</display>
TML Application Development Guidelines 66
Release 3.0.0.0
TML Reference
<getvar>
Description
This element returns the value of the variable specified by the name attribute.
Attributes
Name Type Description
name string The required attribute that specifies the name of the
referenced variable.
format Formatter / Defines a pattern for the variable value. Can be a
Valref constant or a reference to a string‐type variable that
contains a valid formatter pattern. The valid pattern
depends on the type of variable that is being set (see
“Formatter” on page 47). If the format attribute is
not used, or it is set to empty (“”), the default
formatter for the variable is used
Related elements
Parent elements Child element
<layout>, <strtemplate>, <submit>, etc. none
Example
<getvar name="payment.amount" format="^*0.00"/>
It is possible to use a variable reference for the value of the format attribute. It must
be of the string type and has to contain a valid formatter pattern:
<screen id=”formtr_test”>
<!-- string variable -->
<setvar name=”amount_formatter” lo=”^EUR: *0.00” />
<!-- integer variable -->
<setvar name=”amount” lo=”12345” />
<display>
<getvar name=”amount” format=”tmlvar:amount_formatter”/>
</display>
</screen>
This screen will show EUR: 123.45 on the terminal display.
TML Application Development Guidelines 67
Release 3.0.0.0
TML Reference
Related elements
Parent elements Child element
<display>, <print>, <form>, <td>, <th>, <a>, <br>, <getvar>, <input>, <span>,
<dd>, <li>, <div>, <prompt>, <baddata> <textarea>
Remarks
Only inline elements can be used within the heading elements.
Example
<h1>OE Examples:</h1>
<head>
Description
A child element of the <tml> element (see “<tml>” on page 106) representing a TML
page header and, as a rule, containing page‐wide settings and defaults specified by
the means of its child elements.
Attributes
Name Type Description
id ID See “id attribute” on page 115.
Related elements
Parent elements Child element
<tml> <base> ?
<link> *
<defaults> ?, <error> ?
Example
<head>
<link href="emb://customer.tml" rev="text/tml"/>
<link href="embedded.css" rev="stylesheet"/>
<defaults menu="#main" cancel="#main"/>
</head>
<hr>
Description
This tag is used to render a horizontal rule (line). The element takes a single line. The
appearance of the rule is controlled by the CSS.
Attributes
Name Type Description
id ID See “id attribute” on page 115.
class NMTOKENS See “class attribute” on page 115.
Related elements
Parent elements Child element
<form>, <dd>, <display>, <li>, <print>, none
<td>, <th>, <prompt>, <baddata>
Example
<hr/>
TML Application Development Guidelines 68
Release 3.0.0.0
TML Reference
<img>
Description
This element is used to insert an image directly into the text flow. No additional line
breaks or carriage returns are automatically inserted before or after the image. The
image positioning can be controlled by means of CSS.
The image file URI is specified by means of the src attribute whose value can be
represented by a constant or a variable reference, for example,
src="images/btmlpa.gif", src="images/my_lib.iml#btmlpa.gif",
src="tmlvar:print_icon", and so on.
The element can be placed inside an <a> tag to provide a “clickable” image for a
hyperlink.
Attributes
Name Type Description
id ID See “id attribute” on page 115.
class NMTOKENS See “class attribute” on page 115.
src URI Required attribute specifying the URI of the image
file.
The value of the attribute can be represented by a
constant or a variable reference.
Image files contained in image libraries (see “Image
libraries: increasing you application’s performance”
on page 36) are referenced like this: [url of the
image library file]#[image file name and
extension], for example
images/my_lib.iml#btmlpa.gif
See also, “Modifying references to image files” on
page 38.
alt Text Required attribute specifying a text message that will
be displayed (in place of the image) if MicroBrowser
cannot display a graphic image or picture.
height Length An attribute setting the height of the image in pixels
or relative to the width of the screen.
width Length An attribute setting the width of the image in pixels or
relative to the width of the screen.
Related elements
Parent elements Child element
<a>, <baddata>, <form>, <prompt>, <dd>, none
<display>, <li>, <print>, <td>, <th>
Example
<a href="#mag_rm">
<img src="images/ok_up.gif" alt="ok_up"/>
</a>
<input>
Description
This tag is used within the <form> element to collect information (text, password,
etc.) entered by the user.
<input> can be used to create input elements of different types. The type of an input
element is defined by the value of the type attribute, see Table 1: The possible values
of the type attribute and their meanings on page 71.
The element has a number of validity check attributes that allow to restrict user input.
TML Application Development Guidelines 69
Release 3.0.0.0
TML Reference
These attributes are equal, not_equal, max and min. These can be either constants
or variable references.
If the validity check fails, MicroBrowser switches to the URI specified in the child
<baddata> element. If you omit <baddata>, validity check is skipped.
If the input data is valid, the value entered by the user is assigned to the variable
specified in the mandatory name attribute.
When MicroBrowser encounters <input> element, it switches the terminal to the
form processing mode, see “Form processing” on page 30.
Attributes
Name Type Description
id ID See “id attribute” on page 115.
class NMTOKENS See “class attribute” on page 115.
alt Text Provides the alternative text for the terminals which
are not capable of displaying images and forms.
name string For input elements of the checkbox, date, number,
password, radio, and text types: specifies the
name of the variable which receives the value entered
by the user.
For input elements of the submit and reset types:
defines the label of (the text shown on) the
corresponding button. By default (in the absence of
this attribute), the button for submitting the form is
labelled OK, while the button for resetting the form –
Reset.
type InputType The attribute defines the type of an input element that
should be rendered on the terminal display. See Table
1 on page 71 for the list of possible values and their
explanations.
readonly token Displays the value that cannot be changed by the user.
size Length Sets the width of a single‐line input box for input
elements of the date, number, password, and text
types (see Table 1 on page 71). The value defines how
many characters can fit in the box.
In addition to that, the value of this attribute defines
the maximum length (measured in the number of
characters) of the input value.
equal Valref This is a validity check attribute. It can be a constant
or a variable reference.
The data entered by the user is checked whether it is
equal to the value specified by the attribute. If not, the
flow control is passed to the child <baddata>
element.
not_equal Valref This is a validity check attribute. It can be a constant
or a variable reference.
The data entered by the user is checked whether it is
unequal to the value specified by the attribute. If not,
the flow control is passed to the child <baddata>
element.
TML Application Development Guidelines 70
Release 3.0.0.0
TML Reference
TML Application Development Guidelines 71
Release 3.0.0.0
TML Reference
Value Description
number a field (box) for entering non‐negative integer numbers.
Note: The number of digits in the input number can not exceed 8.
Thus, the maximum number that can be entered is 99999999.
password a field (box) for entering text where the text is masked
radio a radio button – an element representing one of the possible options.
A radio button usually belongs to a group in which there are at least
two radio buttons. Only one radio button within the group can be
selected. (The situation when none of the radio buttons in the group is
selected or when there is only one radio button in the group is treated
as normal.)
All radio buttons in the group have the same value of the name
attribute – the name of a TML variable associated with the group.
When one of the radio buttons is selected, this variable is assigned a
value defined by the value attribute of the radio button that has been
selected.
The initial state of a radio button on the screen is defined by the
current value of the variable associated with the group and the value
of the value attribute.
If those two are the same, the radio button is initially selected; if
otherwise, the radio button is not selected.
reset a button for resetting the form variables, that is, for bringing them to
the last saved state.
Use this element only in the cases when all variables within the form
are non‐volatile. Avoid using the element if some or all variables within
the form are volatile: in such cases the “resetting capabilities” of the
corresponding button on the screen are not guaranteed.
submit a button for “submitting the form,” that is, for saving new values of
the variables used within the form – if those were changed by the
user.
The use of this element within a form is not necessary since new values
of the variables are saved automatically each time the application
switches from one screen onto another.
Note: To actually submit something to a server, the <submit>
element is used.
text a field (box) for entering text
list See “<input type=ʺlistʺ>” on page 73
Remarks
Any number of <input> elements can be placed anywhere between a pair of opening
and closing <form> tags to create the desired appearance of the form.
Related elements
Parent elements Child element
<form> <baddata> ?
See also “<textarea>” on page 102.
Example
...
<vardcl name="oebr.run_on_reboot" value="yes" perms="rwx--"
volatile="no"/>
...
<screen id="oebr_prfrncs" ...>
<display>
...
<form>
...
TML Application Development Guidelines 72
Release 3.0.0.0
TML Reference
<input type="checkbox" name="oebr.run_on_reboot"
value="yes"/>
 Run on Reboot<br/>
<input type="submit"/>
</form>
...
</display>
</screen>
...
In the example above the value yes is assigned to the variable
oebr.run_on_reboot in its declaration.
When the screen oebr_prfrncs is displayed for the first time, the check box is
selected as the corresponding <input> element is associated with the variable
oebr.run_on_reboot and the value of its value attribute (yes) is the same as the
current value of the oebr.run_on_reboot variable.
If a user deselects the check box and then submits the form or switches onto a
different screen, the empty string is assigned to the variable oebr.run_on_reboot.
<input type="list">
Description
The element is used within the <form> element (see “<form>” on page 66) to create a
list box associated with a TML variable.
The name of the variable is defined by the element’s name attribute.
The set of the list items – options a user can choose from is specified by the value
attribute. The value of this attribute may be represented by a constant string where the
list items are separated with semicolons (;). It may also be represented by a variable
reference (tmlvar:[variable name]). In the latter case the semicolons within the
variable value are treated as list items separators.
There may be list boxes where only one or a number of items can be selected. The
multiple attribute that may be set either to "yes" or "no" defines whether or not
multiple selections are possible. By default, the value "no" is assumed meaning that
only one of the list items can be selected.
Once selection of an item is performed, the item is assigned to the variable associated
with the element. When a number of items is selected, separate items in the variable’s
value are separated with semicolons.
You can use the element’s format attribute to define the formatting pattern which
should be applied to a string formed according to the current selection within the list
box prior to assignment of a value to the variable (see “Formatter” on page 47).
Initially selected in the list (when the corresponding screen has just been shown and a
user has not yet started to select/deselect the items) are the items whose textual
representations are present in the value of the variable associated with the list box. For
example, if the my-var variable is associated with a list box and its current value is
item-2, for the list box with the items item-1, item-2 and item-3
(<input type="list" name="my-var" value="item-1;item-2;item-3"
.. />), the item item-2 will be initially selected.
The appearance of the list box is defined by the element’s rows, width and height
attributes. It may also be influenced by the value of the multiple attribute.
Figure 6 ‐ 1: Examples of <input type=ʺlist>
TML Application Development Guidelines 73
Release 3.0.0.0
TML Reference
A‐1 B
American Dollar John
Paul
A‐2
George
American Dollar
Ringo
American Dollar
British Pound
Russian Ruble
The value of the rows attribute defines how many rows are to be shown. (A row
corresponds to a list item.)
rows="0" and rows="1" would define a drop‐down list box (See A‐1 in Figure 6 ‐ 1
on page 73) where only one row is initially shown. A user has an ability of opening
such a list box (the list in this case ‘drops down’, A‐2 in Figure 6 ‐ 1 on page 73) to see
all the list items and perform selection of the item.
If the value of the rows attribute is set to a value greater than one, a simple (open) list
box is shown (See B in Figure 6 ‐ 1 on page 73); the attribute’s value in this case
corresponds to the number of rows displayed. If the number of rows specified by the
value of this attribute is less than the number of items in the list, a user has the ability
of scrolling the list up and down. If the number of rows to be shown is greater than
the number of items in the list, some of the rows will be empty.
If omitted, the rows="1" is assumed by default which corresponds to a drop‐down
list box.
If the value of the multiple attribute is set to "yes", the value of the rows attribute
will define the number of rows shown only in the case when this number is greater
than the number of list items. Otherwise, the attribute is ignored and the number of
rows shown will be equal to the number of items in the list.
The width attribute defines the (absolute or relative) width of the list box on the
screen. It may be set as a number of pixels or as percentage of the width of the parent
element (say, the width of a table’s cell – if the list box is placed into that cell). The
value of the attribute is ignored if the width specified by this attribute is less than that
necessary to fully display the ‘longest’ of the list items.
The height attribute defines the (absolute or relative) height of a row in the list box.
It may be set as a number of pixels or percentage of the screen height. If the row height
specified by the value of this attribute is less than that necessary to fully display a list
item, the value of the attribute is ignored.
If the attribute is omitted, the row height (default row height) corresponds to the
height of a list item.
If the row height set by this attribute is greater than the default row height, the
number of rows in the list will correspond to the number of the list items; the value of
the rows attribute in this case is ignored. (The rows="0" and rows="1" – in the
absence of the multiple attribute – will, however, specify a drop‐down list box in
which the row height will be defined by the value of the height attribute.)
Attributes
Name Type Description
class NMTOKENS See “class attribute” on page 115.
alt Text Provides the alternative text for the terminals which
are not capable of displaying images and forms.
name string Required attribute specifying the name of a TML
variable associated with the list box.
TML Application Development Guidelines 74
Release 3.0.0.0
TML Reference
TML Application Development Guidelines 75
Release 3.0.0.0
TML Reference
Remarks
When a screen containing a drop‐down list box is displayed, what is initially shown in
the drop‐down list box is the current value of the variable associated with the
corresponding <input type="list"> element. A user, obviously, expects this
value to be in some reasonable relation with the set of available list items (options).
Thus, it is recommended that you first assign one of the list items as a value to a
variable and only then use a list box associated with this variable in your application.
Example
...
<vardcl name="currency" value="American Dollar"/>
<vardcl name="group" value="John;Paul"/>
...
<screen id="set_currency">
<display>
<form>
Select currency:<br/>
<input type="list" name="currency" value="American
Dollar;British Pound;Russian Ruble"/>
</form>
...
</display>
</screen>
...
<screen id="set_group">
<display>
<form>
Select group members:<br/>
<input type="list" name="group"
value="John;Paul;George;Ringo" multiple="yes"/>
</form>
...
</display>
</screen>
...
The set_currency screen contains a drop‐down list box (the multiple="no" and
rows= "1" are assumed by default) in which only one of the list items can be
selected at a time.
TML Application Development Guidelines 76
Release 3.0.0.0
TML Reference
When this screen is shown for the first time, the drop‐down list box will contain the
text American Dollar, which corresponds to the current value of the currency
variable defined in the variable declaration.
If a user does not ‘touch’ the list box, the value of this variable will stay unchanged. If
a user opens the list box and selects a different item, the selected item will be assigned
as a value to the variable currency when the user finishes working with the list box.
The set_group screen contains a simple (open) list box in which more than one item
can be selected (multiple="yes").
When this screen is displayed for the first time, the items John and Paul will be
shown as selected. If a user selects or deselects the items in this list box, a new list
containing selected items will be assigned as a value to the variable group.
<layout>
Description
Used within the <logdcl> element (see description on page 79) to specify a log
record rendering pattern and, thus, to define how log records should be shown on the
terminal display or printed.
The element may contain any inline and block elements with the exception of the
<form> element. However in practice, the element will normally contain text
fragments, <getvar> elements (see “<getvar>” on page 67) and the tags defining the
log records’ appearance (such, for example, as <p>, <br>, <h1> and so on).
Variables referenced by <getvar> elements should be a subset of the ‘log variables’ –
the ones enumerated by means of <vardcl> elements within the parent <logdcl>
element.
Attributes
Name Type Description
name NMTOKENS Required attribute defining the layout name.
Related elements
Parent elements Child element
<logdcl> <getvar> as well as any other inline and
block elements with the exception of the
<form> element.
Example
<layout name="def_layout">
<h1>
<getvar name="terminal.datetime" format="MM/DD hh:mm:ss"/>
 - <getvar name="oebr.log_module"/>
 - <getvar name="oebr.log_severity"/>
</h1>
<p><getvar name="oebr.log_descr"/></p>
<br/>
</layout>
<li>
Description
This tag is used to define an item in a list. You can type the text directly between the
opening and closing tags.
The element is required for both the ordered list <ol> and the unordered list <ul>. In
an unordered list, each item is preceded by a star, such as *. In an ordered list, each
item is labelled with a number that increments with each following item.
Attributes
Name Type Description
TML Application Development Guidelines 77
Release 3.0.0.0
TML Reference
id ID See “id attribute” on page 115.
class NMTOKENS See “class attribute” on page 115.
Related elements
Parent elements Child element
<ol>, <ul> <a>, <br>, <span>, <getvar>, <input>,
<textarea>, <div>, <dl>, <h1>, <h2>, <h3>,
<h4>, <h5>, <h6>, <hr>, <img>, <ol>, <p>,
<pre>, <table>, <ul>, <form>
Example
See the examples for <ul> element on page 109 and <ol> element on page 82.
<link>
Description
This element is used to establish a relationship between the current page and one or
more other related pages.
The element is a child of the <head> element. MicroBrowser loads and caches the
linked documents and files in advance, before rendering the page.
Attributes
Name Type Description
charset Charset The charset attribute is used to specify the character
encoding used on the page that is the target of the
link.
href URI This is a required attribute which contains a valid URI
address for the linked document.
type xs:token Specifies the type of the medium the links apply to.
Permitted values include: all, print and screen.
rel xs:token Represents a space‐separated list of one or more
values that specify the relationship from the source
page to the target for a link.
Permitted values include: next, prev, section,
stylesheet.
rev xs:token Represents a space‐separated list of one or more
values that specify the relationship from the target
page to the source for a link. The attribute can also be
used to specify the content type of a linked resource.
Typical values are stylesheet and text/tml.
Related elements
Parent elements Child element
<head> none
Example
See the example for the <head> element on page 68.
<log>
Description
Used within the <display> (see page 63) or the <print> element (see page 84) to
display or print a log.
The required attributes name and layout define which of the logs is to be displayed
or printed and which of the layouts (rendering patterns) is to be used. Consequently,
the name attribute should reference the existing log’s name (i.e. correspond to the
TML Application Development Guidelines 78
Release 3.0.0.0
TML Reference
name attribute of the corresponding <logdcl> element, see page 79) and the layout
attribute – the name of one of the layouts specified for that log (i.e. corresponds to the
name attribute of one of the child <layout> elements (see page 77) of the
corresponding <logdcl> element).
The optional type attribute specifies the order in which the log records are to appear.
type="normal" would mean that the most recent records should be shown closer to
the log’s end (bottom). type="reverse" would specify the reversed order. By
default, type="normal" is assumed.
Attributes
Name Type Description
name NMTOKENS Required attribute specifying the name of the log that
should be displayed or printed.
The attribute value should correspond to the name
attribute of the corresponding <logdcl> element, see
page 79.
layout string Required attribute specifying the name of the layout
(rendering pattern) for the log records.
The value of this attribute should correspond to the
name attribute of one of the child <layout> elements
(see page 77) of the corresponding <logdcl>
element.
type token Optional attribute defining the order in which the log
records are to be shown.
Possible values are: "normal" and "reverse".
type="normal" means that the most recent records
are shown closer to the log’s end, while
type="reverse" specifies the reversed order.
Default value is "normal".
Related elements
Parent elements Child element
<display>, <print> none
Example
...
<logdcl name="my-log" ...
...
<layout name=="print-layout" ..
...
</logdcl>
...
<screen id="print-my-log" ...
<print>
<h1>My Log</h1>
<hr/>
<log name="my-log" layout="print-layout"/>
</print>
</screen>
...
<logdcl>
Description
This element declares a log. (For general discussion of logs in TML, see “Logs” on
page 28.)
The child <vardcl> elements define the list of variables whose values are included in
each separate log record (that is, written to corresponding log file). The <logdcl>
element can contain any number of <vardcl> elements or may contain none.
TML Application Development Guidelines 79
Release 3.0.0.0
TML Reference
It should be specifically noted that the use and meaning of <vardcl> elements within
the <logdcl> element are different from those of ordinary <vardcl> elements (ones
described in “<vardcl>” on page 109). Here, they are used not to declare variables but to
specify the ones whose values should be written to the log. Consequently, the
<vardcl> elements within the <logdcl> element must reference (name) the
variables that have already been declared.
The child <layout> elements define various possible patterns according to which
separate log records may and should be rendered, that is, shown on the terminal
display or printed (see “<layout>” on page 77). There can be any number of
<layout> elements within the <logdcl> element or there may be none.
If present, the <logdcl> elements should appear at the beginning of a TML page
after variable declarations (the <vardcl> elements) but before the <screen>
elements.
Attributes
Name Type Description
name NMTOKENS Required attribute defining the name of a log.
css string Optional attribute specifying the URL of an external
css file which contains definitions of styles according
to which the log contents are to be formatted when
shown on the terminal display or printed. For more
information, see “TML CSS” on page 139.
perms Permissions An attribute defining the log access permissions.
The meaning and use of this attribute is the same as
that of the perms attribute of the <vardcl> element
(see “Permissions” on page 51 and “<vardcl>” on page
109).
The value rw-rw is assumed by default (that is, if the
attribute is omitted).
Related elements
Parent elements Child element
<tml> Sequence:
<vardcl>*
<layout>*
Remarks
Please note that the <vardcl> elements within the <logdcl> just name the variables
rather than declare them. The referenced variables have to be declared earlier.
The usage pattern for the <vardcl> element in this case is
<vardcl name="[variable-name]"/>, see “Example” below.
Example
<logdcl name="system_log" css="emb://emb_log.css"
perms="rwx--">
<vardcl name="terminal.datetime"/>
<vardcl name="oebr.log_module"/>
<vardcl name="oebr.log_descr"/>
<vardcl name="oebr.log_severity"/>
<layout name="def_layout">
<h1>
<getvar name="terminal.datetime" format="MM/DD
hh:mm:ss"/>
TML Application Development Guidelines 80
Release 3.0.0.0
TML Reference
 - <getvar name="oebr.log_module"/>
 - <getvar name="oebr.log_severity"/>
</h1>
<p><getvar name="oebr.log_descr"/></p>
<br/>
</layout>
</logdcl>
<logrec>
Description
Used within the <screen> element (see page 85) to append one record to a log.
The attribute name defines the log to which the record is to be appended and thus
should reference the existing log’s name (see “<logdcl>” on page 79).
The contents of the log record are defined by the set of <vardcl> elements within the
corresponding <logdcl> element.
Attributes
Name Type Description
name NMTOKENS Required attribute specifying the name of the log to
which the record is to be appended.
Related elements
Parent elements Child element
<screen> none
Example
...
<logdcl name="my-log" ...>
<vardcl .../>
...
</logdcl>
...
<screen id="append-another-record" ...>
<logrec name="my-log"/>
</screen>
...
<next>
Description
Used within the <screen> element to specify the URI of the next screen. The URI
can be selected form a number of choices defined using child <variant> elements. If
none of the <variant> elements matches, the URI specified by the uri attribute is
used.
Attributes
Name Type Description
uri Valref Required attribute defining the URI of the next screen.
The attribute value can be represented by a constant
or a variable reference. It can also be one of special
URIs ‐ back, menu or cancel (see on page 16).
Related elements
Parent elements Child element
<screen> <variant> *
TML Application Development Guidelines 81
Release 3.0.0.0
TML Reference
Example
See example for the <screen> element on page 87.
<ol>
Description
This tag is used to define the limits of an ordered list. An ordered list is a collection of
items listed in a particular order. TML supports only numbered lists starting with 1.
Use <li> to display the item content.
Note: Ordered lists cannot be nested.
You can use the <ul> to create an unordered list and the <dl> to create a definition
list.
Attributes
Name Type Description
id ID See “id attribute” on page 115.
class NMTOKENS See “class attribute” on page 115.
Related elements
Parent elements Child element
<dd>, <display>, <li>, <print>, <td>, <th> <li> *
Example
<ol class="c_normal">
<li class="c_normal">Normal item 1</li>
<li class="c_normal">Normal item 2</li>
</ol>
<p>
Description
Used to delimit a paragraph which is preceded by line break and carriage return.
Attributes
Name Type Description
id ID See “id attribute” on page 115.
class NMTOKENS See “class attribute” on page 115.
Related elements
You can use only inline elements within the <p> element.
Parent elements Child element
<baddata>, <dd>, <display>, <li>, <print>, <a>, <br>, <getvar>, <input>, <span>,
<prompt>, <td>, <th> <textarea>
<pinentry>
Description
Used within the <tform> for the card PIN. The application switches to the secure
mode and uses the security features of the terminal to accept user input and encrypt it
according to the specified encryption algorithm. This ensures that the pin is never
stored in an unencrypted form, and therefore can not be compromised.
The encryption algorithm is set by the type attribute. Possible types are icc, dukpt
and dukpt3des.
TML Application Development Guidelines 82
Release 3.0.0.0
TML Reference
icc type is used for offline ICC PIN verification. This should be done after the ICC
application that is used for the transaction has been selected and CVM has been
requested.
The PIN is then verified using the verify command of the icc_emv card parser.
See “Transaction flow for ICC EMV” on page 42 for a description of ICC EMV
transaction process. The <card> element description on page 56 explains how to
interact with the card parser.
dukpt and dukpt3des type encryption is used to encrypt the PIN with DUKPT or
3DES DUKPT encryption respectively. The process for both types is the same:
1. card.pan variable should be filled with the card PAN number. You can do
this by reading it from the card or setting the PAN number manually.
2. card.pin.array variable may be set to the DUKPT array you wish to use.
You can leave it set to the default value of 0.
3. use the <pinentry> element with the appropriate encryption type. After the
PIN is entered, it will be processed by the secure hardware of the terminal.
This will set the following variables:
o card.pin ‐ encrypted PIN
o card.pin.smid ‐ key serial number
o card.pin.length ‐ the number of characters in the entered PIN
4. submit the card.pin and card.pin.smid variables to the acquirer for
verification
You can specify the prompt to be displayed on a PIN pad display using the prompt
attribute.
Attributes
Name Type Description
prompt string Specifies a short message to render on the PIN pad
screen during PIN entry.
length Number Specifies the number of characters in the PIN. The
default value is 4.
type token Specifies the encryption algorithm that will be used
for pin encryption:
• icc ‐ the PIN is used for offline icc verification
• dukpt ‐ the PIN will be encrypted using
16
DUKPT scheme
• dukpt3des ‐ 3DES DUKPT encryption
Related elements
Parent elements Child element
<tform> none
Example
DUKPT encryption:
<screen id="pin_dukpt" next="#submt_data" >
<tform>
<baddata max="1" next="#main_menu">
16
Derived Unique Key Per Transaction (DUKPT) is a key management scheme in which for every
transaction, a unique key is used. This key is derived from an initial PIN encryption key, injected into the
terminal. Therefore, to use DUKPT encryption, the terminal should have been injected with an appropriate
key.
TML Application Development Guidelines 83
Release 3.0.0.0
TML Reference
<table border="2" class="warning">
<tr><td>
<getvar name="err.baddata_reason"/>
</td></tr>
</table>
</baddata>
<pinentry type="dukpt" prompt="Enter PIN"/>
</tform>
</screen>
<postvar>
Description
This tag is used within <tmlpost> element to define the name and the value of the
variable to be submitted to the Application Server. This element appears only on the
pages generated by MicroBrowser.
Attributes
Name Type Description
name string The mandatory attribute defines the name of the
variable to be submitted.
type token The attribute defines the type of the variable to
submit. The default type is "string".
value string The mandatory attribute defines the value of the
variable to be submitted.
Related elements
Parent elements Child element
<tmlpost> none
Example
See the example for <tmlpost> element on page 107.
<pre>
Description
This element is used to display preformatted text. The text specified within the
element is rendered on the output device as is, including white spaces, tabs, and line
breaks.
Attributes
Name Type Description
id ID See “id attribute” on page 115.
class NMTOKENS See “class attribute” on page 115.
Related elements
You can use only inline elements within the <pre> element.
Parent elements Child element
<baddata>, <dd>, <display>, <li>, <print>, <a>, <br>, <getvar>, <input>, <span>,
<prompt>, <td>, <th> <textarea>
<print>
Description
This element defines the limits of the print screen. The content which is placed
between the element tags is printed on the embedded terminal printer. You can type
the text you want to be printed directly between the opening and closing tags.
TML Application Development Guidelines 84
Release 3.0.0.0
TML Reference
When printing is completed, MicroBrowser switches to the screen specified in the
<next> element.
The element is a child of the <screen> element.
Attributes
The element has no attributes.
Related elements
You can use block elements within the <print> element.
Parent elements Child element
<screen> <div>, <dl>, <h1>, <h2>, <h3>, <h4>, <h5>,
<h6>, <hr>, <img>, <log>, <ol>, <p>, <pre>,
<table>, <ul>, <form>
Example
<screen id="posts_p_full">
<print>
<hr/>
<div class="c_bold_large_center">
<getvar name="oebr.posts_print.header_label"/>
</div>
<hr/>
<log name="oebr.posts_print" layout="full_post"/>
<br/><br/><br/>
</print>
</screen>
<prompt>
Description
Used within <tform> to render a short message on the terminal screen, prompting a
user to swipe, insert, or remove a card. The message disappears when the requested
action is completed.
Attributes
Name Type Description
id ID See “id attribute” on page 115.
class NMTOKENS See “class attribute” on page 115.
Related elements
You can use block elements, except <form> within the <prompt> element.
Parent elements Child element
<tform> <div>, <dl>, <h1>, <h2>, <h3>, <h4>, <h5>,
<h6>, <hr>, <img>, <ol>, <p>, <pre>,
<table>, <ul>
Example
See the example for the <tform> element on page 104.
<screen>
Description
Defines the screen, which is a logical unit of a TML page. Each screen must have a
unique name, defined by its id attribute.
Important: in TML, the length of a screen name should not exceed 12 characters
TML Application Development Guidelines 85
Release 3.0.0.0
TML Reference
TML supports several types of screens, including display, print, submit, terminal form
and function call screens; see “Screens and navigation” on page 17. The type of the
screen is specified using one of the child elements (<display>, <print>, etc.).
After the opening <screen> tag, you can list the variables whose values should be set
using the <setvar> elements. Note that the values of corresponding variables are
(re)set every time Incendo Online MicroBrowser comes onto the screen.
Use the <next> element, or next attribute of the <screen> element to define the
URI of the next screen. If both the element and the attribute are specified, the element
takes precedence.
Note: If the element’s content includes hyperlinks, both the <next> element and the
next attribute are ignored. However, the child <next> element’s <variant>
elements with a key attribute can still be used and be effective.
To specify the URI of the screen to switch to if an error occurs, use the <error>
element (see “<error>” on page 66).
To associate other screens’ URIs with the Menu (F2) and Cancel terminal keys, use the
menu and cancel attributes.
Attributes
Name Type Description
id ID See “id attribute” on page 115.
class NMTOKENS See “class attribute” on page 115.
menu Valref Specifies the URI of the screen to switch to if the user
presses the Menu (F2) button while browsing the
screen. The URI specified in the attribute has
precedence over the URI defined in the <defaults>
element.
next Valref Specifies the URI of the next screen to switch to when
MicroBrowser finishes processing the current screen.
The attribute value can be a constant or a variable
reference. It can also be one of special URIs ‐ back,
menu or cancel (see on page 16).
If the <next> element is also specified for the screen,
it will have precedence over this attribute.
timeout Number Specifies the maximum amount of time (in seconds)
MicroBrowser should wait for the user input. When
the specified time has elapsed, MicroBrowser switches
to the screen specified in the child <next> element or
the next attribute of the <screen> element. The
attribute is ignored if the screen contains hyperlinks.
Related elements
You can use block elements, except <form> within the <prompt> element.
Parent elements Child element
<tml> Sequence:
<setvar> *
<strtemplate> *
<logrec> *
<next> ?
<error> ?
<call_func> | <display> | <print> |
<submit> | <tform> ?
TML Application Development Guidelines 86
Release 3.0.0.0
TML Reference
Example
<screen id="mag_rm">
<next uri="#mag_submit">
<variant lo="tmlvar:card.parser.verdict" op="equal"
ro="reject" uri="#reject_trans"/>
</next>
<tform>
<card parser="mag" parser_params="risk_mgmt"/>
</tform>
</screen>
<setvar>
Description
This tag sets a variable to a specified value. MicroBrowser processes <setvar>
elements when it switches to the screen except the situations when it returns to the
screen after rendering an error message.
<setvar> can only operate on the variables that have been declared previously using
the <vardcl> element, or are pre‐defined by the Incendo Online Microbrowser.
The variables also must have the correct write permissions (see “Permissions” on page
51).
In TML you can place <setvar> elements only within the <screen> element.
Instead of specifying the variable value explicitly, you can define a simple expression
of two operands, the result of which will be assigned to the variable. The operands
and operation are defined by the element attributes and depend on the type of the
variable.
The type of the variable and its default format are defined when the variable is
declared (see “<vardcl>” on page 109).
If the result of the expression and the type of the result variable do not match, before
calculating the result, MicroBrowser will attempt to cast operands to the data type of
the variable, see “Casting TML variables” on page 25.
Note: Some of the predefined variables are read‐only and their values cannot be
changed using <setvar> elements, see the section “Pre‐defined TML Variables” on
page 117.
Attributes
Name Type Description
name string Specifes the variable that is being set. This attribute is
required.
format Formatter Defines a pattern for the variable value for explicit
assignment (when ro and op attributes are not used).
Also used for some operations.
The content of the attribute must be a constant.
For string variables, the formatter must correspond to
the type of variable referenced by the lo attribute. For
all other types, the formatter must correspond to the
type of the variable that is being set (referenced by the
name attribute).
If the format attribute is not used, or it is set to
empty (“”), the default formatter for the variable type
is used.
See “Formatter” on page 47 for a description of valid
formatter patterns.
TML Application Development Guidelines 87
Release 3.0.0.0
TML Reference
TML Application Development Guidelines 88
Release 3.0.0.0
TML Reference
<setvar name=”date1” lo=”29/06/08” format=”DD/MM/YY” />
date1 variable will have an internal value of 2008/06/29 00:00:00.
Likewise, <setvar name="int_var" lo="$1.23" format="$0.00" /> will
assign 123 to the integer variable int_var.
If the formatter pattern does not correspond to the contents of the lo, it will cause an
error:
<!-- incorrect setvar formatter -->
<setvar name="string2" lo="John Smith" format="Bad c*" />
<!-- this setvar will cause an error -->
See the “Formatter” on page 47 for the description of the valid formatter patterns.
It is possible to combine formatting, variable reference and type casting:
<setvar name="string4" lo="tmlvar:terminal.datetime"
format="To\da\y i\s DD/MM"/>
For the example above, the following steps will be followed:
1. variable reference is resolved for the lo attribute. MicroBrowser takes note of
the variable type.
2. the value of the lo is modified according to the format attribute pattern.
Because the variable specified by the name attribute is of a string type, and the
variable reverenced by the lo is of a date type, date‐type formatter pattern
must be used.
3. the result is cast to the type of the variable defined by the name attribute, and
assigned to that variable
If the current date is 29th of June, then the value of the string4 variable will be
Today is 29/06.
Note: be very careful when using setvar to cast variables and to apply formatting at
the same time. It is very easy to format a variable in such a way that the cast will be
illegal.
String variable operations
String variables can be assigned values directly, or the following operations can be
performed: format, plus and minus.
Note: for string variables, the valid formatter pattern for the format attribute must
correspond to the type of the lo attribute. See “Formatter” on page 47 for the
description of the valid patterns.
format
This operation applies the pattern of the format attribute to the lo attribute and
assignes the result to the string variable, referenced by the name attribute. It is
equivalent to assigning explicit value to a string‐type variable and using format
attribute at the same time (see above).
lo can be either a constant (it is assumed to be of a string type), or a variable
reference. This variable can be of any type.
The value of the format attribute must be a constant. It must be a valid formatter
pattern for the variable type referenced by the lo (see “Formatter” on page 47 for the
description of the valid patterns). If the format attribute does not contain a valid
formatter pattern, an error will occur.
ro attribute is not used.
The following example demonstrates the results of the format operation:
<screen id="str_format" next="#string_menu">
<setvar name="integer1" lo="-567" />
<setvar name="opaque1" lo="AB 0F" format="hex" />
TML Application Development Guidelines 89
Release 3.0.0.0
TML Reference
<!-- need to escape the 'c' character in the formatter with
'\' otherwise the result will be 'WelJome ohn Smith' -->
<setvar name="string1" lo="John Smith" op="format"
format="Wel\come c*!" />
<setvar name="string2" lo="tmlvar:integer1" op="format"
format="^-0.00" />
<setvar name="string3" lo="tmlvar:opaque1" op="format"
format="hex" />
<display>
string1: <getvar name="string1" /><br/>
string2: <getvar name="string2" /><br />
string3: <getvar name="string3" /><br />
</display>
</screen>
The variables will contain the following values:
Variable Value
string1 Welcome John Smith!
string2 ‐5.67
string3 ab 0f
plus
The plus operation, when performed on string variables, concatenates the value of
the ro attribute to the contents of the lo attribute. The values of lo and ro can either
be constants or references to string‐type variables. The format attribute is ignored.
<screen id="str_plus" next="#string_menu" >
<setvar name="string1" lo="One" op="plus" ro="Two" />
<setvar name="string2" lo="tmlvar:string1" op="plus"
ro="Three" />
<setvar name="string3" lo="tmlvar:string2" op="plus"
ro="tmlvar:string1" />
<display>
<table>
<tr><td>
string1: <getvar name="string1" /><br/>
string2: <getvar name="string2" /><br />
string3: <getvar name="string3" /><br />
</td></tr>
</table>
</display>
</screen>
When the example above is processed, the variables will have the following values:
Variable Value
string1 OneTwo
string2 OneTwoThree
string3 OneTwoThreeOneTwo
minus
The minus operation, when performed on string variables, removes the number of
characters corresponding to the value of the ro attribute from the contents of the lo
attribute.
lo must be a string or a reference to a string‐type variable. ro must be a number or a
reference to an integer‐type variable.
If the value of the ro is positive, the characters are removed from the right‐hand side
of the lo string. If ro is negative, the characters are removed from the left‐hand side.
TML Application Development Guidelines 90
Release 3.0.0.0
TML Reference
If the value of the ro is greater than the length of the lo string, the result is an empty
string.
<screen id="str_minus" next="#string_menu" >
<!-- remove 3 characters from the right-hand side -->
<setvar name="string1" lo="OneTwo" op="minus" ro="3" />
<display>
<table>
<tr><td>
string1: <getvar name="string1" /><br/>
string2: <getvar name="string2" /><br />
string3: <getvar name="string3" /><br />
</td></tr>
</table>
</display>
</screen>
When the example above is processed, the variables will have the following values:
Variable Value
string1 One
string2 Two
string3 T
String list operations
String lists are strings that contain items separated by the ; character. For example, a
string One;Two;Three is a list of three elements ‐ One, Two and Three. Therefore,
everything that can be done with strings can be done with string lists.
However, two additional operations can be performed, number and item.
number
The number operation, returns the number of items in the string list, contained in the
lo attribute.
The variable referenced by the name attribute must be of the integer type. lo attribute
can contain a constant or reference a string‐type variable.
<setvar name=”integer1” lo=”One;Two;Three;Four” op=”number” />
The example above will assign 4 to the integer1 variable.
item
The item operation will assign the contents of an item from a string list to the string‐
type variable, defined by the name attribute.
lo attribute should contain a string list. It can be a constant or a reference to a string
variable.
ro attribute is should be set to the index of the item that you are trying to get. It can be
a constant or a reference to an integer variable. The numbering of the items starts from
0. If the value of the ro attribute is outside of the bounds of the string list, the variable
defined by the name attribute is set to ;.
<screen id="string_list" next="#main_menu" >
<!-- define the list -->
<setvar name="string1" lo="First item;Second item;Third
item"/>
TML Application Development Guidelines 91
Release 3.0.0.0
TML Reference
<!-- get the number of items in the list -->
<setvar name="integer1" lo="tmlvar:string1" op="number" />
TML Application Development Guidelines 92
Release 3.0.0.0
TML Reference
Note: to keep the code simple and more readable, avoid using the format attribute
when performing the plus operation.
<screen id="int_plus" next="#int_menu">
<display>
<table>
<tr><td>
integer1: <getvar name="integer1" /><br/>
integer2: <getvar name="integer2" /><br />
integer3: <getvar name="integer3" /><br />
</td></tr>
</table>
</display>
</screen>
When the example above is processed, the variables will have the following values:
Variable Value
integer1 ‐5
integer2 245
integer3 245
minus
The minus operation for integer variables substracts the ro attribute from the lo and
assigns the result to the variable, referenced by the name attribute.
Both lo and ro can be constants, or reference integer variables.
If lo or ro are constants, they must correspond to the integer formatter pattern
defined by the format attribute. If format attribute is empty, default integer formatter
(-0*) is used. Default formatter will allow you to use both negative and positive
values.
Referenced variables ignore the format attribute.
Note: to keep the code simple and more readable, avoid using the format attribute
when performing the minus operation.
<screen id="int_minus" next="#int_menu">
TML Application Development Guidelines 93
Release 3.0.0.0
TML Reference
<!-- Best practice is not to use the 'format' attribute and
use 'lo' and 'ro values that conform to the default formatter -
0* Below is the same operation as for 'integer2', using best
practices -->
<setvar name="integer3" lo="120" op="minus"
ro="tmlvar:integer1" />
<display>
<table>
<tr><td>
integer1: <getvar name="integer1" /><br/>
integer2: <getvar name="integer2" /><br />
integer3: <getvar name="integer3" /><br />
</td></tr>
</table>
</display>
</screen>
When the example above is processed, the variables will have the following values:
Variable Value
integer1 ‐80
integer2 200
integer3 200
Date variable operations
Date variables can be assigned values directly, or the following operations can be
performed: plus and minus.
Additional notes on explicit date variable setting
Explicit value assignments are described in “Assigning explicit values” on page 88.
plus and minus operations are described below. However, some additional points
should be noted regarding the explicit variable setting:
• Default value of a date variable is 1970/01/01 00:00:00 (the fields are
YYYY/MM/DD hh:mm:ss). When you change only some of the fields, the
fields that are not modified are taken from this value.
• This default value is in the terminal local time. To set the value as the GMT
value, you must use GMT as part of the formatter
• If you explicitly set the date variable to 0000/00/00 00:00:00 (the fields
are YYYY/MM/DD hh:mm:ss) this acts as a special value. It is an equivalent of
an empty string for <input> or <getvar> elements.
• If lo attribute is a constant value, or a reference to a string variable, it must
correspond to the date formatter pattern, set by the format attribute. If the
format attribute is empty, default formatter YYYY/MM/DD is used.
• If lo attribute is an integer reference, this integer represents the number of
seconds since the 1970/01/01 00:00:00. Integer format is assumed to be
0* (unsigned integer) and the value of the format attribute is ignored.
• If lo attribute is a reference to a date variable, all variable fields are copied
and the format attribute is ignored.
<screen id="date_set" next="#date_menu">
<!-- setting with default formatter YYYY/MM/DD -->
<setvar name="date1" lo="2008/09/27" />
<!-- setting with formatter: only the fields that are
mentioned are changed from the default value 1970/01/01 -->
<setvar name="date2" lo="59" format="ss" />
<!-- when using integer variables to set dates, and vice
versa, the integer contains the number of seconds from the
TML Application Development Guidelines 94
Release 3.0.0.0
TML Reference
1970/01/01 00:00:00 'integer1' is set to the number of
seconds, equivalent to 2 days 1h 20 min and 59s-->
<setvar name="integer1" lo="177659" />
<setvar name="date3" lo="tmlvar:integer1" />
<!-- string is de-formatted according to the date-type
formatter to get the date variable values -->
<setvar name="string1" lo="1108" />
<setvar name="date4" lo="tmlvar:string1" format="MMYY" />
<!-- for date variable references 'format' attribute is
ignored all fields are copied -->
<setvar name="date5" lo="tmlvar:date1" format="MM"/>
<display>
<table>
<tr><td>
date1: <getvar name="date1" /><br/>
date2 all fields: <getvar name="date2"
format="YYYY/MM/DD HH:mm:ss" /><br />
date3 all fields: <getvar name="date3"
format="YYYY/MM/DD HH:mm:ss" /><br />
date4: <getvar name="date4" /><br />
date5: <getvar name="date5" /><br />
</td></tr>
</table>
</display>
</screen>
When the example above is processed, the variables will have the following values:
Variable Value
date1 2008/09/27 00:00:00
date2 1970/01/01 00:00:59
date3 1970/01/03 01:20:59
date4 2008/11/01 00:00:00
date5 2008/09/27 00:00:00
plus
The plus operation for date variables adds the ro attribute and the lo and assigns
the result to the date variable, defined by the name attribute.
lo attribute must reference a date‐type variable. ro attribute represents the number of
seconds to be added to the lo. Therefore, ro must contain an integer constant or a
reference to an integer variable. The integer can be positive or negative.
The format attribute is ignored, so lo must conform to the default integer formatter
-0*.
<screen id="date_plus" next="#date_menu" >
<!-- set a date -->
<setvar name="date1" lo="2008/08/28 00:00:00"
format="YYYY/MM/DD 00:00:00" />
<!-- add 3600 seconds (1 hour) -->
<setvar name="date2" lo="tmlvar:date1" op="plus" ro="3600" />
<!-- 'lo' must be a reference to a date variable
'ro' can be an integer constant or integer reference -->
<!-- 31622400 seconds is equivalent to 366 days -->
<setvar name="integer1" lo="31622400" />
<setvar name="date3" lo="tmlvar:date2" op="plus"
ro="tmlvar:integer1" />
<!-- you can add negative values -->
<setvar name="date4" lo="tmlvar:date3" op="plus" ro="-59" />
<display>
<table>
<tr><td>
TML Application Development Guidelines 95
Release 3.0.0.0
TML Reference
date1: <getvar name="date1" format="YYYY/MM/DD
HH:mm:ss" /><br/>
date2: <getvar name="date2" format="YYYY/MM/DD
HH:mm:ss" /><br/>
date3: <getvar name="date3" format="YYYY/MM/DD
HH:mm:ss" /><br/>
date4: <getvar name="date4" format="YYYY/MM/DD
HH:mm:ss" /><br/>
</td></tr>
</table>
</display>
</screen>
When the example above is processed, the variables will have the following values:
Variable Value
date1 2008/08/28 00:00:00
date2 2008/08/28 01:00:00
date3 2009/08/29 01:00:00
date4 2009/08/29 00:59:01
minus
The minus operation for date variables substracts the ro attribute from the lo and
assigns the result to the date variable, defined by the name attribute.
lo attribute must reference a date‐type variable. ro attribute represents the number of
seconds to be substracted from the lo. Therefore, ro must contain an integer constant
or a reference to an integer variable. The integer can be positive or negative.
The format attribute is ignored, so lo must conform to the default integer formatter
-0*.
<screen id="date_minus" next="#date_menu" >
</screen>
When the example above is processed, the variables will have the following values:
Variable Value
date1 2008/08/28 00:00:00
date2 2008/08/27 23:00:00
date3 2008/08/28 00:00:00
<span>
Description
Allows to wrap a portion of inline TML content, overriding the values of core
attributes specified for spanned inline elements with the values specified in the core
attributes of the <span> element.
TML Application Development Guidelines 96
Release 3.0.0.0
TML Reference
For example, you could use the class core attribute to apply the effects of CSS to the
portion of text.
You should use the <div> element when you want to apply attributes to a block
portion of TML data.
Attributes
Name Type Description
id ID See “id attribute” on page 115.
class NMTOKENS See “class attribute” on page 115.
Related elements
Parent elements Child element
<div>, <dl>, <h1>, <h2>, <h3>, <h4>, <h5>, <a>, <br>, <span>, <getvar>, <input>,
<h6>, <hr>, <img>, <ol>, <p>, <pre>, <textarea>
<table>, <ul>, <form>, <dd>, <display>,
<li>, <print>, <td>, <th>
Example
See “Using <div> and <span> elements” on page 141.
<strtemplate>
Description
This tag assigns a formatted string of text to a variable of the string type.
The name of a variable is defined by the name attribute of the <strtemplate>
element.
The value assigned to a variable is defined by the format attribute of the
<strtemplate> element and its child <getvar> elements.
The <strtemplate> element can contain from 0 to 9 <getvar> elements.
The value of the format attribute may contain pieces of text and placeholders
representing results of the child <getvar> elements processing.
Each placeholder is specified like this: %n, where n is an integer number in the range
from 1 to 9, representing the number of the child <getvar> element. For example, %3
would mean the third of the <getvar> elements.
To insert the % character as part of the variable value, you should ‘escape’ the special
meaning of % by placing the backslash character (\) in front of it: \%.
If used, the <strtemplate> element(s) should appear in the beginning of the
<screen> element right after the <setvar> element(s) (if present).
Attributes
Name Type Description
name string Required attribute specifying the name of a variable.
format string Required attribute defining the value of a variable.
The attribute’s value may contain pieces of text and
placeholders representing the results of the child
<getvar> elements processing.
Placeholders have the following form: %n, where n is
an integer number from 1 to 9 corresponding to the
child <getvar> element’s number.
Related elements
Parent elements Child element
<screen> <getvar>
The <strtemplate> element may contain 0
TML Application Development Guidelines 97
Release 3.0.0.0
TML Reference
to 9 <getvar> elements.
Example
<setvar name="person.first_name" lo="John"/>
<setvar name="person.last_name" lo="Smith"/>
<strtemplate name="tell_last_name" format="%1’s last name is
%2">
<getvat name="person.first_name"/>
<getvat name="person.last_name"/>
</strtemplate>
In this example the string John’s last name is Smith is assigned to variable
tell_last_name.
<submit>
Description
This element defines a submit screen which is used to send the values of TML
variables or a TML log to the Application Server for processing. The variables whose
values should be submitted are specified by means of the child <getvar> elements
that are listed one by one. In the case of a log the <submit_log> child element is
used.
While parsing the <submit> element, MicroBrowser generates a dynamic TML page
with a single <tmlpost> screen where the same variables are specified using
<postvar> elements.
Note: Predefined variables terminal.datetime and terminal.itid are
submitted to the Application Server using the date and itid attributes of the
corresponding <tmlpost> element, so you don’t need to specify them explicitly.
All values of the date type within the <tmlpost> will have this format:
DD MM YYYY hh:mm:ss GMT, where the symbols D, M, Y, h, m, s have the usual
meaning (see “Dates” on page 48) and GMT is the formatter that instructs to present
the variable in the Greenwich Mean Time.
Aside from specifying the variables or the log, you should provide some auxiliary
data required to complete the submission, such as target server and the screen to
switch to if the connection to the Application Server is lost. The data is defined using
the child <econn> element and the <submit> element’s attributes.
Attributes
Name Type Description
tgt URI The required attribute that specifies the URI of the
host module component that is responsible for
accepting terminal requests. The URI is embedded
into the HTTP POST request generated by the
<tmlpost> element.
Relative URIs specified in the attribute are converted
to absolute by the Incendo Online Gateway data
converter, see Incendo Online Gateway User Guide for
details.
econn URI Specifies the URI of the screen to switch if the
connection to the Application Server is lost during
data submission. If the attribute is specified, the child
<econn> element can be omitted.
It can be a constant or a variable reference.
It can also be one of special URIs ‐ back, menu or
cancel (see on page 16).
cache token Specifies whether the HTTP request with the
submitted information should be cached by the
terminal. Possible values are "allow" and "deny",
TML Application Development Guidelines 98
Release 3.0.0.0
TML Reference
see cache attribute of the <tmlpost> element on
page 107. Default value is "deny".
Related elements
Parent elements Child element
<screen> Sequence:
<econn> ?
<getvar> * | <submit_log>
Remarks
By default, after generating the dynamic screen, MicroBrowser switches to the screen
specified by URI in the <next> element. Note, that the host part of TML application
can override this behaviour by responding with a dynamic TML page which is always
processed by MicroBrowser immediately. The dynamic page can have a different next
screen specified and this screen will take precedence.
Example
<submit tgt="/magcard/authtxn" econn="#mag_rm">
<getvar name="card.parser.type"/>
<getvar name="card.cardholder_name"/>
<getvar name="card.pan"/>
<getvar name="card.issuer_name"/>
<getvar name="card.issue_number"/>
<getvar name="card.scheme"/>
<getvar name="card.effective_date"/>
<getvar name="card.expiry_date"/>
<getvar name="card.mag.iso2_track"/>
<getvar name="oebr.transid"/>
<getvar name="payment.amount"/>
</submit>
<submit_log>
Description
Used within the <submit> element (see page 98) to submit a log to an Application
Server.
The attribute name defines which of the logs is to be submitted.
Consequently, the name attribute should reference an existing log’s name (i.e. be the
same as the name attribute of the corresponding <logdcl> element, see page 79).
Attributes
Name Type Description
name NMTOKENS Required attribute specifying the name of the log that
should be submitted to an Application Server.
The attribute value should correspond to the name
attribute of the corresponding <logdcl> element, see
page 79.
Related elements
Parent elements Child element
<submit> none
Example
...
TML Application Development Guidelines 99
Release 3.0.0.0
TML Reference
<logdcl name="my-log" ..
...
<screen id="submit-my-log" ..
<submit ..>
< submit_log name="my-log"/>
</ submit >
</screen>
...
<table>
Description
This element defines a table. A table is a structural presentation of data using rows
and columns.
The table structure is built using the child elements.
Attributes
Name Type Description
id ID See “id attribute” on page 115.
class NMTOKENS See “class attribute” on page 115.
border Number Instructs MicroBrowser to draw lines around the
entire table and all of the rows and cells. You can
specify the thickness of the border line in pixels.
cellpadding Number Sets the amount of white space (in pixels) between a
cell border and the contents of the cell.
cellspacing Number Sets the amount of white space (in pixels) between
adjacent cells and between a cell and the outer border
of the table.
rules TRules Defines which border lines should appear inside the
table.
The possible values are "none" – to have no internal
borders, "rows" – to have borders between rows,
"cols" – to have borders between columns and
"all" – to have borders between rows and columns.
If rules attribute is omitted, but border attribute is set,
it is considered that rules="all". If border attribute
is also omitted or set to zero, it is considered that
rules="none".
width Length Sets the width of a table. It can be declared either as
an integer number of pixels or as a percentage of the
width of the terminal display.
Related elements
Parent elements Child element
<dd>, <display>, <form>, <li>, <print>, Sequence:
<td>, <th> <col> | <colgroup> *
<thead> | <tfoot> ?
<tbody> | <tr> *
Example
<table class="c_small" width="100%">
<tr>
<td>
<getvar name="oebr.posts_print.var_name"/>
</td>
<td>
<getvar name="oebr.posts_print.var_val"/>
</td>
</tr>
TML Application Development Guidelines 100
Release 3.0.0.0
TML Reference
</table>
<tbody>
Description
This tag defines the body portion of a table where the data is displayed. The body of a
large table can be scrolled while both the header and footnote table sections (defined
by <thead> and <tfoot> elements) remain visible.
Note: the correct order for using these elements is <thead>, then <tfoot>, and
<tbody>.
You can use multiple body sections when you want to have borders between groups
of table rows.
Attributes
Name Type Description
id ID See “id attribute” on page 115.
class NMTOKENS See “class attribute” on page 115.
align token Sets the horizontal alignment of the cell contents for
all the cells in a single row. The possible values are
center, left and right.
valign token Sets the vertical alignment of the cell contents for all
of the cells in a single row. The possible values are
bottom, middle and top.
Related elements
Parent elements Child element
<table> <tr>*
Example
<table border="1">
<thead>
<tr><th>Header 1</th><th>Header 2</th></tr>
</thead>
<tfoot>
<tr><td colspan="2">footnote</td></tr>
</tfoot>
<tbody>
<tr><td>data cell 1</td><td>data cell 2</td></tr>
</tbody>
</table>
<td>
Description
This element is used to create cells with data or text that you want to display in the
table. You can type the text directly between the opening and closing tags. The
number of cells can be arbitrary.
The coding sequence is:
<tr><td> ... your data here ... </td></tr>
Use the <th> element to create a header cell for the column of cells and <tr> element
to create table rows.
Attributes
Name Type Description
TML Application Development Guidelines 101
Release 3.0.0.0
TML Reference
<textarea>
Description
This tag is used within the <form> element to define a multi‐line field for entering
text. You can use text areas when it is required to accept user input which takes more
than a line of text (e.g. home or e‐mail address).
The element has a number of validity check attributes that allow restricting user input.
If the validity check fails, MicroBrowser switches to the URI specified in the child
<baddata> element. If you omit <baddata>, validity check is skipped.
If the input data is valid, the value entered by the user is assigned to the variable
specified in the mandatory name attribute.
The way the data is displayed is controlled by means of the format attribute.
When MicroBrowser encounters <textarea> element, it switches the terminal to the
form processing mode, see “Form processing” on page 30.
Attributes
Name Type Description
id ID See “id attribute” on page 115.
class NMTOKENS See “class attribute” on page 115.
alt string Provides the alternate text to the terminals which are
not capable of displaying images and forms.
name string Specifies the name of the variable which receives the
value entered by the user.
rows Length Defines the width of the input fields in characters
cols Length Defines the height of the input field in characters.
TML Application Development Guidelines 102
Release 3.0.0.0
TML Reference
Attributes
Name Type Description
id ID See “id attribute” on page 115.
class NMTOKENS See “class attribute” on page 115.
TML Application Development Guidelines 103
Release 3.0.0.0
TML Reference
Example
See the example for the <tbody> element on page 101.
<tform>
Description
This element defines a terminal form screen which is used for accepting user card
data. The data can be either read from a card or entered using a terminal PIN pad. The
read data is assigned to the predefined variables according to the input type.
Using a child <prompt> element, you can define a short message to be rendered on
the terminal screen, prompting a user for input.
The element has no attributes.
Related elements
Parent elements Child element
<screen> Sequence:
<baddata> ?
(<card> *
<prompt>?) | <pinentry>
Example
<tform>
<baddata class="c_center" max="3" next="#init_prompt">
<table border="2" height="100%" width="100%">
<tr>
<td align="center" valign="middle">
<getvar name="err.baddata_reason"/>
</td>
</tr>
</table>
</baddata>
<pinentry icc="icc" prompt="Enter PIN"/>
</tform>
<th>
Description
This tag is used to create a header cell for a column of cells within the <table>
element.
The coding sequence is:
<tr><th> ... your header here ... </th></tr>
Use the <td> to create table cells and <tr> to create table rows.
Attributes
Name Type Description
id ID See “id attribute” on page 115.
TML Application Development Guidelines 104
Release 3.0.0.0
TML Reference
<thead>
Description
This element defines the header portion of a table. The body of a large table (defined
by <tbody>) can be scrolled while both the header and footnote (defined by
<tfoot>) table sections remain visible.
Note: the correct order for using these elements is <thead>, then <tfoot> and
<tbody>.
Attributes
Name Type Description
id ID See “id attribute” on page 115.
class NMTOKENS See “class attribute” on page 115.
align token Sets the horizontal alignment of the cell contents for
all the cells in a single row. The possible values are
center, left and right.
valign token Sets the vertical alignment of the cell contents for all
of the cells in a single row. The possible values are
bottom, middle and top.
Related elements
Parent elements Child element
<table> <tr>*
Example
See the example for the <tbody> element on page 101.
TML Application Development Guidelines 105
Release 3.0.0.0
TML Reference
<tml>
Description
The element immediately follows the XML declaration and indicates the beginning
and the end of a TML page enclosing the whole page content. It is the root element of
a TML document.
Attributes
Name Type Description
cache token Specifies whether the TML page should be cached
within the terminal. Possible values are "allow" and
"deny". Default value is "allow".
xmlns URI Specifies a unique URI pointing to a TML page that
defines the namespace for all elements and attributes
valid within your page.
Related elements
Parent elements Child element
none Sequence:
<head> ?
<vardcl> *
<logdcl> *
<screen> *
Example
<tml xmlns="http://localhost:8080/tml">
.... [the page content] ....
</tml>
<tmlpost>
Description
When MicroBrowser encounters a <submit> element, it generates a dynamic TML
page with a single <tmlpost> element inside.
The <tmlpost> element posts the variable values specified in the corresponding
<submit> element to the Application Server. The element can appear only within
dynamic screens generated by MicroBrowser.
The posted variables are listed one by one (using the <postvar> element) in the same
order as they appear within the corresponding <submit> element. The terminal ID
and current date required for submission authorisation are specified by the element
attributes.
The posted data is wrapped into the HTTP POST request which is submitted to the
server identified by the URI.
The request can be submitted in online or offline mode, which depends on the value
of predefined variable oebr.submit_mode. Note, that terminal has a limited amount
of memory to store offline submissions. If the memory is full, the offline submission is
turned into online and the value of the submit_mode variable is changed
automatically.
Online submissions are posted to the Application Server immediately.
TML Application Development Guidelines 106
Release 3.0.0.0
TML Reference
Attributes
Name Type Description
date string The required attribute which specifies the current date
and time taken from the predefined variable
terminal.datetime.
This and all other dates (in corresponding
<postvar> elements) are sent in the following
format: DD MM YYYY hh:mm:ss GMT, where the
symbols D, M, Y, h, m, s have the usual meaning (see “
Dates” on page 48) and GMT stands for Greenwich
Mean Time.
itid string Specifies the Ingenico terminal ID taken from the
predefined variable terminal.itid.
postid string Specifies a unique transaction identifier taken from
the predefined variable oebr.transid. The
identifier is generated by MicroBrowser.
cache token Specifies whether the TML page should be cached
within the terminal. Possible values are "allow" and
"deny". Default value is "allow".
Related elements
Parent elements Child element
none <postvar>*
Example
<tmlpost post_id="3" date="25 07 2007 20:22:08 GMT" itid="100"
xmlns="http://localhost:8080/tml">
<postvar name="oebr.submit_mode" type="string"
value="online"/>
<postvar name="payment.trans_type" type="string"
value="debit"/>
<postvar name="card.pan" type="string"
value="3540829999421012"/>
<postvar name="card.issue_number" type="integer" value="0"/>
<postvar name="card.expiry_date" type="date" value="10 09
2009 00:00:00 GMT"/>
<postvar name="card.effective_date" type="date" value="10 09
2006 00:00:00 GMT"/>
<postvar name="oebr.transid" type="integer" value="1"/>
<postvar name="payment.amount" type="integer" value="12"/>
<postvar name="payment.amount_other" type="integer"
value="0"/>
<postvar name="currency_code" type="string" value="GBP"/>
<postvar name="card.input_type" type="integer" value="2"/>
<postvar name="card.mag.iso2_track" type="string"
value="4475200254859014=05051261001363500000"/>
<postvar name="card.emv.aid" type="string"
value="A0000000651010"/>
<postvar name="card.emv.aip" type="integer" value="31744"/>
<postvar name="card.emv.auc" type="integer" value="65472"/>
<postvar name="card.emv.atc" type="integer" value="5"/>
<postvar name="card.emv.aac" type="opaque" value=""/>
<postvar name="card.emv.tc" type="opaque" value=""/>
<postvar name="card.emv.arqc" type="opaque" value="23 48 00
00 00 00 00 00"/>
<postvar name="card.emv.iad" type="opaque" value=""/>
<postvar name="card.emv.tvr" type="opaque" value="00 00 00 08
00"/>
<postvar name="card.emv.unumber" type="integer" value="41"/>
TML Application Development Guidelines 107
Release 3.0.0.0
TML Reference
<postvar name="payment.txn_date" type="date"
value="1108592990"/>
<postvar name="oebr.time_zone" type="string" value="0"/>
</tmlpost>
<tr>
Description
This element defines a row in a <table> element. The number of rows can be
arbitrary.
A row can contain one or more cells created using either the <td> or <th> element.
The coding sequence is:
<tr><th> ... your header here ... </th></tr>
<tr><td> ... your data here ... </td></tr>
Attributes
Name Type Description
id ID See “id attribute” on page 115.
class NMTOKENS See “class attribute” on page 115.
align token Sets the horizontal alignment of the cell contents for
all the cells in a single row. The possible values are
center, left and right.
valign token Sets the vertical alignment of the cell contents for all
of the cells in a single row. The possible values are
bottom, middle and top.
Related elements
Parent elements Child element
<table> <th>*
<td>*
Example
<table width="85%" border="2" cellpadding="3" cellspacing="5"
align="center">
<tr>
<th colspan="2">table header</th>
</tr>
<tr>
<td>The <b>tr</b> tag creates the row</td>
<td>The <b>td</b> tag creates cells</td>
</tr>
<tr>
<td>cell data</td>
<td>cell data</td>
</tr>
<tr>
<td>cell data</td>
<td>cell data</td>
</tr>
</table>
<ul>
Description
This tag is used to define an unordered list which represents a collection of list items
that do not follow a particular order. Each item in the list is preceded by asterisk (*).
Use <li> element to display content of each item.
Note: Unordered lists cannot be nested.
You can use the <ol> element to create an unordered list and the <dl> element to
create a definition list.
TML Application Development Guidelines 108
Release 3.0.0.0
TML Reference
Attributes
Name Type Description
id ID See “id attribute” on page 115.
class NMTOKENS See “class attribute” on page 115.
Related elements
Parent elements Child element
<baddata>, <form>, <prompt>, <dd>, <li>*
<display>, <li>, <print>, <td>, <th>
Example
<ul class="c_normal">
<li class="c_normal">Normal item 1</li>
<li class="c_normal">Normal item 2</li>
</ul>
<vardcl>
Description
The element is used to declare a TML variable (see “Variables and constants” on page
21).
When declaring a variable you specify its name and type by means of the name and
type attributes. If the type attribute is omitted, the variable is assumed to be of the
string type (type="string").
The value initially assigned to the variable is defined by the value and format
attributes. In the absence of the format attribute, the value of the value attribute will
be stored in the variable as its value.
The format attribute defines the ‘default’ formatting pattern for the variable (see
“Formatter” on page 47) – one used for displaying and printing the variable’s value if
no other pattern is specified in corresponding <getvar> elements (see “<getvar>” on
page 67). The format attribute also specifies how the value of the value attribute
17
should be formatted (or de‐formatted – depending on the variable’s type ) prior to
assigning an initial value to the variable.
The element’s volatile attribute (with the possible values "yes" or "no") is used
to specify whether or not the variable’s value should be kept when the terminal is
turned off or rebooted, see “Volatile and non‐volatile variables” on page 23. By
default, a variable is assumed to be volatile (volatile="yes") meaning that you
don’t mind if the variable’s value is lost when the terminal is rebooted.
Note: if a non‐volatile (volatile=”no”) variable is declared from within a non‐
cached page, it may still be destroyed if the terminal cache is cleared. To avoid this
situation, declare your persistent (non‐volatile) variables from within the TML pages
where the cash attribute of the <tml> tag is set to “allow”.
You can define access permissions for the variable (see “Permissions” on page 51)
using the perms attribute. By default, perms="rw-rw" is assumed.
Variable declarations (that is, the <vardcl> elements) should be placed at the
beginning of the page between the <head> element (see “<head>” on page 68) and the
<screen> elements (see “<screen>” on page 85).
Attributes
17
De‐formatting is a reverse operation with regard to formatting, see “Formatting and deformatting”on
page 21. Prior to assigning a value to a variable, string values are formatted, while date and integer
values are de‐formatted.
TML Application Development Guidelines 109
Release 3.0.0.0
TML Reference
TML Application Development Guidelines 110
Release 3.0.0.0
TML Reference
Related elements
Parent elements Child element
<tml> none
Remarks
• To specify that an integer variable can take negative values you should define
a formatting pattern starting with the minus sign (–) in the variable
declaration, for example, format="–0*".
• To fully define the date and time, a variable of the date type should contain
information about the year, month and day as well as hours, minutes and
seconds. If some of this information is missing it is taken from the ‘default’
date 1970/01/01 00:00:00.
Example
<vardcl name="string-example" value="Ringo Starr"
format="c#6c*c#"/>
<variant>
Description
An element defining destination screen’s URI – alternative to the URI specified by the
uri attribute of the parent element.
The main purpose of this element is to create branches in the application logic. You
can define a number of <variant> elements to create multiple branching choices.
The usage pattern for this element is
<variant uri="[destination screen’s URI]" [condition]/>
TML Application Development Guidelines 111
Release 3.0.0.0
TML Reference
where the [destination screen’s URI] is the URI of the screen Incendo Online
MicroBrowser should switch to if the [condition] is met.
There are two possible way of specifying the [condition]. It may be specified as a
logical expression that needs to be evaluated, or it may be associated with a specific
terminal keypad key press.
In the first of the cases you put the following construction in place of the [condition]:
lo="[left operand]" op="[operation]" ro="[right operand]"
format="[formatter]"
Then, if the statement defined in such a way is found to be true, the [condition] is
considered to be satisfied.
Please note that if the op="[operation]" is missing, the op="equal" is assumed;
the part format="[formatter]" is optional.
Conditions specified in this way are evaluated one by one starting from the first of the
<variant> elements. As soon as the first true statement is found, a jump to the
appropriate next screen is performed.
If neither of the conditions specified by corresponding <variant> elements is true,
the URI of the next screen is defined by the uri attribute of the parent element.
The other possibility is to specify the [condition] in the following way:
key="[key name]"
where the [key name] is the name of a terminal keypad key such, for example, as 1,
2, 3 and so on – for an alphanumeric key. In this case the [condition] corresponds
to the situation when the terminal keypad key specified by the key attribute is
pressed.
If a user then presses a key specified in the <variant> element, its uri attribute will
define the screen Incendo Online MicroBrowser should switch to.
<variant> elements of both types (that is, with a logical expression and with the key
attribute) can be present within one parent element. See “Remarks” on page 113 for
information on how these two different types of <variant> elements are processed.
Note: the contents of ro and lo attributes must be of the same type.
If one attribute contains a variable reference and the other is a constant, the type of the
constant is assumed to be the type of the referenced variable. Formatter of the
appropriate type is applied to that constant, before evaluating the condition.
If both attributes are variable references, they must reference same type of variables. If
both lo and ro values are constants, they are evaluated as strings
Attributes
Name Type Description
uri Valref The required attribute specifying the URI of the screen
Incendo Online MicroBrowser should switch to if the
condition defined by the other attribute(s) of the
element is satisfied.
The value of the attribute can be represented by a
constant or a variable reference. It can also be one of
special URIs ‐ back, menu or cancel (see on page
16).
lo string The attribute representing the left operand of the
logical expression. The attribute value can be a
constant, or a variable reference.
The attribute is required if the key attribute is not
present. Its use is illegal in presence of the key
attribute.
TML Application Development Guidelines 112
Release 3.0.0.0
TML Reference
TML Application Development Guidelines 113
Release 3.0.0.0
TML Reference
<variant> elements with a logical expression and the ones with the key attribute
are processed in different ways. The main difference is basically when those two
different types of <variant> elements are processed.
The <variant> elements with the key attribute are processed when the
corresponding screen is active, while the type with a logical expression is processed
when Incendo Online MicroBrowser is about to switch the next screen.
Whenever a user presses a key, Incendo Online MicroBrowser checks if within the
active screen there is a <variant> element which associates this key with certain
URI. If such element is found, the MicroBrowser jumps onto the screen with the URI
specified by the uri attribute of that <variant> element.
The <variant> elements containing logical expressions are processed when Incendo
Online MicroBrowser ‘decides’ or is instructed to leave the current screen and switch
onto another. This can, for example, happen when printing (i.e. processing of a print
screen) is completed, or when the timeout specified for a screen without hyperlinks
elapses. In such cases to find out which screen is going to be next, Incendo Online
MicroBrowser starts analysing the <next> element to consider various possible
alternatives (that is, the <variant> elements with a logical expression – if there are
such).
Example
The following very simple TML application illustrates the use of <variant>
elements.
<?xml version="1.0" encoding="ISO-8859-1"?>
<tml xmlns="http://www.ingenico.co.uk/tml">
<head>
<defaults menu="emb://embedded.tml"
cancel="emb://embedded.tml"/>
</head>
<vardcl name="my-name"/>
<vardcl name="my-phone-number"/>
<screen id="variant-1">
<display>
<h1>My Name</h1><hr/>
My name is <getvar name="my-name"/>.<br/>
<a href="#home">Go to my home page</a>
</display>
</screen>
<screen id="variant-3">
<display>
<h1>My Phone Number</h1><hr/>
TML Application Development Guidelines 114
Release 3.0.0.0
TML Reference
Here it is: <getvar name="my-phone-number"
format="c#4c*"/><br/>
Oops!..Can you read it?<br/>
<a href="#home">Go to my home page</a>
</display>
</screen>
</tml>
Within the home screen, the variables my-name and my-phone-number are set to
"Jane" and "223-33-22" respectively.
If when viewing this screen a user presses 1, the first of the <variant> elements
‘fires’ (key="1"), and Incendo Online MicroBrowser jumps onto the variant-1
screen.
If, when staying on the home screen, a user – within 5 seconds (timeout="5") – does
nothing or presses a key other than 1, menu or cancel (<defaults
menu="emb://embedded.tml" cancel="emb://embedded.tml"/>),
processing of the <next> element is initiated.
First, the logical expression within the second of the <variant> elements is
evaluated.
Since one of the operands is a constant (lo="Jane"), the formatting pattern c5
(format="c5") is applied. The intermediate result is a string "Jane-" which is then
compared with the value of the variable my-name
(op="equal" ro="tmlvar:my-name").
The statement being evaluated is: "Jane-" is equal to "Jane".
Since the result of evaluation is false, Incendo Online MicroBrowser switches onto the
next <variant> element.
Both operands are constants within the logical expression of this <variant> and,
consequently, the format attribute is ignored. The statement being evaluated, thus, is
"Jane" is equal to "Jane" which, obviously, is true.
The <variant> element ‘fires,’ and Incendo Online MicroBrowser jumps onto the
screen variant-3.
id attribute
Syntax
id="name"
Description
In <screen>, the attribute is used for defining the screen name. When you need to
define a link to a particular screen you use the screen name (preceded with # symbol)
as part of its relative URI.
The id must be unique within the document and every element should have only one
id.
TML Application Development Guidelines 115
Release 3.0.0.0
TML Reference
The id must begin with a letter or an underscore (_). The rest of the value can contain
any alphanumeric characters. Note that for many elements this attribute is mandatory.
Important: in TML, the length of a screen name should not exceed 12 characters
Example
<screen id=submit cancel="#init_prompt" next="#check_res">
...
<screen/>
TML Application Development Guidelines 116
Release 3.0.0.0
7
Pre-defined TML Variables
This chapter lists and describes predefined TML variables – the ones
declared on the page embedded.tml (see “Predefined variables” on page
22 and “Embedded terminal software” on page 39).
The tables used for presentation of information about the variables contain the
following columns:
• Name. This column contains the names of the variables arranged in alphabetical
order.
• Type. In this column the types of predefined variables are indicated. (For the list of
data types supported by TML refer to “Variables and constants” on page 21.)
• Perm. Permissions ‐ in this column the access permissions for a variable are
specified (see “Scopes of variables” on page 22 and “Permissions” on page 51).
• Description. In this column the meaning and/or the purpose of the variable is
explained. Where appropriate, the possible values are enumerated and default value
is presented.
Audio variables
This section describes predefined TML variables related to various audio options.
Most of variables in this group are used to assign different kinds of sounds to
different events such, for example, as a press of a key on the terminal keypad, swiping
of a magnetic card, insertion of a smart card, and so on.
Possible values for audio variables are:
• “sound_click_low”, “sound_click_midtone”, “sound_click_high”
• “sound_short_low”, “sound_short_midtone”, “sound_short_high”
• “sound_long_low”, “sound_long_midtone”, “sound_long_high”
The sound names in this list are self‐explanatory; they describe the sounds in terms of
duration and pitch. The sound duration increases in the order click – short – long. The
sound pitch increases in the row low – midtone – high.
Name Type Perm Description
audio.any_key string rwxr- The sound that the terminal produces when
an alphanumeric, the DOWN, the UP, or the
navigation key on the terminal keypad is
pressed.
Possible values are described above. Default
value is "sound_click_midtone".
audio.app_error string rwxr- The sound that the terminal produces when
Incendo Online MicroBrowser encounters an
error.
Possible values are described above. Default
value is "sound_click_midtone".
audio.app_start string rwxr- The sound that the terminal produces when
Incendo Online MicroBrowser is started.
Possible values are described above. Default
value is "sound_click_midtone".
audio.app_stop string rwxr- The sound that the terminal produces when
Incendo Online MicroBrowser is stopped.
Possible values are described above. Default
value is "sound_click_midtone".
TML Application Development Guidelines 117
Release 3.0.0.0
Pre‐defined TML Variables
TML Application Development Guidelines 118
Release 3.0.0.0
Pre‐defined TML Variables
TML Application Development Guidelines 119
Release 3.0.0.0
Pre‐defined TML Variables
Card-related variables
These variables are used to store card‐related data read by parsers.
Name Type Perm Description
card.cardholder_name string rwxrw Cardholder name.
card.effective_date date rwxrw Card effective date.
card.expiry_date date rwxrw Card expiration date.
card.input_type integer rwxrw Specifies how card details are entered:
1 – magnetic card is swiped
2 – card details are read from ICC EMV
3 – card details are entered manually using
terminal keyboard.
When parser is called with the command
"read_data", this variable should be set to
1. If the parser is called with the command
"risk_mgmt", the variable value should be
checked, and if it is 3, card number and
expiration date should be verified and
card.pan should be filled.
card.issue_number integer rwxrw Card issue number.
card.issuer_name string rwxrw Card issuer name.
card.pan string rwxrw Primary Account Number in ASCII.
card.scheme string rwxrw Card scheme.
TML Application Development Guidelines 120
Release 3.0.0.0
Pre‐defined TML Variables
r
SMID is an internal Ingenico’s term referring to a block of data which acts as cryptographic salt for the PIN
entered by the smart card holder.
To secure PIN transmission, the salt, normally representing a random string of characters, is added to the
entered PIN. One of cryptographic algorithms is then applied to the resulting string prior to its transmission
(to other application, device, etc.).
s
DUKPT – Derived Unique Key Per Transaction – is a key management scheme in which for every
transaction, a unique key is used which is derived from a fixed key.
TML Application Development Guidelines 121
Release 3.0.0.0
Pre‐defined TML Variables
ones available at the server. The values of most of these variables are set by the
t
server .
Name Type Perm Description
cfgm.emv.timestamp integer rwxr- The variable used to keep track of the version
of configuration data in use by the terminal
ICC EMV card parser.
Default value is 0.
cfgm.mag.timestamp integer rwxr- The variable used to keep track of the version
of configuration data in use by the terminal
magnetic card parser.
Default value is 0.
cfgm.scan.interval integer rwx-- The minimum amount of time in seconds
between subsequent configuration requests
sent to Incendo Online Gateway when the
connection between the terminal and Incendo
Online Gateway is active.
Default value is 1.
t
When the server sends to the terminal the card parsers configuration data, it also sets the values of the
cfgm.emv.timestamp and cfgm.mag.timestamp variables so that they contain the information about
the versions of configuration data being sent. Each next time the terminal requests the updates of
configuration data from the server, it informs the server about the versions of data being used by sending to
the server the variables’ values. The server checks the “version numbers” received from the terminal against
those of the current versions and either sends to the terminal the updated versions of the requested
resources or replies that the resources have not changed.
TML Application Development Guidelines 122
Release 3.0.0.0
Pre‐defined TML Variables
GPRS-related variables
This section describes predefined TML variables used to store the settings for modem
connection over GPRS (General Packet Radio Service) communications channels.
Name Type Perm Description
gprs.apn string rwxr- APN – Access Point Name.
Default value is "internet.msk".
gprs.gsm_pin1 string rwxr- GSM PIN1 – the Global System for Mobile
Communications Personal Identification
Number that the terminal uses to prove its
identity when trying to establish the
connection with mobile (GSM/GPRS)
communications service provider.
Default value is "0000".
gprs.gsm_puk1 string rwxr- GSM PUK1 – Personal Unblocking Key –
numeric code used to unblock a SIM card
after incorrect entry of GSM PIN1.
Default value is "00000000".
TML Application Development Guidelines 123
Release 3.0.0.0
Pre‐defined TML Variables
IP-related variables
This section describes predefined IP (Internet Protocol)‐related TML variables.
Name Type Perm Description
ip.default_gateway string rwxr- Default Gateway IP – an IP address of the
gateway, a router or a host computer, that
routes TCP packets from the terminal to the
Internet and, hence, to Incendo Online
Gateway.
Default value is "192.168.0.1".
ip.dns1 string rwxr- IP address of a DNS – Domain Name Server –
a server that translates hostnames (domain
names) into IP addresses.
Default value is "0.0.0.0".
ip.dns2 string rwxr- IP address of an alternative DNS – Domain
Name Server – a server that translates
hostnames (domain names) into IP addresses.
Default value is "0.0.0.0".
ip.local_addr string rwxr- The variable used to store the terminal’s IP
address which the terminal receives from the
server.
Default value is "0.0.0.0".
ip.media string rwxr- Media Type – the type of the communications
channel used by the terminal for data
transmission. Possible values are "com",
"dsl", "ethernet", "gprs", or "modem".
Default value is "com".
ip.net_conn_timeout integer rwxr- The amount of time in seconds within which
the terminal is waiting for the receipt of the
network settings (for example, an IP address)
from the server.
Default value is 120.
ip.net_mask string rwxr- Net Mask – the net mask of the network to
which the terminal is connected.
Default value is "255.255.255.0".
ip.persistent string rwxr- Persistent Connection – parameter that
defines whether or not the connection with
Internet service provider’s (ISP) server should
be kept active after the terminal disconnects
from Incendo Online Gateway. Possible
values are "yes" or "no".
Default value is "yes".
ip.so_timeout integer rwxr- Socket Timeout – the amount of time in
seconds within which the terminal is waiting
for the receipt of data from the host.
Default value is 30.
TML Application Development Guidelines 124
Release 3.0.0.0
Pre‐defined TML Variables
TML Application Development Guidelines 125
Release 3.0.0.0
Pre‐defined TML Variables
TML Application Development Guidelines 126
Release 3.0.0.0
Pre‐defined TML Variables
TML Application Development Guidelines 127
Release 3.0.0.0
Pre‐defined TML Variables
TML Application Development Guidelines 128
Release 3.0.0.0
Pre‐defined TML Variables
TML Application Development Guidelines 129
Release 3.0.0.0
Pre‐defined TML Variables
TML Application Development Guidelines 130
Release 3.0.0.0
Pre‐defined TML Variables
TML Application Development Guidelines 131
Release 3.0.0.0
Pre‐defined TML Variables
TML Application Development Guidelines 132
Release 3.0.0.0
Pre‐defined TML Variables
oebr.ulog_cntr integer rwx-- Auxiliary log counter. The value of this
variable is set by Incendo Online
MicroBrowser.
u
GMA – Global Master Application.
TML Application Development Guidelines 133
Release 3.0.0.0
Pre‐defined TML Variables
gma.event.icc. opaque rwx-- If the event with the name "icc" takes place,
card_answer
this variable will contain the smart card
answer.
The variable is only for internal use within
Incendo Online MicroBrowser.
You must not use this variable in your TML
applications.
TML Application Development Guidelines 134
Release 3.0.0.0
Pre‐defined TML Variables
TML Application Development Guidelines 135
Release 3.0.0.0
Pre‐defined TML Variables
Terminal variables
This section describes predefined TML variables related to a terminal.
v
Public Switched Telephone Network
TML Application Development Guidelines 136
Release 3.0.0.0
Pre‐defined TML Variables
w
RSA – a short for Rivest‐Shamir‐Adleman encryption system: the patented public key encryption
algorithm, introduced by Ronald Rivest, Adi Shamir, and Leonard Adleman.
TML Application Development Guidelines 137
Release 3.0.0.0
Pre‐defined TML Variables
Auxiliary variables
This section describes auxiliary variables – the ones that temporarily store various
intermediate results or information.
Name Type Perm Description
passwd string rw--- The variable that stores intermediate results of
working with the Supervisor Password
parameter.
screen_after_call string rw--- The variable that stores the URI of the screen
that should be processed after the call of a
function such as Clear HTTP Cache,
Disconnect from OEGW, and so on.
x
According to International Technical Specification – Symbology Identifiers by AIM Inc. (the Association for
Automatic Identification and Data Capture Technologies), the bar code reading equipment should prefix
the symbology identifier to the data contained in a bar code symbol. The symbology identifier is a three
character string having the following structure:
]cm
where
• ] is the character assigned to ASCII value 93 in the United States ASCII character set in
accordance with ISO 646, which represents the symbology identifier flag character. The flag
character indicates to the host receiving the data that it and the two following characters are the
symbology identifier characters.
• c represents the code character, which indicates to the host the bar code symbology of the symbol
which has been read. For example, the code characters “A”, “C”, and “E” correspond to the Code
39, Code 128, and EAN/UPC symbologies respectively.
• m represents the modifier character for the symbology defined by the code character. The
modifier character indicates to the host the mode in which the symbology is used. The modifier
characters are symbology‐specific.
For example, for the Code 128 symbology, the possible modifier characters are “0”, “1”, “2”, and “4”, so
the overall identifier for this symbology may look like “]C0”, “]C1”, “]C2”, and “]C4”.
For more information, refer to International Technical Specification – Symbology Identifiers and specifications
for particular symbologies.
TML Application Development Guidelines 138
Release 3.0.0.0
8
TML CSS
Due to the terminal hardware limitations TML CSS offers only the most
essential capabilities of the full CSS 2.0 specification. CSS is well
documented on the web and in various books. This chapter describes only
the limitations and specifics of CSS introduced with TML.
Pseudo‐classes and pseudo‐elements
Pseudo‐classes and pseudo‐selectors are not allowed in TML CSS.
Contextual selectors
Contextual selectors are not allowed in TML CSS.
Comments
Comments are not allowed in TML CSS.
Cascading order
Cascading order is the same as specified in CSS2 with the only exception that
!Important statement is not allowed.
Style directive
Style XHTML element is not allowed in TML.
TML Application Development Guidelines 139
Release 3.0.0.0
TML CSS
Supported Properties Description
height npx or n%
where n is a positive integer number specifying the height
either as a number of pixels (absolute height) or as a
number of percent of the screen height (relative height).
width npx or n%
where n is a positive integer number specifying the width
either as a number of pixels (absolute width) or as a
number of percent of the parent element’s width (relative
width).
Font
Supported Properties Description
font-family arial, courier, helvetica, sans-serif, times
font-size small, medium, large
font-style normal, italic
font-weight normal, bold
Generated content
Generated content properties are not supported in TML CSS.
List and marker
List and marker properties are not supported in TML CSS. Unordered list items are
preceded with asterisk (*).
Margin
Supported Properties Description
margin percentage, auto
margin-bottom percentage, auto
margin-left percentage, auto
margin-right percentage, auto
margin-top percentage, auto
Outlines
Outline properties are not supported in TML CSS.
Padding
Padding properties are not supported in TML CSS.
Positioning
Positioning properties are not supported in TML CSS.
Table
Table properties are not supported in TML CSS.
Text
Supported Properties Description
color Numerical colour specification in #RRGGBB format.
Note that in TML CSS you can use only upper case letters
and hexadecimal colour codes, e.g. #FFFF00.
text-align left, right, center
text-decoration none, underline
text-indent percentage
vertical-align top, bottom, middle, baseline
white-space normal, pre
TML Application Development Guidelines 140
Release 3.0.0.0
TML CSS
Applying styles
Incendo Online MicroBrowser uses a default style sheet (default.css) when the
processed TML document contains no reference to an external style sheet, or the
specified external style sheet fails to be loaded.
Even if you specify no styles or only a few, the entire document is displayed using
styles specified in the default style sheet. Styles defined in the default style sheet have
the lowest precedence in the cascading order, so whenever you specify your own style
it overrides the style set by the default style sheet.
The external CSS is loaded in the text format by the terminal alongside with the
related TML document. If, for some reason the loading cannot be completed,
MicroBrowser will use the default CSS.
TML Application Development Guidelines 141
Release 3.0.0.0
A
Incendo Online MicroBrowser
Error Codes
This Appendix provides a listing of all the error codes generated by the
Incendo Online MicroBrowser. The error codes are 5 digit negative numbers. The first
three digits correspond to a specific component of the MicroBrowser.
Each section contains a table that lists the possible values of pre‐defined variables
err.code.high and err.code.low (the Error Code column). Descriptions (the
Description column) correspond to the text strings that may appear in the system log
and/or be part of the err.description variable value.
Note: for more information on error handling and error handling variables see “Error
handling” on page 31 and “Error handling variables” on page 123.
The following list should help you to find a particular error:
• (‐321XX) CFGM errors on page 143
• (‐322XX) FPM errors on page 143
• (‐323XX) TML errors on page 144
• (‐324XX) HTTP_CLIENT errors on page 145
• (‐325XX) INITM errors on page 146
• (‐326XX) MAIN_APP errors on page 147
• (‐327XX) CARD_PARSER errors on page 148
• (‐328XX) ICC_EMV_PARSER errors en page 149
• (‐329XX) RNM errors on page 151
• (‐330XX) COMMON errors on page 152
• (‐331XX) VARLIB errors on page 152
• (‐332XX) ISTP errors on page 153
• (‐333XX) SSL_TRANSPORT errors en page 154
• (‐334XX) NET_MEDIA errors on page 154
• (‐335XX) PERIPHERAL errors on page 154
• (‐336XX) IMAGER errors en page 155
• (‐337XX) PAM errors on page 155
• (‐338XX) VKBRD errors on page 155
• (‐339XX) IND errors on page 156
• (‐340XX) LOG errors on page 156
• (‐341XX) HCL errors on page 157
• (‐342XX) OEMSG errors on page 157
• (‐343XX) GCL_PGCOMM errors on page 157
TML Application Development Guidelines 142
Release 3.0.0.0
Incendo Online MicroBrowser Error Codes
TML Application Development Guidelines 143
Release 3.0.0.0
Incendo Online MicroBrowser Error Codes
Error Code Description
‐32214 PID error
‐32215 Screen re‐drawing error
‐32251 Wrong equal check
‐32252 Incorrect, not equal
‐32253 Wrong not equal check
‐32254 Incorrect, equal
‐32255 Wrong min check
‐32256 Too short
‐32257 Wrong max check
‐32258 Too long
‐32259 Value assign error
‐32260 SH1 calculation error
‐32261 Cast SH1 hash to Base64 error
‐32262 Invalid date
‐32263 Wrong %s check
‐32264 Too big
‐32265 Too small
‐32266 Unknown parser
‐32267 Card muted
‐32268 Card error
‐32269 Card removed
‐32270 Invalid TML call sequence OR EMV card has been changed
‐32271 Canceled by user
‐32272 FPM timeout
‐32273 Internal ssa error
‐32274 No pinpad
‐32275 PIN entry type is not supported
TML Application Development Guidelines 144
Release 3.0.0.0
Incendo Online MicroBrowser Error Codes
Error Code Description
‐32310 Required attribute missed
‐32311 Fatal variable library error
‐32312 Can not convert attribute value
‐32313 Variable not found
‐32314 Unknown element or element is not allowed here
‐32315 Bad content
‐32316 Cells in table overlaps
‐32317 Screen filename too long
‐32318 Canʹt update screen file
‐32319 Runtime error parsing BTML
‐32320 Invalid format specified
‐32322 Invalid variable type
‐32323 Logger error
‐32324 Log record template is too long
‐32325 Length parsing error
‐32327 Expected end of BTML after reading last closing tag
‐32330 Runtime error when parsing CSS
‐32331 CSS file read error
‐32332 HTTP error retrieving CSS
‐32333 No/invalid CSS declaration found
‐32334 CSS selector/declaration empty
‐32335 CSS property/value unrecognized
TML Application Development Guidelines 145
Release 3.0.0.0
Incendo Online MicroBrowser Error Codes
Error Code Description
‐32415 Uri too long
‐32416 Internal error: varlib failure
‐32417 Unable to follow HTTP redirect
‐32418 Cache cleanup error
‐32419 Error processing cache updates
‐32420 Internal file open error
‐32421 Unable to prepare configuration data update request
‐32422 Unable to update HTTP cache
‐32423 Unable to update configuration data
‐32424 Fatal HTTP cache error. All data is lost
‐32425 Offline post processing error
‐32426 Cache limit reached
‐32427 Invalid ImageLib received
‐32428 Duplicated PostID. Post with such ID already exists
‐32429 Unable to compress offline posts storage
‐32430 Offline posts storage corrupted
‐32431 Duplicated screen or ID/IML image name
‐32432 Screen file too long
‐32433 Fatal: Unsupported cache metadata version
TML Application Development Guidelines 146
Release 3.0.0.0
Incendo Online MicroBrowser Error Codes
TML Application Development Guidelines 147
Release 3.0.0.0
Incendo Online MicroBrowser Error Codes
TML Application Development Guidelines 148
Release 3.0.0.0
Incendo Online MicroBrowser Error Codes
Error Code Description
‐32746 IIN table file corrupted. Please connect to OEGW to solve problem
‐32747 TTL table file missed. Please connect to OEGW to solve problem
‐32748 TTL table file corrupted. Please connect to OEGW to solve problem
‐32749 Card Scheme table file missed. Please connect to OEGW to solve
problem
‐32750 Card Scheme table file corrupted. Please connect to OEGW to solve
problem
‐32751 Risk Managment Verdict table file missed. Please connect to OEGW
to solve problem
‐32752 Risk Managment Verdict table file corrupted. Please connect to
OEGW to solve problem
‐32753 Risk Managment file missed. Please connect to OEGW to solve
problem
‐32754 Risk Managment file corrupted. Please connect to OEGW to solve
problem
‐32755 Invalid card number (incorrect PAN length)
‐32756 Unable to get ISO tracks
‐32757 Risk Managment failed to write a reject reason
TML Application Development Guidelines 149
Release 3.0.0.0
Incendo Online MicroBrowser Error Codes
Error Code Description
‐32822 Internal buffer overflow
‐32827 Wrong authorization code length
‐32828 Wrong authorization response code length
‐32829 Fall back to magnetic stripe
‐32830 Cannot supply power to ICC
‐32831 Application table file missed. Please connect to OEGW to solve
problem
‐32832 Card provider table file missed. Please connect to OEGW to solve
problem
‐32833 RSA key table file missed. Please connect to OEGW to solve problem
‐32834 Application table file corrupted. Please connect to OEGW to solve
problem
‐32835 Card provider table file corrupted. Please connect to OEGW to solve
problem
‐32836 RSA key table file corrupted. Please connect to OEGW to solve
problem
‐32837 Cannot load configuration data for card provider
‐32838 Cannot load configuration data for the application
‐32839 Internal error
‐32840 Smart card insertion detection failed
‐32841 Unknown tag
‐32842 inconsistent TML application
‐32843 Reject transaction
‐32844 unable to verify cardholder
‐32845 Not Authorized
‐32846 Service Not Allowed
‐32847 PIN Limit Exceeded
‐32848 Issuer Authentication
‐32849 transaction validation failed
‐32850 transaction action analysis failed
‐32851 transaction completion failed
‐32852 Failed to del application selection criteria
‐32853 Issuer script is too long
‐32854 Memory allocation error
‐32855 VARLIB error
‐32856 Set verdict error
‐32857 CVM value error
‐32858 SMC‐remove error
‐32859 AMG selection error
‐32860 AMG transaction validation error
‐32861 AMG action analyze error
‐32862 AMG transaction completion error
‐32863 Card holder verification error
‐32864 EMV initialization error
TML Application Development Guidelines 150
Release 3.0.0.0
Incendo Online MicroBrowser Error Codes
Error Code Description
‐32865 EMV Select Data error
‐32866 PAN consistency check failed
‐32867 Invalid transaction type
‐32868 Logical error within the card
‐32869 Unable to get requested EMV data
‐32870 Unable to store provided EMV data
‐32871 The card has been removed and re‐inserted
TML Application Development Guidelines 151
Release 3.0.0.0
Incendo Online MicroBrowser Error Codes
Error Code Description
‐32933 strtemplate loading error
‐32934 table has not enough space for all columns
‐32935 color text in monochrome screen is not allowed
‐32936 TML variable associated with image has different from opaque type
‐32937 list control value is not a string
‐32938 runtime error.
‐32939 Table headers and/or footers are too big in height. No place for
rows. Header/footer freezing mode is switched OFF.
TML Application Development Guidelines 152
Release 3.0.0.0
Incendo Online MicroBrowser Error Codes
Error Code Description
‐33123 Invalid date/time value, time‐zone.
‐33124 psyDateTimeGet error.
‐33125 Load URI map error.
‐33126 Setvar operand processing error.
‐33127 Add variable to scope error.
‐33128 Setvar error, Indirect data casting is forbidden in binary setvar.
‐33129 Setvar error, Binary setvar for opaque variables is forbidden.
‐33130 Setvar error, Wrong binary setvar of date. Date variable plus/minus
integer constant or variable is only allowed.
‐33132 Variant error. Any cast is forbidden if both operands are TML
variables.
‐33133 Variant error. Only string operands are allowed if both operands are
constants.
‐33134 URI map error.
‐33135 Too many ʺunique_idʺ requests on the same screen
‐33137 Directory init error.
‐33138 Getvar error.
‐33139 Incorrect variable type.
‐33141 User Log scope loading error.
‐33143 Error processing string template.
‐33144 Runtime error.
‐33145 ITID isnʹt changed because of off‐line posts presence.
‐33146 Error trying to manually connect to the OEGW by setting
oebr.connection.state to connected
TML Application Development Guidelines 153
Release 3.0.0.0
Incendo Online MicroBrowser Error Codes
TML Application Development Guidelines 154
Release 3.0.0.0
Incendo Online MicroBrowser Error Codes
TML Application Development Guidelines 155
Release 3.0.0.0
Incendo Online MicroBrowser Error Codes
Error Code Description
‐33810 Runtime error.
TML Application Development Guidelines 156
Release 3.0.0.0
Incendo Online MicroBrowser Error Codes
TML Application Development Guidelines 157
Release 3.0.0.0