- From: Zack Ives <zives@cs.washington.edu>
- Date: Sun, 17 Jun 2001 16:37:39 -0700
- To: <www-xml-query-comments@w3.org>
I'd like to suggest the addition of another class of use cases related to the web and data integration. Currently, the use cases assume that XML content is coming from a document at a particular, predefined URI. Considering that an important application of XML is integration of data in existing data sources, it seems likely that we will want to query over not only predefined views, but also *dynamically generated* requests. The concept is basically analogous to "binding patterns" in relational data integration: if we want to integrate bookseller data, we can't actually get a list of books and data directly from Amazon and Barnes and Noble. Instead, we need to get a list of books or authors from another table, and for each of these, we essentially send a query to our favorite bookstore and get back the related information. This is a basic capability of most data integration systems. I would like to see something similar in XQuery: a query should be able to dynamically generate requests based on its current bound variables. In fact, this seems to already be possible in the current XQuery syntax -- in a more powerful form than in the original binding-pattern context[1]. For example, Q1 of Use Case XMP might be changed to the following: <bib> { FOR $pub IN document("http://my.com/publishers.xml")/publishers/name/data() RETURN <publisher name={ $pub }> { FOR $b IN document("http://www.bn.com/find?publisher=" + $pub)/bib/book WHERE $b/@year > 1991 RETURN <book year={ $b/@year }> { $b/title } </book> } </publisher> } </bib> if www.bn.com were accessible through a CGI that needed an input "publisher" parameter in order to return results. We've provided an input binding within the document URI. This example allows the XQuery to invoke a GET-style CGI (one that takes its parameters in the URI) by modifying the document URI. To this point, no one has explicitly mentioned that this style of query is legal, but it's not disallowed either. I'm hoping it can be officially endorsed as a use case. However, I'd suggest going further -- XQuery should allow for dynamic invocation of subqueries via: * GET-style CGI, as mentioned above * POST-style CGI (the other common web form interface) * SOAP request (thus XQueryX, XForms, etc.) * etc. We could use string concatenation to build query requests within an XQuery, then submit those queries to data providers. This could simply involve the addition of a new function to the standard XQuery library -- perhaps "query(URI,query_string)" where the URI has a prefix specifying the protocol. I'd appreciate it if the Working Group could consider extending the use cases along this direction. Best regards, Zack [1] The XQuery extension is more powerful than binding patterns because one can compose an arbitrary URI -- different "tables" and the input values can be specified -- in the XQuery case. Binding patterns are value assignments within the scope of a single table, rather than separate queries.
Received on Sunday, 17 June 2001 19:37:48 UTC