[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to render raw data using sxml?

From: Jakub Jankiewicz
Subject: How to render raw data using sxml?
Date: Sun, 10 Jul 2016 21:58:49 +0200


I want to render scheme code inside script tag to be executed by biwascheme
in the browser so I've try to create simple page using sxml (cgi script):

(display "Content-Type: text/html")
(display "<!DOCTYPE html>")
(sxml->xml `(html
                 (title "BiwaScheme test")
                 (script (@ (src "biwascheme-min.js")) "(display \"hello\")"))
              (body (p "BiwaScheme test"))))

but the output was:

<!DOCTYPE html>
<html><head><title>BiwaScheme test</title><script
&quot;hello&quot;)</script></head><body><p>BiwaScheme test</p></body></html>

which is invalid scheme code. I've also try this:

(script (@ (src "biwascheme-min.js")) "(display " #\" "hello" #\" ")")

but got the same result. How can I display raw data using sxml->xml

thanks in advance

Jakub Jankiewicz, Web Developer

reply via email to

[Prev in Thread] Current Thread [Next in Thread]