[cl-who-devel] CL-WHO transformation rule not working?
Nico de Jager
ndj at hivsa.com
Tue Nov 14 16:00:34 UTC 2006
Hi
It seems that the last transformation rule (and example) for attribute values
described in CL-WHO's documentation is not working.
I am using:
LispWorks 5.0 for Linux (Debian Sarge)
CL-WHO-0.6.2
HUNCHENTOOT-0.4.9
E.g.
(defun logon-page-html () ;logon-action)
(with-html-output (*standard-output*)
(:html
(:head
(:title "test"))
(:body
"Some text"
(:table :border "3" ; Going to change this!
(:tr (:td "1-1") (:td "1-2")))))))
gives the following in 2 browsers:
Some text
1-1 1-2
html:
<html><head><title>test</title></head><body>Some text<table
border='3'><tr><td>1-1</td><td>1-2</td></tr></table></body></html>
While:
(defun logon-page-html () ;logon-action)
(with-html-output (*standard-output*)
(:html
(:head
(:title "test"))
(:body
"Some text"
(:table :border (+ 1 2) ;Substituted (+ 1 2) for "3".
(:tr (:td "1-1") (:td "1-2")))))))
only gives the following in the same browsers:
>1-11-2
html:
><tr><td>1-1</td><td>1-2</td></tr></table></body></html>
The output of both cl-who:show-html-expansion and cl-who:with-html-output
appear correct in the listener, though:
CL-USER 11 > (cl-who:show-html-expansion (*standard-output*)
(:html
(:head
(:title "test"))
(:body
"Some text"
(:table :border (+ 1 2)
(:tr (:td "1-1") (:td "1-2"))))))
(LET ((*STANDARD-OUTPUT* *STANDARD-OUTPUT*))
(PROGN
NIL
(WRITE-STRING "<html><head><title>test</title></head><body>Some
text<table" *STANDARD-OUTPUT*)
(LET ((#:G4088 (+ 1 2)))
(COND ((NULL #:G4088))
((AND (EQ #:G4088 T) (EQ CL-WHO::*HTML-MODE* :XML)) (PROGN
(WRITE-STRING " border='border'" *STANDARD-OUTPUT*)))
((AND (EQ #:G4088 T) (EQ CL-WHO::*HTML-MODE* :SGML)) (PROGN
(WRITE-STRING " border" *STANDARD-OUTPUT*)))
(T (PROGN (WRITE-STRING " border='" *STANDARD-OUTPUT*) (PRINC
#:G4088 *STANDARD-OUTPUT*) (WRITE-STRING "'" *STANDARD-OUTPUT*)))))
(WRITE-STRING "><tr><td>1-1</td><td>1-2</td></tr></table></body></html>"
*STANDARD-OUTPUT*)))
It seems that only the output of the last "write-string" is sent to the
browser for the second example.
Thanks.
Nico
More information about the Cl-who-devel
mailing list