RE: [transquery-discuss] Aggregate Functions and Closure

From: Evan Lenz (elenz@xyzfind.com)
Date: Tue Dec 04 2001 - 17:37:13 CET


Hi Dan,

The issues you raise relate to "best practices", whether in the context of
XQuery or XSLT. I think these will be important issues to address when
people actually implement and start using any XML query language over
relational data. However, for the purposes of TransQuery, they are, strictly
speaking, out of scope.

To answer your question about the tabular nature of results in the online
demo, I'll say that sample data, the query descriptions (in prose), and the
expected result of each query were all taken directly from the W3C XML Query
Use Cases working draft[1]. Part of the demo's intent was to provide XSLT
1.0 solutions to the XML Query Use Cases as a way of defending XSLT 1.0's
viability as a query language. The intent was also, of course, to show the
usefulness and simplicity of the TransQuery input parameter.

Evan Lenz

[1] http://www.w3.org/TR/xmlquery-use-cases

> -----Original Message-----
> From: Dan Diebolt [mailto:dandiebolt@yahoo.com]
> Sent: Tuesday, December 04, 2001 3:47 AM
> To: transquery-discuss@lists.oasis-open.org
> Subject: [transquery-discuss] Aggregate Functions and Closure
>
>
> I wanted to inquire about TransQuery's approach to aggregate
> functions and the general handling of closure.
>
> The expected results from the majority of queries in Use Case "R" -
> (Access to Relational Data) return some type of XML table with
> representation for rows/tuples/records. For example, the expected
> result for Q4 (List item numbers and descriptions of items that
> have no bids) is as follows:
>
> <result>
> <no_bid_item>
> <itemno>1005</itemno>
> <description>Tennis Racket</description>
> </no_bid_item>
> <no_bid_item>
> <itemno>1006</itemno>
> <description>Helicopter</description>
> </no_bid_item>
> <no_bid_item>
> <itemno>1008</itemno>
> <description>Broken Bicycle</description>
> </no_bid_item>
> </result>
>
> This result clearly has table structure:
>
> itemno | description
> -------+---------------
> 1005 | Tennis Racket
> 1006 | Helicopter
> 1008 | Broken Bicycle
>
> However, Q7 (Find the highest bid ever made for a bicycle or tricycle)
> requires aggregation and its expected result is non-tabular:
>
> <high_bid><bid>225</bid></high_bid>
>
> I suppose you could make it tabular but wrapping it with <result>:
>
> <result><high_bid><bid>225</bid></high_bid></result>
>
> For *relational* queries, should TransQuery have a convention for closure
> of always returning a table-like XML structure or an just an
> arbitrary XML
> fragment? I can see a lot of benefits to insuring a table like structure
> is returned in terms of styling the result into a displayable <table>.
>
> What are peoples views on this?
>
> __________________________________________________
> Do You Yahoo!?
> Buy the perfect holiday gifts at Yahoo! Shopping.
> http://shopping.yahoo.com
>



This archive was generated by hypermail 2.1.4 : Fri Feb 22 2002 - 11:35:58 CET