[plt-scheme] servlets and mathml

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Mon Dec 12 16:38:43 EST 2005

Jean-François Trevien wrote:

> I have also tried replacing the start by:
>  (define (start initial-request)
>    (list
>     "text/xhtml"
>     (string-append
>      "<?xml version=\"1.0\"?>
> <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN\"
>               \"http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd\" [
>  <!ENTITY mathml \"http://www.w3.org/1998/Math/MathML\">
> ]>"
>      (xexpr->string
>       `(html ((xmlns "http://www.w3.org/1999/xhtml")

Jean-François Trevien wrote:

 > I have also tried replacing the start by:
 >  (define (start initial-request)
 >    (list
 >     "text/xhtml"
 >     (string-append
 >      "<?xml version=\"1.0\"?>
 > <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN\"
 >               \"http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd\" [
 >  <!ENTITY mathml \"http://www.w3.org/1998/Math/MathML\">
 > ]>"
 >      (xexpr->string
 >       `(html ((xmlns "http://www.w3.org/1999/xhtml")

A month or two ago I used the following:

   (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)))))

-- 
Jens Axel Søgaard




Posted on the users mailing list.