+proc display-full-wais {zset no} {
+ set i 0
+ set element junk
+ htmlToken l [join [$zset getWAIS $no text]] {
+ if {[string compare [string index $l 0] {<}]} {
+ set data($element) $l
+ continue
+ }
+ switch -exact $l {
+ <ti> {
+ set element title
+ }
+ <dm> {
+ set element dateOfLastModification
+ }
+ <ci> {
+ set element controlIdentifier
+ }
+ <lc> {
+ set element lastChecked
+ }
+ <by> {
+ set element bytes
+ }
+ <avli> {
+ set element linkage
+ }
+ <cr> {
+ incr i
+ }
+ <li> {
+ set element "$i,linkage"
+ }
+ <cp> {
+ set element "$i,title"
+ }
+ default {
+ set element junk
+ }
+ }
+ }
+ html {Title: } {<a href="} $data(linkage) {">} $data(title) "</a><br>\n"
+ html {URL: } $data(linkage) "<br>\n"
+ html {Score: } [$zset getWAIS $no score] "<br>\n"
+ html {Lines: } [$zset getWAIS $no lines] "<br>\n"
+ if {[info exists data(bytes)]} {
+ html {Bytes: } $data(bytes) "<br>\n"
+ }
+ if {[info exists data(dateOfLastModification)]} {
+ html {Last modified: } $data(dateOfLastModification) "<br>\n"
+ }
+ if {[info exists data(lastChecked)]} {
+ html {Last checked: } $data(lastChecked) "<br>\n"
+ }
+ html "<ul>\n"
+ for {set i 1} {[info exists data($i,linkage)]} {incr i} {
+ html {<li><a href="} $data($i,linkage) {">}
+ html $data($i,title) "</a><br>\n"
+ html "URL: " $data($i,linkage)
+ }
+ html "</ul>\n"
+}
+