[xquery-talk] xquery 3.1 wishlist

daniela florescu dflorescu at me.com
Fri Jun 26 09:10:22 PDT 2015

> Sorry, what I meant is: how did sequences come into XPath? Was it borrowed from another system or did it appear first in XPath?

Hi Wouter,

languages that work on sequences there are plenty in programming languages, especially function programming languages: e..g. Lisp !?, ML !?
(head(), tail() ? :-)

But your question is about the history of XQuery. Here it is.

In the XQuery per se, the data model based on sequences appeared around 1999-2000, even before we started joint activity with the XSLT working group,
 and even before XQuery decided to use XPath for navigation. 

It was the decision of the entire working group, obviously.

The editors of the Data Model at that time  — and they both did a huge contribution to the guidance and cleaning up the
opinions in the XQuery WG —  were Mary Fernandez (ATT Research and Denise Draper (now at Microsoft).

But you have to understand that the composition at that time of the XQuery Working group was VERY different then it is now.

There were many people with a very strong functional languages background: Mary Fernandez, Phuil Wadler (of Haskell fame), Denise Draper.
Sequences are very normal to them because of Lisp.

There were many people with a database background: Don Chamberlin (of SQL fame), Jonathan Robie, Jim Melton, etc
For the database community iteration over sequences is the bread and butter of any database runtime (the famous iterator model,
see http://bnrg.cs.berkeley.edu/~adj/cs262/papers/graefe.pdf <http://bnrg.cs.berkeley.edu/~adj/cs262/papers/graefe.pdf>), so again this came naturally to them.

And then there were people with one foot in the functional community and one foot in the database community, like me and Jerome Simeon
(IBM) : we both implemented OQL as part of our PhDs - the object oriented query language https://en.wikipedia.org/wiki/Object_Query_Language <https://en.wikipedia.org/wiki/Object_Query_Language>)

OQL is a functional query language, which greatly influenced the design of XQuery.

Both me and Jerome learned from implementing  OQL that the basic type system of OQL was WAY too complicated: it had sets, bags and lists.

Optimizing that thing was a nightmare. So was understanding the semantics. 

So both of us pushed for the simplification of the data model.

The single common denominator for sets, bags and lists are: lists. With lists you can implement the others but not the other way around.


So, here you got the sequences.

I think the other decision : make a single item behave the same as a sequence with one item came after we started working with Path, as it was
already embedded in the XPath semantics.

Hope that helps,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://x-query.com/pipermail/talk/attachments/20150626/81de88da/attachment.html>

More information about the talk mailing list