SUBROUTINE TAG_ATTR
.
INCLUDE #RW.INCLUDE.DEFS FROM /SYSFILES/REALWEB,BP
EQU AM TO CHAR(254)
CALL RW_START_HTML_PAGE("Table Example using RWA_TAG_ATTR", "", "", "", "")
HTML = ""
TEXT = "Areas giving rise to faults in software"
CALL RWS_TAG(TEXT, "caption", "")
HTML = HTML : TEXT
ROW = ""
TAGS = "th":AM:"th"
DATA = "Phase giving rise to fault":AM:"Percentage of total faults"
CALL RWA_TAG_ATTR(ROW, TAGS, DATA, 1, "")
CALL RWS_TAG(ROW, "tr", "")
HTML = HTML : ROW
TAGS = "td":AM:"td"
ROW = ""
DATA = "Requirements definition":AM:"38"
CALL RWA_TAG_ATTR(ROW, TAGS, DATA, 1, "")
CALL RWA_TAG(HTML, "tr", ROW, "")
ROW = ""
DATA = "Maintenance (operation)":AM:"32"
CALL RWA_TAG_ATTR(ROW, TAGS, DATA, 1, "")
CALL RWA_TAG(HTML, "tr", ROW, "")
ROW = ""
DATA = "Design":AM:"23"
CALL RWA_TAG_ATTR(ROW, TAGS, DATA, 1, "")
CALL RWA_TAG(HTML, "tr", ROW, "")
ROW = ""
DATA = "Installation":AM:"7"
CALL RWA_TAG_ATTR(ROW, TAGS, DATA, 1, "")
CALL RWA_TAG(HTML, "tr", ROW, "")
aClass = ""
aClass<2> = "border=border"
CALL RWS_TAG(HTML, "table", aClass)
CALL RW_PUT(HTML)
CALL RW_END_PAGE
RETURN
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<META NAME="Generator" CONTENT="Reality">
<TITLE>Table Example using RWA_TAG_ATTR</TITLE>
</HEAD>
<BODY>
<table border=border><caption>Areas giving rise to faults in software</caption>
<tr><th>Phase giving rise to fault</th>
<th>Percentage of total faults</th>
</tr>
<tr><td>Requirements definition</td>
<td>38</td>
</tr>
<tr><td>Maintenance (operation)</td>
<td>32</td>
</tr>
<tr><td>Design</td>
<td>23</td>
</tr>
<tr><td>Installation</td>
<td>7</td>
</tr>
</table>
</BODY>
</HTML>