SAT Markup Language (SAT/ML) Tags
S@
Home SATGUI SATSHELL SATFORM SATFILTER SATREPORT SATMYSQL License Download Examples Contact

Tags marked (*) are applicable to SATFILTER.


<abs number>Absolute value of number (*).
<b> </b>Set/unset bold text attribute (*).
<body> </body>Mark limits of text body.
<box> </box>Mark limits of box drawing area (*).
<count list>Count TAB delimited items in list.
<dateformat format>Set dateformat to format.
<field position:data>Selects TAB delimited field at postion from data.
<find pattern:dataname>Find numbered data items matching pattern with dataname.
<font fontname?:fontsize?>Set font to fontname (Font size optional) (*).
<format list:dataname>Format numbered data items from list with dataname.
<h1> </h1>Set/unset heading style 1 (Also styles 2-6) (*).
<hr>Print horizontal rule (*).
<i> </i>Set/unset italic text attribute (*).
<include form>Include external form file.
<indent characters>Set indent (*).
<insert label>Insert text block label.
<label label> </label>Mark limits of labeled text block.
<landscape>Set page orientation to landscape (*).
<ltrim data>Trim spaces from left of data (Removes leading spaces) (*).
<o> </o>Mark limits of overlay printing (*).
<overlay overlay>Identify overlay to be used.
<p>Page break (*).
<portrait>Set page orientation to portrait (*).
<read case:name>Read variable name with case convertion.
<repeat number:line>Repeat line number times (*).
<rtrim data>Trim spaces from right of data (Removes trailing spaces) (*).
<run command>Run external command (*).
<search pattern:dataname:list>Search data items matching pattern with dataname in list.
<set name:value>Set variable name to value.
<size fontsize>Set font size (*).
<spacing linespacing>Set line spacing (*).
<sub> </sub>Set/unset subscript text (*).
<sup> </sup>Set/unset superscript text (*).
<tt> </tt>Set/unset teletype font (*).
<trim data>Trim spaces from left/right of data (Removes leading/trailing spaces) (*).
<u> </u>Set/unset underline text attribute (*).
<@ ?column??:line?>Position at column/line (*).
<$ column:number>Right justify number at column (*).
<! ?data?>Suppress printing of line if data is null (*).
<tag ?parameters?>If tag not in above list, then run external tag process (*).


<abs>

The <abs number> tag will be replaced with the absolute value of the specified number.

Examples:

Assume the value of the data item amount is -296

TagReplaced with
<abs 173>173
<abs -173>173
<abs ${amount}>296


<b> </b>

The <b> tag turns on the bold text attribute. The matching </b> tag turns it off.

Example:

This is a <b>bold</b> word.This is a bold word.


<body> </body>

The <body> tag marks the begining of the text to be printed. The matching </body> tag marks the end of the text to be printed.

Notes:


<box> </box>

The <box> tag marks the begining of a box-drawing block. The matching </box> tag marks the end of the box-drawing block.

Within a box-drawing block the font is set to 10 pitch courier and the following character translations are performed:-

It is recommended that box-drawing blocks contain only characters used in box-drawing translations. The boxes should be populated (if required) by positioning text using the @ tag.


<count list>

The <count list> tag is replaced with an integer which is a count of the number of TAB delimited items in the list.

This tag can be used to count the number of matches found by find and search tags.

Example:

Assume the following data items:-

Data ItemValue
example1JOHN SMITH
example2MARY JONES
example3SUSAN SMITH

TagReplaced with
<count <find SMITH:example%>>2
<count <find !JOHN:example%>>2
<count <find !(JOHN|MARY):example%>>1
<count <find S:example%>>3


<dateformat format>

The <dateformat format> tag will set format of printed dates to format.

The date is accessed as the ${DATE} data item.

The following formats are supported:-

eu, gb, uk, us (default), text

Examples:

Assume todays date is 23rd September 2000.

FormatPrinted date
eu23.09.2000
gb23/09/2000
uk23/09/2000
us09/23/2000
text23 September 2000


<field position:data>

The <field position:data> tag selects the field at position from a tab delimted data string.

Example:

Assume the data item example1 (where \t represents a TAB character) contains:-

data field1\tdata field2\tdata field 3

TagReplaced with
<field 1:${example1}>data field1
<field 2:${example1}>data field2
<field 3:${example1}>data field3

Note:


<find pattern:dataname>

The <find pattern:dataname> tag is replaced with a TAB delimited list of numbers, identifying the data items matching the pattern with dataname.

Find replaces a percent (%) character in dataname with an incrementing integer, starting at 1. For each dataname generated in this way find matches the value of the against the pattern. If the pattern matches, the integer is added to the item list to be returned. Find continues until it finds a non-existant dataname.

The pattern must be a regular expression valid for the nawk interpreter being used. To simplify "not matching" conditions, the regular expression may be prefixed with a "!" NOT operator.

Example:

