Whence XQL?

Ed Howland Ed at dega.com
Thu Mar 25 03:25:38 GMT 1999


Ok, so now it is April (or thereabouts) and still no XQL. I've read all the
hypeware about this and I understand that its just a suggestion for a
proposal for a note for a draft for a recommendation. Whatever.
I want my XQL! 

Seriously, all ranting aside, I haven't seen any talk here or in XSL
listserv land about it yet (recently). The proposal seems complete enough to
me for someone to have at least announced a beta implementation of it. I'd
be happy with mostly unfinshed code if it were written in Java.

So does anybody have a clue about this? I know about XSL so please don't
send me down that path. I also know about the Datachannel attempt. 

If not, I'm tempted to write something myself. I'm not sure about a couple
of things because its still just off the top of my head so far.

Ok, its in Java. It uses some free XML parser, probably XML4J because its
the one I'm most familiar with. The XQL syntax parser will be written in
ANTLR, since it outputs nice O-O Java classes. The result set of XQL is well
formed XML. This can be handled easily by XML4J's ability of any node in any
tree (or transformed sub-tree) to print itself in XML to any stream. XML4J
has a nice getNodesByName() mathod that can operate at any level of the tree
returning a NodeList of siblings with that tag name. Wrapping a result tree
in <xql:result></xql:result> and iterating the NodeList gets you the
simplist query.

Internally the result set is just another DOM tree so you should be able to
add the .jar file to your Java app and thus satisfy that type of XQL result.
The input can be done in a variety of ways. I assume that the Perl module
XML::XQL can be used in a CGI context to extract the XQL query, execute it
and return either XML or XSL transformed output to the calling app(browser.)
Likewise, a Java servlet could do the same thing.

Cons: Xml4J doesn't yet handle PI's so its maybe not the overall best
solution. (I may be wrong about this, IBM uploaded a new major release that
may have fixed it.) Its just the one I'm comfortable with, at the moment. On
my hard drive are XML parsers from Sun, Microsoft, Oracle, James Clark and
one or two others I haven't had time to play with yet.

I don't care about efficiency or optimization. All partially created result
sets will live in memory till they are ready to be output. I also don't care
about searching multiple files, although that should be realtively easy to
add. (I'm still confused about XML repositorys. Would XQL have to understand
directory paths? Does XQL need to be able to follow XLinks?)

I'm leaving out sequences but I may add them in (much) later. Return values
(analog to SQL's SELECT) are important to my application, as are
conditionals. 

Unless someone warns me that I'm clueless (which is usually the case,) I'll
post a cut of the ANTLR grammer as soon as I get a working one. I'll
probably put it on my web site.

Ed


Ed Howland
ed at dega.com
http://www.dega.com 
"As your attorney, I advise you to take some adrenalchrome"


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list