guile-user
[Top][All Lists]
Advanced

[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

Hi,

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")
(newline)
(newline)
(display "<!DOCTYPE html>")
(newline)
(sxml->xml `(html
              (head
                 (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
src="biwascheme-min.js">(display
&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

--
Jakub Jankiewicz, Web Developer
http://jcubic.pl



reply via email to

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