Publishing Framework
<SASTABLE> TagPopulates HTML or text tables and lists. Syntax<SASTABLE nested=z entry=x attribute=value> /* insert HTML tags or static text as needed here */ $(variable=variableName) /* insert HTML tags or static text as needed here */ </SASTABLE> The attributes of the <SASTABLE> tag are defined as follows:
DetailsWithin the <SASINSERT> tags, the <SASTABLE> tag supports the development of HTML lists and tables. The <SASTABLE> tag populates tables and lists by repetitively inserting HTML tags or static text and specified data into HTML or text output. The insertion repeats for each row of data that has been specified for insertion. The location of the data and the rows of data to be inserted are determined by the attributes of the <SASTABLE> tag. Variable SubstitutionVariable substitution is valid within the <SASTABLE> open tag and the </SASTABLE> closing tag. The variable substitution syntax is $(VARIABLE=variableName) The variable substitution syntax specifies that the value of the VARIABLE attribute in the data set is to be substituted into the tables and lists in either HTML or plain text format. This attribute is valid only within the <SASTABLE> tag. The entry that is named in the <SASTABLE> tag must be a valid SAS data set. Any number of variable substitutions can be specified within the <SASTABLE> tag as long as each one references a valid variable in the SAS data set. ExamplesThe following example uses the <SASINSERT> and <SASTABLE> tags to build a list. The SAS data set that is used is the second entry that is added to the main package. The value of the fileName variable is substituted on each repetition. <p> <SASINSERT> <ul> <SASTABLE ENTRY=2> <li>$(VARIABLE=fileName)</li> </SASTABLE> </ul> </SASINSERT> The following example uses the <SASINSERT> and <SASTABLE> tags to build a table. The SAS data set entry is the first entry in the main package. The value of the variables fname, lname, state, and homepage are used to create the table. The newly created table will contain one row for each row in the main package. <SASINSERT> <h1>Table Example using SASTABLE</h1> <table border cellspacing=0 cellpadding=5 rules=groups> <thead> <tr><th>First Name</th> <th>Last Name</th> <th>State </th> <th>HomePage</th></tr> <tbody> <SASTABLE ENTRY=1> <tr> <td> $(VARIABLE=fname)</td> <td> $(VARIABLE=lname)</td> <td> $(VARIABLE=state)</td> <td> <a href=$(VARIABLE=homepage)> $(VARIABLE=homepage)</a></td></tr> </SASTABLE> </table> </SASINSERT>
|