Assume the following data items:-

Data ItemValue
example1JOHN SMITH
example2MARY JONES
example3SUSAN SMITH

Where \t represents a TAB character.

TagReplaced with
<find SMITH:example%>1\t3
<find !JOHN:example%>2\t3
<find (JOHN|MARY):example%>1\t2
<find !(JOHN|MARY):example%>3
<find JO:example%>1\t2
<find ^JO:example%>1
<find S:example%>1\t2\t3

Note:


<font fontname?:fontsize?>

The <font fontname?:fontsize?> tag sets the current font to fontname. Optionally a fontsize (in points) can be specified. If no fontsize is specified then the font size is unchanged.

The following fonts are supported:-

arial, clarendon, coronet, courier, gothic, lineprinter, marigold, omega, symbol, times, univers, wingdings.

Examples:

Assume the current font size is 12.

TagExample text
<font times>This is some text
<font times:10>This is some text

Notes:


<format list:dataname>

The <format list:dataname> tag is replaced with a formatted string containing double quote delimited values for each dataname in list. The result is in a suitable format to be passed as parameters to an external tag.

Format replaces a percent (%) character in dataname with each integer in turn from the list. For each dataname generated in this way find delimits the value of the data item with double quotes and appends it to the result string.

Example:

Assume the following data items:-

Data ItemValue
example1JOHN SMITH
flag1N
example2MARY JONES
flag2Y
example3SUSAN SMITH
flag3Y

TagReplaced with
<format <find SMITH:example%>:flag%>"N" "Y"
<format <find !JOHN:example%>:flag%>"Y" "Y"
<format <find !(JOHN|MARY):example%>:flag%>"Y"
<format <find S:example%>:flag%>"N" "Y" "Y"

Note:


<h1> </h1>

The <h1> tag marks the begining a heading style 1 text block. The matching </h1> tag marks the end of the heading style 1 block.

Heading style 1 is the largest, heading styles 2-8 are subsequently smaller.

The heading style tag turns on the bold text attribute and sets the font size as follows:-

TagSize
<h1>18
<h2>16
<h3>14
<h4>12
<h5>10
<h6>8


<hr>

The <hr> tag prints a horizontal rule line. The length of the line is determinted by the page orientation. For portrait it will be 76 (10 pitch) characters, for landscape 113 characters. These figures are suitable for A4 sized paper.

The start position of the line is determined by the indent. The line is shortened by the current indent value.

Note:


<i> </i>

The <i> tag turns on the italic text attribute. The matching </i> tag turns it off.

Example:

This is an <i>italic</i> word.This is an italic word.

Note:


<include form>

The <include form> tag copies form into the current form starting at the positon of the include tag.

Notes:


<indent characters>

The <indent characters> tag sets the left margin indent to characters, based on 10 pitch courier.


<insert label>

The <insert label> tag inserts the block of text identified by label at the position of the insert tag.

This tag is most likely to be used in conjuntion with conditional macros.

Example:

{${balance}:<:0;<insert debit-text>;<insert credit-text>}


<label label> </label>

The <label label> tag marks the begining of a labeled block to be identified by label. The matching </label> tag marks the end of the labeled block.

Example:

<label debit-text>
Your account is &L;${balance} in debit.

Please clear this debt immediately.

<size 14><b>Failure to do so will result in legal action.</b><size 12>
</label>

Note:


<landscape>

The <landscape> tag sets the orientation of the current page to landscape.


<ltrim data>

The <ltrim data> tag trims spaces from the left of data (Removes leading spaces).


<o> </o>

The <o> tag turns on overlay printing. The matching </o> tag turns it off.

Example:

Use <o> to turn on a letter-head logo overlay for the first page of a letter. Then use </o> on the second page to turn off letter-head overlay printing for subsequent pages.

Note:


<overlay overlay>

The <overlay overlay> tag copies overlay to the current form.

Notes:


<p>

The <p> tag inserts a page-break.


<portrait>

The <portrait> tag sets the orientation of the current page to portrait.


<read case:name>

The <read case:name> tag will be replaced by the value of the variable data item name. The case of the variable will be converted according to case.

This tag can be used to read a variable data item set using the set tag, or to defer reading a variable data item until the tag processing stage.

Examples:

Assume the value of the data item name is "john SMITH"

TagReplaced withConvertion
<read $:name>john SMITHNone
<read %:name>John SmithMixed case
<read +:name>JOHN SMITHUpper case
<read -:name>john smithLower case


<repeat number?,start?:line>

The <repeat number?,start?:line> tag repeats the line, number times. In each line "%" symbols will be replaced by a numeric count. By default the count starts at 1, but this can be set by specifying a start value.

This tag can be useful for box drawing and printing lists generated by SATMYSQL.

Examples

<repeat 3:<field 1:demo-%><@ 25><field 2:demo-%>>

Is equivalent to:-

