ad_style_example_table { entity_type "Tag" } tag_name_tag_and_code_listWhat it does:
Helper procedure for html_tag_list_example, html_attribute_list_example, and htmp_entity_list_example. Typical values of entity_type are Tag, Attribute, and Entity.Defined in: /web/philip/tcl/ad-style.tcl
Source code:
set to_return "<center>
<table border=0 cellspacing=2 cellpadding=3 width=90%>
<tr>
<td bgcolor=ececec><b>$entity_type</b></td>
<td bgcolor=ececec><b>Code Example</b></td>
<td bgcolor=ececec><b>Typical Rendering</b></td>
</tr>
"
foreach tag_example $tag_name_tag_and_code_list {
set tag_name [lindex $tag_example 0]
set tag [lindex $tag_example 1]
set example [lindex $tag_example 2]
if {[catch {set note [lindex $tag_example 3]}]} {
set note ""
}
# to show the code and tag, we have to change < to <, etc.
set example_code [philg_quote_double_quotes $example]
set tag [philg_quote_double_quotes $tag]
# then to show the results, we have to change <p> to <p class="mtb"> otherwise
# the stylesheet indents the paragraph
regsub -all {<p>} $example {<p class="mtb">} example_results
append to_return "<tr>
<td align=center valign=top bgcolor=ececec>
$tag_name[util_decode $tag_name "" "" "<br>"]
<code>$tag</code>
</td>
<td valign=top bgcolor=ececec>
<pre>$example_code</pre>
</td>
<td valign=top bgcolor=ececec>
$example_results
</td>
</tr>
[util_decode $note "" "" "<tr><td colspan=3 bgcolor=ececec><blockquote><font size=-1>$note</font></blockquote></td></tr>"]
"
}
append to_return "</table>
</center>
"
return $to_return