[plt-scheme] xexprs and sxml

From: Anton van Straaten (anton at appsolutions.com)
Date: Mon Jan 9 14:21:25 EST 2006

John Clements wrote:
> On Jan 9, 2006, at 10:12 AM, Dave Herman wrote:
>> Anton's suggestion was just to go SXML -> XML and pass the strings  to 
>> the web-server, essentially bypassing any of the web-server's  use of 
>> x-expressions at all. Lower-tech, but something that works  now 
>> without me having to generate a mapping.
> Yes, this sounds like a nice simple solution.

I emailed Dave privately by mistake.  For the record, I wrote:

 > I skip the xexpr steps by generating XML from SXML, and returning that
 > directly to the web server using a response of the form:
 >   (cons "text/html" <<list-of-html-strings-generated-from-sxml>>)
 > IIRC, HTMLPrag has some useful functions to support this sort of
 > thing, too.

One thing which HTMLPrag handles is HTML entity representation and 
generation, which Dave mentioned: a list of the form (& entity) in the 
SXML will be converted to the corresponding HTML entity.  Since HTMLPrag 
is geared towards permissive parsing of HTML, I assume it handles 
parsing of HTML containing entities, too, if that's needed.


Posted on the users mailing list.