The following is not exactly what you are looking for, but you might find it interesting.
http://www.franz.com/support/tech_corner/xml-generator-blurb.html This blurb is an example of a self-embedding document. I've used this XML generator in many applications, and it is usually elegant to use the structural parallel between an XML tree and the Lisp code that generates it. I haven't thought whether it could be reasonable to port it to scheme. Anyone who wants to think about it has my blessing! -- http://mail.python.org/mailman/listinfo/python-list