html: Add sxml->html-string.
* haunt/build/html.scm (sxml->html-string): New procedure.
This commit is contained in:
parent
44fdd16202
commit
fc06ea3d9d
|
@ -28,7 +28,8 @@
|
|||
#:use-module (ice-9 match)
|
||||
#:use-module (ice-9 format)
|
||||
#:use-module (ice-9 hash-table)
|
||||
#:export (sxml->html))
|
||||
#:export (sxml->html
|
||||
sxml->html-string))
|
||||
|
||||
(define %void-elements
|
||||
'(area
|
||||
|
@ -368,3 +369,9 @@ list ATTRS and the child nodes in BODY."
|
|||
(string->escaped-html text port))
|
||||
;; Render arbitrary Scheme objects, too.
|
||||
(obj (object->escaped-html obj port))))
|
||||
|
||||
(define (sxml->html-string sxml)
|
||||
"Render SXML as an HTML string."
|
||||
(call-with-output-string
|
||||
(lambda (port)
|
||||
(sxml->html sxml port))))
|
||||
|
|
Loading…
Reference in New Issue