Nico de Jager
2006-11-14 16:00:34 UTC
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")))))))
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
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")))))))
1-11-2
<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<tr><td>1-1</td><td>1-2</td></tr></table></body></html>
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