Re: Converting s-expressions to XML

2010-06-17 Thread Thien-Thi Nguyen
() "d...@mac.com" () Thu, 17 Jun 2010 15:21:08 -0400 (with-xml-tag 'em (make-raw "A Better Way")) yields A Better Way See also ‘peel’ and ‘expand’ in module (ttn-do zzz publishing): http://www.gnuvola.org/software/ttn-do/ttn-do.html.gz#zzz-publishing Module (ttn-do zzz xhtml-tree) uses ‘expa

Re: Converting s-expressions to XML

2010-06-17 Thread dsmich
Josef Wolf wrote: > Hello, > > I am trying to write a (simple) function to convert s-expressions to XML. Guile 1.9/2.x has sxml modules. So (use-modules (sxml simple)) (define (sexp->xml s) (sxml->xml s)) Ought to get you pretty close. (untested) -Dale

Re: Converting s-expressions to XML

2010-06-17 Thread dsmich
Josef Wolf wrote: > Hello, > > I am trying to write a (simple) function to convert s-expressions to XML. Guile 1.9/2.x has sxml modules. So (use-modules (sxml simple)) (define (sexp->xml s) (sxml->xml s)) Ought to get you pretty close. (untested) -Dale

Re: Converting s-expressions to XML

2010-06-17 Thread d...@mac.com
Here's an excerpt from my sexp to XML interface for Proverb: Generating XML in Scheme Proverb lets you generate and present XML-valued objects from Scheme with little fuss. The most crude interface is the procedure make-raw . This procedure is called with a valid XML fragment as a string an

Converting s-expressions to XML

2010-06-17 Thread Josef Wolf
Hello, I am trying to write a (simple) function to convert s-expressions to XML. I've come up with following function, which (somehow) works: (use-modules (ice-9 rdelim)) (use-modules (ice-9 pretty-print)) (define atom? (lambda (x) (and (not (pair? x)) (not (null? x) (