ABSTRACT
Query containment has been studied extensively for fragments of XPath 1.0. For instance, the problem is known to be ExpTime-complete for CoreXPath, the navigational core of XPath 1.0. Much less is known about query containment in (fragments of) the richer language XPath 2.0. In this paper, we consider extensions of CoreXPath with the following operators, which are all part of XPath 2.0 (except the last): path intersection, path equality, path complementation, for-loops, and transitive closure. For each combination of these operators, we determine the complexity of query containment, both with and without DTDs. It turns out to range from ExpTime (for extensions with path equality) and 2-ExpTime (for extensions with path intersection) to non-elementary (for extensions with path complementation or for-loops). In almost all cases, adding transitive closure on top has no further impact on the complexity. We also investigate the effect of dropping the upward and/or sibling axes, and show that this sometimes leads to a reduction in complexity.Since the languages we study include negation and conjunction infilters, our complexity results can equivalently be stated in terms ofsatisfiability.We also analyze the above languages in terms of succinctness.
Supplemental Material
- M. Benedikt, W. Fan, and F. Geerts. XPath satisfiability in the presence of DTDs. In Proc. of PODS 2005, pages 25--36. ACM Press, 2005. Google ScholarDigital Library
- M. Benedikt, W. Fan, and G. M. Kuper. Structural properties of XPath fragments. Theoretical Computer Science, 336(1):3--31, 2005. Google ScholarDigital Library
- A. K. Chandra, D. C. Kozen, and L. J. Stockmeyer. Alternation. Journal of the ACM, 28(1):114--133, 1981. Google ScholarDigital Library
- A. Deutsch and V. Tannen. Containment and integrity constraints for XPath fragments. In Proc. of KRDB 2001, volume 45 of CEUR Workshop Series. 2001.Google Scholar
- K. Etessami, M. Y. Vardi, and T. Wilke. First order logic with two variables and unary temporal logic. Information and computation, 179(2):279--295, 2002. Google ScholarDigital Library
- W. Fan, F. Geerts, X. Jia, and A. Kementsietsidis. Rewriting regular XPath queries on XML views. In Proc. of ICDE 2007, 2007.Google ScholarCross Ref
- G. Gottlob and C. Koch. Monadic queries over tree-structured data. In Proc. of LICS 2002, pages 189--202. IEEE Computer Society, 2002. Google ScholarDigital Library
- G. Gottlob, C. Koch, R. Pichler, and L. Segoufin. The complexity of XPath query evaluation and XML typing. Journal of the ACM, 52(2):284--335, 2005. Google ScholarDigital Library
- G. Gottlob, C. Koch, and K. U. Schulz. Conjunctive queries over trees. In Proc. of PODS 2004, pages 189--200. ACM Press, 2004. Google ScholarDigital Library
- M. Grohe and N. Schweikardt. The succinctness of first-order logic on linear orders. Logical Methods in Computer Science, 1(1), 2005. Google ScholarDigital Library
- B. C. Hammerschmidt, M. Kempa, and V. Linnemann. On the intersection of XPath expressions. In Proc. of IDEAS 2005, 2005. Google ScholarDigital Library
- J. Hidders. Satisfiability of XPath expressions. In Proc. of DBPL, pages 21--36, 2003.Google Scholar
- R. E. Ladner. The computational complexity of provability in systems of modal propositional logic. SIAM Journal of Computing, 6(3):467--480, 1977.Google ScholarDigital Library
- M. Lange and C. Lutz. 2-ExpTime lower bounds for propositional dynamic logics with intersection. Journal of Symbolic Logic, 70(5):1072--1086, 2005.Google ScholarCross Ref
- W. Martens, F. Neven, T. Schwentick, and G. Bex. Expressiveness and complexity of XML Schema. ACM Transactions on Database Systems 31(3):770--813, 2006. Google ScholarDigital Library
- M. Marx. XPath with conditional axis relations. In Proc. of EDBT 2004, volume 2992 of LNCS. Springer, 2004.Google Scholar
- M. Marx. Conditional XPath. ACM Transactions on Database Systems, 30(4):929--959, 2005. Google ScholarDigital Library
- M. Marx and M. de Rijke. Semantic characterizations of navigational XPath. ACM SIGMOD Record, 34(2):41--46, 2005. Google ScholarDigital Library
- G. Miklau and D. Suciu. Containment and equivalence for an XPath fragment. In Proc. of PODS 2002, pages 65--76. ACM Press, 2002. Google ScholarDigital Library
- M. Murata, D. Lee, M. Mani, and K. Kawaguchi. Taxonomy of XML schema languages using formal language theory. ACM Transactions on Internet Technology 5(4):660--704, 2005. Google ScholarDigital Library
- F. Neven and T. Schwentick. On the complexity of XPath containment in the presence of disjunction, DTDs and variables. Logical Methods in Computer Science, 2:1--30, 2006.Google ScholarCross Ref
- D. Olteanu, H. Meuss, T. Furche, and F. Bry. XPath: Looking forward. In Proc. of XMLDM 2002, pages 109--127. Springer Verlag, 2002. Google ScholarDigital Library
- T. Schwentick. XPath query containment. ACM SIGMOD Record, 33(1):101--109, 2004. Google ScholarDigital Library
- L. J. Stockmeyer. The Complexity of Decision Problems in Automata Theory. PhD thesis, Department of Electrical Engineering, MIT, 1974.Google Scholar
- B. ten Cate. The expressivity of XPath with transitive closure. In Proc. of PODS 2006, pages 328--337. ACM Press, 2006. Google ScholarDigital Library
- B. ten Cate and M. Marx. Axiomatizing the logical core of XPath 2.0. In Proc. of ICDT 2007, 2007. Google ScholarDigital Library
- M. Vardi. Reasoning about the past with two-way automata. In Proc. of ICALP 1998, volume 1443 of LNCS, pages 628--641. Springer, 1998. Google ScholarDigital Library
- P. T. Wood. Containment for XPath fragments under DTD constraints. In Proc. of ICDT 2003, pages 300--314, 2003. Google ScholarDigital Library
Index Terms
- The complexity of query containment in expressive fragments of XPath 2.0
Recommendations
The complexity of query containment in expressive fragments of XPath 2.0
XPath is a prominent W3C standard for navigating XML documents that has stimulated a lot of research into query answering and static analysis. In particular, query containment has been studied extensively for fragments of the 1.0 version of this ...
XPath satisfiability in the presence of DTDs
We study the satisfiability problem associated with XPath in the presence of DTDs. This is the problem of determining, given a query p in an XPath fragment and a DTD D, whether or not there exists an XML document T such that T conforms to D and the ...
Satisfiability of simple xpath fragments in the presence of dtds
WIDM '09: Proceedings of the eleventh international workshop on Web information and data managementFor an XPath expression q and a DTD D, q is satisfiable under D if there exists an XML document t such that t is valid against D and that the answer of q on t is nonempty. Evaluating an unsatisfiable XPath expression is meaningless, since such an ...
Comments