Element - text
The text element is used to add text to the current page.
Syntax:
|
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:
|
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="¤#,###.##"/>
</text>