XPath with Conditional Axis Relations

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.

[1]  Gabriel M. Kuper,et al.  Structural properties of XPath fragments , 2003, Theor. Comput. Sci..

[2]  Diego Calvanese,et al.  Representing and Reasoning on XML Documents: A Description Logic Approach , 1999, J. Log. Comput..

[3]  Thomas Schwentick,et al.  XPath Containment in the Presence of Disjunction, DTDs, and Variables , 2003, ICDT.

[4]  Alasdair Urquhart,et al.  Temporal Logic , 1971 .

[5]  Mark Weyer Decidability of S1S and S2S , 2001, Automata, Logics, and Infinite Games.

[6]  Stephan Merz,et al.  Model Checking , 2000 .

[7]  James Rogers,et al.  A descriptive approach to language-theoretic complexity , 1998 .

[8]  J W Ballard,et al.  Data on the web? , 1995, Science.

[9]  John Doner,et al.  Tree Acceptors and Some of Their Applications , 1970, J. Comput. Syst. Sci..

[10]  Georg Gottlob,et al.  The complexity of XPath query evaluation , 2003, PODS.

[11]  Georg Gottlob,et al.  Monadic queries over tree-structured data , 2002, Proceedings 17th Annual IEEE Symposium on Logic in Computer Science.

[12]  Peter Øhrstrøm,et al.  Temporal Logic , 1994, Lecture Notes in Computer Science.

[13]  Georg Gottlob,et al.  Efficient Algorithms for Processing XPath Queries , 2002, VLDB.

[14]  Dexter Kozen,et al.  Kleene algebra with tests , 1997, TOPL.

[15]  Wolfgang Thomas Logical Aspects in the Study of Tree Languages , 1984, CAAP.

[16]  Maarten Marx,et al.  Variable free reasoning on finite trees , 2003 .

[17]  Pierre Wolper,et al.  Automata theoretic techniques for modal logics of programs: (Extended abstract) , 1984, STOC '84.

[18]  Vaughan R. Pratt,et al.  Models of program logics , 1979, 20th Annual Symposium on Foundations of Computer Science (sfcs 1979).

[19]  Maarten de Rijke,et al.  A Modal Perspective on Path Constraints , 2003, J. Log. Comput..

[20]  Richard E. Ladner,et al.  Propositional Dynamic Logic of Regular Programs , 1979, J. Comput. Syst. Sci..

[21]  P. Wadler Two semantics for XPath , 2000 .

[22]  M. Rabin Decidability of second-order theories and automata on infinite trees , 1968 .

[23]  Johan Anthory Willem Kamp,et al.  Tense logic and the theory of linear order , 1968 .

[24]  Saharon Shelah,et al.  On the temporal analysis of fairness , 1980, POPL '80.

[25]  David S. Johnson,et al.  A Catalog of Complexity Classes , 1991, Handbook of Theoretical Computer Science, Volume A: Algorithms and Complexity.

[26]  Klaus Reinhardt,et al.  The Complexity of Translating Logic to Finite Automata , 2001, Automata, Logics, and Infinite Games.

[27]  Peter T. Wood,et al.  On the Equivalence of XML Patterns , 2000, Computational Logic.

[28]  Dan Suciu,et al.  Containment and equivalence for an XPath fragment , 2002, PODS.

[29]  Dexter Kozen,et al.  RESULTS ON THE PROPOSITIONAL’p-CALCULUS , 2001 .

[30]  Neil Immerman,et al.  Reachability Logic: An Efficient Fragment of Transitive Closure Logic , 2000, Log. J. IGPL.

[31]  C. M. Sperberg-McQueen,et al.  Extensible markup language , 1997 .