[plt-scheme] servlets and mathml

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Mon Dec 12 16:55:08 EST 2005

You must add

(require (lib "response.ss" "web-server"))

to your preamble.

On 12/12/05, Jean-François Trevien <jftrevien at free.fr> wrote:
> I try the following:
>
> (module test-mathml mzscheme
>   (require (lib "servlet.ss" "web-server")
>            (lib "date.ss")
>            (lib "xml.ss" "xml")
>            )
>   (provide interface-version timeout start)
>   (define interface-version 'v1)
>   (define timeout +inf.0)
>   (define (make-page body)
>     (make-response/full
>      200 "OK" (current-seconds) (string->bytes/utf-8 "text/html")
>      '()
>      (list "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"
> \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"
>          (xexpr->string
>           `(html
>              (head (title "A Title")
>                     (meta ((http-equiv "Content-Type")
>                            (content "text/html;charset=ISO-8859-1"))))
>             ,body)))))
>   (define (start initial-request)
>     (make-page
>                (math ((xmlns "http://www.w3.org/1998/Math/MathML"))
>                      (mrow
>                       (msup
>                        (mfenced (mrow (mi "a")(mo "+")(mi "b")))(mn "2")))
>                      )))
>   )
>
> Ang get the following error:
>
> Servlet didn't load.
> C:\Programs\PLT\collects\web-server\default-web-root\.\servlets\examples\test-mathml.scm:10:5: compile: unbound variable in module in: make-response/full
>
>
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>


--
Jay McCarthy <jay at cs.brown.edu>
http://jay.makeoutcity.com/


Posted on the users mailing list.