Re: SXML -> HTML

"Neil W. Van Dyke" <[email protected]> Wed, 23 Feb 2005 13:11:41 -0500
Newsgroups gmane.lisp.scheme.ssax-sxml
Message-ID <[email protected]>
> b.  Is there a better way to support nbsp?

Oleg provided the best answer to this general XML problem.

But if you only want to deal with HTML, the latest HtmlPrag has a couple
small improvements for dealing with HTML character entities, which you
might find convenient.

For example:

    (define lsxml '(html (body (h1 (@ (align "center"))
                                   "Hello World"
                                   (& nbsp)
                                   "People"))))

    (shtml->html lsxml)

yields the following as a string:

    <html><body><h1 align="center">Hello World&nbsp;People</h1></body></html>

More info at:

    http://www.neilvandyke.org/htmlprag/

PLT PLaneT "require" form is:

    (require (planet "htmlprag.ss" ("neil" "htmlprag.plt" 2 0)))


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click