[plt-scheme] literal html data in servlets
I do, and that's how I generate my web pages. Here is an excerpt:
;; I escape into plain HTML with (xml ...), but it also takes file
names:
(write-normal-page "general.html" "General" #f (xml "general.xml"))
;; general.xml:
<div>
<scheme>(red-title "Contract")</scheme>
<p>
If you ...
As you can see, I can also escape back into Scheme via <scheme> (and a
few other macros). So it's really a quasiquote, comma like system.
The XML boxes in DrScheme have supplanted this system so I just
maintain it for my own sake.
-- Matthias
On Aug 18, 2005, at 3:33 PM, Hans Oesterholt-Dijkema wrote:
> L.S.,
>
> Is it possible with the plt-webserver to combine X-Exprs and Plain
> HTML text with each other?
>
> e.g.:
>
> (define H1 "XYZ")
> `(html (head (title "test"))(body (h1 ,H1) (literal
> "<h2>head2</h2><p><ul><li> 1</li><p><li> 2</li></ul>") (h3 "head3")))
>
> Thanks in advance for answers,
>
> Hans
>