Conditional XPath

XPath 1.0 is a variable free language designed to specify paths between nodes in XML documents. Such paths can alternatively be specified in first-order logic. The logical abstraction of XPath 1.0, usually called Navigational or Core XPath, is not powerful enough to express every first-order definable path. In this article, we show that there exists a natural expansion of Core XPath in which every first-order definable path in XML document trees is expressible. This expansion is called Conditional XPath. It contains additional axis relations of the form (child::n[F])+, denoting the transitive closure of the path expressed by child::n[F]. The difference with XPath's descendant::n[F] is that the path (child::n[F])+ is conditional on the fact that all nodes in between the start and end node of the path should also be labeled by n and should make the predicate F true. This result can be viewed as the XPath analogue of the expressive completeness of the relational algebra with respect to first-order logic.

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

[2]  Kousha Etessami,et al.  First-Order Logic with Two Variables and Unary Temporal Logic , 2002, Inf. Comput..

[3]  Moshe Y. Vardi Why is Modal Logic So Robustly Decidable? , 1996, Descriptive Complexity and Finite Models.

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

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

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

[7]  E. F. Codd,et al.  Relational Completeness of Data Base Sublanguages , 1972, Research Report / RJ / IBM / San Jose, California.

[8]  Steven J. DeRose,et al.  XML Path Language (XPath) Version 1.0 , 1999 .

[9]  M. de Rijke,et al.  A Proof System for Finite Trees , 1995, CSL.

[10]  Moshe Y. Vardi On the complexity of bounded-variable queries (extended abstract) , 1995, PODS '95.

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

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

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

[14]  Jerzy Tiuryn,et al.  Dynamic logic , 2001, SIGA.

[15]  A. Tarski,et al.  A Formalization Of Set Theory Without Variables , 1987 .

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

[17]  Georg Gottlob,et al.  Conjunctive queries over trees , 2004, JACM.

[18]  M. de Rijke,et al.  Semantic characterizations of navigational XPath , 2005, SGMD.

[19]  Moshe Y. Vardi On the Complexity of Bounded-Variable Queries. , 1995, PODS 1995.

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

[21]  M. Kracht Tools and Techniques in Modal Logic , 1999 .

[22]  Thomas Schwentick On Diving in Trees , 2000, MFCS.

[23]  Thomas Schwentick,et al.  Expressive and efficient pattern languages for tree-structured data (extended abstract) , 2000, PODS '00.

[24]  Adi Palm,et al.  Transforming tree constraints into formal grammars - the expressivity of tree languages , 1997, DISKI.

[25]  Kousha Etessami,et al.  First-Order Logic with Two Variables and Unary Temporal Logic , 1997 .

[26]  Richard Spencer-Smith,et al.  Modal Logic , 2007 .

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

[28]  Wolfgang Thomas,et al.  Ehrenfeucht Games, the Composition Method, and the Monadic Theory of Ordinal Words , 1997, Structures in Logic and Computer Science.

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

[30]  Georg Gottlob,et al.  Monadic datalog and the expressive power of languages for web information extraction , 2002, JACM.

[31]  Neil Immerman Upper and lower bounds for first order expressibility , 1980, 21st Annual Symposium on Foundations of Computer Science (sfcs 1980).

[32]  Bernhard Beckert,et al.  Dynamic Logic , 2007, The KeY Approach.

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

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

[35]  Marcus Kracht Inessential Features , 1996, LACL.

[36]  Jörg Flum,et al.  Finite model theory , 1995, Perspectives in Mathematical Logic.

[37]  Yde Venema,et al.  Dynamic Logic by David Harel, Dexter Kozen and Jerzy Tiuryn. The MIT Press, Cambridge, Massachusetts. Hardback: ISBN 0–262–08289–6, $50, xv + 459 pages , 2002, Theory and Practice of Logic Programming.

[38]  Dov M. Gabbay,et al.  Temporal logic (vol. 1): mathematical foundations and computational aspects , 1994 .

[39]  Martin Grohe,et al.  The complexity of first-order and monadic second-order logic revisited , 2002, Proceedings 17th Annual IEEE Symposium on Logic in Computer Science.

[40]  Tim Furche,et al.  XPath: Looking Forward , 2002, EDBT Workshops.

[41]  Holger Schlingloff Expressive completeness of temporal logic of trees , 1992, J. Appl. Non Class. Logics.

[42]  Gerhard Weikum,et al.  ACM Transactions on Database Systems , 2005 .

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

[44]  Maarten Marx,et al.  XPath with Conditional Axis Relations , 2004, EDBT.

[45]  Pablo Barceló,et al.  Temporal logics over unranked trees , 2005, 20th Annual IEEE Symposium on Logic in Computer Science (LICS' 05).

[46]  Ashok K. Chandra,et al.  Optimal implementation of conjunctive queries in relational data bases , 1977, STOC '77.

[47]  Maarten Marx,et al.  First Order Paths in Ordered Trees , 2005, ICDT.

[48]  Maarten Marx,et al.  Conditional XPath, the first order complete XPath dialect , 2004, PODS.

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

[50]  A. Dawar FINITE MODEL THEORY (Perspectives in Mathematical Logic) , 1997 .

[51]  Alexander Moshe Rabinovich,et al.  Expressive Power of Temporal Logics , 2002, CONCUR.