![](https://secure.gravatar.com/avatar/903fa63984557ed9c3c908958c9f00e8.jpg?s=120&d=mm&r=g)
20 Jul
2011
20 Jul
'11
9:51 p.m.
You might want to examine https://github.com/franzinc/net-xml-generatorwhich is (sort-of) a DSL for generating and pretty-printing XML. It uses reader macros and the pretty-printer so that XML elements can be freely intermixed and nested inside Lisp code. (Unlike HTML, XML has an unbounded set of tags, so defining a finite set of keywords won't work.) Download the zip and view the xhtml blurb in a browser. It self-referentially contains the Lisp code that generated it, which is probably harder to do in other languages.