$ cat sxml2html.scm (import (chicken port)) (import sxml-transforms) (define sxml->html (let ((rules `((literal *preorder* . ,(lambda (t b) b)) . ,universal-conversion-rules*))) (lambda (sxml) (with-output-to-string (lambda () (SRV:send-reply (pre-post-order* sxml rules))))))) (print (sxml->html '(html (head (title "the title")) (body (div (@ (id "content")) (p "stuff here")))))) $ csi -s sxml2html.scm the title

stuff here