Re: [q-lang-users] Avoiding trailing () in CGIs
Brought to you by:
agraef
From: <Dr....@t-...> - 2004-07-03 10:07:51
|
Tim Haynes wrote: > Well, I'm not convinced I know that much about it either, but I'd be happy > to pass on the scripts & sablotron glue I've got so far - where would you > like them? Yes, I'd like to take a look at that! Just send me a tarball by email, if you like. > - the basic gist is that, given a database query result-set via > ODBC, I convert this > [(colname1,colname2), (row1col1, row1val1)...] > into XML with a recursive function whose first parameter is a list of > node-names for different depths (["xml","row","field"], typically). For simple XML this scheme seems to be perfectly adequate, so why make it any more complicated? > However, this is not clever in the slightest - it's all done with strings > when ideally it should be a type in its own right with an appropriate index > - but my Q is not so advanced[0] that I'd know how to implement such a > thing. [...] If all you need is a kind of indexed container, Q's standard library already has both ordered and hashed dictionaries (sections 11.5.5/6 in the manual). Crafting your own data types is also pretty straightforward (chapter 8 of the manual). If you need more info on this, don't hesitate to ask! > [0] I've only been using it on & off since I saw the 5.3 announcement on > freshmeat - hi folks! Welcome to the list. :) Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikwissenschaft.uni-mainz.de/~ag |