SAS Institute. The Power to Know

SAS(R) 9.2 Publishing Framework: Developer's Guide

Previous Page | Next Page

Viewer Processing

SASREPEAT Tag



Repeats a substitution for all entries that match given criteria
Syntax
Details
Examples

Syntax

<SASREPEAT> </SASREPEAT>

Details

The <SASREPEAT> tag causes a substitution that is enclosed within the tag to repeat for all entries that match the specified name/value pair, as described in Specifying Name/Value Pairs. Without the <SASREPEAT> tag, the substitution stops after matching the first entry.

Any HTML tags or static text that are included in the <SASREPEAT> tag are inserted into the output along with the substitution data, and those tags are repeatedly inserted each time a new entry matches the name/value pair.

The <SASREPEAT> tag is recognized only within the <SASINSERT> tag and is relevant only when it is used with name/value pair substitutions.


Examples

The following example uses the <SASREPEAT> tag to build a list of reports. The substitutions and the HTML tag within the <SASREPEAT> tag are repeated for each entry that matches the type=report name/value pair.

<SASINSERT>
Available reports include the following:
<ul>
<SASREPEAT>
<li> $(entry="(type=report)"
attribute=description)</li>
</SASREPEAT>
</ul>
</SASINSERT>

An example of the rendered view follows:

Available reports include the following:
     President's State of the Union address
     AlphaliteAirways Annual Report
     Sales Quotas for Midwest Territory

The next example uses the <SASREPEAT> tag to build a table. The substitutions and the HTML tags within the <SASREPEAT> tag are repeated for each entry in the main package that matches the type=report name/value pair.

<table border="1" cellspacing="0" cellpadding="3">
<SASINSERT>
<SASREPEAT>
<tr><td>$(entry="(type=report)"
attribute=description)</td></tr>
</SASREPEAT>
</SASINSERT>
</table>

An example of the rendered view follows:

Table Built Using <SASREPEAT> Tag
President's State of the Union Address AlphaliteAirways Annual Report Sales Quotas for Midwest Territory

Previous Page | Next Page | Top of Page