The list consists of a text area that is repeated as many times as specified in the count field in the input data block_count block. The following script is attached before the document root and evaluates the count field with the stEvalXPath() script function. It also creates an array that is used to repeat the text area.
Example 37 //Block repeats$cnt = stEvalXPath( "/data/message/block_count/count");$i = 0;while( num($i) < num($cnt) ){$block_repeats[$i] = $i;$i++;}
Figure 42
Example 38 $pos_y = stGetParagraphPageYpt();
$min_height = in2pt(1); //inches
$high_pos = in2pt(7.4); //inches
$low_pos = in2pt(11.125); //inches
$last_page_blank = 0;
if ( num($pos_y) < num($high_pos) )
{
$height_left = num($high_pos) - num($pos_y);
}
else if ( num($pos_y) < num($low_pos) )
{
$height_left = num($low_pos) - num($pos_y);
$last_page_blank = 1;
}
else
{
$height_left = 0;
}if ( num( $height_left ) > in2pt(1) )
{
stsetPropertypt( "Height", $height_left );
}
else
{
skip();
}The Marketing message 2 text area has a repeater on it with an XPath set to $last_page_blank[. = 1]. This means that it is only rendered when $last_page_blank = 1.
Example 39 //Calculate where on the page the frame ends in Y direction$frame_end = stGetPropertypt("Y") + stGetPropertypt("Height");
Example 40 //Test if position is below frame end$posy = stGetPropertypt("Y");if( num($posy) < num($frame_end) ){skip();}
| OpenText StreamServe 5.6.2 | Updated: 2018-01-26 |