OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: SQL queries expressed in XML

[ Lists Home | Date Index | Thread Index ]
  • From: "Julian Reschke" <reschke@medicaldataservice.de>
  • To: <xml-dev@ic.ac.uk>
  • Date: Tue, 23 Mar 1999 12:50:40 +0100

Andrew McNaughton <andrew@squiz.co.nz> wrote:

> > > we recently had the idea to use XML to express SQL-like queries
> > > (so this is
> > > not about querying XML -- it is about using XML to express queries).
> > > seems to me that we might not be the first ones; so has anybody
defined an
> > > XML document type for expressing SQL queries?
> >
> > And just to widen this question slightly - assuming I do have an XML
> > representation
> > of a language construct - whats the best way to do the conversion from
> > the XML representation to the 'correct' language representation.
> >
> > Could I use XSL to do this - or would this be going against the grain?
> >
> > (Just to qualify this I'm relatively new to XML, and *extremely* new to
> > XSL).
> XSL doesn't seem to do very well where the desired output is not well
> If your SQL queries have '"', '<', '>' or '&' in them, then you're going
> start getting into kludges.  perl or DSSSL would be better suited to the
> *Why* do you want to put your queries into XML?  Do you need access to the
> structure of your queries?  Perhaps you just need something that can be

The idea was to reuse XML tools in a project which is XML related anyway.
Expressing a query in XML instead of using a "proprietary" representation
would allow us to use a standard parser to transform it into a object
representation (DOM), and it would also have the benefit that standard tools
could be used to actually enter or render a query string.

> ...
> I figure any boolean query can be expressed as a decision tree terminating
> true or false leaf nodes, that this maps well into XML, and that it should
> able to be used to search for queries matching a given document using
> tools (eg sgrep).  I believe this could lead to a relatively simple
> model, but it remains to be seen how efficient it will be.

Basically this is similar to our thinking...

> If anyone is aware of any relevant work that is being or has been done I'd
> appreciate hearing about it.  XML or otherwise.

This is precisely why I asked :-)

Julian Reschke
MedicalData Service GmbH (http://www.medicaldataservice.de)

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@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@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS