Print

Print


We do a similar pipeline in our JAFER toolkit.

Actually we have an additional step since internally we use an XML
representation of the Z39.50 RPN query.

So our pipeline from CQL to Z39.50 is something like

CQL --> XCQL --> XSLT Transform --> XML RPN --> RPN

For SQL we go

CQL --> XCQL --> XSLT Transform --> XML RPN --> XSLT Transform --> SQL

(since an XSLT transform can convert to a single string) The XML
transform is driven by another XML file to determine the mappings
between CQL context sets, Z39.50 attributes and SQL indices.

This isn't the most optimal route agreed but it does have versatility. 

(Had XCQL existed when we started we would probably have used that
rather than an XML version of the Z39.50 RPN query).

It is for this reason, that I've always resisted losing XCQL entirely
since it is useful for those who want to use XSLT for this sort of
conversion.

(and those who don't such as Mike, needn't).

Matthew Dovey
Oxford University

> -----Original Message-----
> From: SRU (Search and Retrieve Via URL) Implementors 
> [mailto:[log in to unmask]] On Behalf Of Mark R. Diggory
> Sent: 15 February 2006 15:17
> To: [log in to unmask]
> Subject: Re: SQL as XML
> 
> You know, we're taking a similar approach with XQuery right now.
> 
> CQL --> XCQL --> XSLT transform --> XQuery against XQuery 
> source (SQL DB, Native XML db etc)
> 
> I fail to see the issue (though I havn't listed into the 
> entire thread). 
> I don't think the approach is a bad idea, allot of 
> implementors will need to tailor an implementation to Legacy 
> systems, I think that the SRU folks are not the proper 
> location to discuss implementation details. 
> Zing seems a better place if your going with that technology.
> 
> We're using the following implementation of CQL/XCQL to get 
> to XML which we can use for processing/parsing queries.
> 
> http://zing.z3950.org/cql/java/
> 
> Cheers,
> Mark
> 
> Rafe Rosen wrote:
> 
> > Sorry, my bad, I should have been more clear,
> >
> > My project is implementing a CQL interface to our database 
> of 160,000 
> > recordings of animal sound and video.  My task is to build a system 
> > that translates a CQL query entered by a human into an appropriate 
> > (and potentially complex) SQL select statement to be sent to the 
> > database. Since there is (was?) an XML-CQL representation, 
> and XML is 
> > pretty pervasive, I figured if there was a similar schema 
> defined for 
> > SQL I could to the transformation with XSLT.
> >
> > I have since been advised that the above strategy is a Bad 
> Idea.  I'm 
> > probably going to use the parse tree structures created by CQL-java 
> > (for CQL) and either ZQL or hibernate (for SQL).
> >
> > If anyone on the list has experience translating CQL to 
> SQL, I would 
> > love to hear about it.  And what is the exact status of XCQL?  I'm 
> > pretty new on this list and hadn't heard it had been dropped.
> >
> > Thanks much!
> >
> > Rafe Rosen
> > Software Developer / System Administrator Macaulay Library 
> Cornell Lab 
> > of Ornithology Ithaca, NY 14850
> > 607 254 2132
> >
> > On Wed, 15 Feb 2006, Mike Taylor wrote:
> >
> >>> Date: Mon, 13 Feb 2006 16:32:28 -0500
> >>> From: Rafe Rosen <[log in to unmask]>
> >>>
> >>> Hey all- for a new search tool I'm writing, I'm thinking 
> it might be 
> >>> prudent to use XML transformations to convert between 
> some various 
> >>> query formats.  Is anyone out there aware of an XML schema that 
> >>> could represent a SQL select statement?
> >>
> >>
> >> Sorry, I think you're on the wrong mailing list :-)  In 
> SRU, we don't 
> >> use SQL at all, and we recently dropped XCQL which was the only 
> >> XML-based query language we had.
> >>
> >> _/|_     
> >> ___________________________________________________________________
> >> /o ) \/  Mike Taylor  <[log in to unmask]> 
> >> http://www.miketaylor.org.uk )_v__/\  "Covenant strode 
> pustulatingly 
> >> across the gibbous room, the
> >>      preternatural sun playing lambently across his 
> gloaming features"
> >>      -- Steven Donaldson, "Lord Lambent's Bane"
> >>
>