|
From: Ken A. <kan...@bb...> - 2004-03-09 22:42:43
|
If you want to combine database querying and XML generation you could use a little language, like this xmlDbQuery macro examples. The first one uses quasistring notation to generate the sql query and the XML:
(xmlDbQuery
dbConnection
{select first_name, last_name from people where last_name like '[lname]'}
{<person>
<first-name>[first_name]</first-name>
<last-name>[last_name]</last-name>
</person>})
The second uses the <> macro in elf/html-gen.scm (see the lastest CVS version):
(xmlDbQuery
dbConnection
{select first_name, last_name from people where last_name like 'KNAUTH'}
(<> person
(<> first-name first_name)
(<> last-name last_name)))
This is close to SXML.
See also dclass SaxExp.scm for a sax parser that turns XML into s-expressions like McCarthy intended.
k
At 03:23 PM 3/9/2004 -0500, Geoffrey Knauth wrote:
>Have been using JScheme to read Oracle data and organize it hierarchically, since trees are so easy with Lisp/Scheme. Now trying to convert it to XML (so others can import the data). There's DrScheme code (a library, SXML?) that does that. Looking to see if I can do it easily staying in JScheme.
>
>Geoffrey
>--
>Geoffrey S. Knauth | http://knauth.org/gsk
>
>On Mar 9, 2004, at 15:06, Ken Anderson wrote:
>
>>Update of /cvsroot/jscheme/jscheme/src/elf
>>In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20702/src/elf
>>
>>Modified Files:
>> future.scm interrupt.scm
>>Log Message:
>>Future.scm - print error when it occurs.
>>
>>
>>
>>-------------------------------------------------------
>>This SF.Net email is sponsored by: IBM Linux Tutorials
>>Free Linux tutorial presented by Daniel Robbins, President and CEO of
>>GenToo technologies. Learn everything from fundamentals to system
>>administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
>>_______________________________________________
>>Jscheme-devel mailing list
>>Jsc...@li...
>>https://lists.sourceforge.net/lists/listinfo/jscheme-devel
|