You are looking at historical revision 2736 of this page. It may differ significantly from its current revision.
Introduction
The hart egg provides an SXML-inspired syntax for HTML generation.
(Sorry, documentation is a bit sparse at the moment.)
License
hart is licensed under the BSD License.
Authors
Requirements
Examples
Canonical Usage
(use hart) (define people '((Fred fred@example.net 25) (Mary mary@example.net 33))) (hart (html (head (title "People")) (body (h1 (fmt: "A list of ~a people" (length people))) (if: (null? people) (h2 "No people!") (ol (for: ((name email age) people) (li (a (@ (href (conc "mailto:" email))) (text: name)) (fmt: ", who is ~a years old." age))))))))
which produces
<html><head><title>People</title></head><body> <h1>A list of 2 people</h1> <ol><li><a href="mailto:fred@example.net">Fred</a>, who is 25 years old.</li> <li><a href="mailto:mary@example.net">Mary</a>, who is 33 years old.</li> </ol></body></html>