XPath with Conditional Axis Relations

  • Maarten Marx
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2992)

Abstract

This paper is about the W3C standard node-addressing language for XML documents, called XPath. XPath is still under development. Version 2.0 appeared in 2001 while the theoretical foundations of Version 1.0 (dating from 1998) are still being widely studied. The paper aims at bringing XPath to a “stable fixed point” in its development: a version which is expressively complete, still manageable computationally, with a user-friendly syntax and a natural semantics. We focus on an important axis relation which is not expressible in XPath 1.0 and is very useful in practice: the conditional axis. With it we can express paths specified by for instance “do a child step, while test is true at the resulting node”. We study the effect of adding conditional axis relations to XPath on its expressive power and the complexity of the query evaluation and query equivalence problems. We define an XPath dialect \(\mathcal{X}\)CPath which is expressively complete, has a linear time query evaluation algorithm and for which query equivalence given a DTD can be decided in exponential time.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Abiteboul, S., Buneman, P., Suciu, D.: Data on the web. Morgan Kaufman, San Francisco (2000)Google Scholar
  2. 2.
    Alechina, N., Demri, S., de Rijke, M.: A modal perspective on path constraints. Journal of Logic and Computation 13, 1–18 (2003)CrossRefGoogle Scholar
  3. 3.
    Alechina, N., Immerman, N.: Reachability logic: An efficient fragment of transitive closure logic. Logic Journal of the IGPL 8(3), 325–337 (2000)MATHCrossRefMathSciNetGoogle Scholar
  4. 4.
    Benedikt, M., Fan, W., Kuper, G.: Structural properties of XPath fragments. In: Calvanese, D., Lenzerini, M., Motwani, R. (eds.) ICDT 2003. LNCS, vol. 2572, pp. 79–95. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  5. 5.
    Berwick, R., Weinberg, A.: The Grammatical Basis of Natural Languages. MIT Press, Cambridge (1984)Google Scholar
  6. 6.
    Blackburn, P., Gaiffe, B., Marx, M.: Variable free reasoning on finite trees. In: Proceedings of Mathematics of Language (MOL–8), Bloomington (2003)Google Scholar
  7. 7.
    Calvanese, D., De Giacomo, G., Lenzerini, M.: Representing and reasoning on XML documents: A description logic approach. J. of Logic and Computation 9(3), 295–318 (1999)MATHCrossRefGoogle Scholar
  8. 8.
    Clarke, E.M., Schlingloff, B.-H.: Model checking. Elsevier Science Publishers, Amsterdam (to appear)Google Scholar
  9. 9.
    Deutsch, A., Tannen, V.: Containment of regular path expressions under integrity constraints. In: Knowledge Representation Meets Databases (2001)Google Scholar
  10. 10.
    Doner, J.: Tree acceptors and some of their applications. J. Comput. Syst. Sci. 4, 405–451 (1970)MathSciNetCrossRefGoogle Scholar
  11. 11.
    Clarke, E.M., Emerson, E.A.: Design and Synthesis of Synchronization Skeletons using Branching Time Temporal Logic. In: Kozen, D. (ed.) Logic of Programs 1981. LNCS, vol. 131, pp. 52–71. Springer, Heidelberg (1982)CrossRefGoogle Scholar
  12. 12.
    Fisher, M., Ladner, R.: Propositional dynamic logic of regular programs. J. Comput. Syst. Sci. 18(2), 194–211 (1979)CrossRefGoogle Scholar
  13. 13.
    Gabbay, D.M., Hodkinson, I., Reynolds, M.: Temporal Logic. Mathematical Foundations and Computational Aspects, vol. 1. Oxford Science Publications (1994)Google Scholar
  14. 14.
    Gabbay, D.M., Pnueli, A., Shelah, S., Stavi, J.: On the temporal analysis of fairness. In: Proc. 7th ACM Symposium on Principles of Programming Languages, pp. 163–173 (1980)Google Scholar
  15. 15.
    Gottlob, G., Koch, C., Pichler, R.: Efficient algorithms for processing XPath queries. In: Proc. of the 28th International Conference on Very Large Data Bases (VLDB 2002) (2002)Google Scholar
  16. 16.
    Gottlob, G., Koch, C., Pichler, R.: The complexity of XPath query evaluation. In: PODS 2003, pp. 179–190 (2003)Google Scholar
  17. 17.
    Gottlob, G., Koch, C.: Monadic queries over tree-structured data. In: Proc. LICS, Copenhagen (2002)Google Scholar
  18. 18.
    Harel, D.: Dynamic logic. In: Gabbay, D.M., Guenther, F. (eds.) Handbook of Philosophical Logic, vol. 2, pp. 497–604. Reidel, Dordrecht (1984)Google Scholar
  19. 19.
    Harel, D., Kozen, D., Tiuryn, J.: Dynamic Logic. MIT Press, Cambridge (2000)MATHGoogle Scholar
  20. 20.
    Johnson, D.: A catalog of complexity classes. In: van Leeuwen, J. (ed.) Handbook of Theoretical Computer Science, vol. B, pp. 67–161. Elsevier, Amsterdam (1990)Google Scholar
  21. 21.
    Kamp, J.A.W.: Tense Logic and the Theory of Linear Order. PhD thesis, University of California, Los Angeles (1968)Google Scholar
  22. 22.
    Kozen, D.: Results on the propositional mu-calculus. Th. Comp. Science 27 (1983)Google Scholar
  23. 23.
    Kozen, D.: Kleene algebra with tests. ACM Transactions on Programming Languages and Systems 19(3), 427–443 (1997)CrossRefGoogle Scholar
  24. 24.
    Marx, M.: XCPath, the expressively complete XPath fragment. Manuscript (July 2003)Google Scholar
  25. 25.
    Miklau, G., Suciu, D.: Containment and equivalence for an XPath fragment. In: Proc. PODS 2002, pp. 65–76 (2002)Google Scholar
  26. 26.
    Neven, F., Schwentick, T.: XPath containment in the presence of disjunction, DTDs, and variables. In: Calvanese, D., Lenzerini, M., Motwani, R. (eds.) ICDT 2003. LNCS, vol. 2572, pp. 312–326. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  27. 27.
    Papadimitriou, C.: Computational Complexity. Addison-Wesley, Reading (1994)MATHGoogle Scholar
  28. 28.
    Pratt, V.: Models of program logics. In: Proceedings FoCS, pp. 115–122 (1979)Google Scholar
  29. 29.
    Rabin, M.: Decidability of second order theories and automata on infinite trees. Transactions of the American Mathematical Society 141, 1–35 (1969)MATHMathSciNetGoogle Scholar
  30. 30.
    Reinhardt, K.: The complexity of translating logic to finite automata. In: Grädel, E., Thomas, W., Wilke, T. (eds.) Automata, Logics, and Infinite Games. LNCS, vol. 2500, pp. 231–238. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  31. 31.
    Rogers, J.: A descriptive approach to language theoretic complexity. CSLI Press, Stanford (1998)MATHGoogle Scholar
  32. 32.
    Thomas, W.: Logical aspects in the study of tree languages. In: Courcelle, B. (ed.) Ninth Colloquium on Trees in Algebra and Programming, pp. 31–50. CUP, Cambridge (1984)Google Scholar
  33. 33.
    Vardi, M.Y., Wolper, P.: Automata-theoretic techniques for modal logics of programs. Journal of Computer and System Sciences 32, 183–221 (1986)MATHCrossRefMathSciNetGoogle Scholar
  34. 34.
    Wadler, P.: Two semantics for XPath. Technical report, Bell Labs (2000)Google Scholar
  35. 35.
    Weyer, M.: Decidability of S1S and S2S. In: Grädel, E., Thomas, W., Wilke, T. (eds.) Automata, Logics, and Infinite Games. LNCS, vol. 2500, pp. 207–230. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  36. 36.
    Wood, P.: On the equivalence of XML patterns. In: Palamidessi, C., Moniz Pereira, L., Lloyd, J.W., Dahl, V., Furbach, U., Kerber, M., Lau, K.-K., Sagiv, Y., Stuckey, P.J. (eds.) CL 2000. LNCS (LNAI), vol. 1861, pp. 1152–1166. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  37. 37.
    W3C. Extensible markup language (XML) 1.0, http://www.w3.org/TR/REC-xml
  38. 38.
    W3C. XML path language (XPath 1.0), http://www.w3.org/TR/xpath.html
  39. 39.
    W3C. XML path language (XPpath 2.0), http://www.w3.org/TR/xpath20/
  40. 40.
    W3C. XML schema part 1: Structures, http://www.w3.org/TR/xmlschema-1
  41. 41.
    W3C. Xquery 1.0: A query language for XML, http://www.w3.org/TR//xquery/
  42. 42.
    W3C. XSL transformations language XSLT 2.0, http://www.w3.org/TR/xslt20/

Copyright information

© Springer-Verlag Berlin Heidelberg 2004

Authors and Affiliations

  • Maarten Marx
    • 1
  1. 1.Language and Inference Technology, ILLCUniversiteit van AmsterdamThe Netherlands

Personalised recommendations