Referencing the results of prior queries with XQL

Bob Kline bkline at rksystems.com
Wed Jan 26 17:19:35 GMT 2000


[I'm posting this here, rather than in the XQL mailing list, which
appears to be very close to moribund.]

The latest version of the XQL draft says, "The nodes which form the
input to a query may come from a variety of different sources.  They may
be the result of a prior query, ...."  It doesn't, however, say how a
query would identify these results (in fact, it goes on: "XQL does not
specify how these nodes are brought to the query.").

I would have thought that such queries would be fairly common, and
further that it would be useful (and necessary for interoperability and
portability of tools) to have the syntax for such queries specified.

Here's an example (a real one).  A repository containing medical
diagnosis and treatment information consists of documents which
(simplified) look like this:

<CdrDoc>
 <DocId>04007026</DocId>
 ... // rest of document
</CdrDoc>

A complex query is submitted, which returns something like the
following:

<xql:result>
 <DocId>04007026</DocId>
 <DocId>12480279</DocId>
 ... // several hundred more document IDs
</xql:result>

The user now wants to refine the search ("which of these documents
contain descriptions of experimental cancer treatment protocols?")  
without incurring the cost of repeating the work done for the original
query.  Now, it would be possible to construct the new query, embedding
a clause which enumerated all of the document IDs returned by the first
query:

   ...[ ... and (DocId = "04007026" or DocId = "12480279" or ... )] ...

but that's clearly not the most elegant solution.  Similar cases are
presented for exclusions ("which documents in the repository match these
criteria, excluding the list of documents I got when I submitted the
same query last month?") or unions.

We could come up with our own private solution to this, of course, but
do we really want to have every project on the planet which does this
sort of XQL querying to come up with a different syntax?  Is there a
later XQL draft than the one I've found (August of last year) which
addresses this issue more satisfactorily, or have others on this list
wrestled with this problem?

-- 
Bob Kline
mailto:bkline at rksystems.com
http://www.rksystems.com




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/ or CD-ROM/ISBN 981-02-3594-1
Unsubscribe by posting to majordom at ic.ac.uk the message
unsubscribe xml-dev  (or)
unsubscribe xml-dev your-subscribed-email at your-subscribed-address

Please note: New list subscriptions now closed in preparation for transfer to OASIS.





More information about the Xml-dev mailing list