<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><br class=""><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Sorry, what I meant is: how did sequences come into XPath? Was it borrowed from another system or did it appear first in XPath?</div></div></blockquote><br class=""></div><div><br class=""></div><div>Hi Wouter,</div><div><br class=""></div><div>languages that work on sequences there are plenty in programming languages, especially function programming languages: e..g. Lisp !?, ML !?</div><div>(head(), tail() ? :-)</div><div><br class=""></div><div>But your question is about the history of XQuery. Here it is.</div><div><br class=""></div><div>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,</div><div> and even before XQuery decided to use XPath for navigation. </div><div><br class=""></div><div>It was the decision of the entire working group, obviously.</div><div><br class=""></div><div>The editors of the Data Model at that time  — and they both did a huge contribution to the guidance and cleaning up the</div><div>opinions in the XQuery WG —  were Mary Fernandez (ATT Research and Denise Draper (now at Microsoft).</div><div><br class=""></div><div>But you have to understand that the composition at that time of the XQuery Working group was VERY different then it is now.</div><div><br class=""></div><div>There were many people with a very strong functional languages background: Mary Fernandez, Phuil Wadler (of Haskell fame), Denise Draper.</div><div>Sequences are very normal to them because of Lisp.</div><div><br class=""></div><div>There were many people with a database background: Don Chamberlin (of SQL fame), Jonathan Robie, Jim Melton, etc</div><div>For the database community iteration over sequences is the bread and butter of any database runtime (the famous iterator model,</div><div>see <a href="http://bnrg.cs.berkeley.edu/~adj/cs262/papers/graefe.pdf" class="">http://bnrg.cs.berkeley.edu/~adj/cs262/papers/graefe.pdf</a>), so again this came naturally to them.</div><div><br class=""></div><div>And then there were people with one foot in the functional community and one foot in the database community, like me and Jerome Simeon</div><div>(IBM) : we both implemented OQL as part of our PhDs - the object oriented query language <a href="https://en.wikipedia.org/wiki/Object_Query_Language" class="">https://en.wikipedia.org/wiki/Object_Query_Language</a>)</div><div><br class=""></div><div>OQL is a functional query language, which greatly influenced the design of XQuery.</div><div><br class=""></div><div>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.</div><div><br class=""></div><div>Optimizing that thing was a nightmare. So was understanding the semantics. </div><div><br class=""></div><div>So both of us pushed for the simplification of the data model.</div><div><br class=""></div><div>The single common denominator for sets, bags and lists are: lists. With lists you can implement the others but not the other way around.</div><div><br class=""></div><div>=========</div><div><br class=""></div><div>So, here you got the sequences.</div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div>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</div><div>already embedded in the XPath semantics.</div><div><br class=""></div><div>Hope that helps,</div><div>Dana</div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div><br class=""></div></body></html>