<html><head><title>People</title></head><body>
<h1>A list of 2 people</h1>
<ol><li><ahref="mailto:fred@example.net">Fred</a>, who is 25 years old.</li>
<li><ahref="mailto:mary@example.net">Mary</a>, who is 33 years old.</li>
</ol></body></html>

Syntax

[syntax] (hart hart-expr)
[syntax] (hart->string hart-expr)

Compiles hart-expr, an expression in the Hart syntax. In short, Hart is SXML syntax plus a set of "keyword expressions" which handle flow-control, iteration, escaping, etc.

Formatting keywords

The Scheme expressions (not Hart!) are evaluated to strings and outputted, without HTML/XML escaping.

[syntax] (text: expr*) or (t: expr*)

The expressions are evaluated to strings, HTML-escaped, and outputted.

[syntax] (fmt: format-string args*)

The result of (format format-string args*) is HTML-escaped and outputted.

On Attributes

Note that attributes (such as the "href" in an A tag) are of the form (name value), where "name" is a string or symbol, and "value" is a Scheme expression (literal or otherwise). No escaping is done on these expressions at the current time. Also there isn't yet support for adding arbitrary attributes.