This paper proposes an extension to the XQuery language to solve the problem of positional grouping: that is, problems in which it is necessary to convert a flat sequence into a hierarchy by recognizing patterns in the sequence of items. Positional grouping is contrasted with value-based grouping, where the allocation of items to groups is based on common values rather than on the positional relationships of the items in the sequence. The approach is based on analyzing a set of use cases, derived from real-world experience. Categories and Subject Descriptors D.3.3 [Programming Languages]: Language Contructs and Features – data types and structures General Terms Algorithms, Standardization, Languages. Keywords XML, XQuery, grouping.
Michael H. Kay