Element text

LANSA Integrator

Element - text

The text element is used to add text to the current page.

Syntax:

Element

Attributes

Value

Notes for Element/Attribute/Value

text

x1

integer

Default. 0.

y1

integer

Default. 0.

width

integer

Default. 0.

height

integer

Default. 0.

margin

integer

Default. 0.

border

Boolean

Default. Document border.

align

left

Default.

center

 

right

 

style

style

Default. Helvetica, 10, normal.

leading

float

Default. fontsize * 1.5

value

string

Text.

anchor

url

 

annotation

string

Name of annotation

date-format

string

5.1.4 Date and Time Formats

decimal-format

string

5.1.5 Decimal Formats

locale

string

en_US
fr_FR
Default. default locale.

use-list

Boolean

Default. false.

use-list-option

sb

Space before text value.
Default. sb.

 

sa

Space after text value.

nb

New line before text value.

na

New line after text value.

 

Text created from child phrase elements

If the text is large and extends over several lines then child phrase elements can be used.

Text created from child phrase elements take precedence over the text element value attribute.

Phrase text can come from the phrase element value attribute or a text node between the start and end phrase element tags.

The phrase element options attribute can be used to insert spaces or new lines before and after the text value. The options value is a comma-separated list of tokens.

Text created from list argument

The use-list attribute allows text to be created from a list.

This option takes precedence over the other methods of creating text.

The use-list-option attribute specifies the default text option value to be used.

The first list field contains the text and an optional second field is used to control the concatenation process.

If no second field is present or the field has a value of blank then the default text option value is used.

The possible option values are:

     SB - Add a space before appending the text entry, except for the first entry.

     NB - Add a new line before appending the text entry, except for the first entry.

     SA - Add a space after appending the text entry, except for the last entry.

     NA - Add a new line after appending the text entry.

If the option value is not one of the above then no additional action is done and the next entry is appended to the previous entries.

Syntax:

Element

Attributes

Value

Notes for Element/Attribute/Value

phrase

options

sb

Space before text value.

sa

Space after text value.

nb

New line before text value.

na

New line after text value.

value

string

Text value.

style

style

Default. Text element style.

anchor

url

 

annotation

string

Name of annotation.

date-format

string

5.1.4 Date and Time Formats

decimal-format

string

5.1.5 Decimal Formats

locale

string

en_US
fr_FR
Default. default locale.

 

Example

 

<text x1="20" y1="700" width="100" height="20"" value="some text"/>

 

<text x1="70" y1="500" width="200" height="400" style="text-modern">

   <phrase style="modern" options="na">First text phrase</phrase>

   <phrase style="modern-strike" options="na">Second text phrase</phrase>

   <phrase style="normal-white" options="na" value="Third text phrase as a value attribute"/>

   <phrase options="na" anchor="http://www.lansa.com">Anchor<phrase>

   <phrase>Here is an</phrase>

   <phrase options="sb,sa" annotation="explain">annotation</phrase>

   <phrase options="na">example</phrase>

   <phrase options="sb,sb,sb,na,sa" value="{@date}" date-format="dd-MM-yyyy"/>

   <phrase options="na" value="{@date}" date-format="dd/MM/yyyy hh:mm:ss"/>

   <phrase options="na" value="23" decimal-format="0000"/>

   <phrase options="na" value="34.56" decimal-format="#,###.##"/>

   <phrase options="na" value="2334.56" decimal-format="&#xA4;#,###.##"/>

 </text>