Abstract:This paper addresses the semi-structured query rewriting problem for TSL (tree specification language), a language for querying semi-structured data. An algorithm that can find the maximally-contained rewriting query is presented, when a semi-structured query and a set of semi-structured views are given. The idea is borrowed from MiniCon, a scalable relational query rewriting algorithm, and some new problems for semi-structured query rewriting, e.g., object-id dependency and set value variable mapping, are solved. It is shown that the algorithm is correct.