Package: closure-html

Function make-string-sink

Lambda List

make-string-sink (&rest args)

Return Value

a HAX handler

Details

Returns a sink creating strings.

This function creates a serialization sink. Sinks are HAX handlers that write events in their normal HTML syntax, and return the result from hax:end-document, if applicable.

This particular kind of sink creates an HTML document in a string. The string is not encoded into an external-format. When writing this string to a Lisp character stream at a later point, make sure that the stream's external format agrees with the encoding declared by the document, if any.

Supported only on Lisps with Unicode support. On Lisps without Unicode characters, try make-string-sink/utf8 as an alternative that has different encoding behaviour, but still uses strings. Or use make-rod-sink, which creates arrays of code points.

 

See also