(use sxml-transforms) (define html-rules `((literal *preorder* . ,(lambda (t b) b)) . ,universal-conversion-rules*)) (define (sxml->html sxml) (SRV:send-reply (pre-post-order* sxml html-rules))) #;3> (sxml->html '(div (div hello)))
hello
#t #;4> (sxml->html '(textarea (div hello))) ...but edge cases: #;10> (sxml->html '(textarea (div (@ (hello "\"what\""))))) ... is irreversible because the browser will map " to " and " to " as well. #;12> (sxml->html `(textarea ,(with-output-to-string (lambda () (sxml->html '(div (@ (hello "\"what\""))))))))