[cl-who-devel] Parsing html and creating a new output
Richard Newman
rnewman at twinql.com
Sat Nov 24 23:52:06 UTC 2007
>> I am wondering is there a function inside cl-who that I can use to
>> convert s-exp html list like '(:body "some body") to an HTML text?
>
> No, unfortunately there isn't. I wanted to add that for quite some
> time now, but it implies a major rewrite of CL-WHO's internals and I
> don't have time for this ATM. Maybe you can use one the related tools
> like htout, LML, or htmlgen for this.
I don't know if the innards of CL-WHO have changed in the two years
since I wrote my code, but I did put together a hack that did exactly
this, calling APPLY-TO-TREE and TREE-TO-TEMPLATE with a rewritten -
AUX function.
Rather than walking an expression inside a macro, producing code to
print HTML, we walk the form inside a function, printing strings
directly.
I don't know if it still works, but it's under 100 lines, so you
should be able to replicate it pretty easily.
-R
More information about the Cl-who-devel
mailing list