[racket] SXML->xexprs ?

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Sun Jul 25 17:21:44 EDT 2010

Pedro Pinto wrote at 07/25/2010 11:04 AM:

 > I am using neil/htmlprag to generate sxml and  lizorkin/sxml to 
manipulate it. I would like to mash together the resulting sxml with my 
own generated xexprs. Is there a recommended way to go about this? 
Ideally I would like to be able to use both xexprs and sxml since each 
format seems to have a different set of useful toolkits.

I think that the short-term solution is to write an "shtml->xexprs" 
procedure.  This procedure is mostly just a simple tree traversal.  (I 
wrote such a procedure, but regrettably no longer have access to that code.)

Longer-term, I plan to release some libraries and a spec for a new 
format that's mostly backward-compatible with both SXML and xexprs, and 
that adds a few things that neither format has.  I've actually found 
only one nontrivial difference between SXML and xexprs, and I don't 
think that difference is worth fragmenting the base of libraries over, 
nor worth the increased bugs as programmers intermix both formats in 
their code.  (I did most of this library and spec work last year, but it 
needs polishing up and be reviewed by SXML and PLT people, so that the 
spec is fairly stable before anyone starts depending on it.  I've also 
committed to doing a couple SRFIs on the spec and libraries.)


Posted on the users mailing list.