web-server-xexp: SXML/xexp Support for Racket Web Server
(require (planet neil/web-server-xexp:1:0)) |
1 Introduction
#lang web-server/insta (require (planet neil/web-server-xexp)) (define (start req) (response/html-template (html (header (title "advice-pin-oogly-book-r.com")) (body (h1 "Today's Advice") (p "Don't run with " (% (random-list-element '("scissors" "toilet plungers" "cheese graters" "trays of lasagna" "cats" "wolves" "the bulls"))) ".") (p "Like us on Facebook for a chance to win $" (% (+ 100 (random 901))) "."))))) (define (random-list-element lst) (list-ref lst (random (length lst))))
2 Interface
3 Known Issues
Rework response/html-template to use new features in package version html-template:2.
Add #:ordering argument to response/html-template, probably implemented using more general support in package html-template. Once that’s finalized, implement the Content-length computation placeholder code.
Document more.
Maybe expose html-writing package procedures as well, to reduce version mismatches.
4 History
- PLaneT 1:0 —
2013-01-07 Early initial release, since needed by RackOut.
5 Legal
Copyright 2013 Neil Van Dyke. This program is Free Software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License,or (at your option) any later version. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See http://www.gnu.org/licenses/ for details. For other licenses and consulting, please contact the author.