<field 1:demo-1><@ 25><field 2:demo-1>
<field 1:demo-2><@ 25><field 2:demo-2>
<field 1:demo-3><@ 25><field 2:demo-3>


<repeat 3,5:<field 1:demo-%><@ 25><field 2:demo-%>>

Is equivalent to:-

<field 1:demo-5><@ 25><field 2:demo-5>
<field 1:demo-6><@ 25><field 2:demo-6>
<field 1:demo-7><@ 25><field 2:demo-7>

Note:


<rtrim data>

The <rtrim data> tag trims spaces from the right of data (Removes trailing spaces).


<run command>

The <run command> tag runs an external (Unix) command. The standard output from the command will be also be output by SATFORM.

SATFORM will run a program called command from the $SATHOME/bin directory, passing any supplied parameters. The standard output from the program will be output unmodifed.

Note:


<search pattern:dataname:list>

The <search pattern:dataname:list> tag is replaced with a TAB delimited list of numbers, identifying the data items matching the pattern with dataname identified by list.

Search is intended to be used to process the result of a find tag.

Search replaces a percent (%) character in dataname with each integer in turn from the list. For each dataname generated in this way find matches the value of the against the pattern. If the pattern matches, the integer is added to the item list to be returned.

The pattern must be a regular expression valid for the nawk interpreter being used.

Example:

Assume the following data items:-

Data ItemValue
example1JOHN SMITH
flag1N
example2MARY JONES
flag2Y
example3SUSAN SMITH
flag3Y

Where \t represents a TAB character.

TagReplaced with
<search Y:flag%:<find SMITH:example%>>3
<search Y:flag%:<find !JOHN:example%>>2\t3
<search N:flag%:<find (JOHN|MARY):example%>>1
<search N:flag%:<find S:example%>>1

Note:


<set name:value>

The <set name:value> tag will set the contents of the variable data item name to value.

This tag can be used to set the value of variable data items at the tag processing stage.

Example:

<set manager:john smith>


<size fontsize>

The <size fontsize> tag sets the current font size to fontsize.

Examples:

Assume the current font is 10 point times.

TagExample text
<size 12>This is some text
<size 8>This is some text

Note:


<spacing linespacing>

The <spacing linespacing> tag sets the line pitch to linespacing lines per inch.

The following linespacings are supported:-

6, 8, 10, 12


<sub> </sub>

The <sub> tag turns on subscript text. The matching </sub> tag turns it off.

Example:

This is a <sub>subscript</sub> word.This is a subscript word.


<sup> </sup>

The <sup> tag turns on superscript text. The matching </sup> tag turns it off.

Example:

This is a <sup>superscript</sup> word.This is a superscript word.


<tt> </tt>

The <tt> tag turns on the teletype style text attribute. The matching </tt> tag turns it off.

Example:

This is a <tt>teletype</tt> word.This is a teletype word.


<trim data>

The <trim data> tag trims spaces from the left and right of data (Removes leading and trailing spaces).


<u> </u>

The <u> tag turns on the underline text attribute. The matching </u> tag turns it off.

Example:

This is an <u>underlined</u> word.This is an underlined word.


<@ ?column??:line?>

The <?column??:line?> tag sets the print position column:line. Both column and line are optional, but at least one must exist.

Examples:

TagResult
<@ 25>Postion set to column 25 in the current line.
<@ :8>Postion set to line 8.
<@ 25:8>Postion set to column 25 in line 8.

Note:


<$ column:number>

The <$ column:number> tag sets the right justified print position of number to column in the current line. The decimal point in number will be lined up at column. If the number has no decimal point (an integer), it will be lined up as if there were a decimal point after the number.

The following fonts/sizes are supported:-

courier, gothic, times, univers in sizes 10 and 12.

Examples:

Assume the value of data item amount1 is 297.35 and amount2 is 94

TagResult
<$ 25:${amount1}>Decimal point postion of "297.35" set to column 25.
<$ 30:112.47>Decimal point postion of "112.47" set to column 30.
<$ 50:${amount2}>Decimal point position set to column 50 as if number were "94."

Notes:


<! ?data?>

The <! ?data?> tag will suppress printing of the current line if the value of data is null.

This tag can be used in three ways:-

  1. As a comment line.
  2. To suppress output of line if data is null. For example: Print addresses neatly where not all address lines are used.
  3. In conjunction with conditional macros.

Examples:

TagResult
<!> This is a comment lineComment line
<! ${address2}>No line printed if value of address2 is null.
{${balance}:<:0;<!>;}No line printed if the value of balance less than zero.


<tag ?parameters?>

The <tag ?parameters?> tag will run an external tag process if the tag does not match one supported internally by SATFORM.

This facility can be used to add custom application specific tags to SATFORM.

SATFORM will run a program called tag from the $SATHOME/bin directory, passing any supplied parameters. The tag will then be replaced with the standard output from the program.


Copyright © 2003
Adrian Davis.