[racket] doctype in an xexpr?
Awesome : )
On Sat, Nov 26, 2011 at 11:07:42PM -0700, Jay McCarthy wrote:
> An Xexpr only encodes an XML element. The DOCTYPE is part of the document
> meta-data.
>
> The response/xexpr function therefore provides the #:preamble keyword that
> gives you the ability to put some bytes up front.
>
> Your wish...
>
> (define (start req)
> (response/xexpr
> "<!DOCTYPE html>"
> `(html (head (title "Hello world!"))
> (body (p "Hey out there!")))))
>
> is almost my command...
>
> (define (start req)
> (response/xexpr
> #:preamble #"<!DOCTYPE html>"
> `(html (head (title "Hello world!"))
> (body (p "Hey out there!")))))
>
> On Sat, Nov 26, 2011 at 9:44 PM, Jordan Schatz <jordan at noionlabs.com> wrote:
>
> > I don't see any way to include a DOCTYPE declaration in an xexpr?
> >
> > (define (start req)
> > (response/xexpr
> > "<!DOCTYPE html>"
> > `(html (head (title "Hello world!"))
> > (body (p "Hey out there!")))))
> >
> > (except of course that doesn't work : )
> >
> > Shalom,
> > Jordan
> >
> > _________________________________________________
> > For list-related administrative tasks:
> > http://lists.racket-lang.org/listinfo/users
> >
>
>
>
> --
> Jay McCarthy <jay at cs.byu.edu>
> Assistant Professor / Brigham Young University
> http://faculty.cs.byu.edu/~jay
>
> "The glory of God is Intelligence" - D&C 93