Forum OpenACS Development: Re: Invalid XML in XQL files

Collapse
Posted by Don Baccus on
Someone should probably ping Ben on this since he wrote the QD, but I think Jeff's summary of my position's more or less correct.  Another way to put it: the Query dispatcher transforms .xql files into valid XML before parsing them and my presumption has been that Ben did this by design, to make the query files less obnoxious to write.

But I've never asked him ...

Caching for quicker startup would be nice, of course, but that's another issue.

Yet another issue that we need to tackle soon is to drop libxml and switch to Zoran's tDom AOLserver module.  It was supposed to be "released any day now" late last summer so one would hope it's actually available now?  Does anyone know?  ns_xml only exposes a trivial subset of libxml and since everyone seems to believe that Zoran's stuff's better than libxml and since supposedly he's exposed everything in his AOLserver module, it seems much more reasonable to switch rather than extend ns_xml into something more useful.

Collapse
Posted by Bart Teeuwisse on
Yet another issue that we need to tackle soon is to drop libxml and switch to Zoran's tDom AOLserver module.  It was supposed to be "released any day now" late last summer so one would hope it's actually available now? 

Don, tDOM 0.7.5 was released 2002-11-27 and is available from http://www.tdom.org/. It works great with AOLServer!

Let's switch over to tDOM. And now that we are on the subject of XQL files, could we please include an XQL DOCTYPE at the top of each XQL file? I can provide a DTD for the type. With a DOCTYPE in place XQL files are a snap to create/modify by hand when using Emacs.

/Bart

Collapse
Posted by C. R. Oldham on
Sorry if this has already been discussed.  Is tDOM a drop-in replacement for nsxml?
Collapse
Posted by John Sequeira on
C.R.,

I've written a tiny compatibility layer mapping ns_xml commands to tdom commands as part of my portable.nsd effort.  It's not quite drop-in,  but close.

Collapse
Posted by Jeff Davis on
As much as I hate having queries in a seperate file, I am not sure if pre-processing the tcl is such a good idea. If the first step in installing openacs is "compile the actual tcl scripts" I would have serious concerns that the we would see two things
  • Mysteriously broken code which would result from errors in the parser or quirks in the particular source tcl.
  • even more difficulty in merging improvements from particular sites back into the code base.
If it were a cleaner language or if we had a full parser I would not worry quite so much but regardless of how good the parser is, the later problem will remain.

I don't see a lot of evidence that the QD overhead is anything to be that concerned about relative to going to the DB in the first place.

I think there is probably a better argument for precompiling adp files rather than doing them on the fly, although there it is much clearer that what you are doing is compiling and no one would really be tempted to discard the adp's and work directly with the resulting code.