Forward node-selecting queries over trees

Dan Olteanu
2007 ACM Transactions on Database Systems  
Node-selecting queries over trees lie at the core of several important XML languages for the Web, e.g., the node-selection language XPath, the query language XQuery and the transformation language XSLT. The main syntactic constructs of such queries are the backward predicates, e.g., ancestor and preceding, and the forward predicates, e.g., descendant and following. Forward predicates are included in the depth-first, left-to-right preorder relation associated with the input tree, whereas
more » ... predicates are included in the inverse of this preorder relation. This work is devoted to an expressiveness study of node-selecting queries with proven theoretical and practical applicability, especially in the field of query evaluation against XML streams. The main question it answers positively is whether for each input query with forward and backward predicates there exists an equivalent forward-only output query. This question is then positively answered for input and output queries of varying structural complexity, using LOGLIN and PSPACE reductions. Various existing applications based on the results of this work are reported, including query optimization and streamed evaluation.
doi:10.1145/1206049.1206052 fatcat:qqruq5qqvzc5rdgbgn7ry5ahyu