Fw: XML query language
Oren Ben-Kiki
oren at capella.co.il
Tue Mar 30 17:18:45 BST 1999
Paul Janssens <paul.janssens at skynet.be> wrote:
>In my opinion, an xml query language should only describe a set of
>equations, an xml query language implementation should only solve these
>equations, and whatever is done with the result is NO business of the
>query language.
Just to make sure I follow: you'd prefer that there would be a standard
<xql:result> DTD, so that results would always be created in an XML format
containing references to the matched XML elements (XLink/XPointer?). The
user would then filter this through XSL or whatever to display the results.
Nice separation of concerns, but I see several objections:
- Efficiency. Suppose I'm querying a very large DB, and I'm getting a list
of matches scattered all over the place. In the current approach, the DB
would both resolve the matches and extract the necessary data, potentially
at the same pass using a lot of locality-of-reference optimizations. In your
method a second tool would re-fetch the references in a second phase, which
would probably double the cost of doing the query.
- Power. Assume that I hypnotize all the W3C members to adopt the XSL
transformational part as XQL version 1.0 :-) This is more powerful then
current ?QL proposals because it allows for an <xsl:template> to call
<xsl:apply-templates> - that is, to perform nested queries (and therefore,
BTW, offers a natural way to do joins without variables, and solves other
?QL problems). All this works because XSL has a rich language for
constructing the results. In your approach, you won't be able to do a lot of
that; you'd end up adding special constructs for them, duplicating XSL's
capabilities in an incompatible language. Of course you'd be in good
company - that is what all the other ?QL language proposals do :-)
- Convenience. It is easier to specify a query as just "one thing" instead
of two. Note that even if ?QL == XSL transformation, it still makes a lot of
sense to filter its results through another XSL stylesheet for presentation
in most cases. Even lazy users will do so - if, for example, they had
already available XSL sheets for displaying certain types of results.
So all in all I prefer my approach: XQL = XSL - FO.
Share & Enjoy,
Oren Ben-Kiki
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