Hi Matt, Matt Gushee <m...@gushee.net> writes: > markdown->sxml converts whitespace in the input to character objects, > or lists of character objects, e.g.: > > '(#\space) > #\newline > > ... but serialize-sxml can't handle these: evidently it wants either > strings or symbols. I haven't found any arguments or parameters in > either egg that seem to be able to affect this behavior.
yeah, Lowdown is cheating a bit here. Those individual characters fall right out of the parser and it would require an additional walk of the result to turn them into strings. As you already found out, this is not really part of the SXML spec but most tools allow characters just fine (sxml-serializer is an exception here and is particularly strict). Same applies to the additional list wrapping. I usually serialize SXML like this: (use sxml-transforms) (define some-data '(some #\d (#\a "ta"))) (SRV:send-reply (pre-post-order some-data) universal-conversion-rules)) Which outputs: <some>data</some> As you can see, universal-conversion-rules and SRV:send-reply (what's the deal with that name?) don't care much about the structure. Note that characters will not be entity escaped though, they are just passed through as-is. However, I do take your point and I think if I advertise Lowdown as producing SXML I should better change it to produce SXML according to spec :-) I hope I will get around to changing this soon but can't promise when. I also hope the workaround above will serve you until then! Moritz _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users