Re: [q-lang-users] Avoiding trailing () in CGIs
Brought to you by:
agraef
From: Tim H. <q...@st...> - 2004-07-03 22:27:17
|
Dr....@t-... (Albert Graef) writes: > 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. [for the list's benefit, a tarball has been mailed.] >> - 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? Well, at some future date I would like to be able to read in arbitrary, possibly large-ish, XML documents, have them parsed into an accessible structure and then be able to perform xpath/xquery queries on them to isolate node(s). >> 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). Oh, ordered dictionaries as well? That would be great. I was wondering, earlier, what the most appropriate data-structure would be for storing such a set of XML nodes, facilitating rapid random access. I'll have a look through those sections imminently. >> [0] I've only been using it on & off since I saw the 5.3 announcement on >> freshmeat - hi folks! > > Welcome to the list. :) Thanks :) ~Tim -- <http://spodzone.org.uk/> |